![]() |
![]()
| ![]() |
![]()
NAMEChemistry::Pattern::Bond - A bond that knows how to match SYNOPSISmy $patt_bond = Chemistry::Pattern::Bond->new(order => 2); $patt_bond->test_sub( sub { my ($what, $where) = @_; $where->type eq 'purple' ? 1 : 0; # only match purple bonds }); DESCRIPTIONObjects of this class represent bonds in a pattern. This is a subclass of Chemistry::Bond. In addition to the properties of regular bonds, pattern bonds have a method for testing if they match an bond in a molecule. By default, a pattern bond matches an bond if they have the same bond order or both are aromatic. It is possible to substitute this by an arbitrary criterion by providing a custom test subroutine. METHODS
VERSION0.27 SEE ALSOChemistry::Pattern The PerlMol website <http://www.perlmol.org/> 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.
|