|
NAMEChemistry::Reaction - Explicit chemical reactionsSYNOPSISuse Chemistry::Reaction; use Chemistry::File::SMILES; my $s = Chemistry::Pattern->parse('C=CC=C.C=C', format=>'smiles'); my $p = Chemistry::Pattern->parse('C1=CCCCC1', format=>'smiles'); my %m; for (my $i = 1; $i <= $s->atoms; $i++) { $m{$s->atoms($i)} = $p->atoms($i); } my $r = Chemistry::Reaction->new($s, $p, \%m); DESCRIPTIONThis package, along with Chemistry::Pattern, provides an implementation of explicit chemical reactions.An explicit chemical reaction is a representation of the transformation that takes place in a given chemical reaction. In an explicit chemical reaction, a substrate molecule is transformed into a product molecule by breaking existing bonds and creating new bonds between atoms. The representation of an explicit chemical reaction is a molecule in which the order of a bond before the chemical reaction is distinguished from the order of the bond after the chemical reaction. Thus, the breaking of an existing bond is represented by one of the following before/after pairs: 3/2, 2/1, 1/0 (breaking of a single bond or reduce order by one) 3/1, 2/0 (breaking of a double bond or reduce order by two) 3/0 (breaking of a triple bond) The creation of a new bond is represented by one of the following before/after pairs: 0/1, 1/2, 2/3 (creation of a single bond or increase order by one) 0/2, 1/3 (creation of a double bond or increase order by two) 0/3 (creation of a triple bond) An explicit chemical reaction $react can be forward or reverse applied once to a molecule $mol at the first subgraph of $mol found which is isomorphic to the substrate or product of $react: my $subst = $react->substrate; if ($subst->match($mol)) { $react->forward($mol, $subst->atom_map); } Also, an explicit chemical reaction $react can be forward or reverse applied once to a molecule $mol at each subgraph of $mol which is isomorphic to the substrate or product of $react: my $subst = $react->substrate; my @products; while ($subst->match($mol)) { my $new_mol = $mol->clone; # start from a fresh molecule my @map = $subst->atom_map; # translate atom map to the clone my @m = map { $new_mol->by_id($_->id) } @map; $react->forward($new_mol, @m); push @products, $new_mol; } Furthermore, an explicit chemical reaction $react can be forward or reverse applied as long as possible to a molecule $mol at the first subgraph of $mol found which is isomorphic to the substrate or product of $react: my $subst = $react->substrate; while ($subst->match($mol)) { $react->forward($mol, $subst->atom_map); } METHODS
VERSION0.02SEE ALSOChemistry::Mol, Chemistry::Pattern, Chemistry::TutorialRosselló, F. and G. Valiente, Analysis of metabolic pathways by graph transformation, in: Proc. 2nd Int. Conf. Graph Transformation, Lecture Notes in Computer Science 3256 (2004), pp. 73--85. Rosselló, F. and G. Valiente, Chemical graphs, chemical reaction graphs, and chemical graph transformation, in: Proc. 2nd Int. Workshop on Graph-Based Tools, Electronic Notes in Theoretical Computer Science (2004), in press. The PerlMol website <http://www.perlmol.org/> AUTHORIvan Tubert-Brohman <itub@cpan.org> and Gabriel Valiente <valiente@lsi.upc.es>COPYRIGHTCopyright (c) 2004 Ivan Tubert-Brohman and Gabriel Valiente. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.POD ERRORSHey! The above document had some coding errors, which are explained below:
Visit the GSP FreeBSD Man Page Interface. |