Package schrodinger :: Package application :: Package bioluminate :: Module interaction_calculator :: Class InteractionCalculator
[hide private]
[frames] | no frames]

Class InteractionCalculator

object --+
         |
        InteractionCalculator

Calculate all interactions between two groups of atoms

Instance Methods [hide private]
 
__init__(self, interaction_params=InteractionParams(), ignore_backbone=False)
Initialize an instance of the class using the specified parameters
 
calculate(self, struc, asl_expressions)
Calculate all interactions
 
_prepCalculations(self, struc, asl_expressions)
Prepare the specified structure for calculations
 
_prepStrucs(self, struc, group_atoms)
Divide up a structure into two new structures, each of which contains only the specified atoms.
 
_removeTempProperty(self, struc)
Remove the ORIG_ATOM_NUM_PROP atom property from all atoms
list
compileResults(self)
Compile all of the calculated interactions into a list of InteractingResidue objects
 
_checkAtomLists(self, group_atoms)
Make sure that both groups contain protein atoms
 
_calculateInteraction(self, iter_func, inter_name, struc, group_atoms, check_interaction_func)
Record all interactions of the specified type to self.results
 
_calculateHbonds(self, struc, group_atoms)
Record all hydrogen bonds in the structure
iter
_hbondIterator(self, struc, group_atoms)
Create an iterator that iterates through all hydrogen bonds between two groups of atoms
 
_calculateClashes(self, struc, group_atoms)
Record all steric clashes in the structure
iter
_clashIterator(self, struc, group_atoms)
Create an iterator that iterates through all steric clashes between two groups of atoms
 
_calculateSaltBridges(self, struc, group_atoms)
Record all salt bridges in the structure
iter
_saltBridgeIterator(self, struc, group_atoms)
Create an iterator that iterates through all salt bridges between two groups of atoms
 
_calculateHydrophobicScore(self, struc, group_atoms)
Calculate the hydrophobic interactions between the two groups of atoms.
bool
_isHydrophobicAtom(self, struc, iatom)
Check if an atom is a hydrophobic atom
 
_calculateNearbyRes(self, struc, group_atoms)
Record all neighboring residues in the structure
iter
_nearbyAtomIterator(self, struc, group_atoms, dist)
Create an iterator that iterates through all neighboring heavy atoms.
 
_calculatePiStacks(self, struc, group_strucs)
Record all pi stacking in the structure
 
_calculateDisulfides(self, struc, group_atoms)
Record all disulfide bonds in the structure
iter
_disulfideIterator(self, struc, group_atoms)
Create an iterator that iterates through all disulfide bonds
bool
_potentialDisulfideAtom(self, atom)
Determine if the given atom is a potential disulfide bond participant
 
_calculateBuriedSASA(self, group_strucs, combined_struc)
Record all buried solvent accessible surface area in the structure
dict
_sumSASAByRes(self, struc, sasa_by_atom)
Sum solvent accessible surface areas by residue
bool
_recordInteraction(self, struc, ha1_num, ha2_num)
Record an interaction between two heavy atoms so that the two atoms aren't later counted as clashing
bool
_checkInteraction(self, struc, ha1_num, ha2_num)
Find out if two heavy atoms interact so we know whether to ignore their clashing.
int
_getHeavyAtomNum(self, struc, atom_num)
If the specified atom is a hydrogen, get the bound heavy atom
bool
_backboneInteraction(self, struc, ha1_num, ha2_num)
Determine if the interaction between the specified atoms is a backbone- backbone interaction.
 
_calculateVdwComp(self, struc, group_atoms)
Record all van der Waals surface complementarity in the structure

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

Class Methods [hide private]
list
run(cls, struc, asl_expressions, interaction_params=InteractionParams(), ignore_backbone=False)
A convenience function to initialize this class, calculate all interactions, and return the compiled results.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, interaction_params=InteractionParams(), ignore_backbone=False)
(Constructor)

 

Initialize an instance of the class using the specified parameters

Parameters:
Overrides: object.__init__

calculate(self, struc, asl_expressions)

 

Calculate all interactions

Parameters:
  • struc (schrodinger.structure.Structure) - The structure to analyze
  • asl_expressions (list of string) - A list of [asl_expresion for group 1, asl expression for group2]

_prepCalculations(self, struc, asl_expressions)

 

Prepare the specified structure for calculations

Parameters:
  • struc (schrodinger.structure.Structure) - The structure to analyze
  • asl_expressions (list of string) - A list of [asl_expresion for group 1, asl expression for group2]
Returns:
A tuple of
  • A list of [all protein atom indices in group 1, all protein atom indices in group 2]
  • A list of [a Structure object containing only the protein atoms in group 1, a Structure object containing only the protein atoms in group 2]
  • A single Structure object containing the protein atoms in groups 1 and 2

