Package schrodinger :: Package application :: Package bioluminate :: Module escomp
[hide private]
[frames] | no frames]

Module escomp


Module for using APBS to find electrostic potential on the protein surface to analyze 
protein-protein (or protein-ligand) interactions. There are two types of analyses
that can be performed here:
(1) Electrostatic complementarity. The reference: J. Mol. Biol. (1997) 268, 570-584.
(2) Residual potential. The reference: Prot. Sci. (2001) 10, 362-377 and also the website:
    http://web.mit.edu/tidor/www/residual/description.html

Electrostatic complementarity (EC) defined in (1) provides a single quantity to describe the 
interface complementarity, and it is extended here to assign a quantity for each residue
or each atom. Residual potential (RP) defined in (2) focuses on the ligand design, providing
a map of residual (non-ideal) electrostatic potential on the ligand surface. It would be better
used as a visualization tool.


Example usage to get EC:

ct = structure.StructureReader('1brs.maegz').next()
assign_ff(ct) # make sure force field is assigned to initialize the partial charge
lig_atoms = analyze.evaluate_asl(ct, 'chain.name D')
ec = calc_total_complementarity(ct, lig_atoms) # the overal EC
print "Overall EC:",ec
pots_by_atoms = calc_complementarity_by_atom(ct, lig_atoms)
# now get EC by residue
for res in ct.residue:
    pots_by_res = {}
    for atom in res.atom:
        if atom in pots_by_atoms:
            pots_by_res[atom.index] = pots_by_atoms[atom.index]
    if pots_by_res:
        print "Residue EC:", str(res), -1.0 * pearson_by_set(pots_by_res)

To get RP:
jobname = 'test'
rp = ResidualPotential(ct, lig_atoms, jobname = jobname)
residual_potential = rp.getResidualPotential()
# write out the surface and color it with residual potential
rp.ligct.write(jobname+'.maegz')
color_potential_surface(rp.ligsurf, residual_potential)
rp.ligsurf.write(jobname+'_residual.vis')
# also possible to visualize two components of residual potential
inter_potential = rp.getInteractionPotential()
color_potential_surface(rp.ligsurf, inter_potential)
rp.ligsurf.write(jobname+'_inter.vis')
desolv_potential = rp.getDesolvationPotential()
color_potential_surface(rp.ligsurf, desolv_potential)
rp.ligsurf.write(jobname+'_desolv.vis')

Or simply get electrostatic potential by APBS:
pg = get_APBS_potential_grid(ct) # potential on the grid
surf = surface.Surface.newMolecularSurface(ct, 'Surface')
pots = pg.getSurfacePotential(surf.vertex_coords) # potential on the surface points

Copyright Schrodinger, LLC. All rights reserved.

Classes [hide private]
  PotGrid
The container that holds the potential grid from APBS calculation.
  ResidualPotential
Calculator of the residual potential on the ligand surface.
Functions [hide private]
 
color_potential_surface(surf, vertex_pots, negative_cutoff=-5.0, positive_cutoff=5.0)
Color the surface according to the potential at surface points.
 
assign_ff(ct, ff_version=14)
Assign force field to get the atom property "partial_charge"
two lists of floats: (x, y, z), (xlen, ylen, zlen)
get_center_gridlen(ct)
Compute the center and grid size for the input structure.
Object of PotGrid class
get_APBS_potential_grid(ct, center=None, gridlen=None, jobname='apbs_potgrid')
Compute the APBS electrostatic potential on a 3D grid.
 
write_pqr(ct, filename)
Write the .PQR file for APBS job.
 
write_input(ct, in_file, pqr_file, jobname, center=None, gridlen=None)
Write the input file for APBS job.
List of DX files (potential)
run_multiple_inputs(in_files)
Run multiple APBS jobs with job control.
 
calc_total_complementarity(ct, atoms1, atoms2=None)
Return the total electrostatic complementarity between the specified surfaces.
 
calc_complementarity_by_atom(ct, atoms1, atoms2=None)
Return the pairs of potential values used for calculating electrostatic complementarity between the specified surfaces, grouped by atom, in one dict.
 
calc_complementarity(ct, atoms1, atoms2=None)
Return the pairs of potential values used for calculating electrostatic complementarity between the specified surfaces, grouped by atom, in two dicts.
dict of lists.
_buried_surface_pots(prot_surface, nb_cell_handle, pg1, pg2)
Return the pair of potentials on the buried surface points, grouped by atoms.
float
pearson_by_set(pots_by_set)
Compute Pearson Correlation Coefficient for the pair of surface potentials for a set of atoms.
Variables [hide private]
  __doc__ = ...
  OPLS_VERSION = 14
  DIEL_PRO = '2.0'
  DIEL_WATER = '78.0'
  COARSE_BUFFER = 40.0
  FINE_BUFFER = 20.0
  POT_CUTOFF_POSITIVE = 5.0
  POT_CUTOFF_NEGATIVE = -5.0
  NON_BURIED_DIST = 1.5
  logger = log.get_output_logger(name= "escomp")
  __package__ = 'schrodinger.application.bioluminate'
Function Details [hide private]

color_potential_surface(surf, vertex_pots, negative_cutoff=-5.0, positive_cutoff=5.0)

 

Color the surface according to the potential at surface points. Red for negative potential, blue for positive potential. red (255, 0, 0) for negative, blue (0, 0, 255) for positive, white (255, 255, 255) for neutral

Parameters:
  • surf (Surface) - the input surface object
  • vertex_pots (List of floats) - the potential values on surface points
  • negative_cutoff (float) - the cutoff value for negative potential coloring. Below this cutoff, surface will be colored pure red.
  • positive_cutoff (float) - the cutoff value for positive potential coloring. Above this cutoff, surface will be colored pure blue.

