Chemistry::MidasPattern

Select atoms in macromolecules
Download

Chemistry::MidasPattern Ranking & Summary

Advertisement

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

Chemistry::MidasPattern Tags


Chemistry::MidasPattern Description

Select atoms in macromolecules Chemistry::MidasPattern is a Perl module to select atoms in macromolecules.SYNOPSIS use Chemistry::MidasPattern; use Chemistry::File::PDB; # read a molecule my $mol = Chemistry::MacroMol->read("test.pdb"); # define a pattern matching carbons alpha and beta # in all valine residues my $str = ':VAL@CA,CB'; my $patt = Chemistry::MidasPattern->new($str); # apply the pattern to the molecule $patt->match($mol); # extract the results for my $atom ($patt->atom_map) { printf "%s %s ", $atom->attr("pdb/residue_name"), $atom->name; } printf "FOUND %d atoms ", scalar($patt->atom_map);This module partially implements a pattern matching engine for selecting atoms in macromolecules by using Midas/Chimera patterns. See http://www.cmpharm.ucsf.edu/~troyer/troff2html/midas/Midas-uh-3.html#sh-2.1 for a detailed description of this language.This module shares the same interface as Chemistry::Pattern; to perform a pattern matching operation on a molecule, follow these steps.1) Create a pattern object, by parsing a string. Let's assume that the pattern object is stored in $patt and that the molecule is $mol.2) Execute the pattern on the molecule by calling $patt->match($mol).3) If $patt->match() returns true, extract the "map" that relates the pattern to the molecule by calling $patt->atom_map. These method returns a list of the atoms in the molecule that are matched by the pattern. Thus $patt->atom_map(1) would be analogous to the $1 special variable used for regular expresion matching. The difference between Chemistry::Pattern and Perl regular expressions is that atoms are always captured, and that each atom always uses one "slot". Requirements: · Perl


Chemistry::MidasPattern Related Software