| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
#ifndef BALL_DOCKING_COMMON_DOCKINGALGORITHM_H |
| 7 |
#define BALL_DOCKING_COMMON_DOCKINGALGORITHM_H |
| 8 |
|
| 9 |
#ifndef BALL_DATATYPE_OPTIONS_H |
| 10 |
# include <BALL/DATATYPE/options.h> |
| 11 |
#endif |
| 12 |
|
| 13 |
#ifndef BALL_KERNEL_SYSTEM_H |
| 14 |
# include <BALL/KERNEL/system.h> |
| 15 |
#endif |
| 16 |
|
| 17 |
#ifndef BALL_DOCKING_COMMON_CONFORMATIONSET_H |
| 18 |
# include <BALL/DOCKING/COMMON/conformationSet.h> |
| 19 |
#endif |
| 20 |
|
| 21 |
#ifndef BALL_MATHS_MATRIX44_H |
| 22 |
#include <BALL/MATHS/matrix44.h> |
| 23 |
#endif |
| 24 |
|
| 25 |
#ifndef BALL_SYSTEM_TIMER_H |
| 26 |
#include <BALL/SYSTEM/timer.h> |
| 27 |
#endif |
| 28 |
|
| 29 |
#ifndef BALL_DOCKING_COMMON_CONSTRAINTS_H |
| 30 |
#include <BALL/DOCKING/COMMON/constraints.h> |
| 31 |
#endif |
| 32 |
|
| 33 |
|
| 34 |
namespace BALL |
| 35 |
{ |
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
class ScoringFunction; |
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
class BALL_EXPORT DockingAlgorithm |
| 46 |
{ |
| 47 |
public: |
| 48 |
|
| 49 |
enum DISPLAYMODE |
| 50 |
{ |
| 51 |
NO_DISPLAY = 0, |
| 52 |
BEST_INTERMEDIATE_POSES = 1, |
| 53 |
ALL_INTERMEDIATE_POSES = 2, |
| 54 |
NO_INTERMEDIATE_POSES = 3 |
| 55 |
}; |
| 56 |
|
| 57 |
DockingAlgorithm(); |
| 58 |
|
| 59 |
DockingAlgorithm(System& receptor, System& ligand, Options& new_options); |
| 60 |
|
| 61 |
DockingAlgorithm(System& receptor, System& ligand); |
| 62 |
|
| 63 |
virtual ~DockingAlgorithm(); |
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
Options options; |
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
virtual void setup(System& receptor, System& ligand, Options& new_options); |
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
virtual void setup(System& receptor, System& ligand); |
| 82 |
|
| 83 |
static void readOptionFile(String filename, Options& output_options, list<Constraint*>& output_constraints, const AtomContainer* ref_ligand = 0); |
| 84 |
|
| 85 |
static void writeOptionFile(String filename, Options& input_options, list<Constraint*>& input_constraints); |
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
virtual double dockLigand(AtomContainer& ligand, bool verbose = 0); |
| 90 |
|
| 91 |
|
| 92 |
ScoringFunction* getScoringFunction(); |
| 93 |
|
| 94 |
void setScoringFunction(ScoringFunction* scoring) { scoring_function_ = scoring;} |
| 95 |
|
| 96 |
void processMultiMoleculeFile(string input_filename, string output_filename, double score_cutoff, vector<double>* min_atoms_in_ref_areas = 0, String toolinfo="", String timestamp=""); |
| 97 |
|
| 98 |
void setLigand(AtomContainer* ligand); |
| 99 |
|
| 100 |
const AtomContainer* getLigand(); |
| 101 |
|
| 102 |
const AtomContainer* getReferenceLigand(); |
| 103 |
|
| 104 |
|
| 105 |
const String& getName(); |
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
virtual void start(); |
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
virtual void pause(); |
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
virtual void proceed(); |
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
virtual void abort(); |
| 122 |
|
| 123 |
virtual void finish(); |
| 124 |
|
| 125 |
|
| 126 |
virtual void reset(); |
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
virtual bool hasFinished() const; |
| 131 |
|
| 132 |
|
| 133 |
virtual bool wasAborted() const |
| 134 |
{ return abort_;} |
| 135 |
|
| 136 |
|
| 137 |
virtual bool wasPaused() const |
| 138 |
{ return pause_;} |
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
virtual float getProgress() const; |
| 143 |
|
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
virtual ConformationSet getConformationSet(Index total_conformations = 0); |
| 149 |
|
| 150 |
double calculateRMSD(const AtomContainer& S1, const AtomContainer& S2, int* no_matched_atoms = NULL); |
| 151 |
|
| 152 |
static Matrix4x4 mapCompounds(const AtomContainer& S1, const AtomContainer& S2, Size& no_matched_heavy_atoms, double& rmsd, double upper_bound, double lower_bound, double tolerance); |
| 153 |
|
| 154 |
const static String OPTION_FILE_PARAMETER_NAME; |
| 155 |
|
| 156 |
const AtomContainer* getVisualizationPose(); |
| 157 |
|
| 158 |
void setVisualizationPose(const double& score); |
| 159 |
|
| 160 |
double getVisualizationPoseScore(); |
| 161 |
|
| 162 |
bool new_pose_to_be_visualized; |
| 163 |
|
| 164 |
DISPLAYMODE getDisplayMode(); |
| 165 |
|
| 166 |
void setDisplayMode(DISPLAYMODE display_mode); |
| 167 |
|
| 168 |
|
| 169 |
void setMaxFps(int no); |
| 170 |
|
| 171 |
protected: |
| 172 |
|
| 173 |
static void writeSubcategories_(Options& category, std::ostream& out); |
| 174 |
|
| 175 |
System* system1_; |
| 176 |
System* system2_; |
| 177 |
|
| 178 |
bool pause_; |
| 179 |
bool abort_; |
| 180 |
bool finished_; |
| 181 |
|
| 182 |
AtomContainer* reference_ligand_; |
| 183 |
|
| 184 |
|
| 185 |
String name_; |
| 186 |
|
| 187 |
AtomContainer* receptor_; |
| 188 |
|
| 189 |
AtomContainer* ligand_; |
| 190 |
|
| 191 |
void mapLigandOntoReferenceLigand(); |
| 192 |
|
| 193 |
ScoringFunction* scoring_function_; |
| 194 |
|
| 195 |
String parameter_filename_; |
| 196 |
|
| 197 |
|
| 198 |
String scoring_type_; |
| 199 |
|
| 200 |
DISPLAYMODE display_mode_; |
| 201 |
|
| 202 |
|
| 203 |
AtomContainer visualization_pose_; |
| 204 |
|
| 205 |
double visualization_pose_score_; |
| 206 |
|
| 207 |
double min_sec_between_visualizations_; |
| 208 |
Timer visualization_timer_; |
| 209 |
}; |
| 210 |
|
| 211 |
} |
| 212 |
|
| 213 |
#endif |