Package schrodinger :: Package application :: Package bioluminate :: Module protein :: Class PropertyCalculator
[hide private]
[frames] | no frames]

Class PropertyCalculator

object --+
         |
        PropertyCalculator

Class for calculating properties of proteins and protein residues.

Here is an example of how to calculate properties for a protein:

 from schrodinger import structure
 from schrodinger.application.bioluminate import protein

 # Get the input structure
 st = structure.StructureReader('receptor.maegz').next()

 # Define the properties to calculate
 calculations = [ 'e_pot', 'e_internal', 'e_interaction', 'prime_energy',
                  'pka', 'sasa_polar', 'sasa_nonpolar', 'sasa_total']

 # Create the calculator
 calculator = protein.PropertyCalculator(st, "my_calculator_jobname")

 # Calculate the properties
 properties = calculator.calculate(*calculations)

In the example above the properties output would look something like this:

 properties = {
     'e_pot'         : 1573.4,
     'e_internal'    : 624.7,
     'e_interaction' : 994.8,
     'prime_energy'  : 744.2,
     'pka'           : 124.1,
     'sasa_polar',   : 3122.3,
     'sasa_nonpolar' : 271.1,
     'sasa_total'    : 3393.4
 }
Instance Methods [hide private]
 
__init__(self, struct, jobname, cleanup=True, nbcutoff=14.0, residues=None, lig_asl=None)
Construct a ProteinCalculator class from a structure file and a jobname.
 
minimizer(self)
The minimizer used in energy calculations.
 
_prepInscode(self)
Private method to renumber residues with inscodes so that propka can handle them.
 
runpKa(self)
Runs PROPKA to get the pKa of all residues in the self.struct, then sets self.pka_data.
float
getResiduepKa(self, residue)
Returns the pKa for specified residue
float
getTotalpKa(self)
Gets the sum of the pKa values for the protein.
 
setpKaData(self, summary, renum_map=None)
Compares residues from the PROPKA summary with the residues in self.residues and when matches are found the summary's pKa is set for that residue in self.pka_data
float
getTotalPrimeEnergy(self)
Run Prime Minimization on self.struct.
float
getPrimeEnergyByResidues(self, residues)
Run Prime Minimization on self.struct only minimizing the residues in residues.
float
getResiduePotentialEnergy(self, residue)
Return the potential energy for a residue.
generator
getPotentialEnergyGenerator(self)
Return a generator that iterates over each residue in self.struct yielding the schrodinger.structure._Residue object and it's potential energy.
float
getTotalPotentialEnergy(self)
Get the potential energy of self.struct which is calculated using schrodinger.structutils.minimize.Minimizer.
float
getResidueInternalEnergy(self, residue)
Return the residue's internal energy.
generator
getInternalEnergyGenerator(self)
Return a generator that iterates over each residue in self.struct.
 
_calculateEnergiesByResidue(self, res)
float
getResidueInteractionEnergy(self, residue)
Return the residue's interaction energy.
generator
getInteractionEnergyGenerator(self)
Return a generator that iterates over each residue in self.struct.
 
_calculateAtomicSasaList(self)
Calculate SASA for all atoms in the structure, and save them.
 
