schrodinger.application.bioluminate.interaction_calculator module

This module defines the InteractionCalculator class, which can be used for finding interactions between two groups of atoms.

schrodinger.application.bioluminate.interaction_calculator.approx_eq(val1, val2)
schrodinger.application.bioluminate.interaction_calculator.lipophilic_ChemScore_value(atom1, atom2, distance=None, cutoff=None)

Calculates a lipophilic score between an atom pair utilizing their van der Waals radii. An optional argument is available to avoid computation of the iter-atom distance within the function. The empirical function form is adopted from ChemScore:

Empirical scoring functions: I. The development of a fast empirical scoring function to estimate the binding affinity of ligands in receptor complexes. Eldridge, Murray, Auton, Paolini, and Mee. JCAMD, 1997 (11).

Parameters:
  • atom1 (structure.StructureAtom) – first atom (usually a lipophilic ligand atom)
  • atom2 (structure.StructureAtom) – second atom (usually a lipophilic receptor atom)
  • distance (float) – inter-atom distance
  • cutoff (float) – distance beyond which to always return 0.0
Returns:

emperical function value

Return type:

float

class schrodinger.application.bioluminate.interaction_calculator.InteractionParams

Bases: object

A class to store settings for interaction parameters

__init__()

Initialize the class using the default param

paramDict()

Return a dictionary of all interaction parameters. Note that changes to this dictionary will change the instance variables as well.

Returns:A dictionary of all interaction parameters
Return type:dict
__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.bioluminate.interaction_calculator', '__doc__': '\n A class to store settings for interaction parameters\n ', '__init__': <function InteractionParams.__init__>, 'paramDict': <function InteractionParams.paramDict>, '__dict__': <attribute '__dict__' of 'InteractionParams' objects>, '__weakref__': <attribute '__weakref__' of 'InteractionParams' 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.interaction_calculator'
__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.interaction_calculator.ResTuple

Bases: schrodinger.application.bioluminate.interaction_calculator._ResTuple

A class to store a residue. Unlike schrodinger.structure._Residue, two ResTuple objects that describe the same residue are equal (and their hashes are equal). This class will also strip spaces from inscode and pdbres.

static __new__(cls, res)

Create a new instance of the tuple

Parameters:res (schrodinger.structure._StructureAtom or schrodinger.structure._Residue or ResTuple) – The object to take residue data from
Returns:The newly created instance
Return type:ResTuple
classmethod init(*args, **kwargs)

Initialize a class instance directly instead of from a _Residue object. This function allows for the output of __repr__() to be evaluated and is intended for use in testing.

Returns:The initialized instance
Return type:ResTuple
__str__()

Represent this residue as ex. A:22:Ala

__repr__()

Generate a string that can be used to reproduce this object

__add__

Return self+value.

__class__

alias of builtins.type

__contains__

Return key in self.

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.bioluminate.interaction_calculator', '__doc__': '\n A class to store a residue. Unlike schrodinger.structure._Residue, two\n ResTuple objects that describe the same residue are equal (and their hashes\n are equal). This class will also strip spaces from inscode and pdbres.\n ', '__new__': <staticmethod object>, 'init': <classmethod object>, '__str__': <function ResTuple.__str__>, '__repr__': <function ResTuple.__repr__>, '__dict__': <attribute '__dict__' of 'ResTuple' objects>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__getitem__

Return self[key].

__getnewargs__()

Return self as a plain tuple. Used by copy and pickle.

__gt__

Return self>value.

__hash__

Return hash(self).

__init__

Initialize self. See help(type(self)) for accurate signature.

__init_subclass__()

This method is called when a class is subclassed.

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

__iter__

Implement iter(self).

__le__

Return self<=value.

__len__

Return len(self).

__lt__

Return self<value.

__module__ = 'schrodinger.application.bioluminate.interaction_calculator'
__mul__

Return self*value.n

__ne__

Return self!=value.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__rmul__

Return self*value.

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__slots__ = ()
__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).

chain

Alias for field number 0

count(value) → integer -- return number of occurrences of value
index(value[, start[, stop]]) → integer -- return first index of value.

Raises ValueError if the value is not present.

inscode

Alias for field number 2

pdbres

Alias for field number 3

resnum

Alias for field number 1

class schrodinger.application.bioluminate.interaction_calculator.Interactions

Bases: object

Store data about all the interactions made by a single residue

H_BOND = 'hb'
PI_STACK = 'pi stack'
SALT_BRIDGE = 'salt bridge'
CLASH = 'clash'
DISULFIDE = 's-s'
__init__()

Initialize an instance of this class with 0 interactions

classmethod init(**kwargs)

Initialize a class instance from existing interaction dictionaries. This function allows for the output of __repr__() to be evaluated and is intended for use in testing.

Returns:The initialized instance
Return type:Interactions
__repr__()

Generate a string that can be used to reproduce this object

__eq__(other)

