![]() |
Chemical Data Processing Library C++ 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...
#include <GRAILDataSetGenerator.hpp>
Public Types | |
| typedef std::shared_ptr< GRAILDataSetGenerator > | SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated GRAILDataSetGenerator instances. More... | |
| typedef FeatureInteractionScoreGridCalculator::ScoringFunction | ScoringFunction |
| Re-export of the scoring-function type used by the underlying score-grid calculator. More... | |
| typedef FeatureInteractionScoreGridCalculator::ScoreCombinationFunction | ScoreCombinationFunction |
| Re-export of the score-combination function type used by the underlying score-grid calculator. More... | |
| typedef std::function< void(CDPL::Pharm::Pharmacophore &)> | PharmacophoreProcessingFunction |
| Type of the generic functor used to post-process a generated pharmacophore prior to grid calculation. More... | |
Public Member Functions | |
| GRAILDataSetGenerator () | |
Constructs the GRAILDataSetGenerator instance. More... | |
| virtual | ~GRAILDataSetGenerator () |
| Virtual destructor. More... | |
| void | enableInteraction (unsigned int ftr_type, unsigned 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 (unsigned int ftr_type, unsigned int tgt_ftr_type) const |
| Tells whether interaction-grid generation is enabled for the given (ligand feature type, target feature type) pair. More... | |
| void | clearEnabledInteractions () |
| Disables interaction-grid generation for all feature-type pairs. More... | |
| void | setScoringFunction (unsigned int ftr_type, unsigned int tgt_ftr_type, const ScoringFunction &func) |
| Sets the scoring function for the given (ligand feature type, target feature type) pair. More... | |
| const ScoringFunction & | getScoringFunction (unsigned int ftr_type, unsigned int tgt_ftr_type) const |
| Returns the scoring function configured for the given (ligand feature type, target feature type) pair. More... | |
| void | removeScoringFunction (unsigned int ftr_type, unsigned int tgt_ftr_type) |
| Removes the scoring function configured for the given (ligand feature type, target feature type) pair. More... | |
| void | setGridName (unsigned int ftr_type, unsigned int tgt_ftr_type, const std::string &name) |
| Sets the grid name associated with the given (ligand feature type, target feature type) pair. More... | |
| const std::string & | getGridName (unsigned int ftr_type, unsigned int tgt_ftr_type) const |
| Returns the grid name associated with the given (ligand feature type, target feature type) pair. More... | |
| void | removeGridName (unsigned int ftr_type, unsigned int tgt_ftr_type) |
| Removes the grid name associated with the given (ligand feature type, target feature type) pair. More... | |
| void | setScoreCombinationFunction (const ScoreCombinationFunction &func) |
| Sets the function used to combine per-feature scores into a single grid cell value. More... | |
| const ScoreCombinationFunction & | getScoreCombinationFunction () const |
| Returns the currently configured score-combination function. More... | |
| void | normalizeScores (bool normalize) |
| Enables or disables normalization of the combined per-cell scores to the range [0, 1]. More... | |
| bool | scoresNormalized () const |
| Tells whether the combined per-cell scores are normalized. More... | |
| void | diminishScoresByAtomDensity (bool diminish) |
| Enables or disables multiplicative diminishing of interaction scores by the (normalized) atom density of the target environment. More... | |
| bool | scoresDiminishedByAtomDensity () const |
| Tells whether the interaction scores are diminished by the atom density of the target environment. More... | |
| void | storeEnvironmentAtomDensityGrid (bool store) |
| Specifies whether the target environment atom-density grid shall be added to the produced grid set. More... | |
| bool | environmentAtomDensityGridStored () const |
| Tells whether the target environment atom-density grid is stored in the produced grid set. More... | |
| void | setEnvironmentAtomDensityGridName (const std::string &name) |
| Sets the name to assign to the target environment atom-density grid in the produced grid set. More... | |
| const std::string & | getEnvironmentAtomDensityGridName () const |
| Returns the name assigned to the target environment atom-density grid. More... | |
| const Math::Matrix4D & | getGridTransform () const |
| Returns the affine transformation matrix that places the grids in the target coordinate frame. More... | |
| template<typename T > | |
| void | setGridTransform (const T &xform) |
| Sets the affine transformation matrix that places the grids in the target coordinate frame. More... | |
| double | getGridStepSize () const |
| Returns the currently configured grid spacing. More... | |
| void | setGridStepSize (double size) |
| Sets the grid spacing (isotropic). More... | |
| std::size_t | getGridXSize () const |
| Returns the grid size in the x direction. More... | |
| void | setGridXSize (std::size_t size) |
| Sets the grid size in the x direction. More... | |
| std::size_t | getGridYSize () const |
| Returns the grid size in the y direction. More... | |
| void | setGridYSize (std::size_t size) |
| Sets the grid size in the y direction. More... | |
| std::size_t | getGridZSize () const |
| Returns the grid size in the z direction. More... | |
| void | setGridZSize (std::size_t size) |
| Sets the grid size in the z direction. More... | |
| void | setGridParamsForBoundingBox (const Math::Vector3D &bbox_min, const Math::Vector3D &bbox_max, double step_size=DEF_GRID_STEP_SIZE) |
| Convenience method that configures grid size, spacing and transformation so that the grid covers the given axis-aligned bounding box. More... | |
| const Pharm::DefaultPharmacophoreGenerator & | getPharmacophoreGenerator () const |
| Returns the internal pharmacophore generator used for the target environment. More... | |
| Pharm::DefaultPharmacophoreGenerator & | getPharmacophoreGenerator () |
| Returns the internal pharmacophore generator used for the target environment. More... | |
| void | setPharmacophoreProcessingFunction (const PharmacophoreProcessingFunction &func) |
| Sets the function applied to the generated target pharmacophore before grid calculation (e.g. for filtering or modification). More... | |
| const PharmacophoreProcessingFunction & | getPharmacophoreProcessingFunction () const |
| Returns the currently configured pharmacophore processing function. More... | |
| void | calcInteractionGrids (const Chem::MolecularGraph &tgt_env, const 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::SharedPointer | calcAtomDensityGrid (const Chem::AtomContainer &atoms, const Chem::Atom3DCoordinatesFunction &coords_func, const std::string &grid_name) |
| Calculates an atom-density grid for the given atoms. More... | |
Static Public Attributes | |
| static constexpr double | DEF_GRID_STEP_SIZE = 0.5 |
| Default grid spacing (isotropic). More... | |
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).
| typedef std::shared_ptr<GRAILDataSetGenerator> CDPL::GRAIL::GRAILDataSetGenerator::SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated GRAILDataSetGenerator instances.
| typedef FeatureInteractionScoreGridCalculator::ScoringFunction CDPL::GRAIL::GRAILDataSetGenerator::ScoringFunction |
Re-export of the scoring-function type used by the underlying score-grid calculator.
| typedef FeatureInteractionScoreGridCalculator::ScoreCombinationFunction CDPL::GRAIL::GRAILDataSetGenerator::ScoreCombinationFunction |
Re-export of the score-combination function type used by the underlying score-grid calculator.
| typedef std::function<void(CDPL::Pharm::Pharmacophore&)> CDPL::GRAIL::GRAILDataSetGenerator::PharmacophoreProcessingFunction |
Type of the generic functor used to post-process a generated pharmacophore prior to grid calculation.
| CDPL::GRAIL::GRAILDataSetGenerator::GRAILDataSetGenerator | ( | ) |
Constructs the GRAILDataSetGenerator instance.
|
inlinevirtual |
Virtual destructor.
| void CDPL::GRAIL::GRAILDataSetGenerator::enableInteraction | ( | unsigned int | ftr_type, |
| unsigned 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 | ( | unsigned int | ftr_type, |
| unsigned int | tgt_ftr_type | ||
| ) | const |
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. | void CDPL::GRAIL::GRAILDataSetGenerator::clearEnabledInteractions | ( | ) |
Disables interaction-grid generation for all feature-type pairs.
| void CDPL::GRAIL::GRAILDataSetGenerator::setScoringFunction | ( | unsigned int | ftr_type, |
| unsigned int | tgt_ftr_type, | ||
| const ScoringFunction & | 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. |
| const ScoringFunction& CDPL::GRAIL::GRAILDataSetGenerator::getScoringFunction | ( | unsigned int | ftr_type, |
| unsigned int | tgt_ftr_type | ||
| ) | const |
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. |
| void CDPL::GRAIL::GRAILDataSetGenerator::removeScoringFunction | ( | unsigned int | ftr_type, |
| unsigned 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. |
| void CDPL::GRAIL::GRAILDataSetGenerator::setGridName | ( | unsigned int | ftr_type, |
| unsigned int | tgt_ftr_type, | ||
| const std::string & | 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. |
| const std::string& CDPL::GRAIL::GRAILDataSetGenerator::getGridName | ( | unsigned int | ftr_type, |
| unsigned int | tgt_ftr_type | ||
| ) | const |
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. |
| void CDPL::GRAIL::GRAILDataSetGenerator::removeGridName | ( | unsigned int | ftr_type, |
| unsigned 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. |
| void CDPL::GRAIL::GRAILDataSetGenerator::setScoreCombinationFunction | ( | const ScoreCombinationFunction & | func | ) |
Sets the function used to combine per-feature scores into a single grid cell value.
| func | The score-combination function. |
| const ScoreCombinationFunction& CDPL::GRAIL::GRAILDataSetGenerator::getScoreCombinationFunction | ( | ) | const |
Returns the currently configured score-combination function.
| void 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 | ( | ) | const |
Tells whether the combined per-cell scores are normalized.
true if the combined scores are normalized, and false otherwise. | void 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 | ( | ) | const |
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. | void 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 | ( | ) | const |
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. | void CDPL::GRAIL::GRAILDataSetGenerator::setEnvironmentAtomDensityGridName | ( | const std::string & | name | ) |
Sets the name to assign to the target environment atom-density grid in the produced grid set.
| name | The grid name. |
| const std::string& CDPL::GRAIL::GRAILDataSetGenerator::getEnvironmentAtomDensityGridName | ( | ) | const |
Returns the name assigned to the target environment atom-density grid.
| const Math::Matrix4D& CDPL::GRAIL::GRAILDataSetGenerator::getGridTransform | ( | ) | const |
Returns the affine transformation matrix that places the grids in the target coordinate frame.
|
inline |
Sets the affine transformation matrix that places the grids in the target coordinate frame.
| T | The transformation matrix expression type. |
| xform | The transformation matrix. |
| double CDPL::GRAIL::GRAILDataSetGenerator::getGridStepSize | ( | ) | const |
Returns the currently configured grid spacing.
| void CDPL::GRAIL::GRAILDataSetGenerator::setGridStepSize | ( | double | size | ) |
Sets the grid spacing (isotropic).
| size | The grid spacing. |
| std::size_t CDPL::GRAIL::GRAILDataSetGenerator::getGridXSize | ( | ) | const |
Returns the grid size in the x direction.
| void CDPL::GRAIL::GRAILDataSetGenerator::setGridXSize | ( | std::size_t | size | ) |
Sets the grid size in the x direction.
| size | The grid size. |
| std::size_t CDPL::GRAIL::GRAILDataSetGenerator::getGridYSize | ( | ) | const |
Returns the grid size in the y direction.
| void CDPL::GRAIL::GRAILDataSetGenerator::setGridYSize | ( | std::size_t | size | ) |
Sets the grid size in the y direction.
| size | The grid size. |
| std::size_t CDPL::GRAIL::GRAILDataSetGenerator::getGridZSize | ( | ) | const |
Returns the grid size in the z direction.
| void CDPL::GRAIL::GRAILDataSetGenerator::setGridZSize | ( | std::size_t | size | ) |
Sets the grid size in the z direction.
| size | The grid size. |
| void CDPL::GRAIL::GRAILDataSetGenerator::setGridParamsForBoundingBox | ( | const Math::Vector3D & | bbox_min, |
| const Math::Vector3D & | bbox_max, | ||
| double | step_size = DEF_GRID_STEP_SIZE |
||
| ) |
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. |
| const Pharm::DefaultPharmacophoreGenerator& CDPL::GRAIL::GRAILDataSetGenerator::getPharmacophoreGenerator | ( | ) | const |
Returns the internal pharmacophore generator used for the target environment.
const reference to the pharmacophore generator. | Pharm::DefaultPharmacophoreGenerator& CDPL::GRAIL::GRAILDataSetGenerator::getPharmacophoreGenerator | ( | ) |
Returns the internal pharmacophore generator used for the target environment.
| void CDPL::GRAIL::GRAILDataSetGenerator::setPharmacophoreProcessingFunction | ( | const PharmacophoreProcessingFunction & | func | ) |
Sets the function applied to the generated target pharmacophore before grid calculation (e.g. for filtering or modification).
| func | The pharmacophore processing function. |
| const PharmacophoreProcessingFunction& CDPL::GRAIL::GRAILDataSetGenerator::getPharmacophoreProcessingFunction | ( | ) | const |
Returns the currently configured pharmacophore processing function.
| void CDPL::GRAIL::GRAILDataSetGenerator::calcInteractionGrids | ( | const Chem::MolecularGraph & | tgt_env, |
| const 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::SharedPointer CDPL::GRAIL::GRAILDataSetGenerator::calcAtomDensityGrid | ( | const Chem::AtomContainer & | atoms, |
| const Chem::Atom3DCoordinatesFunction & | coords_func, | ||
| const std::string & | 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. |
|
staticconstexpr |
Default grid spacing (isotropic).