## Import a PDB file from the file system
protein <- makeExampleProtein()
## Reduce to minimal structure
protein.reduced <- AlexanderBriggs(protein$A)
## Compute the skein tree
tree <- skeinIterator(protein.reduced$points3D, protein.reduced$ends)
## Compute the HOMFLY polynomial
HOMFLYpolynomial(tree$leaves, tree$tree, skein.sign = -1)
Run the code above in your browser using DataLab