BALL 1.5.0
Loading...
Searching...
No Matches
IMGDock.h
Go to the documentation of this file.
1// -*- Mode: C++; tab-width: 2; -*-
2// vi: set ts=2:
3//
4
5#ifndef BALL_DOCKING_IMGDOCK_IMGDOCK_H
6#define BALL_DOCKING_IMGDOCK_IMGDOCK_H
7
8#ifndef BALL_DOCKING_COMMON_DOCKINGALGORITHEM_H
10#endif
11
12#ifndef BALL_MOLMEC_COMMON_FORCEFIELD_H
14#endif
15
16#ifndef BALL_MATH_MATRIX44_H
17#include <BALL/MATHS/matrix44.h>
18#endif
19
20#ifndef BALL_SCORING_COMMON_SCORINGFUNCTION_H
22#endif
23
24#ifndef BALL_DOCKING_COMMON_STATICLIGANDFRAGMENT_H
26#endif
27
28#ifndef BALL_DOCKING_COMMON_SIDECHAINOPTIMIZER_H
30#endif
31
32#include <map>
33
34
35namespace BALL
36{
39 {
40 public:
43 IMGDock(System& receptor, System& ligand, Options& new_options);
44
45 IMGDock(System& receptor, System& ligand);
46
47 IMGDock(System& receptor, System& ligand, string config_file);
48
51
55 struct Option
56 {
57 static const char* STEP_WIDTH;
58 static const char* NO_SOLUTIONS;
59 static const char* GLOBAL_ROTATION;
60 static const char* POST_OPTIMIZATION_STEPS;
61 static const char* POST_OPTIMIZATION_STEP_WIDTH;
62 static const char* MIN_INHIBITOR_ATOMS;
63 static const char* SCORING_TYPE;
64 static const char* ITERATIONS;
65 static const char* DECREASE_STEPWIDTH;
66 static const char* SUPERPOSE_LIGAND;
67 };
68
69 struct Default
70 {
71 static int STEP_WIDTH;
72 static int NO_SOLUTIONS;
73 static bool GLOBAL_ROTATION;
78 static int ITERATIONS;
79 static bool DECREASE_STEPWIDTH;
80 static bool SUPERPOSE_LIGAND;
81 };
82
85 void setup(System& receptor, System& ligand, Options& new_options);
86
87 void setup(System& receptor, System& ligand);
88
89 void start();
90
92 double dockLigand(AtomContainer& ligand, bool verbose = 0);
93
95 double getEnergy();
96
100 double getScore();
101
103 void printFragments(std::ostream& out = std::cout);
104
105 void printResults(std::ostream& out = std::cout);
106
108 void rotateLigandFragment(Size fragment, Size bond, int degree);
109
110 void steps(Size no = 1);
111
113 void update();
114
115 void startDock(bool verbose = 0);
116
118
119 //ConformationSet getConformationSet(Index total_conformations);
120
122 static void getDefaultOptions(Options& options);
124
127 int rec;
129
130 private:
131 typedef std::multimap<double, std::vector<int> > PoseList;
132
135 void rotateLigandFragment(StaticLigandFragment* lf, TMatrix4x4<float>& M, Vector3& origin, int static_fragment);
136
138 void translateLigand(Vector3& v);
139
141 void calculateScore(double& interact_energy, double& conf_energy);
142
143 void createLigandFragments();
144
146 void storeForces();
147
149 void reassignForces();
150
152 void saveBondInformation();
153
154 void saveBondInformation(AtomPairList* mapped_atoms);
155
156 bool findUnfrozenFragments(int fragment, std::set<int> frozen_fragments, std::set<int>& processed_fragments);
157
158 void postDockOptimization(double step_width, int no_steps);
159
160 void recursionPrint(string line);
161
162 void optimizeRotation(std::vector < int > & conf, PoseList& best_conformations, Size bond, bool ignore_original_angle);
163
164 void displayConformation(const std::vector < int > & conf, const double& energy);
165
166 void applyConformation(const std::vector < int > & conf, bool verbose = 0);
167
169 //void findBestFragmentRotation(int fragment, Size& bond, int& degree, map<int>* ignore_bonds);
170
177 //void findBestRotation(int& fragment, Size& bond, int& degree, map* ignore_bonds = NULL, bool use_fragment_force = 0);
178
181 void rotateLigand(int a, int degree);
182
184 void resetRotations();
185
187 void saveAtomPositions();
188
190
193
195 int iterations_;
196
198 bool superpose_ligand_;
199
200 int no_steps_;
201
202 std::vector<Vector3> original_atom_positions_;
203
204 //AtomContainer* receptor_;
205
206 double score_;
207
209 Vector3 reference_center_;
210
212 std::vector < Vector3 > old_forces_;
213
215 std::vector < int > current_conformation_;
216
218 std::vector < std::vector < int > > bond_information_;
219
221 int max_rotated_pos_;
222
224 bool decrease_stepwidth_;
225
227 int step_width_;
228
229 Size no_solutions_;
230
232 int post_optimization_steps_;
233
235 double post_optimization_step_width_;
236
238 bool global_rotation_;
239
240 int min_inhibitor_atoms_;
241
243 int av_ref_lig_neighbors_;
244
245 PoseList best_conformations_;
246
247 SideChainOptimizer* sidechain_optimizer_;
248
250 };
251}
252
253#endif // BALL_DOCKING_IMGDOCK_IMGDOCK_H
std::list< std::pair< Atom *, Atom * > > AtomPairList
void printFragments(std::ostream &out=std::cout)
const AtomContainer * getLigand()
double getEnergy()
IMGDock(System &receptor, System &ligand)
void steps(Size no=1)
void setup(System &receptor, System &ligand, Options &new_options)
void startDock(bool verbose=0)
void printResults(std::ostream &out=std::cout)
void setup(System &receptor, System &ligand)
double dockLigand(AtomContainer &ligand, bool verbose=0)
static void getDefaultOptions(Options &options)
double getScore()
IMGDock(System &receptor, System &ligand, Options &new_options)
void rotateLigandFragment(Size fragment, Size bond, int degree)
IMGDock(System &receptor, System &ligand, string config_file)
static const char * SCORING_TYPE
Definition IMGDock.h:63
static const char * ITERATIONS
Definition IMGDock.h:64
static const char * SUPERPOSE_LIGAND
Definition IMGDock.h:66
static const char * DECREASE_STEPWIDTH
Definition IMGDock.h:65
static const char * POST_OPTIMIZATION_STEPS
Definition IMGDock.h:60
static const char * POST_OPTIMIZATION_STEP_WIDTH
Definition IMGDock.h:61
static const char * GLOBAL_ROTATION
Definition IMGDock.h:59
static const char * STEP_WIDTH
Definition IMGDock.h:57
static const char * NO_SOLUTIONS
Definition IMGDock.h:58
static const char * MIN_INHIBITOR_ATOMS
Definition IMGDock.h:62
static int ITERATIONS
Definition IMGDock.h:78
static int NO_SOLUTIONS
Definition IMGDock.h:72
static double POST_OPTIMIZATION_STEP_WIDTH
Definition IMGDock.h:75
static int POST_OPTIMIZATION_STEPS
Definition IMGDock.h:74
static bool GLOBAL_ROTATION
Definition IMGDock.h:73
static String SCORING_TYPE
Definition IMGDock.h:77
static bool DECREASE_STEPWIDTH
Definition IMGDock.h:79
static bool SUPERPOSE_LIGAND
Definition IMGDock.h:80
static int MIN_INHIBITOR_ATOMS
Definition IMGDock.h:76
static int STEP_WIDTH
Definition IMGDock.h:71
Default Type.
Definition matrix44.h:68
#define BALL_EXPORT