- SEE ALSO
- COPYRIGHT AND LICENSE
Bio::PDB::Structure - Perl module for parsing and manipulating Protein Databank (PDB) files
use Bio::PDB::Structure; $mol1= Bio::PDB::Structure::Molecule -> new; $mol2= Bio::PDB::Structure::Molecule -> new; $mol1 -> read("molecule.pdb",0); #read the first model $mol2 -> read("molecule.pdb",1); #read the second model $mol1b = $mol1 -> backbone; #create a list with the backbone of mol1 $mol2b = $mol2 -> backbone; #create a list with the backbone of mol2 @transform = $mol2b ->superpose($mol1b); #compute alignment of mol2 to mol1 $mol2 ->rotate_translate(@transform); #rotate and translate mol2 $rmsd = $mol2 -> rmsd($mol1); #compute the rmsd between mol2 and mol1 $mol2 -> print("new.pdb"); #save the molecule to a file
This module combines tools that are commonly used to analyze proteins and nucleic acids from a pdb file stuctures. The main benefits of using the module are its ability to parse and print out a pdb structure with minimum effort. However in addition to that it is possible to do structural alignments, RMSD calculations, atom editons, center of mass calculations, molecule editions and so forth. Both Atom objects and Molecule objects are defined within this module.
Get/set the atom's type
Get/set the atom's number
Get/set the atom's name
Get/set the atom's chain
Get/set the atom's residue number
Get/set the atom's residue name
Get/set the atom's x coordinate
Get/set the atom's y coordinate
Get/set the atom's z coordinate
Get/set the atom's occupancy
Get/set the atom's temperature factor
Get/set the atom's alternate location field
Get/set the atom's insertion code
Compute the distance between atom1 and atom2
Compute the angle in degrees sustended by atom1--atom2--atom3
Compute the dihedral in degrees sustended by atom1--atom2--atom3--atom4
models Bio::PDB::Structure::Molecule "file.pdb"
Return the number of models in a pdb file
Read the contents of file.pdb into a molecule. If a second numeric argument is specified it will read model (i+1) from the file (counting from zero).
Write the molecule to STDOUT when no argument is provided or to a file when an argument is provided.
Return the number of atoms contained in the molecule.
Return the atom located at position five (starting from zero).
Push atom object at the end of the molecule.
Return a molecule that only contains atoms with type ATOM
Retruns a molecule that only contains HETATM records
Returns a molecule with the alpha carbons
Returns a molecule with the backbone of a protein
Returns a molecule with the sidechains of a protein
Creates a molecule with a custom atom selection. The logical expression must use Perl's logical operators and the properties of atoms. For example to select all atoms from residue 50 onwards and only belonging to ALA residues on would use the logical expression: 'residue_number >= 50 && residue_name eq "ALA"'
Return an atom object that respresents the centroid for the given molecule.
Return an atom object that sits at the center of mass for the given molecule.
Translate the molecule as a rigid object by x,y,z.
Do a rigid rotation of the molecule using matrix u.
Apply a rotation matrix followed by a translation. To facilitate structural supperpositions.
Find the transformation that overlaps $object on to $reference. The resulting transformation is in the format @transformation= (@matrix,@vector). Molecules must have the same number of atoms.
Compute the RMSD between two molecules. The molecules must have the same number of atoms
Raul Alcantara Aragon, <firstname.lastname@example.org>
Copyright (C) 2012 by Raul Alcantara
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.12.3 or, at your option, any later version of Perl 5 you may have available.