![]() |
![]()
| ![]() |
![]()
NAMEChemistry::Ring - Represent a ring as a substructure of a molecule SYNOPSISuse Chemistry::Ring; # already have a molecule in $mol... # create a ring with the first six atoms in $mol my $ring = Chemistry::Ring->new; $ring->add_atom($_) for $mol->atoms(1 .. 6); # find the centroid my $vector = $ring->centroid; # find the plane that fits the ring my ($normal, $distance) = $ring->plane; # is the ring aromatic? print "is aromatic!\n" if $ring->is_aromatic; # "aromatize" a molecule Chemistry::Ring::aromatize_mol($mol); # get the rings involving an atom (after aromatizing) my $rings = $mol->atoms(3)->attr('ring/rings'); DESCRIPTIONThis module provides some basic methods for representing a ring. A ring is a subclass of molecule, because it has atoms and bonds. Besides that, it has some useful geometric methods for finding the centroid and the ring plane, and methods for aromaticity detection. This module does not detect the rings by itself; for that, look at Chemistry::Ring::Find. This module is part of the PerlMol project, <http://www.perlmol.org/>. METHODS
EXPORTABLE SUBROUTINESNothing is exported by default, but you can export these subroutines explicitly, or all of them by using the ':all' tag.
VERSION0.20 SEE ALSOChemistry::Mol, Chemistry::Atom, Chemistry::Ring::Find, Math::VectorReal. AUTHORIvan Tubert-Brohman <itub@cpan.org> COPYRIGHTCopyright (c) 2009 Ivan Tubert-Brohman. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
|