Debian Codegraph @

include/BALL/DOCKING/GENETICDOCK/evolutionaryDocking.h

raw symbols SCIP
1 // ----------------------------------------------------
2 // $Maintainer: Marcel Schumann $
3 // $Authors: Jan Fuhrmann, Marcel Schumann $
4 // ----------------------------------------------------
5
6 #ifndef BALL_DOCKING_GENETICDOCK_EVOLUTIONARYDOCKING_H
7 #define BALL_DOCKING_GENETICDOCK_EVOLUTIONARYDOCKING_H
8
9 #ifndef BALL_DATATYPE_REGULARDATA3D_H
10 # include <BALL/DATATYPE/regularData3D.h>
11 #endif
12
13 #ifndef BALL_KERNEL_SYSTEM_H
14 # include <BALL/KERNEL/system.h>
15 #endif
16
17 #ifndef BALL_DOCKING_COMMON_DOCKINGALGORITHM_H
18 # include <BALL/DOCKING/COMMON/dockingAlgorithm.h>
19 #endif
20
21 #include <BALL/SCORING/COMMON/scoringFunction.h>
22
23 namespace BALL
24 {
25 class GeneticAlgorithm;
26
27 class DockProblem;
28
29 /**
30 class EvolutionaryDocking
31 This class is derived from class DockingAlgorithm.
32 small ligand docking algorithm via a genetic Algorithm.
33 */
34 class BALL_EXPORT BALL_DEPRECATED EvolutionaryDocking : public DockingAlgorithm
35 {
36 public:
37
38 struct Option
39 {
40 static const String MAX_ITERATIONS;
41 static const String POPULATION_NUMBER;
42 static const String INITIAL_POPULATION;
43 static const String POPULATION;
44 static const String SURVIVORS;
45 static const String MUTATION_RATE;
46 static const String MUTATION_SAVE;
47 static const String CONV_ITERATIONS;
48 static const String CONV_VALUE;
49 static const String CONV_START;
50 static const String BEST_NUM;
51 static const char *SCORING_TYPE;
52 };
53
54 struct Default
55 {
56 static const int MAX_ITERATIONS;
57 static const int POPULATION_NUMBER;
58 static const int INITIAL_POPULATION;
59 static const int POPULATION;
60 static const int SURVIVORS;
61 static const double MUTATION_RATE;
62 static const int MUTATION_SAVE;
63 static const int CONV_ITERATIONS;
64 static const double CONV_VALUE;
65 static const int CONV_START;
66 static const int BEST_NUM;
67 static const String SCORING_TYPE;
68 };
69
70
71 EvolutionaryDocking(System& system1, System& system2, Options& new_options);
72
73 EvolutionaryDocking(System& receptor, System& ligand, string config_file);
74
75 /** destructor
76 */
77 ~EvolutionaryDocking();
78
79 /** The setup routines.
80 */
81 virtual void setup(System & ligand, BALL::ScoringFunction * sf, Options & new_options);
82
83 virtual void setup(System & ligand, BALL::ScoringFunction * sf);
84
85 void setup(System & receptor, System & ligand, Options & new_options);
86
87 /** Start the main loop of the algorithm.
88 */
89 void start();
90
91 /** docks the given ligand and returns the score for the best conformation */
92 double dockLigand(AtomContainer &ligand, bool verbose = 0);
93
94 /** return the overall docking progress as a percentage
95 */
96 float getProgress() const;
97
98 /** true if new ligand position has to be drawn
99 */
100 bool redraw();
101
102 Vector3 &getReferenceLigandCenter();
103
104 /** return ranked conformations.
105 */
106 // ConformationSet getConformationSet(Index total_number = 0);
107
108 /** stores the default options of this algorithms in the given Option object */
109 static void getDefaultOptions(Options & options);
110
111
112 protected:
113
114 // virtual const AtomContainer& getIntermediateResult_()
115 //throw();
116
117 /** Free all allocated memory and destroys the options and results
118 */
119 void destroy_();
120
121 void applyBestConformation();
122
123 /** optimization method
124 */
125 GeneticAlgorithm *ga_;
126
127 /** mapping class for docking
128 */
129 DockProblem *dp_;
130
131 /** the geometrical center of the reference ligand */
132 Vector3 reference_center_;
133
134 };
135 }
136
137 #endif /* BALL_DOCKING_GENETICDOCK_EVOLUTIONARYDOCKING_H */