schrodinger.application.bioluminate.escomp module

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:

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.Structure.read(‘1brs.maegz’) 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.

schrodinger.application.bioluminate.escomp.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.
schrodinger.application.bioluminate.escomp.assign_ff(ct, ff_version=14)

Assign force field to get the atom property “partial_charge”

schrodinger.application.bioluminate.escomp.get_center_gridlen(ct)

Compute the center and grid size for the input structure.

Parameters:ct (Structure) – the input structure
Return type:two lists of floats: (x, y, z), (xlen, ylen, zlen)
Returns:center position, and size in three dimensions
schrodinger.application.bioluminate.escomp.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
Return type:

Object of PotGrid class

Returns:

the potential grid

schrodinger.application.bioluminate.escomp.write_pqr(ct, filename)

Write the .PQR file for APBS job.

Parameters:
  • ct (Structure) – the input structure
  • filename (String) – PQR file name
schrodinger.application.bioluminate.escomp.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
schrodinger.application.bioluminate.escomp.run_multiple_inputs(in_files)

Run multiple APBS jobs with job control.

Parameters:in_files (List of string) – a list of input files
Return type:List of DX files (potential)
Returns:a list of DX files from each APBS job
class schrodinger.application.bioluminate.escomp.PotGrid(**kwargs)

Bases: object

The container that holds the potential grid from APBS calculation. The potential has the unit of kT/e.

__init__(**kwargs)

There are two ways to initialize the object: read from a DX file, or copy from an existing object with the option of using another 3D potential map.

getSurfacePotential(vertex_coords)

Interpolate the potential from the grid to the surface.

Parameters:vertex_coords (2D Numpy array (N x 3)) – list of coordinates of surface vertex points
Return type:1D Numpy array (N)
Returns:list of potential values on surface points
__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.bioluminate.escomp', '__doc__': '\n The container that holds the potential grid from APBS calculation.\n The potential has the unit of kT/e.\n ', '__init__': <function PotGrid.__init__>, '_read': <function PotGrid._read>, '_new': <function PotGrid._new>, 'getSurfacePotential': <function PotGrid.getSurfacePotential>, '__dict__': <attribute '__dict__' of 'PotGrid' objects>, '__weakref__': <attribute '__weakref__' of 'PotGrid' objects>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.bioluminate.escomp'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

class schrodinger.application.bioluminate.escomp.ResidualPotential(ct, lig_atoms, jobname='residual')

Bases: object

Calculator of the residual potential on the ligand surface. The two components of the residual potential, interaction potential and desolvation potential, can also be reported and visualized on the surface.

__init__(ct, lig_atoms, jobname='residual')
Parameters:
  • ct (Structure) – the input complex structure
  • atoms1 – atom numbers that define the ligand
  • jobname (String) – the basename for temporary APBS files
getResidualPotential()

return the “residual potential” on the ligand surface.

Return type:1D Numpy array
Returns:a list of potential values on ligand surface points
getInteractionPotential()

return the “interaction potential” on the ligand surface.

Return type:1D Numpy array
Returns:a list of potential values on ligand surface points
getDesolvationPotential()

return the “desolvation potential” on the ligand surface.

Return type:1D Numpy array
Returns:a list of potential values on ligand surface points
getResidualPotentialByAtom()

return the residual potential grouped by atom.

Return type:Dict of lists
Returns:dict key is the ligand atom index in the ligand ct, dict value is a list of potential values on the surface points that belong to this atom.
getResidualPotentialByResidue()

return the residual potential grouped by residue.

Return type:Dict of lists
Returns:dict key is the ligand residue string, dict value is a list of potential values on the surface points that belong to this residue.
__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.bioluminate.escomp', '__doc__': '\n Calculator of the residual potential on the ligand surface. The two\n components of the residual potential, interaction potential and desolvation\n potential, can also be reported and visualized on the surface.\n ', '__init__': <function ResidualPotential.__init__>, 'getResidualPotential': <function ResidualPotential.getResidualPotential>, 'getInteractionPotential': <function ResidualPotential.getInteractionPotential>, 'getDesolvationPotential': <function ResidualPotential.getDesolvationPotential>, 'getResidualPotentialByAtom': <function ResidualPotential.getResidualPotentialByAtom>, 'getResidualPotentialByResidue': <function ResidualPotential.getResidualPotentialByResidue>, '__dict__': <attribute '__dict__' of 'ResidualPotential' objects>, '__weakref__': <attribute '__weakref__' of 'ResidualPotential' objects>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.bioluminate.escomp'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

schrodinger.application.bioluminate.escomp.calc_total_complementarity(ct, atoms1, atoms2=None)

Return the total electrostatic complementarity between the specified surfaces.

Parameters:
  • ct (structure._Structure object) – Structure to which <atoms1> and <atoms2> are indices in.
  • atoms1 (Iterable of atom indices) – Atom numbers from the surface for which to calculate the complementrairity.
:param atoms2 = Atom numbers for the other surface. if not specified, use all
other atoms from the CT.
Return type:float

:return the electrostatic complementarity between the 2 surfaces.

schrodinger.application.bioluminate.escomp.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.

Parameters:
  • ct (structure._Structure object) – Structure to which <atoms1> and <atoms2> are indices in.
  • atoms1 (Iterable of atom indices) – Atom numbers from the surface for which to calculate the complementrairity.
:param atoms2 = Atom numbers for the other surface. if not specified, use all
other atoms from the CT.
Return type:dict of lists.
Returns: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.
schrodinger.application.bioluminate.escomp.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.

Parameters:
  • ct (structure._Structure object) – Structure to which <atoms1> and <atoms2> are indices in.
  • atoms1 (Iterable of atom indices) – Atom numbers from the surface for which to calculate the complementrairity.
:param atoms2 = Atom numbers for the other surface. if not specified, use all
other atoms from the CT.
Return type:two dicts of lists.
Returns: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.
schrodinger.application.bioluminate.escomp.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.
Return type:float
Returns:Pearson Correlation Coefficient