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. J. Mol. Biol. (1997) 268, 570-584.

  2. Residual potential. 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.Structure.read('1brs.maegz')
# make sure force field is assigned to initialize the partial charge
assign_ff(ct)
lig_atoms = analyze.evaluate_asl(ct, 'chain.name D')
ec = calc_total_complementarity(ct, lig_atoms) # the overal EC
print(f"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: {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')
# potential on the surface points
pots = pg.getSurfacePotential(surf.vertex_coords)

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 (255, 0, 0) for negative potential, blue (0, 0, 255) for positive potential, 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 grid center and extent for the input structure. This is chosen so that the grid covers all coordinates in ct.

Parameters

ct (Structure) – the input structure

Return type

two lists of floats: (x, y, z), (xlen, ylen, zlen)

Returns

grid center position and extent, 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 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.

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.

  • atoms2 (Iterable of atom indices) – Atom numbers for the other surface. if not specified, use all other atoms from the CT.

Return type

float

Returns

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.

  • atoms2 (Iterable of atom indices) – 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 complementarity.

  • atoms2 (Iterable of atom indices) – 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