_sumSasaForAtoms(self, atoms=None)
Sum up the pre-calculated SASAs for the given atoms.
float
getResidueAtomicPolarSASA(self, residue, sidechain=False)
Returns SASA for all polar atoms in residue
generator
getAtomicPolarSASAGenerator(self, sidechain=False)
Returns a generator that yields the schrodinger.structure._Residue object and its calculated SASA for only the polar atoms in each residue in self.struct.
float
getResidueAtomicNonPolarSASA(self, residue, sidechain=False)
Returns SASA for only the nonpolar atoms in residue
generator
getAtomicNonPolarSASAGenerator(self, sidechain=False)
Returns a generator that yields the schrodinger.structure._Residue object and its calculated SASA for only the nonpolar atoms in each residue in self.struct.
float
getResidueSASA(self, residue, sidechain=False)
Returns the SASA for residue.
generator
getSASAPolarGenerator(self, sidechain=False)
Returns a generator that yields the schrodinger.structure._Residue object and its calculated SASA for each polar residue in self.struct.
float
getTotalSASAPolar(self, sidechain=False)
Returns the total approximate solvent accessible surface area for all polar residues.
generator
getSASANonPolarGenerator(self, sidechain=False)
Returns a generator that yields the schrodinger.structure._Residue object and its calculated SASA for each nonpolar residue in self.struct.
float
getTotalSASANonPolar(self, sidechain=False)
Returns the total approximate solvent accessible surface area for all non-polar residues.
generator
getSASAGenerator(self, sidechain=False)
Returns a generator that yields the schrodinger.structure._Residue object and its calculated SASA for each residue in self.struct.
float
getTotalSASA(self, sidechain=False)
Returns the total approximate solvent accessible surface area for all residues.
float
getResidueHydropathy(self, residue, sidechain=False)
Returns hydropathy value for residue
generator
getHydropathyGenerator(self, sidechain=False)
Returns a generator that yields the schrodinger.structure._Residue object and its calculated hydropathy for each residue in self.struct.
float
getTotalHydropathy(self, sidechain=False)
Returns the total calculated hydropathy value for all residues.
int
getResidueRotatableBonds(self, residue)
Return the number of rotors for a residue.
generator
getRotatableBondsGenerator(self)
Returns a generator that yields the schrodinger.structure._Residue object and its number of rotors for each residue in self.struct.
float
getTotalRotatableBonds(self)
Returns: Sum of rotors for all residues.
 
_calculateVDWSurfComp(self)
float
getTotalSurfComp(self)
Returns: Median of vdW surface complementarity values for all surface points for all residues.
float
getResidueSurfComp(self, residue)
Returns: Median of vdW surface complementarity values for all accounted points on the surface of this residue.
generator
calculateOverResidues(self, *properties)
Helper method that returns a generator which will calculate multiple properties for self.struct.
dict
calculate(self, *properties)
Helper method to calculate multiple properties for self.struct.
 
getTotalAggregation(self)
 
getTotalSolubility(self)
 