_prepStrucs(self, struc, group_atoms)

 

Divide up a structure into two new structures, each of which contains only the specified atoms. In each new structure, the atom indices from the original structure are recorded in a temporary atom property.

Parameters:
  • struc (schrodinger.structure.Structure) - The structure to be divided up
  • group_atoms (list) - A list of [atom numbers for group 1, atom numbers for group 2]
Returns:
A tuple of two new structures, one for each group.

_removeTempProperty(self, struc)

 

Remove the ORIG_ATOM_NUM_PROP atom property from all atoms

Parameters:

compileResults(self)

 

Compile all of the calculated interactions into a list of InteractingResidue objects

Returns: list
A list of InteractingResidue objects, sorted by residue

run(cls, struc, asl_expressions, interaction_params=InteractionParams(), ignore_backbone=False)
Class Method

 

A convenience function to initialize this class, calculate all interactions, and return the compiled results.

Parameters:
Returns: list
A list of InteractingResidue objects describing all calculated interactions, sorted by residue

_checkAtomLists(self, group_atoms)

 

Make sure that both groups contain protein atoms

Parameters:
  • group_atoms (list) - A list of [atom numbers for group 1, atom numbers for group 2]
Raises:

_calculateInteraction(self, iter_func, inter_name, struc, group_atoms, check_interaction_func)

 

Record all interactions of the specified type to self.results

Parameters:
  • iter_func (function) - A function that produces an iterator that iterates through all interactions to record
  • inter_name (str) - The interaction name. Must be one of the class constants from the Interactions class.
  • struc (schrodinger.structure.Structure) - The structure being analyzed
  • group_atoms (list) - A list of [atom numbers for group 1, atom numbers for group 2]
  • check_interaction_func (function) - A function that either records interacting atoms so they're not later counted as clashes (self._recordInteraction) or checks clashing atoms to see if they've previously been recorded as interactions (self._checkInteraction). This function must return False for all interactions to be ignored and True otherwise.

_calculateHbonds(self, struc, group_atoms)

 

Record all hydrogen bonds in the structure

Parameters:
  • struc (schrodinger.structure.Structure) - The structure being analyzed
  • group_atoms (list) - A list of [atom numbers for group 1, atom numbers for group 2]

_hbondIterator(self, struc, group_atoms)

 

Create an iterator that iterates through all hydrogen bonds between two groups of atoms

Parameters:
  • struc (schrodinger.structure.Structure) - The structure being analyzed
  • group_atoms (list) - A list of [atom numbers for group 1, atom numbers for group 2]
Returns: iter
An iterator that produces tuples of two atoms numbers, representing (the group 1 atom involved in the hydrogen bond, the group 2 atom involved in the hydrogen bond)

Note: This function differs from schrodinger.structutils.analyze.hbond_iterator in that this function:

  • uses mm.mmct_hbond_get_user_spec_inter() in place of mm.mmct_hbond_get_inter() so that non-default values for distance and angle cutoffs can be used.
  • Takes two atom lists, rather than assuming that the second list of atoms is the converse of the first.

_calculateClashes(self, struc, group_atoms)

 

Record all steric clashes in the structure

Parameters:
  • struc (schrodinger.structure.Structure) - The structure being analyzed
  • group_atoms (list) - A list of [atom numbers for group 1, atom numbers for group 2]

_clashIterator(self, struc, group_atoms)

 

Create an iterator that iterates through all steric clashes between two groups of atoms

Parameters:
  • struc (schrodinger.structure.Structure) - The structure being analyzed
  • group_atoms (list) - A list of [atom numbers for group 1, atom numbers for group 2]
Returns: iter
An iterator that produces tuples of two atoms numbers, representing (the group 1 atom involved in the steric clash, the group 2 atom involved in the steric clash)

_calculateSaltBridges(self, struc, group_atoms)

 

Record all salt bridges in the structure

Parameters:
  • struc (schrodinger.structure.Structure) - The structure being analyzed
  • group_atoms (list) - A list of [atom numbers for group 1, atom numbers for group 2]

_saltBridgeIterator(self, struc, group_atoms)

 

Create an iterator that iterates through all salt bridges between two groups of atoms

Parameters:
  • struc (schrodinger.structure.Structure) - The structure being analyzed
  • group_atoms (list) - A list of [atom numbers for group 1, atom numbers for group 2]
Returns: iter
An iterator that produces tuples of two atoms numbers, representing (the group 1 atom involved in the salt bridge, the group 2 atom involved in the salt bridge)

_calculateHydrophobicScore(self, struc, group_atoms)

 

Calculate the hydrophobic interactions between the two groups of atoms. This hydrophobic score is defined in ChemScore and VSGB2.0.

