![]() |
Chemical Data Processing Library Python API - Version 1.4.0
|
Generator that pre-computes the per-cell interaction-score grids and the atom-density grid used by GRAIL scoring of ligand poses against a target environment. More...
Inheritance diagram for CDPL.GRAIL.GRAILDataSetGenerator:Public Member Functions | |
| None | __init__ () |
Constructs the GRAILDataSetGenerator instance. | |
| None | __init__ (GRAILDataSetGenerator gen) |
Initializes a copy of the GRAILDataSetGenerator instance gen. More... | |
| int | getObjectID () |
| Returns the numeric identifier (ID) of the wrapped C++ class instance. More... | |
| GRAILDataSetGenerator | assign (GRAILDataSetGenerator gen) |
Replaces the current state of self with a copy of the state of the GRAILDataSetGenerator instance gen. More... | |
| None | setScoringFunction (int ftr_type, int tgt_ftr_type, DoubleVector3DFeatureFunctor func) |
| Sets the scoring function for the given (ligand feature type, target feature type) pair. More... | |
| None | removeScoringFunction (int ftr_type, int tgt_ftr_type) |
| Removes the scoring function configured for the given (ligand feature type, target feature type) pair. More... | |
| DoubleVector3DFeatureFunctor | getScoringFunction (int ftr_type, int tgt_ftr_type) |
| Returns the scoring function configured for the given (ligand feature type, target feature type) pair. More... | |
| None | setGridName (int ftr_type, int tgt_ftr_type, str name) |
| Sets the grid name associated with the given (ligand feature type, target feature type) pair. More... | |
| None | removeGridName (int ftr_type, int tgt_ftr_type) |
| Removes the grid name associated with the given (ligand feature type, target feature type) pair. More... | |
| str | getGridName (int ftr_type, int tgt_ftr_type) |
| Returns the grid name associated with the given (ligand feature type, target feature type) pair. More... | |
| None | enableInteraction (int ftr_type, int tgt_ftr_type, bool enable) |
| Enables or disables interaction-grid generation for the given (ligand feature type, target feature type) pair. More... | |
| bool | isInteractionEnabled (int ftr_type, int tgt_ftr_type) |
| Tells whether interaction-grid generation is enabled for the given (ligand feature type, target feature type) pair. More... | |
| bool | clearEnabledInteractions (int arg2, int self) |
| None | setScoreCombinationFunction (Math.DoubleDVectorFunctor func) |
| Sets the function used to combine per-feature scores into a single grid cell value. More... | |
| Math.DoubleDVectorFunctor | getScoreCombinationFunction () |
| Returns the currently configured score-combination function. More... | |
| None | normalizeScores (bool normalize) |
| Enables or disables normalization of the combined per-cell scores to the range [0, 1]. More... | |
| bool | scoresNormalized () |
| Tells whether the combined per-cell scores are normalized. More... | |
| None | diminishScoresByAtomDensity (bool diminish) |
| Enables or disables multiplicative diminishing of interaction scores by the (normalized) atom density of the target environment. More... | |
| bool | scoresDiminishedByAtomDensity () |
| Tells whether the interaction scores are diminished by the atom density of the target environment. More... | |
| None | storeEnvironmentAtomDensityGrid (bool store) |
| Specifies whether the target environment atom-density grid shall be added to the produced grid set. More... | |
| bool | environmentAtomDensityGridStored () |
| Tells whether the target environment atom-density grid is stored in the produced grid set. More... | |
| None | setEnvironmentAtomDensityGridName () |
| str | getEnvironmentAtomDensityGridName () |
| Returns the name assigned to the target environment atom-density grid. More... | |
| float | getGridStepSize () |
| Returns the currently configured grid spacing. More... | |
| None | setGridStepSize (float size) |
| Sets the grid spacing (isotropic). More... | |
| int | getGridXSize () |
| Returns the grid size in the x direction. More... | |
| None | setGridXSize (int size) |
| Sets the grid size in the x direction. More... | |
| int | getGridYSize () |
| Returns the grid size in the y direction. More... | |
| None | setGridYSize (int size) |
| Sets the grid size in the y direction. More... | |
| int | getGridZSize () |
| Returns the grid size in the z direction. More... | |
| None | setGridZSize (int size) |
| Sets the grid size in the z direction. More... | |
| Math.Matrix4D | getGridTransform () |
| Returns the affine transformation matrix that places the grids in the target coordinate frame. More... | |
| None | setGridTransform (Math.Matrix4D xform) |
| Sets the affine transformation matrix that places the grids in the target coordinate frame. More... | |
| None | setGridParamsForBoundingBox (Math.Vector3D bbox_min, Math.Vector3D bbox_max, float step_size=0.5) |
| Convenience method that configures grid size, spacing and transformation so that the grid covers the given axis-aligned bounding box. More... | |
| Pharm.DefaultPharmacophoreGenerator | getPharmacophoreGenerator () |
| Returns the internal pharmacophore generator used for the target environment. More... | |
| None | setPharmacophoreProcessingFunction (VoidPharmacophoreFunctor func) |
| Sets the function applied to the generated target pharmacophore before grid calculation (e.g. More... | |
| VoidPharmacophoreFunctor | getPharmacophoreProcessingFunction () |
| Returns the currently configured pharmacophore processing function. More... | |
| None | calcInteractionGrids (Chem.MolecularGraph tgt_env, Chem.Atom3DCoordinatesFunction coords_func, Grid.DRegularGridSet grid_set, bool append=False) |
| Calculates the interaction-score grids for all enabled feature-type pairs and stores them in grid_set. More... | |
| Grid.DRegularGrid | calcAtomDensityGrid (Chem.AtomContainer atoms, Chem.Atom3DCoordinatesFunction coords_func, str grid_name) |
| Calculates an atom-density grid for the given atoms. More... | |
Static Public Attributes | |
| float | DEF_GRID_STEP_SIZE = 0.5 |
| Default grid spacing (isotropic). | |
Properties | |
| objectID = property(getObjectID) | |
| normalizedScores = property(scoresNormalized, normalizeScores) | |
| scoreCombinationFunction = property(getScoreCombinationFunction, setScoreCombinationFunction) | |
| pharmProcessingFunction = property(getPharmacophoreProcessingFunction, setPharmacophoreProcessingFunction) | |
| gridStepSize = property(getGridStepSize, setGridStepSize) | |
| gridXSize = property(getGridXSize, setGridXSize) | |
| gridYSize = property(getGridYSize, setGridYSize) | |
| gridZSize = property(getGridZSize, setGridZSize) | |
| gridTransform = property(getGridTransform, setGridTransform) | |
| pharmGenerator = property(getPharmacophoreGenerator) | |
| dimScoresByAtomDensity = property(scoresDiminishedByAtomDensity, diminishScoresByAtomDensity) | |
| storeEnvAtomDensityGrid = property(environmentAtomDensityGridStored, storeEnvironmentAtomDensityGrid) | |
| envAtomDensityGridName = property(getEnvironmentAtomDensityGridName, setEnvironmentAtomDensityGridName) | |
Generator that pre-computes the per-cell interaction-score grids and the atom-density grid used by GRAIL scoring of ligand poses against a target environment.
For every enabled (ligand feature type, target feature type) pair the generator runs a GRAIL.FeatureInteractionScoreGridCalculator and stores the resulting grid in a Grid.DRegularGridSet. Optionally the generator also produces an atom-density grid of the target environment (e.g. for use as a buriedness or accessibility weight).
| None CDPL.GRAIL.GRAILDataSetGenerator.__init__ | ( | GRAILDataSetGenerator | gen | ) |
Initializes a copy of the GRAILDataSetGenerator instance gen.
| gen | The GRAILDataSetGenerator instance to copy. |
| int CDPL.GRAIL.GRAILDataSetGenerator.getObjectID | ( | ) |
Returns the numeric identifier (ID) of the wrapped C++ class instance.
Different Python GRAILDataSetGenerator instances may reference the same underlying C++ class instance. The commonly used Python expression a is not b thus cannot tell reliably whether the two GRAILDataSetGenerator instances a and b reference different C++ objects. The numeric identifier returned by this method allows to correctly implement such an identity test via the simple expression a.getObjectID() != b.getObjectID().
| GRAILDataSetGenerator CDPL.GRAIL.GRAILDataSetGenerator.assign | ( | GRAILDataSetGenerator | gen | ) |
Replaces the current state of self with a copy of the state of the GRAILDataSetGenerator instance gen.
| gen | The GRAILDataSetGenerator instance to copy. |
| None CDPL.GRAIL.GRAILDataSetGenerator.setScoringFunction | ( | int | ftr_type, |
| int | tgt_ftr_type, | ||
| DoubleVector3DFeatureFunctor | func | ||
| ) |
Sets the scoring function for the given (ligand feature type, target feature type) pair.
| ftr_type | The ligand feature type. |
| tgt_ftr_type | The target feature type. |
| func | The scoring function. |
| None CDPL.GRAIL.GRAILDataSetGenerator.removeScoringFunction | ( | int | ftr_type, |
| int | tgt_ftr_type | ||
| ) |
Removes the scoring function configured for the given (ligand feature type, target feature type) pair.
| ftr_type | The ligand feature type. |
| tgt_ftr_type | The target feature type. |
| DoubleVector3DFeatureFunctor CDPL.GRAIL.GRAILDataSetGenerator.getScoringFunction | ( | int | ftr_type, |
| int | tgt_ftr_type | ||
| ) |
Returns the scoring function configured for the given (ligand feature type, target feature type) pair.
| ftr_type | The ligand feature type. |
| tgt_ftr_type | The target feature type. |
| None CDPL.GRAIL.GRAILDataSetGenerator.setGridName | ( | int | ftr_type, |
| int | tgt_ftr_type, | ||
| str | name | ||
| ) |
Sets the grid name associated with the given (ligand feature type, target feature type) pair.
| ftr_type | The ligand feature type. |
| tgt_ftr_type | The target feature type. |
| name | The grid name. |
| None CDPL.GRAIL.GRAILDataSetGenerator.removeGridName | ( | int | ftr_type, |
| int | tgt_ftr_type | ||
| ) |
Removes the grid name associated with the given (ligand feature type, target feature type) pair.
| ftr_type | The ligand feature type. |
| tgt_ftr_type | The target feature type. |
| str CDPL.GRAIL.GRAILDataSetGenerator.getGridName | ( | int | ftr_type, |
| int | tgt_ftr_type | ||
| ) |
Returns the grid name associated with the given (ligand feature type, target feature type) pair.
| ftr_type | The ligand feature type. |
| tgt_ftr_type | The target feature type. |
| None CDPL.GRAIL.GRAILDataSetGenerator.enableInteraction | ( | int | ftr_type, |
| int | tgt_ftr_type, | ||
| bool | enable | ||
| ) |
Enables or disables interaction-grid generation for the given (ligand feature type, target feature type) pair.
| ftr_type | The ligand feature type. |
| tgt_ftr_type | The target feature type. |
| enable | If True, the interaction is enabled. |
| bool CDPL.GRAIL.GRAILDataSetGenerator.isInteractionEnabled | ( | int | ftr_type, |
| int | tgt_ftr_type | ||
| ) |
Tells whether interaction-grid generation is enabled for the given (ligand feature type, target feature type) pair.
| ftr_type | The ligand feature type. |
| tgt_ftr_type | The target feature type. |
True if the interaction is enabled, and False otherwise. | bool CDPL.GRAIL.GRAILDataSetGenerator.clearEnabledInteractions | ( | int | arg2, |
| int | self | ||
| ) |
| arg1 | |
| arg2 |
| None CDPL.GRAIL.GRAILDataSetGenerator.setScoreCombinationFunction | ( | Math.DoubleDVectorFunctor | func | ) |
Sets the function used to combine per-feature scores into a single grid cell value.
| func | The score-combination function. |
| Math.DoubleDVectorFunctor CDPL.GRAIL.GRAILDataSetGenerator.getScoreCombinationFunction | ( | ) |
Returns the currently configured score-combination function.
| None CDPL.GRAIL.GRAILDataSetGenerator.normalizeScores | ( | bool | normalize | ) |
Enables or disables normalization of the combined per-cell scores to the range [0, 1].
| normalize | If True, the combined scores are normalized. |
| bool CDPL.GRAIL.GRAILDataSetGenerator.scoresNormalized | ( | ) |
Tells whether the combined per-cell scores are normalized.
True if the combined scores are normalized, and False otherwise. | None CDPL.GRAIL.GRAILDataSetGenerator.diminishScoresByAtomDensity | ( | bool | diminish | ) |
Enables or disables multiplicative diminishing of interaction scores by the (normalized) atom density of the target environment.
| diminish | If True, scores are diminished by atom density. |
| bool CDPL.GRAIL.GRAILDataSetGenerator.scoresDiminishedByAtomDensity | ( | ) |
Tells whether the interaction scores are diminished by the atom density of the target environment.
True if scores are diminished by atom density, and False otherwise. | None CDPL.GRAIL.GRAILDataSetGenerator.storeEnvironmentAtomDensityGrid | ( | bool | store | ) |
Specifies whether the target environment atom-density grid shall be added to the produced grid set.
| store | If True, the atom-density grid is stored. |
| bool CDPL.GRAIL.GRAILDataSetGenerator.environmentAtomDensityGridStored | ( | ) |
Tells whether the target environment atom-density grid is stored in the produced grid set.
True if the atom-density grid is stored, and False otherwise. | None CDPL.GRAIL.GRAILDataSetGenerator.setEnvironmentAtomDensityGridName | ( | ) |
| <br> |
| str CDPL.GRAIL.GRAILDataSetGenerator.getEnvironmentAtomDensityGridName | ( | ) |
Returns the name assigned to the target environment atom-density grid.
| float CDPL.GRAIL.GRAILDataSetGenerator.getGridStepSize | ( | ) |
Returns the currently configured grid spacing.
| None CDPL.GRAIL.GRAILDataSetGenerator.setGridStepSize | ( | float | size | ) |
Sets the grid spacing (isotropic).
| size | The grid spacing. |
| int CDPL.GRAIL.GRAILDataSetGenerator.getGridXSize | ( | ) |
Returns the grid size in the x direction.
| None CDPL.GRAIL.GRAILDataSetGenerator.setGridXSize | ( | int | size | ) |
Sets the grid size in the x direction.
| size | The grid size. |
| int CDPL.GRAIL.GRAILDataSetGenerator.getGridYSize | ( | ) |
Returns the grid size in the y direction.
| None CDPL.GRAIL.GRAILDataSetGenerator.setGridYSize | ( | int | size | ) |
Sets the grid size in the y direction.
| size | The grid size. |
| int CDPL.GRAIL.GRAILDataSetGenerator.getGridZSize | ( | ) |
Returns the grid size in the z direction.
| None CDPL.GRAIL.GRAILDataSetGenerator.setGridZSize | ( | int | size | ) |
Sets the grid size in the z direction.
| size | The grid size. |
| Math.Matrix4D CDPL.GRAIL.GRAILDataSetGenerator.getGridTransform | ( | ) |
Returns the affine transformation matrix that places the grids in the target coordinate frame.
| None CDPL.GRAIL.GRAILDataSetGenerator.setGridTransform | ( | Math.Matrix4D | xform | ) |
Sets the affine transformation matrix that places the grids in the target coordinate frame.
| xform | The transformation matrix. |
| None CDPL.GRAIL.GRAILDataSetGenerator.setGridParamsForBoundingBox | ( | Math.Vector3D | bbox_min, |
| Math.Vector3D | bbox_max, | ||
| float | step_size = 0.5 |
||
| ) |
Convenience method that configures grid size, spacing and transformation so that the grid covers the given axis-aligned bounding box.
| bbox_min | The bounding box minimum-corner coordinates. |
| bbox_max | The bounding box maximum-corner coordinates. |
| step_size | The grid spacing. |
| Pharm.DefaultPharmacophoreGenerator CDPL.GRAIL.GRAILDataSetGenerator.getPharmacophoreGenerator | ( | ) |
Returns the internal pharmacophore generator used for the target environment.
| None CDPL.GRAIL.GRAILDataSetGenerator.setPharmacophoreProcessingFunction | ( | VoidPharmacophoreFunctor | func | ) |
Sets the function applied to the generated target pharmacophore before grid calculation (e.g.
for filtering or modification).
| func | The pharmacophore processing function. |
| VoidPharmacophoreFunctor CDPL.GRAIL.GRAILDataSetGenerator.getPharmacophoreProcessingFunction | ( | ) |
Returns the currently configured pharmacophore processing function.
| None CDPL.GRAIL.GRAILDataSetGenerator.calcInteractionGrids | ( | Chem.MolecularGraph | tgt_env, |
| Chem.Atom3DCoordinatesFunction | coords_func, | ||
| Grid.DRegularGridSet | grid_set, | ||
| bool | append = False |
||
| ) |
Calculates the interaction-score grids for all enabled feature-type pairs and stores them in grid_set.
| tgt_env | The target environment. |
| coords_func | The function used to retrieve atom 3D-coordinates from tgt_env. |
| grid_set | The output grid set. |
| append | If True, the new grids are appended to grid_set. Otherwise, grid_set is cleared first. |
| Grid.DRegularGrid CDPL.GRAIL.GRAILDataSetGenerator.calcAtomDensityGrid | ( | Chem.AtomContainer | atoms, |
| Chem.Atom3DCoordinatesFunction | coords_func, | ||
| str | grid_name | ||
| ) |
Calculates an atom-density grid for the given atoms.
| atoms | The atoms contributing to the density. |
| coords_func | The function used to retrieve atom 3D-coordinates. |
| grid_name | The name to assign to the resulting grid. |