getTotalComplementarity(self)

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  AGGREGATE_CALCULATIONS = ['e_pot', 'prime_energy', 'pka', 'sas...
  RESIDUE_CALCULATIONS = ['e_pot', 'e_internal', 'e_interaction'...
Instance Variables [hide private]
  _minimizer
Private variable that stores the minimizer.
  progress
Variable that can be used to get the progress of calculations.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, struct, jobname, cleanup=True, nbcutoff=14.0, residues=None, lig_asl=None)
(Constructor)

 

Construct a ProteinCalculator class from a structure file and a jobname.

Parameters:
  • struct (schrodinger.structure.Structure object) - The protein structure or protein/ligand structures
  • jobname - The jobname that will be used for all calculations that require output files.
  • residues (Iterable of schrodinger.structure._Residue objects.) - An iterable of _Residue objects to analyze. If not specified, all residues in the structure are considered.
  • lig_asl (str) - The ASL for the ligand substructure. Used for calculating the vdW surface complementarity.
Overrides: object.__init__

minimizer(self)

 

The minimizer used in energy calculations.

Decorators:
  • @property

_prepInscode(self)

 

Private method to renumber residues with inscodes so that propka can handle them. The returned st is renumbered and the renumbering map is also returned and used in self.setpKaData

getResiduepKa(self, residue)

 

Returns the pKa for specified residue

Parameters:
Returns: float

getTotalPrimeEnergy(self)

 

Run Prime Minimization on self.struct. This will launch a job using job control. After the job completes the total energy will be taken from the first CT using the "r_psp_Prime_Energy" property.

Returns: float
Prime energy of protein

getPrimeEnergyByResidues(self, residues)

 

Run Prime Minimization on self.struct only minimizing the residues in residues. This will launch a job using job control. After the job completes the total energy will be taken from the first CT using the "r_psp_Prime_Energy" property.

Parameters:
  • residues (list of residues) - Residues to minimize
Returns: float
Prime energy of protein

getResiduePotentialEnergy(self, residue)

 

Return the potential energy for a residue.

Parameters:
Returns: float

getPotentialEnergyGenerator(self)

 

Return a generator that iterates over each residue in self.struct yielding the schrodinger.structure._Residue object and it's potential energy.

Returns: generator
See Also:
schrodinger.structutils.minimize.Minimizer.getSelfEnergy, schrodinger.structutils.minimize.Minimizer.getInteractionEnergy

getTotalPotentialEnergy(self)

 

Get the potential energy of self.struct which is calculated using schrodinger.structutils.minimize.Minimizer. The potential energy is the sum of the internal energies and the interaction energies.

Returns: float
Total potential energy of all the residues
See Also:
schrodinger.structutils.minimize.Minimizer.getSelfEnergy, schrodinger.structutils.minimize.Minimizer.getInteractionEnergy

getResidueInternalEnergy(self, residue)

 

Return the residue's internal energy.

Parameters:
Returns: float

See Also: schrodinger.structutils.minimize.Minimizer.getSelfEnergy

getInternalEnergyGenerator(self)

 

Return a generator that iterates over each residue in self.struct. This yields the schrodinger.structure._Residue object and it's internal energy.

Returns: generator

See Also: schrodinger.structutils.minimize.Minimizer.getSelfEnergy

getResidueInteractionEnergy(self, residue)

 

Return the residue's interaction energy.

Parameters:
Returns: float

See Also: schrodinger.structutils.minimize.Minimizer.getInteractionEnergy

getInteractionEnergyGenerator(self)

 

Return a generator that iterates over each residue in self.struct. This yields the schrodinger.structure._Residue object and it's interaction energy.

Returns: generator

See Also: schrodinger.structutils.minimize.Minimizer.getInteractionEnergy

_sumSasaForAtoms(self, atoms=None)

 

Sum up the pre-calculated SASAs for the given atoms. If atoms is None, the sum of all atoms will be returned.

getResidueAtomicPolarSASA(self, residue, sidechain=False)

 

Returns SASA for all polar atoms in residue

Parameters:
  • residue (structure._Residue) - Residue to get atomic polar SASA contribution for
  • sidechain (bool) - Only consider sidechain atoms when calculating SASA
Returns: float

getAtomicPolarSASAGenerator(self, sidechain=False)

 

Returns a generator that yields the schrodinger.structure._Residue object and its calculated SASA for only the polar atoms in each residue in self.struct.

Parameters:
  • sidechain (bool) - Only consider sidechain atoms when calculating SASA
Returns: generator

getResidueAtomicNonPolarSASA(self, residue, sidechain=False)

 

Returns SASA for only the nonpolar atoms in residue

Parameters:
  • residue (structure._Residue) - Residue to get atomic nonpolar SASA contribution for
  • sidechain (bool) - Only consider sidechain atoms when calculating SASA
Returns: float

getAtomicNonPolarSASAGenerator(self, sidechain=False)

 

Returns a generator that yields the schrodinger.structure._Residue object and its calculated SASA for only the nonpolar atoms in each residue in self.struct.

Parameters:
  • sidechain (bool) - Only consider sidechain atoms when calculating SASA
Returns: generator

getResidueSASA(self, residue, sidechain=False)

 

Returns the SASA for residue.

Parameters:
  • residue (structure._Residue) - Residue to get SASA for
  • sidechain (bool) - Only consider sidechain atoms when calculating SASA
Returns: float

getSASAPolarGenerator(self, sidechain=False)

 

Returns a generator that yields the schrodinger.structure._Residue object and its calculated SASA for each polar residue in self.struct.

Parameters:
  • sidechain (bool) - Only consider sidechain atoms when calculating SASA
Returns: generator

getTotalSASAPolar(self, sidechain=False)

 

Returns the total approximate solvent accessible surface area for all polar residues.

Parameters:
  • sidechain (bool) - Only consider sidechain atoms when calculating SASA
Returns: float

getSASANonPolarGenerator(self, sidechain=False)

 

Returns a generator that yields the schrodinger.structure._Residue object and its calculated SASA for each nonpolar residue in self.struct.

Parameters:
  • sidechain (bool) - Only consider sidechain atoms when calculating SASA
Returns: generator

getTotalSASANonPolar(self, sidechain=False)

 

Returns the total approximate solvent accessible surface area for all non-polar residues.

Parameters:
  • sidechain (bool) - Only consider sidechain atoms when calculating SASA
Returns: float

getSASAGenerator(self, sidechain=False)

 

Returns a generator that yields the schrodinger.structure._Residue object and its calculated SASA for each residue in self.struct.

Parameters:
  • sidechain (bool) - Only consider sidechain atoms when calculating SASA
Returns: generator

getTotalSASA(self, sidechain=False)

 

Returns the total approximate solvent accessible surface area for all residues.

Parameters:
  • sidechain (bool) - Only consider sidechain atoms when calculating SASA
Returns: float

getResidueHydropathy(self, residue, sidechain=False)

 

Returns hydropathy value for residue

Parameters:
  • residue (structure._Residue) - Residue to get hydropathy value for
  • sidechain (bool) - Only consider sidechain atoms when calculating SASA
Returns: float

getHydropathyGenerator(self, sidechain=False)

 

Returns a generator that yields the schrodinger.structure._Residue object and its calculated hydropathy for each residue in self.struct.

Parameters:
  • sidechain (bool) - Only consider sidechain atoms when calculating SASA
Returns: generator

getTotalHydropathy(self, sidechain=False)

 

Returns the total calculated hydropathy value for all residues.

Parameters:
  • sidechain (bool) - Only consider sidechain atoms when calculating SASA
Returns: float

getResidueRotatableBonds(self, residue)

 

Return the number of rotors for a residue.

Parameters:
Returns: int

getTotalRotatableBonds(self)

 
Returns: float
Sum of rotors for all residues.

getTotalSurfComp(self)

 
Returns: float
Median of vdW surface complementarity values for all surface points for all residues.

getResidueSurfComp(self, residue)

 
Parameters:
Returns: float
Median of vdW surface complementarity values for all accounted points on the surface of this residue.

calculateOverResidues(self, *properties)

 

Helper method that returns a generator which will calculate multiple properties for self.struct. All results will be returned in a tuple with the form ( structure._Residue, calc dict ). Here is a list of valid properties to calculate:

  • e_pot
  • e_internal
  • e_interaction
  • atomic_sasa_polar
  • atomic_sasa_nonpolar
  • pka
  • sasa_polar
  • sasa_nonpolar
  • sasa_total
  • hydropathy
  • rotatable
Parameters:
  • properties (str (see PropertyCalculator.RESIDUE_CALCULATIONS)) - Properties to calculate
Returns: generator
Generator that yields structure._Residue and dict where keys are properties passed in and values are the total value of the property for the protein. e.g (_Residue, {'e_pot':1324.3})
Raises:
  • KeyError - If a property passed in is invalid

calculate(self, *properties)

 

Helper method to calculate multiple properties for self.struct. All results will be returned in a dict where the keys are each of the properties in properties, and their values are the values returned from their corresponding method. Here is a list of valid properties to calculate:

  • e_pot
  • sasa_polar
  • sasa_nonpolar
  • sasa_total
  • prime_energy
  • pka
  • hydropathy
  • rotatable
  • vdw_surf_comp
Parameters:
  • properties (str (see PropertyCalculator.AGGREGATE_CALCULATIONS)) - Properties to calculate
Returns: dict
Dict where keys are properties passed in and values are the total value of the property for the protein. e.g {'e_pot': 1324.3, 'sasa_total': 1846.9}
Raises:
  • KeyError - If a property passed in is invalid

Class Variable Details [hide private]

AGGREGATE_CALCULATIONS

Value:
['e_pot', 'prime_energy', 'pka', 'sasa_polar', 'sasa_nonpolar', 'sasa_\
total', 'hydropathy', 'rotatable', 'vdw_surf_comp',]

RESIDUE_CALCULATIONS

Value:
['e_pot', 'e_internal', 'e_interaction', 'pka', 'atomic_sasa_polar', '\
atomic_sasa_nonpolar', 'sasa_polar', 'sasa_nonpolar', 'sasa_total', 'h\
ydropathy', 'rotatable', 'vdw_surf_comp',]

Instance Variable Details [hide private]

_minimizer

Private variable that stores the minimizer. We don't create it here since some applications that use this class will not need it.

progress

Variable that can be used to get the progress of calculations. This variable is only set in self.calculateOverResidues. Since that method returns a generator, each step can query self.progress to get a description of the progress. This variable is a tuple with the form ( step, total steps ).