Loading...
Searching...
No Matches
BALL::GridBasedScoring Class Referenceabstract

`#include <BALL/SCORING/COMMON/gridBasedScoring.h>`

Inheritance diagram for BALL::GridBasedScoring:

## Classes

struct | Option
struct | Default
struct | GridSetsResult

## Public Member Functions

| GridBasedScoring (AtomContainer &receptor, AtomContainer &ligand, Options &options)
| GridBasedScoring (AtomContainer &receptor, Vector3 &hashgrid_origin, Options &options)
virtual | ~GridBasedScoring ()
void | defineGridSet (AtomContainer *sys, Vector3 &angstroem, double out_of_grid_penalty, bool enforce_grid_boundaries, double resolution, double interaction_no_scale=1)
void | defineGridSet (AtomContainer *sys, double out_of_grid_penalty, bool enforce_grid_boundaries, double resolution, double interaction_no_scale=1)
void | defineFlexibleResiduesGridSet ()
void | printResult ()
void | setAtomTypeNames (std::set< String > &types)
void | precalculateGrids (bool ony_flexRes_grids=false)
void | saveGridSetsToFile (String file, String receptor_name)
void | readAdditionalGridSetFromFile (String file)
void | replaceGridSetFromFile (String file)
void | loadFlexibleResidueScoreGrids (std::list< std::pair< const Residue *, const Rotamer * > > residue_list)
void | setupReferenceLigand ()
void | setCombineOperation (int i)
int | getNoNeighboringReceptorAtoms ()
std::vector< ScoreGridSet * > * | getScoreGridSets ()
void | validateGridSets ()
Public Member Functions inherited from BALL::ScoringFunction
| ScoringFunction ()
| ScoringFunction (const ScoringFunction &sf)
| ScoringFunction (AtomContainer &receptor, AtomContainer &ligand)
| ScoringFunction (AtomContainer &receptor, AtomContainer &ligand, const Options &options)
| ScoringFunction (AtomContainer &receptor, AtomContainer &ligand, Options &options)
| ScoringFunction (AtomContainer &receptor, Vector3 &hashgrid_origin, Options &options)
virtual | ~ScoringFunction ()
virtual void | clear ()
ScoringFunction & | operator= (const ScoringFunction &sf)
bool | setup ()
bool | setup (AtomContainer &receptor, AtomContainer &ligand)
bool | setup (AtomContainer &receptor, AtomContainer &ligand, const Options &options)
void | setMaximumNumberOfErrors (Size nr)
Size | getMaximumNumberOfErrors () const
void | setFirstMolecule (AtomContainer &molecule1)
AtomContainer * | getFirstMolecule () const
void | setSecondMolecule (AtomContainer &molecule2)
AtomContainer * | getSecondMolecule () const
void | setReceptor (AtomContainer &receptor)
AtomContainer * | getReceptor () const
void | setLigand (AtomContainer &ligand)
AtomContainer * | getLigand () const
void | setIntercept (double intercept)
double | getIntercept () const
void | setBaseFunction (ScoringBaseFunction &base_function)
| Set the instance of BaseFunction for the scoring function.
ScoringBaseFunction * | getBaseFunction () const
void | insertComponent (ScoringComponent *component)
void | insertComponent (ScoringComponent *component, float coefficient)
void | removeComponent (const ScoringComponent *component)
void | removeComponent (const String &name)
void | setCoefficient (const ScoringComponent *component, float coefficient)
void | setCoefficient (const String &name, float coefficient)
bool | getCoefficient (const ScoringComponent *component, float &coefficient) const
bool | getCoefficient (const String &name, float &coefficient) const
ScoringComponent * | getComponent (const String &name) const
ScoringComponent * | getComponent (const Size index) const
double | calculateScore ()
const HashSet< const Atom * > & | getUnassignedAtoms () const
HashSet< const Atom * > & | getUnassignedAtoms ()
double | getExpEnergyStddev ()
void | enableStoreInteractionsOnlyForPhContraints ()
String | convertTime (double seconds)
virtual void | update ()
virtual double | updateScore ()
virtual void | printResult (bool detail=0)
void | getScoreContributions (vector< double > &score_contributions, vector< String > &names)
String | getEquation ()
void | enableStoreInteractions (bool b=true)
String | getName ()
int | getBurialDepthScale ()
String | valueToString (double value)
void | unsetTrainingParameters ()
void | setNormalizationParameters (double stddev, double mean)
const HashGrid3< Atom * > * | getHashGrid ()
const Vector3 & | getLigandCenter () const
double | getLigandRadius () const
bool | storeInteractionsEnabled ()
int | getNoLigandAtoms ()
Options | getOptions ()
Options * | getOptionsToModify ()
void | createStaticLigandFragments ()
const vector< Bond * > * | getRotatableLigandBonds () const
const vector< StaticLigandFragment * > * | getStaticLigandFragments () const
bool | hasFlexibleResidues ()
void | setFlexibleResidues (const std::set< Residue * > &flexible_residues)
bool | assignRotamer (Residue *residue, ResidueRotamerSet *rotamer_set, const Rotamer *rotamer)
void | resetFlexibleResidues ()
Size | countNeighboringReceptorAtoms (const Atom *atom, double distance_threshold, bool onePerCell=0, int *number_of_overlaps=0) const
void | resetResiduePositions (Residue *residue, list< Vector3 > &old_positions)
double | getScore ()
const std::map< Atom *, int > * | getAtomFragmentMap ()

