Loading...
Searching...
No Matches
bindingPocketProcessor.h
Go to the documentation of this file.
#ifndef BALL_STRUCTURE_BINDINGPOCKETPROCESSOR_H
#define BALL_STRUCTURE_BINDINGPOCKETPROCESSOR_H
#ifndef BALL_CONCEPT_PROCESSOR_H
# include <BALL/CONCEPT/processor.h>
#endif
#ifndef BALL_KERNEL_RESIDUE_H
# include <BALL/KERNEL/residue.h>
#endif
#ifndef BALL_MATHS_VECTOR3_H
# include <BALL/MATHS/vector3.h>
#endif
#ifndef BALL_KERNEL_SYSTEM_H
# include <BALL/KERNEL/system.h>
#endif
#ifndef BALL_DATATYPE_HASHGRID_H
# include <BALL/DATATYPE/hashGrid.h>
#endif
#ifndef BALL_DATATYPE_OPTIONS_H
# include <BALL/DATATYPE/options.h>
#endif
#include <vector>
#include <string>
#include <fstream>
namespace BALL
{
class BALL_EXPORT BindingPocketProcessor
: public UnaryProcessor<Composite>
{
public:
struct Option
{
static const String HEAVY_ONLY;
static const String PARSE_INI_FILE;
static const String INI_FILE_NAME;
static const String RADIUS_HYDROGEN;
static const String RADIUS_OXYGEN;
static const String RADIUS_NITROGEN;
static const String RADIUS_CARBON;
static const String RADIUS_SULFUR;
static const String PROBE_SPHERE_RADIUS;
static const String PROBE_SPHERE_RADIUS_HYDROGEN_FREE;
static const String PROBE_LAYER_RADIUS;
static const String BURIAL_COUNT_THRESHOLD;
static const String BURIAL_COUNT_THRESHOLD_HYDROGEN_FREE;
static const String BURIAL_COUNT_RADIUS;
static const String PW_SQUARE_WELL;
static const String PW_GAUSSIAN_WIDTH;
static const String PW_MAX_DISTANCE;
static const String MAX_ASPS;
// additional factor for the computation of the collision of two spheres
static const String CLASH_FACTOR;
static const String ASP_SEPERATION;
};
struct Default
{
static const bool HEAVY_ONLY;
static const bool PARSE_INI_FILE;
static const String INI_FILE_NAME;
static const double RADIUS_HYDROGEN;
static const double RADIUS_OXYGEN;
static const double RADIUS_NITROGEN;
static const double RADIUS_CARBON;
static const double RADIUS_SULFUR;
static const double PROBE_SPHERE_RADIUS;
static const double PROBE_SPHERE_RADIUS_HYDROGEN_FREE;
static const double PROBE_LAYER_RADIUS;
static const Position BURIAL_COUNT_THRESHOLD;
static const Position BURIAL_COUNT_THRESHOLD_HYDROGEN_FREE;
static const double BURIAL_COUNT_RADIUS;
static const double PW_SQUARE_WELL;
static const double PW_GAUSSIAN_WIDTH;
static const double PW_MAX_DISTANCE;
static const Position MAX_ASPS;
static const double CLASH_FACTOR;
static const double ASP_SEPERATION;
};
BindingPocketProcessor();
BindingPocketProcessor(Options& new_options);
BindingPocketProcessor(const BindingPocketProcessor& pp);
virtual ~BindingPocketProcessor();
const BindingPocketProcessor& operator=(const BindingPocketProcessor& pp);
virtual bool finish();
virtual Processor::Result operator() (Composite &composite);
const vector<std::pair<Vector3,double> >& getActiveSitePoints() const;
const vector<vector<std::pair<Vector3,double> > >& getLayers() const;
Options options;
private:
class Sphere_
{
public:
Sphere_();
BALL::Vector3 position;
float radius;
Position b_count;
float probe_weight;
Position layer;
inline bool operator<(const Sphere_& sp) const {return probe_weight > sp.probe_weight;};
int id;
static int global_id;
Position a,b,c,d;
inline bool operator==(const Sphere_& sp) const {return a == sp.a && b == sp.b && c == sp.c && d == sp.d;};
};
class SphereComparator_
{
public:
int operator()(const Sphere_& sp1, const Sphere_& sp2) const
{
if (sp1.a != sp2.a)
return sp1.a < sp2.a;
if (sp1.b != sp2.b)
return sp1.b < sp2.b;
if (sp1.c != sp2.c)
return sp1.c < sp2.c;
if (sp1.d != sp2.d)
return sp1.d < sp2.d;
return 0;
};
};
Position layer_;
friend std::ostream& operator<<(std::ostream& os, const BindingPocketProcessor::Sphere_& /*sp*/) {return os;};
HashGrid3<Sphere_> sphere_grid_;
HashGrid3<Sphere_> protein_grid_;
HashGrid3<Sphere_> layer_grid_;
HashGrid3<Sphere_> clayer_grid_;
HashGrid3<Sphere_> BC_grid_;
HashGrid3<Sphere_> pw_grid_;
HashGrid3<Sphere_> candidates_grid_;
std::vector<Sphere_> sorted_spheres_;
double sphere_rad_;
double second_layer_rad_;
double protein_clash_rad_;
double BC_threshold_;
Position found_new_;
double c_factor_;
std::vector<Sphere_> candidates;
std::vector<std::pair<Vector3,double> > asps_;
std::vector<std::vector<std::pair<Vector3,double> > > layers_;
double radius_(const String& element);
void trySphere__(HashGridBox3<Sphere_>::DataIterator data_it,
HashGridBox3<Sphere_>::DataIterator data_it2,
HashGridBox3<Sphere_>::DataIterator data_it3);
void addSphere_s_();
Vector3 calculateT_(HashGridBox3<Sphere_>::DataIterator data_it,
HashGridBox3<Sphere_>::DataIterator data_it2);
void testFirst_(HashGrid3<Sphere_>& hg,HashGridBox3<Sphere_>::DataIterator data_it,
Position x, Position y, Position z);
void testSecond_(HashGrid3<Sphere_>& hg,HashGridBox3<Sphere_>::DataIterator data_it,
HashGridBox3<Sphere_>::DataIterator data_it2,
Position x, Position y, Position z,Position step);
bool testSphereClash_(Vector3& v);
bool testProteinClash_(Vector3& v);
bool testBC_(Sphere_& sp);
void weedCandidates_();
bool parse_();
bool second_it_;
};
} //namesspace BALL
#endif // BALL_STRUCTURE_BINDINGPOCKETPROCESSOR_H
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
system.h
BALL::BindingPocketProcessor::operator=
const BindingPocketProcessor & operator=(const BindingPocketProcessor &pp)
BALL::BindingPocketProcessor::BindingPocketProcessor
BindingPocketProcessor()
BALL::BindingPocketProcessor::operator<<
friend std::ostream & operator<<(std::ostream &os, const BindingPocketProcessor::Sphere_ &)
Definition bindingPocketProcessor.h:225
BALL::BindingPocketProcessor::getActiveSitePoints
const vector< std::pair< Vector3, double > > & getActiveSitePoints() const
BALL::BindingPocketProcessor::finish
virtual bool finish()
Finish .
BALL::BindingPocketProcessor::BindingPocketProcessor
BindingPocketProcessor(const BindingPocketProcessor &pp)
BALL::BindingPocketProcessor::options
Options options
Definition bindingPocketProcessor.h:151
BALL::BindingPocketProcessor::BindingPocketProcessor
BindingPocketProcessor(Options &new_options)
BALL::BindingPocketProcessor::~BindingPocketProcessor
virtual ~BindingPocketProcessor()
BALL::BindingPocketProcessor::getLayers
const vector< vector< std::pair< Vector3, double > > > & getLayers() const
BALL::Composite
Definition composite.h:74
BALL::HashGrid3
Three-dimensional Hash Grid Class.
Definition hashGrid.h:755
BALL::HashGridBox3::DataIterator
ForwardIterator< HashGridBox3< Item >, Item, DataIteratorPosition, DataIteratorTraits > DataIterator
Definition hashGrid.h:492
BALL::Options
Definition options.h:48
BALL::Processor::Result
int Result
Definition processor.h:36
BALL::String
Definition string.h:57
BALL::UnaryProcessor< Composite >::UnaryProcessor
UnaryProcessor()
Definition processor.h:69
hashGrid.h
BALL
Definition constants.h:13
BALL::operator<
BALL_EXPORT bool operator<(const String &s1, const String &s2)
BALL::Position
BALL_SIZE_TYPE Position
Definition COMMON/global.h:140
BALL::operator==
BALL_EXPORT bool operator==(const String &s1, const String &s2)
BALL::Vector3
TVector3< float > Vector3
Definition vector3.h:1084
options.h
processor.h
residue.h
BALL::BindingPocketProcessor::Default
Definition bindingPocketProcessor.h:91
BALL::BindingPocketProcessor::Default::PW_MAX_DISTANCE
static const double PW_MAX_DISTANCE
Definition bindingPocketProcessor.h:110
BALL::BindingPocketProcessor::Default::MAX_ASPS
static const Position MAX_ASPS
Definition bindingPocketProcessor.h:111
BALL::BindingPocketProcessor::Default::PROBE_SPHERE_RADIUS
static const double PROBE_SPHERE_RADIUS
Definition bindingPocketProcessor.h:102
BALL::BindingPocketProcessor::Default::RADIUS_OXYGEN
static const double RADIUS_OXYGEN
Definition bindingPocketProcessor.h:97
BALL::BindingPocketProcessor::Default::BURIAL_COUNT_THRESHOLD_HYDROGEN_FREE
static const Position BURIAL_COUNT_THRESHOLD_HYDROGEN_FREE
Definition bindingPocketProcessor.h:106
BALL::BindingPocketProcessor::Default::RADIUS_NITROGEN
static const double RADIUS_NITROGEN
Definition bindingPocketProcessor.h:98
BALL::BindingPocketProcessor::Default::CLASH_FACTOR
static const double CLASH_FACTOR
Definition bindingPocketProcessor.h:112
BALL::BindingPocketProcessor::Default::INI_FILE_NAME
static const String INI_FILE_NAME
Definition bindingPocketProcessor.h:94
BALL::BindingPocketProcessor::Default::PARSE_INI_FILE
static const bool PARSE_INI_FILE
Definition bindingPocketProcessor.h:93
BALL::BindingPocketProcessor::Default::ASP_SEPERATION
static const double ASP_SEPERATION
Definition bindingPocketProcessor.h:113
BALL::BindingPocketProcessor::Default::BURIAL_COUNT_THRESHOLD
static const Position BURIAL_COUNT_THRESHOLD
Definition bindingPocketProcessor.h:105
BALL::BindingPocketProcessor::Default::PROBE_LAYER_RADIUS
static const double PROBE_LAYER_RADIUS
Definition bindingPocketProcessor.h:104
BALL::BindingPocketProcessor::Default::RADIUS_CARBON
static const double RADIUS_CARBON
Definition bindingPocketProcessor.h:99
BALL::BindingPocketProcessor::Default::RADIUS_SULFUR
static const double RADIUS_SULFUR
Definition bindingPocketProcessor.h:100
BALL::BindingPocketProcessor::Default::PW_GAUSSIAN_WIDTH
static const double PW_GAUSSIAN_WIDTH
Definition bindingPocketProcessor.h:109
BALL::BindingPocketProcessor::Default::PW_SQUARE_WELL
static const double PW_SQUARE_WELL
Definition bindingPocketProcessor.h:108
BALL::BindingPocketProcessor::Default::BURIAL_COUNT_RADIUS
static const double BURIAL_COUNT_RADIUS
Definition bindingPocketProcessor.h:107
BALL::BindingPocketProcessor::Default::RADIUS_HYDROGEN
static const double RADIUS_HYDROGEN
Definition bindingPocketProcessor.h:96
BALL::BindingPocketProcessor::Default::HEAVY_ONLY
static const bool HEAVY_ONLY
Definition bindingPocketProcessor.h:92
BALL::BindingPocketProcessor::Default::PROBE_SPHERE_RADIUS_HYDROGEN_FREE
static const double PROBE_SPHERE_RADIUS_HYDROGEN_FREE
Definition bindingPocketProcessor.h:103
BALL::BindingPocketProcessor::Option
Definition bindingPocketProcessor.h:49
BALL::BindingPocketProcessor::Option::INI_FILE_NAME
static const String INI_FILE_NAME
name of the ini-file
Definition bindingPocketProcessor.h:55
BALL::BindingPocketProcessor::Option::RADIUS_NITROGEN
static const String RADIUS_NITROGEN
Definition bindingPocketProcessor.h:60
BALL::BindingPocketProcessor::Option::PROBE_SPHERE_RADIUS_HYDROGEN_FREE
static const String PROBE_SPHERE_RADIUS_HYDROGEN_FREE
probe sphere radius for heavy atoms only
Definition bindingPocketProcessor.h:67
BALL::BindingPocketProcessor::Option::PROBE_SPHERE_RADIUS
static const String PROBE_SPHERE_RADIUS
probe sphere radius for computation with hydrogen atoms
Definition bindingPocketProcessor.h:65
BALL::BindingPocketProcessor::Option::BURIAL_COUNT_THRESHOLD
static const String BURIAL_COUNT_THRESHOLD
burial count threshold for computation with hydrogen atoms
Definition bindingPocketProcessor.h:71
BALL::BindingPocketProcessor::Option::PW_SQUARE_WELL
static const String PW_SQUARE_WELL
options for the computation of the probe weight
Definition bindingPocketProcessor.h:77
BALL::BindingPocketProcessor::Option::RADIUS_CARBON
static const String RADIUS_CARBON
Definition bindingPocketProcessor.h:61
BALL::BindingPocketProcessor::Option::BURIAL_COUNT_RADIUS
static const String BURIAL_COUNT_RADIUS
radius for the computation of the burial count
Definition bindingPocketProcessor.h:75
BALL::BindingPocketProcessor::Option::PW_GAUSSIAN_WIDTH
static const String PW_GAUSSIAN_WIDTH
Definition bindingPocketProcessor.h:78
BALL::BindingPocketProcessor::Option::BURIAL_COUNT_THRESHOLD_HYDROGEN_FREE
static const String BURIAL_COUNT_THRESHOLD_HYDROGEN_FREE
burial count threshold for heavy atoms only
Definition bindingPocketProcessor.h:73
BALL::BindingPocketProcessor::Option::RADIUS_HYDROGEN
static const String RADIUS_HYDROGEN
atom radius of individual elements
Definition bindingPocketProcessor.h:58
BALL::BindingPocketProcessor::Option::PROBE_LAYER_RADIUS
static const String PROBE_LAYER_RADIUS
probe radius for colision of probes in one layer
Definition bindingPocketProcessor.h:69
BALL::BindingPocketProcessor::Option::PW_MAX_DISTANCE
static const String PW_MAX_DISTANCE
Definition bindingPocketProcessor.h:79
BALL::BindingPocketProcessor::Option::MAX_ASPS
static const String MAX_ASPS
maximum number of active site points
Definition bindingPocketProcessor.h:81
BALL::BindingPocketProcessor::Option::CLASH_FACTOR
static const String CLASH_FACTOR
Definition bindingPocketProcessor.h:83
BALL::BindingPocketProcessor::Option::RADIUS_SULFUR
static const String RADIUS_SULFUR
Definition bindingPocketProcessor.h:62
BALL::BindingPocketProcessor::Option::RADIUS_OXYGEN
static const String RADIUS_OXYGEN
Definition bindingPocketProcessor.h:59
BALL::BindingPocketProcessor::Option::PARSE_INI_FILE
static const String PARSE_INI_FILE
try to parse ini-file
Definition bindingPocketProcessor.h:53
BALL::BindingPocketProcessor::Option::HEAVY_ONLY
static const String HEAVY_ONLY
use only heavy atoms for computation
Definition bindingPocketProcessor.h:51
BALL::BindingPocketProcessor::Option::ASP_SEPERATION
static const String ASP_SEPERATION
minumum distance between two active site points
Definition bindingPocketProcessor.h:85
vector3.h