forcefield (6 October 2003)
index
/home/todd/release/pdb2pqr/forcefield.py

Forcefield script
 
This module takes a pdblist as input and replaces the occupancy and
tempfactor fields with charge and radius fields, with values as defined
by a particular forcefield.  The forcefield structure is modeled off of
the structures.py file, where each forcefield is considered a chain of
residues of atoms.
 
Todd Dolinsky (todd@ccb.wustl.edu)
Washington University in St. Louis

 
Modules
            
getopt
string
sys
 
Classes
            
Forcefield
ForcefieldAtom
ForcefieldResidue
 
class Forcefield
      Forcefield class
 
The forcefield class contains definitions for a given forcefield.
Each forcefield object contains a dictionary of residues, with each
residue containing a dictionary of atoms.  Dictionaries are used
instead of lists as the ordering is not important. The forcefield
definition files are unedited, directly from the forcefield - all
transformations are done within.
 
   Methods defined here:
__init__(self, ff)
Initialize the class by parsing the definition file
 
Parameters
    ff: The name of the forcefield (string)
getAmberParams(self, residue, name)
Get the forcefield definitions from the Amber database
 
Parameters
    residue:  The residue (residue)
    name:     The atom name (string)
Returns
    resname:  The name of the amber residue
    atomname: The name of the amber atom
getCharmmParams(self, residue, name)
Get the forcefield definitions from the Charmm database
 
Parameters
    residue:  The residue (residue)
    name:     The atom name (string)
Returns
    resname:  The name of the Charmm residue
    atomname: The name of the Charmm atom
getParams(self, residue, name)
Get the parameters associated with the input fields.
The residue itself is needed instead of simply its name
because  the forcefield may use a different residue name
than the standard amino acid name.
 
Parameters
    residue:  The residue (residue)
    name:     The atom name (string)
Returns
    charge:   The charge on the atom (float)
    radius:   The radius of the atom (float)
getParseParams(self, residue, name)
Get the forcefield definitions from the Parse database
 
Parameters
    residue:  The residue (residue)
    name:     The atom name (string)
Returns
    resname:  The name of the amber residue
    atomname: The name of the amber atom
getResidue(self, resname)
Return the residue object with the given resname
 
Parameters
    resname: The name of the residue (string)
Returns
    residue: The residue object (ForcefieldResidue)

Data and non-method functions defined here:
__doc__ = '\n Forcefield class\n\n The forcefiel...ll\n transformations are done within.\n\n '
__module__ = 'forcefield'
 
class ForcefieldAtom
      ForcefieldAtom class
 
The ForcefieldAtom object contains fields that are related to the
forcefield at the atom level
 
   Methods defined here:
__init__(self, name, charge, radius)
Initialize the object
 
Parameters
    name:    The atom name (string)
    charge:  The charge on the atom (float)
    radius:  The radius of the atom (float)
get(self, name)
Get a member of the ForcefieldAtom class
 
Parameters
    name:       The name of the member (string)
Possible Values
    name:    The atom name (string)
    charge:  The charge on the atom (float)
    radius:  The radius of the atom (float)
    epsilon: The epsilon assocaited with the atom (float)
Returns
    item:       The value of the member

Data and non-method functions defined here:
__doc__ = '\n ForcefieldAtom class\n\n The Force... to the\n forcefield at the atom level\n '
__module__ = 'forcefield'
 
class ForcefieldResidue
      ForcefieldResidue class
 
The ForceFieldResidue class contains a mapping of all atoms within
the residue for easy searching.
 
   Methods defined here:
__init__(self, name)
Initialize the ForceFieldResidue object
 
Parameters
    name: The name of the residue (string)
addAtom(self, atom)
Add an atom to the ForcefieldResidue
 
Parameters
    atom:  The atom to be added (atom)
getAtom(self, atomname)
Return the atom object with the given atomname
 
Parameters
    resname: The name of the atom (string)
Returns
    residue: The atom object (ForcefieldAtom)

Data and non-method functions defined here:
__doc__ = '\n ForcefieldResidue class\n\n The Fo...thin\n the residue for easy searching.\n '
__module__ = 'forcefield'
 
Data
             AMBER_FILE = 'AMBER.DAT'
CHARMM_FILE = 'CHARMM.DAT'
PARSE_FILE = 'PARSE.DAT'
__author__ = 'Todd Dolinsky'
__date__ = '6 October 2003'
__file__ = './forcefield.pyc'
__name__ = 'forcefield'
 
Author
             Todd Dolinsky