get_center_gridlen(ct)

 

Compute the center and grid size for the input structure.

Parameters:
Returns: two lists of floats: (x, y, z), (xlen, ylen, zlen)
center position, and size in three dimensions

get_APBS_potential_grid(ct, center=None, gridlen=None, jobname='apbs_potgrid')

 

Compute the APBS electrostatic potential on a 3D grid.

The partial charge in the ct will be used in APBS calculation. So care should be taken before passing in CT if for example the ligand charge should be disabled. The vdW Radii are used to construct the molecular surface.

Parameters:
  • ct (Structure) - the input structure
  • center (List of three floats) - the center of the grid
  • gridlen (List of three floats) - the grid size in three dimensions
  • jobname (String) - the basename for temporary APBS files
Returns: Object of PotGrid class
the potential grid

write_pqr(ct, filename)

 

Write the .PQR file for APBS job.

Parameters:
  • ct (Structure) - the input structure
  • filename (String) - PQR file name

write_input(ct, in_file, pqr_file, jobname, center=None, gridlen=None)

 

Write the input file for APBS job.

Parameters:
  • ct (Structure) - the input structure
  • in_file (String) - the input file name
  • pqr_file (String) - the PQR file name
  • jobname (String) - the basename for temporary APBS files
  • center (List of three floats) - the center of the grid
  • gridlen (List of three floats) - the grid size in three dimensions

run_multiple_inputs(in_files)

 

Run multiple APBS jobs with job control.

Parameters:
  • in_files (List of string) - a list of input files
Returns: List of DX files (potential)
a list of DX files from each APBS job

calc_total_complementarity(ct, atoms1, atoms2=None)

 

Return the total electrostatic complementarity between the specified surfaces.

@type ct: structure._Structure object
@param ct: Structure to which <atoms1> and <atoms2> are indices in.

@type atoms1: Iterable of atom indices
@param atoms1: Atom numbers from the surface for which to calculate the
    complementrairity.

@type atoms2: Iterable of atom indices
@param atoms2 = Atom numbers for the other surface. if not specified, use all
    other atoms from the CT.

@rtype: float
@return the electrostatic complementarity between the 2 surfaces.

calc_complementarity_by_atom(ct, atoms1, atoms2=None)

 

Return the pairs of potential values used for calculating electrostatic complementarity
between the specified surfaces, grouped by atom, in one dict.

@type ct: structure._Structure object
@param ct: Structure to which <atoms1> and <atoms2> are indices in.

@type atoms1: Iterable of atom indices
@param atoms1: Atom numbers from the surface for which to calculate the
    complementrairity.

@type atoms2: Iterable of atom indices
@param atoms2 = Atom numbers for the other surface. if not specified, use all
    other atoms from the CT.

@rtype: dict of lists.
@return: dict key is the index of the atom from the given list, dict value is a list of 
    potential pairs on the surface points that belong to the buried surface
    of this atom. The correlation between the pair of potentials on one atom will give the 
    complementarity measurement of that atom. Similarly, the correlation between the pair
    of potentials on one residue will give the complementarity of that residue, etc.  

calc_complementarity(ct, atoms1, atoms2=None)

 

Return the pairs of potential values used for calculating electrostatic complementarity
between the specified surfaces, grouped by atom, in two dicts.

@type ct: structure._Structure object
@param ct: Structure to which <atoms1> and <atoms2> are indices in.

@type atoms1: Iterable of atom indices
@param atoms1: Atom numbers from the surface for which to calculate the
    complementrairity.

@type atoms2: Iterable of atom indices
@param atoms2 = Atom numbers for the other surface. if not specified, use all
    other atoms from the CT.

@rtype: two dicts of lists.
@return: Each dict corresponds to one of atom sets <atoms1> and <atoms2>. For each dict,
    dict key is the index of the atom from the given list, dict value is a list of 
    potential pairs on the surface points that belong to the buried surface
    of this atom. The correlation between the pair of potentials on one atom will give the 
    complementarity measurement of that atom. Similarly, the correlation between the pair
    of potentials on one residue will give the complementarity of that residue, etc.  

_buried_surface_pots(prot_surface, nb_cell_handle, pg1, pg2)

 

Return the pair of potentials on the buried surface points, grouped by atoms.

Parameters:
  • prot_surface (Surface) - the surface from <atoms1> or <atoms2>
  • nb_cell_handle (Object of distance cell) - the NB distance cell created from the total surface of the complex. This will be used to check if a surface point from a binding parter surface is buried in the complex surface.
  • pg1 (Object of PotGrid) - the potential grid resulting only from the charges from <atoms1>
  • pg2 (Object of PotGrid) - the potential grid resulting only from the charges from <atoms2>
Returns: dict of lists.
dict key is the atom index, dict value is a list of potential pairs on the surface points that belong to the buried surface of this atom. The correlation between the pair of potentials measures the complementarity.

pearson_by_set(pots_by_set)

 

Compute Pearson Correlation Coefficient for the pair of surface potentials for a set of atoms.

Parameters:
  • pots_by_set (Dict of lists) - the pair of surface potentials for a set of atoms. Dict key is atom index, dict value is a list of potential pairs on the buried surface points of that atom.
Returns: float
Pearson Correlation Coefficient

Variables Details [hide private]

__doc__

Value:
"""
Module for using APBS to find electrostic potential on the protein sur\
face to analyze 
protein-protein (or protein-ligand) interactions. There are two types \
of analyses
that can be performed here:
(1) Electrostatic complementarity. The reference: J. Mol. Biol. (1997)\
 268, 570-584.
...