| 1 |
|
| 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 |
| 9 |
#include <BALL/DOCKING/COMMON/dockingAlgorithm.h> |
| 10 |
#endif |
| 11 |
|
| 12 |
#ifndef BALL_MOLMEC_COMMON_FORCEFIELD_H |
| 13 |
#include <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 |
| 21 |
#include <BALL/SCORING/COMMON/scoringFunction.h> |
| 22 |
#endif |
| 23 |
|
| 24 |
#ifndef BALL_DOCKING_COMMON_STATICLIGANDFRAGMENT_H |
| 25 |
#include <BALL/DOCKING/COMMON/staticLigandFragment.h> |
| 26 |
#endif |
| 27 |
|
| 28 |
#ifndef BALL_DOCKING_COMMON_SIDECHAINOPTIMIZER_H |
| 29 |
#include <BALL/DOCKING/COMMON/sideChainOptimizer.h> |
| 30 |
#endif |
| 31 |
|
| 32 |
#include <map> |
| 33 |
|
| 34 |
|
| 35 |
namespace BALL |
| 36 |
{ |
| 37 |
|
| 38 |
class BALL_EXPORT IMGDock : public DockingAlgorithm |
| 39 |
{ |
| 40 |
public: |
| 41 |
|
| 42 |
|
| 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 |
|
| 49 |
~IMGDock(); |
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 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; |
| 74 |
static int POST_OPTIMIZATION_STEPS; |
| 75 |
static double POST_OPTIMIZATION_STEP_WIDTH; |
| 76 |
static int MIN_INHIBITOR_ATOMS; |
| 77 |
static String SCORING_TYPE; |
| 78 |
static int ITERATIONS; |
| 79 |
static bool DECREASE_STEPWIDTH; |
| 80 |
static bool SUPERPOSE_LIGAND; |
| 81 |
}; |
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
void setup(System& receptor, System& ligand, Options& new_options); |
| 86 |
|
| 87 |
void setup(System& receptor, System& ligand); |
| 88 |
|
| 89 |
void start(); |
| 90 |
|
| 91 |
|
| 92 |
double dockLigand(AtomContainer& ligand, bool verbose = 0); |
| 93 |
|
| 94 |
|
| 95 |
double getEnergy(); |
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
double getScore(); |
| 101 |
|
| 102 |
|
| 103 |
void printFragments(std::ostream& out = std::cout); |
| 104 |
|
| 105 |
void printResults(std::ostream& out = std::cout); |
| 106 |
|
| 107 |
|
| 108 |
void rotateLigandFragment(Size fragment, Size bond, int degree); |
| 109 |
|
| 110 |
void steps(Size no = 1); |
| 111 |
|
| 112 |
|
| 113 |
void update(); |
| 114 |
|
| 115 |
void startDock(bool verbose = 0); |
| 116 |
|
| 117 |
const AtomContainer* getLigand(); |
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
static void getDefaultOptions(Options& options); |
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
|
| 127 |
int rec; |
| 128 |
|
| 129 |
|
| 130 |
private: |
| 131 |
typedef std::multimap<double, std::vector<int> > PoseList; |
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
void rotateLigandFragment(StaticLigandFragment* lf, TMatrix4x4<float>& M, Vector3& origin, int static_fragment); |
| 136 |
|
| 137 |
|
| 138 |
void translateLigand(Vector3& v); |
| 139 |
|
| 140 |
|
| 141 |
void calculateScore(double& interact_energy, double& conf_energy); |
| 142 |
|
| 143 |
void createLigandFragments(); |
| 144 |
|
| 145 |
|
| 146 |
void storeForces(); |
| 147 |
|
| 148 |
|
| 149 |
void reassignForces(); |
| 150 |
|
| 151 |
|
| 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 |
|
| 168 |
|
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
|
| 178 |
|
| 179 |
|
| 180 |
|
| 181 |
void rotateLigand(int a, int degree); |
| 182 |
|
| 183 |
|
| 184 |
void resetRotations(); |
| 185 |
|
| 186 |
|
| 187 |
void saveAtomPositions(); |
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
|
| 192 |
|
| 193 |
|
| 194 |
|
| 195 |
int iterations_; |
| 196 |
|
| 197 |
|
| 198 |
bool superpose_ligand_; |
| 199 |
|
| 200 |
int no_steps_; |
| 201 |
|
| 202 |
std::vector<Vector3> original_atom_positions_; |
| 203 |
|
| 204 |
|
| 205 |
|
| 206 |
double score_; |
| 207 |
|
| 208 |
|
| 209 |
Vector3 reference_center_; |
| 210 |
|
| 211 |
|
| 212 |
std::vector < Vector3 > old_forces_; |
| 213 |
|
| 214 |
|
| 215 |
std::vector < int > current_conformation_; |
| 216 |
|
| 217 |
|
| 218 |
std::vector < std::vector < int > > bond_information_; |
| 219 |
|
| 220 |
|
| 221 |
int max_rotated_pos_; |
| 222 |
|
| 223 |
|
| 224 |
bool decrease_stepwidth_; |
| 225 |
|
| 226 |
|
| 227 |
int step_width_; |
| 228 |
|
| 229 |
Size no_solutions_; |
| 230 |
|
| 231 |
|
| 232 |
int post_optimization_steps_; |
| 233 |
|
| 234 |
|
| 235 |
double post_optimization_step_width_; |
| 236 |
|
| 237 |
|
| 238 |
bool global_rotation_; |
| 239 |
|
| 240 |
int min_inhibitor_atoms_; |
| 241 |
|
| 242 |
|
| 243 |
int av_ref_lig_neighbors_; |
| 244 |
|
| 245 |
PoseList best_conformations_; |
| 246 |
|
| 247 |
SideChainOptimizer* sidechain_optimizer_; |
| 248 |
|
| 249 |
|
| 250 |
}; |
| 251 |
} |
| 252 |
|
| 253 |
#endif |