Chemistry::Reaction

Explicit chemical reactions
Download

Chemistry::Reaction Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Ivan Tubert-Brohman
  • Publisher web site:
  • http://search.cpan.org/~itub/

Chemistry::Reaction Tags


Chemistry::Reaction Description

Explicit chemical reactions The Chemistry::Reaction module, 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); }SYNOPSIS use 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 atoms; $i++) { $m{$s->atoms($i)} = $p->atoms($i); } my $r = Chemistry::Reaction->new($s, $p, \%m); Requirements: · Perl


Chemistry::Reaction Related Software