Python: module src.protein

src.protein (13 May 2008) | index /Users/d3y382/workspaces/apbs-pdb2pqr/pdb2pqr/src/protein.py

`Routines for PDB2PQR
This module contains the protein object used in PDB2PQR and associated
methods
----------------------------
PDB2PQR -- An automated pipeline for the setup, execution, and analysis of
Poisson-Boltzmann electrostatics calculations
Copyright (c) 2002-2011, Jens Erik Nielsen, University College Dublin;
Nathan A. Baker, Battelle Memorial Institute, Developed at the Pacific
Northwest National Laboratory, operated by Battelle Memorial Institute,
Pacific Northwest Division for the U.S. Department Energy.;
Paul Czodrowski & Gerhard Klebe, University of Marburg.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the names of University College Dublin, Battelle Memorial Institute,
Pacific Northwest National Laboratory, US Department of Energy, or University
of Marburg nor the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------`

Modules
`` |  |
copy math | os string | sys |

Classes
`` |  | Protein
class Protein
`` | `Protein class The protein class represents the parsed PDB, and provides a hierarchy of information - each Protein contains a list of Chain objects as provided in the PDB file. Each Chain then contains its associated list of Residue objects, and each Residue contains a list of Atom objects, completing the hierarchy.`
| Methods defined here: __init__(self, pdblist, definition) `Initialize using parsed PDB file Parameters pdblist: List of Classes of PDB lines as created` createHTMLTypeMap(self, definition, outfilename) `Create an HTML typemap file at the desired location. If a type cannot be found for an atom a blank is listed. Parameters definition: The definition objects. outfilename: The name of the file to write (string)` createResidue(self, residue, resname) `Create a residue object. If the resname is a known residue type, try to make that specific object, otherwise just make a standard residue object. Parameters residue: A list of atoms (list) resname: The name of the residue (string) Returns: residue: The residue object (Residue)` getAtoms(self) `Return all Atom objects in list format Returns atomlist: List of Atom objects in the protein (list)` getChains(self) `Get the chains object Returns chains: The list of chains in the protein (chain)` getCharge(self) `Get the total charge on the protein NOTE: Since the misslist is used to identify incorrect charge assignments, this routine does not list the 3 and 5 termini of nucleic acid chains as having non-integer charge even though they are (correctly) non-integer. Returns: misslist: List of residues with non-integer charges (list) charge: The total charge on the protein (float)` getResidues(self) `Return the list of residues in the entire protein` getSummary(self) numAtoms(self) `Get the number of atoms for the entire protein(including multiple chains)` numResidues(self) `Get the number of residues for the entire protein (including multiple chains) Returns count: Number of residues in the protein (int)` printAtoms(self, atomlist, chainflag=False, pdbfile=False) `Get the text for the entire protein Parameters atomlist: The list of atoms to include (list) chainflag: Flag whether to print chainid or not - Defaults to False Returns text: The list of (stringed) atoms (list)` reSerialize(self) `Generate new serial numbers for atoms in the protein`

Data
`` |  | BACKBONE = ['N', 'CA', 'C', 'O', 'O2', 'HA', 'HN', 'H', 'tN'] DIHEDRAL = 57.2958 INSTALLDIR = '/Users/d3y382/pdb2pqr/' SMALL = 1e-07 TMPDIR = 'tmp/' __author__ = 'Todd Dolinsky, Yong Huang' __date__ = '13 May 2008' lineParsers = {'ANISOU': <class 'src.pdb.ANISOU'>, 'ATOM': <class 'src.pdb.ATOM'>, 'AUTHOR': <class 'src.pdb.AUTHOR'>, 'CAVEAT': <class 'src.pdb.CAVEAT'>, 'CISPEP': <class 'src.pdb.CISPEP'>, 'COMPND': <class 'src.pdb.COMPND'>, 'CONECT': <class 'src.pdb.CONECT'>, 'CRYST1': <class 'src.pdb.CRYST1'>, 'DBREF': <class 'src.pdb.DBREF'>, 'END': <class 'src.pdb.END'>, ...}

Author
`` |  | Todd Dolinsky, Yong Huang