## Protected Member Functions

void | setup ()
double | calculateGridScore ()
void | defineReceptorGridSet (Vector3 &origin, Vector3 &size, double out_of_grid_penalty, bool enforce_grid_boundaries, double resolution=0.5, double interaction_no_scale=1)
virtual AtomTypes & | getAtomTypes ()=0
std::map< String, int > * | getAtomTypesMap ()
virtual void | setAtomType (Atom *atom, const String &type_name)
String | getGridAtomTypeName (int grid_id)
virtual void | updatePrecalculatedScore (Size set)=0
Protected Member Functions inherited from BALL::ScoringFunction
void | setName (String name)
void | updateComponent (int id, AtomPairList *)
Vector3 | calculateGeometricalCenter (AtomContainer *s, int *no_ligand_atoms=NULL)
double | calculateMoleculeRadius (AtomContainer *sys, Vector3 &center)
void | setupFlexibleResidues_ ()
int | checkForAtomOverlaps (const AtomPairVector *pair_vector)
AtomPairVector * | createNonbondedPairVector (HashGrid3< Atom * > *hashgrid, int &overlaps, bool rec_lig, bool check_fragments=0, bool intra_fragment=0)
AtomPairVector * | createLigandNonbondedPairVector (bool intra_fragment, int &overlaps)
bool | hasPharmacophoreConstraints_ ()
void | clearStoredInteractions_ ()
double | calculateConstraintsScore ()
void | enableInteractionComponents_ (const list< String > &type_names)
virtual double | getES ()
void | enableAllComponents_ ()
void | fetchStaticLigandFragment (Atom *a1, int index)
int | countCovalentBonds (const Atom *atom, int threshold=-1)
virtual void | createAllLigandNonBondedPairs ()
virtual double | calculateStaticLigandFragmentEnergy ()
bool | isPeptideBond (const Bond *bond) const

## Protected Attributes

