Loading...
Searching...
No Matches
gridBasedScoring.h
Go to the documentation of this file.
// ----------------------------------------------------
// $Maintainer: Marcel Schumann $
// $Authors: Marcel Schumann $
// ----------------------------------------------------
#ifndef BALL_SCORING_COMMON_GRIDBASEDSCORING_H
#define BALL_SCORING_COMMON_GRIDBASEDSCORING_H
#include <BALL/SCORING/COMMON/scoringFunction.h>
#include <BALL/SCORING/COMMON/scoreGridSet.h>
#include <BALL/MOLMEC/PARAMETER/atomTypes.h>
#include <set>
#include <map>
namespace BALL
{
class ScoreGridSet;
class Residue;
class Rotamer;
class BALL_EXPORT GridBasedScoring : public ScoringFunction
{
public:
struct Option
{
static const char* SCOREGRID_RESOLUTION;
static const char* SCOREGRID_INTERPOLATION;
};
struct Default
{
static double SCOREGRID_RESOLUTION;
static bool SCOREGRID_INTERPOLATION;
};
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();
protected:
void setup();
struct GridSetsResult
{
std::vector<double> gridSet_scores;
std::vector<double> no_neighbors;
std::vector<Size> no_out_of_grid;
void setup(Size no_gridSets);
};
GridSetsResult gridsets_result_;
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);
/* --------- protected members ------------------ */
int combine_operation_;
std::map<String, int> atom_types_map_;
std::vector<BALL::ScoreGridSet*> grid_sets_;
virtual void updatePrecalculatedScore(Size set) = 0;
double scoregrid_resolution_;
bool scoregrid_interpolation_;
int flex_gridset_id_;
std::map<const Residue*, ScoreGridSet*> flex_gridsets_;
friend class ScoreGridSet;
friend class PharmacophoreConstraint;
};
}
#endif // BALL_SCORING_COMMON_GRIDBASEDSCORING_H
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
atomTypes.h
BALL::AtomContainer
Definition atomContainer.h:32
BALL::AtomTypes
Definition atomTypes.h:30
BALL::Atom
Definition atom.h:90
BALL::GridBasedScoring::getScoreGridSets
std::vector< ScoreGridSet * > * getScoreGridSets()
BALL::GridBasedScoring::defineGridSet
void defineGridSet(AtomContainer *sys, Vector3 &angstroem, double out_of_grid_penalty, bool enforce_grid_boundaries, double resolution, double interaction_no_scale=1)
BALL::GridBasedScoring::scoregrid_resolution_
double scoregrid_resolution_
Definition gridBasedScoring.h:147
BALL::GridBasedScoring::setAtomType
virtual void setAtomType(Atom *atom, const String &type_name)
BALL::GridBasedScoring::replaceGridSetFromFile
void replaceGridSetFromFile(String file)
BALL::GridBasedScoring::getAtomTypes
virtual AtomTypes & getAtomTypes()=0
BALL::GridBasedScoring::setAtomTypeNames
void setAtomTypeNames(std::set< String > &types)
BALL::GridBasedScoring::flex_gridsets_
std::map< const Residue *, ScoreGridSet * > flex_gridsets_
Definition gridBasedScoring.h:157
BALL::GridBasedScoring::defineGridSet
void defineGridSet(AtomContainer *sys, double out_of_grid_penalty, bool enforce_grid_boundaries, double resolution, double interaction_no_scale=1)
BALL::GridBasedScoring::GridBasedScoring
GridBasedScoring(AtomContainer &receptor, AtomContainer &ligand, Options &options)
BALL::GridBasedScoring::defineReceptorGridSet
void defineReceptorGridSet(Vector3 &origin, Vector3 &size, double out_of_grid_penalty, bool enforce_grid_boundaries, double resolution=0.5, double interaction_no_scale=1)
BALL::GridBasedScoring::precalculateGrids
void precalculateGrids(bool ony_flexRes_grids=false)
BALL::GridBasedScoring::validateGridSets
void validateGridSets()
BALL::GridBasedScoring::scoregrid_interpolation_
bool scoregrid_interpolation_
Definition gridBasedScoring.h:150
BALL::GridBasedScoring::combine_operation_
int combine_operation_
Definition gridBasedScoring.h:134
BALL::GridBasedScoring::readAdditionalGridSetFromFile
void readAdditionalGridSetFromFile(String file)
BALL::GridBasedScoring::printResult
void printResult()
BALL::GridBasedScoring::loadFlexibleResidueScoreGrids
void loadFlexibleResidueScoreGrids(std::list< std::pair< const Residue *, const Rotamer * > > residue_list)
BALL::GridBasedScoring::atom_types_map_
std::map< String, int > atom_types_map_
Definition gridBasedScoring.h:137
BALL::GridBasedScoring::getGridAtomTypeName
String getGridAtomTypeName(int grid_id)
BALL::GridBasedScoring::flex_gridset_id_
int flex_gridset_id_
Definition gridBasedScoring.h:153
BALL::GridBasedScoring::ScoreGridSet
friend class ScoreGridSet
Definition gridBasedScoring.h:159
BALL::GridBasedScoring::~GridBasedScoring
virtual ~GridBasedScoring()
BALL::GridBasedScoring::PharmacophoreConstraint
friend class PharmacophoreConstraint
Definition gridBasedScoring.h:160
BALL::GridBasedScoring::grid_sets_
std::vector< BALL::ScoreGridSet * > grid_sets_
Definition gridBasedScoring.h:140
BALL::GridBasedScoring::getNoNeighboringReceptorAtoms
int getNoNeighboringReceptorAtoms()
BALL::GridBasedScoring::updatePrecalculatedScore
virtual void updatePrecalculatedScore(Size set)=0
BALL::GridBasedScoring::gridsets_result_
GridSetsResult gridsets_result_
Definition gridBasedScoring.h:111
BALL::GridBasedScoring::saveGridSetsToFile
void saveGridSetsToFile(String file, String receptor_name)
BALL::GridBasedScoring::getAtomTypesMap
std::map< String, int > * getAtomTypesMap()
BALL::GridBasedScoring::setupReferenceLigand
void setupReferenceLigand()
BALL::GridBasedScoring::setup
void setup()
BALL::GridBasedScoring::calculateGridScore
double calculateGridScore()
BALL::GridBasedScoring::setCombineOperation
void setCombineOperation(int i)
BALL::GridBasedScoring::defineFlexibleResiduesGridSet
void defineFlexibleResiduesGridSet()
BALL::GridBasedScoring::GridBasedScoring
GridBasedScoring(AtomContainer &receptor, Vector3 &hashgrid_origin, Options &options)
BALL::Options
Definition options.h:48
BALL::Residue
Definition residue.h:38
BALL::Rotamer
Definition residueRotamerSet.h:38
BALL::ScoreGridSet
Definition scoreGridSet.h:23
BALL::ScoringFunction::ScoringFunction
ScoringFunction()
BALL::String
Definition string.h:57
BALL
Definition constants.h:13
BALL::Size
BALL_SIZE_TYPE Size
Definition COMMON/global.h:114
BALL::Vector3
TVector3< float > Vector3
Definition vector3.h:1084
scoreGridSet.h
scoringFunction.h
BALL::GridBasedScoring::Default
Definition gridBasedScoring.h:34
BALL::GridBasedScoring::Default::SCOREGRID_RESOLUTION
static double SCOREGRID_RESOLUTION
Definition gridBasedScoring.h:35
BALL::GridBasedScoring::Default::SCOREGRID_INTERPOLATION
static bool SCOREGRID_INTERPOLATION
Definition gridBasedScoring.h:36
BALL::GridBasedScoring::GridSetsResult
Definition gridBasedScoring.h:97
BALL::GridBasedScoring::GridSetsResult::gridSet_scores
std::vector< double > gridSet_scores
Definition gridBasedScoring.h:99
BALL::GridBasedScoring::GridSetsResult::no_neighbors
std::vector< double > no_neighbors
Definition gridBasedScoring.h:102
BALL::GridBasedScoring::GridSetsResult::no_out_of_grid
std::vector< Size > no_out_of_grid
Definition gridBasedScoring.h:105
BALL::GridBasedScoring::GridSetsResult::setup
void setup(Size no_gridSets)
BALL::GridBasedScoring::Option
Definition gridBasedScoring.h:25
BALL::GridBasedScoring::Option::SCOREGRID_INTERPOLATION
static const char * SCOREGRID_INTERPOLATION
Definition gridBasedScoring.h:30
BALL::GridBasedScoring::Option::SCOREGRID_RESOLUTION
static const char * SCOREGRID_RESOLUTION
Definition gridBasedScoring.h:27