rings {ChemmineR} | R Documentation |
Identifies all possible rings in molecules using the exhaustive ring perception algorithm from Hanser et al (1996). In addition, the function can return all smallest possible rings as well as aromaticity information for each ring.
rings(x, upper = Inf, type = "all", arom = FALSE, inner = FALSE)
x |
|
upper |
allows to specify an upper length limit for ring predictions. The default setting |
type |
if |
arom |
if |
inner |
if |
...
The settings type="all"
and type="arom"
return lists
, and type="count"
returns a matrix
.
Thomas Girke
Hanser, Jauffret and Kaufmann (1996) A New Algorithm for Exhaustive Ring Perception in a Molecular Graph. Journal of Chemical Information and Computer Sciences, 36: 1146-1152. URL: http://pubs.acs.org/doi/abs/10.1021/ci960322f
...
## Instances of SDFset class data(sdfsample) sdfset <- sdfsample ## Return all possible rings for a single compound rings(sdfset[1], upper=Inf, type="all", arom=FALSE, inner=FALSE) plot(sdfset[1], print=FALSE, atomnum=TRUE, no_print_atoms="H") ## Return all possible rings for several compounds plus their ## aromaticity information rings(sdfset[1:4], upper=Inf, type="all", arom=TRUE, inner=FALSE) ## Return rings with no more than 6 atoms rings(sdfset[1:4], upper=6, type="all", arom=TRUE, inner=FALSE) ## Return rings with no more than 6 atoms that are also armomatic rings(sdfset[1:4], upper=6, type="arom", arom=TRUE, inner=FALSE) ## Return shortest possible rings (no complex rings) rings(sdfset[1:4], upper=Inf, type="all", arom=TRUE, inner=TRUE) ## Count shortest possible rings rings(sdfset[1:4], upper=Inf, type="count", arom=TRUE, inner=TRUE)