GridSetsResult | gridsets_result_
int | combine_operation_
std::map< String, int > | atom_types_map_
std::vector< BALL::ScoreGridSet * > | grid_sets_
double | scoregrid_resolution_
bool | scoregrid_interpolation_
int | flex_gridset_id_
std::map< const Residue *, ScoreGridSet * > | flex_gridsets_
Protected Attributes inherited from BALL::ScoringFunction
String | name_ {""}
Options | options_ {}
AtomContainer * | receptor_ {nullptr}
AtomContainer * | ligand_ {nullptr}
double | score_ {0.0}
double | intercept_ {0.0}
ScoringBaseFunction * | base_function_ {nullptr}
vector< ScoringComponent * > | scoring_components_ {}
HashSet< const Atom * > | unassigned_atoms_ {}
Size | max_number_of_errors_ {0}
Size | number_of_errors_ {0}
double | ligand_radius_ {0.0}
int | ligand_atoms_ {0}
Vector3 | ligand_center_ {}
HashGrid3< Atom * > * | hashgrid_ {nullptr}
HashGrid3< Atom * > * | all_residues_hashgrid_ {nullptr}
HashGrid3< Atom * > * | static_residues_hashgrid_ {nullptr}
HashGrid3< Atom * > * | flexible_residues_hashgrid_ {nullptr}
double | resolution_ {0.0}
std::map< Atom *, int > | atoms_to_fragments_ {}
int | reference_neighbors_ {0}
int | neighboring_target_atoms_ {0}
int | misplaced_ligand_atoms_ {0}
int | hashgrid_search_radius_ {0}
double | nonbonded_cutoff_ {0.0}
double | nonbonded_cutoff_2_ {0.0}
bool | ignore_h_clashes_ {false}
int | overlaps_ {0}
int | ligand_intramol_overlaps_ {0}
double | allowed_intermolecular_overlap_ {0.0}
double | allowed_intramolecular_overlap_ {0.0}
double | neighbor_cutoff_2_ {0.0}
vector< StaticLigandFragment * > | static_ligand_fragments_ {}
bool | store_interactions_ {false}
bool | store_interactions_phC_only_ {false}
AtomPairVector * | all_ligand_nonbonded_ {nullptr}
double | conformation_scale_ {0.0}
bool | use_all_lig_nonb_ {false}
bool | use_static_lig_fragments_ {false}
int | burial_depth_scale_ {0}
double | exp_energy_stddev_ {0.0}
double | exp_energy_mean_ {0.0}
std::set< Residue * > | flexible_residues_ {}
Result | result_ {}
double | static_ligand_energy_ {0.0}
vector< Bond * > | rotatable_ligand_bonds_ {}
list< list< Vector3 > > | flexres_org_positions_ {}

## Friends

class | ScoreGridSet
class | PharmacophoreConstraint

## Additional Inherited Members

Static Public Member Functions inherited from BALL::ScoringFunction
static HashGrid3< Atom * > * | initializeHashGrid (AtomContainer *sys, Vector3 &center, double &resolution, int hashgrid_size)
static void | getDefaultOptions (Options &options)
Public Attributes inherited from BALL::ScoringFunction
list< Constraint * > | constraints {}
Static Public Attributes inherited from BALL::ScoringFunction
static const char * | SUBCATEGORY_NAME

## Detailed Description

Definition at line 21 of file gridBasedScoring.h.

## Constructor & Destructor Documentation

## GridBasedScoring() [1/2]

BALL::GridBasedScoring::GridBasedScoring | ( | AtomContainer & | receptor,
|  | AtomContainer & | ligand,
|  | Options & | options )

## GridBasedScoring() [2/2]

BALL::GridBasedScoring::GridBasedScoring | ( | AtomContainer & | receptor,
|  | Vector3 & | hashgrid_origin,
|  | Options & | options )

## ~GridBasedScoring()

virtual BALL::GridBasedScoring::~GridBasedScoring | ( |  | ) |

virtual

## Member Function Documentation

## calculateGridScore()

double BALL::GridBasedScoring::calculateGridScore | ( |  | ) |

protected

calculates the score for the interaction between the receptor and the current ligand conformation by use of the precalculated GridSets

## defineFlexibleResiduesGridSet()

void BALL::GridBasedScoring::defineFlexibleResiduesGridSet | ( |  | ) |

## defineGridSet() [1/2]

