Chemistry::Ring::Find
use Chemistry::Ring::Find ':all'; # find the smallest ring containing $atom my $ring = find_ring($atom); # find all the rings containing $bond my @rings = find_ring($bond, all => 1); # see below for more options
This module implements a simple breadth-first ring finding algorithm. It does not find all the rings in the structure; it only finds the rings that include a starting atom or bond. Future versions may find all the rings in the molecule, or perhaps the Smallest Set of Smallest Rings.
These functions may be exported explicitly, or all by using the :all tag, but nothing is exported by default.
Find the smallest ring containg $origin, which may be either an atom or a bond. Returns a Chemistry::Ring object. Options:
If true, find all the rings containing $origin. If false, return the first ring found. Defaults to false.
Only find rings with a the given minimum size. Defaults to zero.
Only find rings up to the given maximium size. Defaults to unlimited size.
Only find rings with this size. Same as setting min and max to the same size. Default: unspecified.
An array reference containing a list of atoms that must NOT be present in the ring. Defaults to the empty list.
If true, find each ring twice (forwards and backwards). Defaults to false.
Chemistry::Ring, Chemistry::Mol, Chemistry::Atom, Chemistry::Bond Math::VectorReal.
Ivan Tubert <itub@cpan.org>
Copyright (c) 2004 Ivan Tubert. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Chemistry::Ring, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Chemistry::Ring
CPAN shell
perl -MCPAN -e shell install Chemistry::Ring
For more information on module installation, please visit the detailed CPAN module installation guide.