# Compute the HOMFLY polynomial of a polygonal link

### Description

Compute the HOMFLY polynomial of a polygonal link, given its skein tree
(generated by `skeinIterator`

)

### Usage

1 | ```
HOMFLYpolynomial(leaves, tree, skein.sign = -1)
``` |

### Arguments

`leaves` |
a list containing the binary indices of the tree leaves |

`tree` |
a list containing the skein tree as
returned by |

`skein.sign` |
the skein sign to be used (+1 or -1) |

### Details

The polynomial computation relies on `rSymPy`

.
Please notice that the first time sympy is invoked is expected to be
much slower than subsequent ones.

### Value

the HOMFLY polynomial

### Note

This is a low-level function.

### Author(s)

Federico Comoglio, federico.comoglio@bsse.ethz.ch

### References

Freyd P, Yetter D, Hoste J, Lickorish WBR, Millett K, et al. (1985) A new polynomial invariant of knots and links. Bull Amer Math Soc (NS) 12: 239-246.

Kauffman, L. Knots and Physics. Teaneck, NJ: World Scientific, p. 19, 1991.

Comoglio F. and Rinaldi M. (2011) A Topological Framework for the Computation of the HOMFLY Polynomial and Its Application to Proteins PLoS ONE 6(4): e18693, doi:10.1371/journal.pone.0018693 ArXiv:1104.3405

### See Also

`HOMFLY2mirror`

,
`HOMFLY2Alexander`

,
`HOMFLY2Jones`

### Examples

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
## Not run:
## 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)
## End(Not run)
``` |