void BALL::GridBasedScoring::defineGridSet | ( | AtomContainer * | sys,
|  | double | out_of_grid_penalty,
|  | bool | enforce_grid_boundaries,
|  | double | resolution,
|  | double | interaction_no_scale = 1 )

create a new ScoreGridSet and appends it to the existing ones.
The size of this ScoreGridSet is automatically set in such a way that it is large enough to encompass all nonbonded interactions with the given AtomContainer (dependend on nonbonded_cutoff_, which is set by use of an Option object in the ScoringFunction constructor)

## defineGridSet() [2/2]

void BALL::GridBasedScoring::defineGridSet | ( | AtomContainer * | sys,
|  | Vector3 & | angstroem,
|  | double | out_of_grid_penalty,
|  | bool | enforce_grid_boundaries,
|  | double | resolution,
|  | double | interaction_no_scale = 1 )

creates a new ScoreGridSet and appends it to the existing ones.
See class ScoreGridSet for documentation of the other parameters

Parameters

  angstroem | the size of the grid in Angstroem (since this might be more comfortable when supplying a molecule)

## defineReceptorGridSet()

void BALL::GridBasedScoring::defineReceptorGridSet | ( | Vector3 & | origin,
|  | Vector3 & | size,
|  | double | out_of_grid_penalty,
|  | bool | enforce_grid_boundaries,
|  | double | resolution = 0.5,
|  | double | interaction_no_scale = 1 )

protected

creates a new ScoreGridSet for receptor_ according to dimensions/properties of ScoringFunction::hashgrid_
See class ScoreGridSet for documentation of the other parameters

Parameters

  size | the number of grid cell on each axis

## getAtomTypes()

virtual AtomTypes & BALL::GridBasedScoring::getAtomTypes | ( |  | ) |

protected pure virtual

Implemented in BALL::GridedMM, and BALL::GridedPLP.

## getAtomTypesMap()

std::map< String, int > * BALL::GridBasedScoring::getAtomTypesMap | ( |  | ) |

protected

## getGridAtomTypeName()

String BALL::GridBasedScoring::getGridAtomTypeName | ( | int | grid_id | ) |

protected

Get the atom-type name for the specified grid (as stored in atom_types_map_)

## getNoNeighboringReceptorAtoms()

int BALL::GridBasedScoring::getNoNeighboringReceptorAtoms | ( |  | ) |

virtual

Returns the average number of receptor atoms neighboring each ligand atom as determined by the last call of calculateGridScore() (which is called by update()).

Reimplemented from BALL::ScoringFunction.

## getScoreGridSets()

std::vector< ScoreGridSet * > * BALL::GridBasedScoring::getScoreGridSets | ( |  | ) |

## loadFlexibleResidueScoreGrids()

void BALL::GridBasedScoring::loadFlexibleResidueScoreGrids | ( | std::list< std::pair< const Residue *, const Rotamer * > > | residue_list | ) |

Load precalculated ScoreGridSets for the given residues from files.
The values stored in those grids are automatically added to the ScoreGridSets that holds the scores for all flexible residues.

## precalculateGrids()

void BALL::GridBasedScoring::precalculateGrids | ( | bool | ony_flexRes_grids = false | ) |

precalculate one Grid for each desired AtomType and one Grid for the electrostatic (q1/distance)

## printResult()

void BALL::GridBasedScoring::printResult | ( |  | ) |

## readAdditionalGridSetFromFile()

void BALL::GridBasedScoring::readAdditionalGridSetFromFile | ( | String | file | ) |

restores GridSet from the given file and appends it to the current ScoreGridSets

## replaceGridSetFromFile()

void BALL::GridBasedScoring::replaceGridSetFromFile | ( | String | file | ) |

deletes all existing ScoreGridSet and creates a new one from a given file

## saveGridSetsToFile()

void BALL::GridBasedScoring::saveGridSetsToFile | ( | String | file,
|  | String | receptor_name )

saves all previously calculated Grids to the specified file

## setAtomType()

virtual void BALL::GridBasedScoring::setAtomType | ( | Atom * | atom,
|  | const String & | type_name )

