Package Bio :: Package PDB :: Module ResidueDepth'
[hide private]
[frames] | no frames]

Module ResidueDepth'

source code

Calculation of residue depth using command line tool MSMS.

This module uses Michel Sanner's MSMS program for the surface calculation. See: http://mgltools.scripps.edu/packages/MSMS

Residue depth is the average distance of the atoms of a residue from the solvent accessible surface.

Residue Depth:

>>> rd = ResidueDepth(model)
>>> print(rd[(chain_id, res_id)])

Direct MSMS interface, typical use:

>>> parser = PDBParser()
>>> structure = parser.get_structure('1FAT.pdb')
>>> model = structure[0]
>>> surface = get_surface(model)

The surface is a Numeric array with all the surface vertices.

Distance to surface:

>>> dist = min_dist(coord, surface)

where coord is the coord of an atom within the volume bound by the surface (ie. atom depth).

To calculate the residue depth (average atom depth of the atoms in a residue):

>>> rd = residue_depth(residue, surface)
Classes [hide private]
  ResidueDepth
Calculate residue and CA depth for all residues.
Functions [hide private]
 
_get_atom_radius(atom, rtype='united')
Translates an atom object to an atomic radius defined in MSMS.
source code
 
_read_vertex_array(filename)
Read the vertex list into a Numeric array.
source code
 
ca_depth(residue, surface) source code
 
get_surface(model, PDB_TO_XYZR=None, MSMS='msms')
Represent molecular surface as a vertex list array.
source code
 
min_dist(coord, surface)
Return minimum distance between coord and surface.
source code
 
residue_depth(residue, surface)
Residue depth as average depth of all its atoms.
source code
Variables [hide private]
  __package__ = 'Bio.PDB'
  _atomic_radii = {1: (0.57, 1.4, 1.4), 2: (0.66, 1.4, 1.6), 3: ...
Function Details [hide private]

_get_atom_radius(atom, rtype='united')

source code 

Translates an atom object to an atomic radius defined in MSMS.

Uses information from the parent residue and the atom object to define the atom type.

Returns the radius (float) according to the selected type:
  • explicit (reads hydrogens)
  • united (default)

get_surface(model, PDB_TO_XYZR=None, MSMS='msms')

source code 

Represent molecular surface as a vertex list array.

Return a Numpy array that represents the vertex list of the molecular surface.

Arguments:
  • PDB_TO_XYZR - deprecated, ignore this.
  • MSMS - msms executable (used as argument to os.system)

residue_depth(residue, surface)

source code 

Residue depth as average depth of all its atoms.

Return average distance to surface for all atoms in a residue, ie. the residue depth.


Variables Details [hide private]

_atomic_radii

Value:
{1: (0.57, 1.4, 1.4),
 2: (0.66, 1.4, 1.6),
 3: (0.57, 1.4, 1.4),
 4: (0.7, 1.54, 1.7),
 5: (0.7, 1.54, 1.8),
 6: (0.7, 1.54, 2.0),
 7: (0.77, 1.74, 2.0),
 8: (0.77, 1.74, 2.0),
...