![]() |
![]()
| ![]() |
![]()
NAMEChemistry::Pattern::Atom - An atom that knows how to match SYNOPSISmy $patt_atom = Chemistry::Pattern::Atom->new(symbol => C); $patt_atom->test_sub( sub { my ($what, $where) = @_; $where->bonds == 3 ? 1 : 0; # only match atoms with three bonds }); DESCRIPTIONObjects of this class represent atoms in a pattern. This is a subclass of Chemistry::Atom. In addition to the properties of regular atoms, pattern atoms have a method for testing if they match an atom in a molecule. By default, a pattern atom matches an atom if they have the same symbol. 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.
|