protected virtual

Set the desired type of the given atom. This function can be overloaded when setting the atom's types type is done in a different way, like for example for Gehlhaar's ScoringFunction

Reimplemented in BALL::GridedPLP.

## setAtomTypeNames()

void BALL::GridBasedScoring::setAtomTypeNames | ( | std::set< String > & | types | ) |

sets the atom_types that are to be used

## setCombineOperation()

void BALL::GridBasedScoring::setCombineOperation | ( | int | i | ) |

defines how the Scores computed for on all ScoreGridSets are to be combined
0 = addition
1 = average
2 = minimum
3 = maximum

## setup()

void BALL::GridBasedScoring::setup | ( |  | ) |

protected

## setupReferenceLigand()

void BALL::GridBasedScoring::setupReferenceLigand | ( |  | ) |

virtual

Use the current ligand as reference ligand. Thus, the average number of neighboring target atoms per reference ligand atom is calculated and can later be compared to the value for a ligand candidate, so that its depth of burial is thereby estimated.

Reimplemented from BALL::ScoringFunction.

## updatePrecalculatedScore()

virtual void BALL::GridBasedScoring::updatePrecalculatedScore | ( | Size | set | ) |

protected pure virtual

update all nonbonded atom-pair lists and precalculate the score

Parameters

  set | the id of the ScoreGrid, whose HashGrid is to be used

Implemented in BALL::DiffGridBasedScoring.

## validateGridSets()

void BALL::GridBasedScoring::validateGridSets | ( |  | ) |

## Friends And Related Symbol Documentation

## PharmacophoreConstraint

friend class PharmacophoreConstraint

friend

Definition at line 160 of file gridBasedScoring.h.

## ScoreGridSet

friend class ScoreGridSet

friend

Definition at line 159 of file gridBasedScoring.h.

## Member Data Documentation

## atom_types_map_

std::map<String, int> BALL::GridBasedScoring::atom_types_map_

protected

maps each AtomType that is to be used to the ID of its Grid (position within ScoreGridSet.score_grids)

Definition at line 137 of file gridBasedScoring.h.

## combine_operation_

int BALL::GridBasedScoring::combine_operation_

protected

see setCombineOperation()

Definition at line 134 of file gridBasedScoring.h.

## flex_gridset_id_

int BALL::GridBasedScoring::flex_gridset_id_

protected

index of the ScoreGridSet for the flexible residues of the receptor (if there are any)

Definition at line 153 of file gridBasedScoring.h.

## flex_gridsets_

std::map<const Residue*, ScoreGridSet*> BALL::GridBasedScoring::flex_gridsets_

protected

Stores one ScoreGridSets for each flexible sidechain.
These ScoreGridSets are not used directly during updateScore() (and therefore they are not put into grid_sets_), but their scores are added to the one ScoreGridSet that holds the score-sums of all flexible residues by loadFlexibleResidueScoreGrids().

Definition at line 157 of file gridBasedScoring.h.

## grid_sets_

std::vector<BALL::ScoreGridSet*> BALL::GridBasedScoring::grid_sets_

protected

stores all calculated GridSets

Definition at line 140 of file gridBasedScoring.h.

## gridsets_result_

GridSetsResult BALL::GridBasedScoring::gridsets_result_

protected

saves the final and all intermediate results of the last call of updateScore()

Definition at line 111 of file gridBasedScoring.h.

## scoregrid_interpolation_

bool BALL::GridBasedScoring::scoregrid_interpolation_

protected

determines whether or not interpolation should be used in order to calculated the score from the precalculated ScoreGridSets.

Definition at line 150 of file gridBasedScoring.h.

## scoregrid_resolution_

double BALL::GridBasedScoring::scoregrid_resolution_

protected

the resolution of the ScoreGrids in units of Angstroem (not to be confused with ScoringFunction::resolution_, which is the resolution of the _Hash_Grid !!)

Definition at line 147 of file gridBasedScoring.h.