Scoring Functions (dockerasmus.score)¶
Generalized Scoring Function¶
-
class
dockerasmus.score.
ScoringFunction
(*components, **kwargs)[source]¶ The generalisation of a scoring function
The ScoringFunction will first fetch dynamically the requirements that must be pre-computed before calling each scoring component: for instance, since both
components.Coulomb
andcomponents.LennardJones
require the atom-wise distance matrix between the two proteins, this matrix will be created only once. This magic behaviour is obtained by matching the names of the arguments of each scoring component with an actual function in therequirements
module.-
components
¶ list
– the list of individual components that are used independently to compute the final score.
-
requirements
¶ Set displays
– a set of arguments that must be preprocessed to compute the score, based on the requirements of the individual scoring components.
Examples
Non-bound terms of Cornell’s scoring function:
>>> f = ScoringFunction(LennardJones, Coulomb) >>> f(barnase, barstar) -84.9...
Using weights on individual components:
>>> g = ScoringFunction(LennardJones, Fabiola, weights=[1, 3]) >>> g(barnase, barstar) -118.54...
-
Components (dockerasmus.score.components)¶
-
class
dockerasmus.score.components.
LennardJones
(force_backend=None)[source]¶ A scoring component modeling Van der Waals interactions.
-
class
dockerasmus.score.components.
Coulomb
(force_backend=None)[source]¶ A scoring component modeling electrostatic forces.
-
class
dockerasmus.score.components.
Fabiola
(force_backend=None)[source]¶ A scoring component modeling hydrogen bonds.
Requirements (dockerasmus.score.requirements)¶
-
dockerasmus.score.requirements.
potential_well_depth
(protein1, protein2)[source]¶ The \(\epsilon\) of the atoms of
protein1
andprotein2
.
-
dockerasmus.score.requirements.
vdw_radius
(protein1, protein2)[source]¶ The Van der Waals radius of the atoms of
protein1
andprotein2
.
-
dockerasmus.score.requirements.
charge
(protein1, protein2)[source]¶ The charge of the atoms of
protein1
andprotein2
.
-
dockerasmus.score.requirements.
ocn_atoms_positions
(protein1, protein2)[source]¶ The positions of O, C and N atoms in
protein1
andprotein2
.
-
dockerasmus.score.requirements.
distance
(protein1, protein2)[source]¶ The euclidean distances of
protein1
atoms toprotein2
atoms.Hint
If available, the distance matrix will be computed using
scipy.spatial.distance.cdist
. Speedup is substantial !