Parameters:
  • struc (schrodinger.structure.Structure) - The structure being analyzed
  • group_atoms (list) - A list of [atom numbers for group 1, atom numbers for group 2]

_isHydrophobicAtom(self, struc, iatom)

 

Check if an atom is a hydrophobic atom

Parameters:
Returns: bool
whether or not the atom is defined as hydrophobic atom

_calculateNearbyRes(self, struc, group_atoms)

 

Record all neighboring residues in the structure

Parameters:
  • struc (schrodinger.structure.Structure) - The structure being analyzed
  • group_atoms (list) - A list of [atom numbers for group 1, atom numbers for group 2]

_nearbyAtomIterator(self, struc, group_atoms, dist)

 

Create an iterator that iterates through all neighboring heavy atoms.

Parameters:
  • struc (schrodinger.structure.Structure) - The structure being analyzed
  • group_atoms (list) - A list of [atom numbers for group 1, atom numbers for group 2]
  • dist (float) - the distance cutoff for neighbors
Returns: iter
An iterator that produces tuples of two atoms numbers, representing (the group 1 atom, the group 2 atom)

_calculatePiStacks(self, struc, group_strucs)

 

Record all pi stacking in the structure

Parameters:
  • struc (schrodinger.structure.Structure) - The structure being analyzed
  • group_strucs (list) - A list of [Structure object for group 1, Structure object for group 2]

_calculateDisulfides(self, struc, group_atoms)

 

Record all disulfide bonds in the structure

Parameters:
  • struc (schrodinger.structure.Structure) - The structure being analyzed
  • group_atoms (list) - A list of [atom numbers for group 1, atom numbers for group 2]

_disulfideIterator(self, struc, group_atoms)

 

Create an iterator that iterates through all disulfide bonds

Parameters:
  • struc (schrodinger.structure.Structure) - The structure being analyzed
  • group_atoms (list) - A list of [atom numbers for group 1, atom numbers for group 2]
Returns: iter
An iterator that produces tuples of two atoms numbers, representing (the group 1 atom, the group 2 atom)

_potentialDisulfideAtom(self, atom)

 

Determine if the given atom is a potential disulfide bond participant

Parameters:
Returns: bool
True if the given atom is a potential disulfide bond participant, False otherwise

_calculateBuriedSASA(self, group_strucs, combined_struc)

 

Record all buried solvent accessible surface area in the structure

Parameters:
  • group_strucs (list) - A list of [Structure object for group 1, Structure object for group 2]
  • combined_struc (schrodinger.structure.Structure) - A single Structure object containing the protein atoms in groups 1 and 2

_sumSASAByRes(self, struc, sasa_by_atom)

 

Sum solvent accessible surface areas by residue

Parameters:
Returns: dict
A dictionary of {ResTuple: sasa}

_recordInteraction(self, struc, ha1_num, ha2_num)

 

Record an interaction between two heavy atoms so that the two atoms aren't later counted as clashing

Parameters:
  • struc (schrodinger.structure.Structure) - The structure being analyzed
  • ha1_num (int) - The atom number of the heavy atom from group 1
  • ha2_num (int) - The atom number of the heavy atom from group 2
Returns: bool
Always returns True (for compatibility with _checkInteraction when used in _calculateInteraction)

_checkInteraction(self, struc, ha1_num, ha2_num)

 

Find out if two heavy atoms interact so we know whether to ignore their clashing. (The interactions must have been previously recorded using _recordInteraction.)

Parameters:
  • struc (schrodinger.structure.Structure) - The structure being analyzed
  • ha1_num (int) - The atom number of the heavy atom from group 1
  • ha2_num (int) - The atom number of the heavy atom from group 2
Returns: bool
False if the heavy atoms interact, True otherwise

_getHeavyAtomNum(self, struc, atom_num)

 

If the specified atom is a hydrogen, get the bound heavy atom

Parameters:
Returns: int
If the specified atom is a hydrogen, return the atom number of the bound heavy atom. Otherwise, returns atom_num

_backboneInteraction(self, struc, ha1_num, ha2_num)

 

Determine if the interaction between the specified atoms is a backbone- backbone interaction. (i.e. Are both of the specified atoms from the backbone?)

Parameters:
  • struc (schrodinger.structure.Structure) - The structure being analyzed
  • ha1_num (int) - The atom number of the heavy atom from group 1
  • ha2_num (int) - The atom number of the heavy atom from group 2
Returns: bool
True if both heavy atoms are backbone atome, False otherwise

_calculateVdwComp(self, struc, group_atoms)

 

Record all van der Waals surface complementarity in the structure

Parameters:
  • struc (schrodinger.structure.Structure) - The structure being analyzed
  • group_atoms (list) - A list of [atom numbers for group 1, atom numbers for group 2]