Test two Interactions objects for equality. Note that nearby residue distances are compared for approximate equality since they’re floats.

__ne__(other)

Test two Interactions objects for inequality.

numHbonds()

Return the number of hydrogen bonds

Returns:The number of hydrogen bonds
Return type:int
numPiStacks()

Return the number of pi stacks

Returns:The number of pi stacks
Return type:int
numSaltBridges()

Return the number of salt bridges

Returns:The number of salt bridges
Return type:int
numDisulfides()

Return the number of disulfide bonds

Returns:The number of disulfide bonds
Return type:int
numClashs()

Return the number of steric clashes

Returns:The number of steric clashes
Return type:int
numSpecificInteractions()

Return the total number of specific interactions (i.e. ignoring non- specific interactions such as buried SASA)

Returns:The total number of specific interactions
Return type:int
allInteractingResidues()

Return a list of all residues that this one interacts with (not counting nearby residues)

Returns:A set of ResTuple objects
Return type:set
interactionSummary()

Create the interaction summary to display in the specific interactions column.

Returns:The interaction summary
Return type:str
nearbyRes()

Return the nearby residues

Returns:A tuple of - The nearby residues (as strings), sorted by distance - The sorted residue distances (floats)
Return type:tuple
__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.bioluminate.interaction_calculator', '__doc__': '\n Store data about all the interactions made by a single residue\n ', 'H_BOND': 'hb', 'PI_STACK': 'pi stack', 'SALT_BRIDGE': 'salt bridge', 'CLASH': 'clash', 'DISULFIDE': 's-s', '__init__': <function Interactions.__init__>, '_createInteractionsDict': <function Interactions._createInteractionsDict>, 'init': <classmethod object>, '__repr__': <function Interactions.__repr__>, '__eq__': <function Interactions.__eq__>, '__ne__': <function Interactions.__ne__>, 'numHbonds': <function Interactions.numHbonds>, 'numPiStacks': <function Interactions.numPiStacks>, 'numSaltBridges': <function Interactions.numSaltBridges>, 'numDisulfides': <function Interactions.numDisulfides>, 'numClashs': <function Interactions.numClashs>, 'numSpecificInteractions': <function Interactions.numSpecificInteractions>, 'allInteractingResidues': <function Interactions.allInteractingResidues>, 'interactionSummary': <function Interactions.interactionSummary>, 'nearbyRes': <function Interactions.nearbyRes>, '__dict__': <attribute '__dict__' of 'Interactions' objects>, '__weakref__': <attribute '__weakref__' of 'Interactions' objects>, '__hash__': None})
__dir__() → list

default dir() implementation

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__ = None
__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.interaction_calculator'
__new__()

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

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__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.interaction_calculator.InteractingResidue(res, interactions)

Bases: object

Store information about a residue and the interactions it makes

__init__(res, interactions)

Initialize an instance from existing ResTuple and Interactions objects

Parameters:
__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.bioluminate.interaction_calculator', '__doc__': '\n Store information about a residue and the interactions it makes\n ', '__init__': <function InteractingResidue.__init__>, '__dict__': <attribute '__dict__' of 'InteractingResidue' objects>, '__weakref__': <attribute '__weakref__' of 'InteractingResidue' 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.interaction_calculator'
__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.interaction_calculator.InteractionCalculator(interaction_params=<schrodinger.application.bioluminate.interaction_calculator.InteractionParams object>, ignore_backbone=False)

Bases: object

Calculate all interactions between two groups of atoms

__init__(interaction_params=<schrodinger.application.bioluminate.interaction_calculator.InteractionParams object>, ignore_backbone=False)

Initialize an instance of the class using the specified parameters

Parameters:
  • interaction_params (interaction_calculator.InteractionParams) – The interaction parameters
  • ignore_backbone (bool) – Should the calculations ignore backbone-backbone interactions?
calculate(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]
compileResults()

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

Returns:A list of InteractingResidue objects, sorted by residue
Return type:list
classmethod run(struc, asl_expressions, interaction_params=<schrodinger.application.bioluminate.interaction_calculator.InteractionParams object>, ignore_backbone=False)

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

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]
  • interaction_params (interaction_calculator.InteractionParams) – The interaction parameters
  • ignore_backbone (bool) – Should the calculations ignore backbone-backbone interactions?
Returns:

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

Return type:

list

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.bioluminate.interaction_calculator', '__doc__': '\n Calculate all interactions between two groups of atoms\n ', '__init__': <function InteractionCalculator.__init__>, 'calculate': <function InteractionCalculator.calculate>, '_prepCalculations': <function InteractionCalculator._prepCalculations>, '_prepStrucs': <function InteractionCalculator._prepStrucs>, '_removeTempProperty': <function InteractionCalculator._removeTempProperty>, 'compileResults': <function InteractionCalculator.compileResults>, 'run': <classmethod object>, '_checkAtomLists': <function InteractionCalculator._checkAtomLists>, '_calculateInteraction': <function InteractionCalculator._calculateInteraction>, '_calculateHbonds': <function InteractionCalculator._calculateHbonds>, '_hbondIterator': <function InteractionCalculator._hbondIterator>, '_calculateClashes': <function InteractionCalculator._calculateClashes>, '_clashIterator': <function InteractionCalculator._clashIterator>, '_calculateSaltBridges': <function InteractionCalculator._calculateSaltBridges>, '_saltBridgeIterator': <function InteractionCalculator._saltBridgeIterator>, '_calculateHydrophobicScore': <function InteractionCalculator._calculateHydrophobicScore>, '_isHydrophobicAtom': <function InteractionCalculator._isHydrophobicAtom>, '_calculateNearbyRes': <function InteractionCalculator._calculateNearbyRes>, '_nearbyAtomIterator': <function InteractionCalculator._nearbyAtomIterator>, '_calculatePiStacks': <function InteractionCalculator._calculatePiStacks>, '_calculateDisulfides': <function InteractionCalculator._calculateDisulfides>, '_disulfideIterator': <function InteractionCalculator._disulfideIterator>, '_potentialDisulfideAtom': <function InteractionCalculator._potentialDisulfideAtom>, '_calculateBuriedSASA': <function InteractionCalculator._calculateBuriedSASA>, '_sumSASAByRes': <function InteractionCalculator._sumSASAByRes>, '_recordInteraction': <function InteractionCalculator._recordInteraction>, '_checkInteraction': <function InteractionCalculator._checkInteraction>, '_getHeavyAtomNum': <function InteractionCalculator._getHeavyAtomNum>, '_backboneInteraction': <function InteractionCalculator._backboneInteraction>, '_calculateVdwComp': <function InteractionCalculator._calculateVdwComp>, '__dict__': <attribute '__dict__' of 'InteractionCalculator' objects>, '__weakref__': <attribute '__weakref__' of 'InteractionCalculator' 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.interaction_calculator'
__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.interaction_calculator.PiStackFinder(max_stack_dist=4.0)

Bases: object

Find pi-pi interactions in proteins

Variables:NON_AROMATIC_RES (set) – A set of residue types that don’t contain aromatic side chains
NON_AROMATIC_RES = {'LYS', 'PRO', 'ASP', 'ARG', 'CYS', 'MET', 'LEU', 'GLY', 'THR', 'VAL', 'ALA', 'GLN', 'ILE', 'ASN', 'SER', 'GLU'}
__init__(max_stack_dist=4.0)

Initialize a new object using the specified interaction cutoffs

Parameters:max_stack_dist (float) – The maximum distance between two ring centroids allowed for face-face interactions.
classmethod createIter(struc, group_strucs, max_stack_dist=4.0)

A convenience function to initalize the class and return an iterator

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]
  • max_stack_dist (float) – The maximum distance between two ring centroids allowed for face-face interactions.
Returns:

An iterator that produces tuples of two atom number lists, representing (the ring atoms from group 1 involved in the stacking, the ring atoms from group 2 involved in the stacking

Return type:

iter

piStacksIterator(struc, group_strucs)

Create an iterator that iterates through all pi stacking between two groups of atoms

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]
Returns:

An iterator that produces tuples of two atom number lists, representing (the ring atoms from group 1 involved in the stacking, the ring atoms from group 2 involved in the stacking

Return type:

iter

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.bioluminate.interaction_calculator', '__doc__': "\n Find pi-pi interactions in proteins\n\n :cvar NON_AROMATIC_RES: A set of residue types that don't contain aromatic\n side chains\n :vartype NON_AROMATIC_RES: set\n ", 'NON_AROMATIC_RES': {'LYS', 'PRO', 'ASP', 'ARG', 'CYS', 'MET', 'LEU', 'GLY', 'THR', 'VAL', 'ALA', 'GLN', 'ILE', 'ASN', 'SER', 'GLU'}, '__init__': <function PiStackFinder.__init__>, 'createIter': <classmethod object>, 'piStacksIterator': <function PiStackFinder.piStacksIterator>, '__dict__': <attribute '__dict__' of 'PiStackFinder' objects>, '__weakref__': <attribute '__weakref__' of 'PiStackFinder' 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.interaction_calculator'
__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)

exception schrodinger.application.bioluminate.interaction_calculator.InteractionCalculatorError

Bases: Exception

An error that happens during InteractionCalculator calculations

__cause__

exception cause

__class__

alias of builtins.type

__context__

exception context

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.bioluminate.interaction_calculator', '__doc__': '\n An error that happens during InteractionCalculator calculations\n ', '__weakref__': <attribute '__weakref__' of 'InteractionCalculatorError' 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__

Initialize self. See help(type(self)) for accurate signature.

__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.interaction_calculator'
__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).

__setstate__()
__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).

__suppress_context__
__traceback__
__weakref__

list of weak references to the object (if defined)

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.