BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
constraints.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_COMMON_CONSTRAINTS
6 #define BALL_DOCKING_COMMON_CONSTRAINTS
7 
8 
9 #ifndef BALL_MATHS_VECTOR3_H
10 #include <BALL/MATHS/vector3.h>
11 #endif
12 
13 #ifndef BALL_MATHS_MATRIX44_H
14 #include <BALL/MATHS/matrix44.h>
15 #endif
16 
17 #ifndef BALL_MATHS_PLANE3_H
18 #include <BALL/MATHS/plane3.h>
19 #endif
20 
21 #ifndef BALL_KERNEL_SYSTEM_H
22 #include <BALL/KERNEL/system.h>
23 #endif
24 
25 #ifndef BALL_DATATYPE_HASHGRID_H
26 #include <BALL/DATATYPE/hashGrid.h>
27 #endif
28 
29 
30 namespace BALL
31 {
32  class DockingAlgorithm;
33 
34  namespace VIEW
35  {
36  class DockRLDialog;
37  }
38 
39  class ScoringFunction;
40 
42  {
43  public:
44  Constraint();
45 
46  virtual ~Constraint();
47 
48  virtual double calculateScore(AtomContainer* mol) = 0;
49 
51  virtual void setName(String name);
52 
53  String getName();
54 
55  String getType();
56 
57  virtual void setScoringFunction(ScoringFunction* sf);
58 
59  protected:
61 
64 
66  double penalty_;
68  };
69 
72  : public Constraint
73  {
74  public:
75  ReferenceArea();
76 
77  ~ReferenceArea();
80  ReferenceArea(Vector3& p1, Vector3& p2, Vector3& p3, Vector3& p4, bool atom_fraction, double atoms, double penalty);
81 
83  ReferenceArea(Vector3& p1, Vector3& p2, int y_expansion, int z_expansion, bool atom_fraction, double atoms, double penalty);
84 
86  ReferenceArea(const AtomContainer* sys, bool atom_fraction, double atoms, double penalty);
87 
88  ReferenceArea(list<const AtomContainer*>& container_list, const list<String>& interaction_types, double desired_interaction_score, double penalt);
89 
91  double calculateScore(AtomContainer* mol);
92 
94  double getContainedAtoms();
95 
99  System* createBoundaryMolecule();
100 
102  void enlarge(double angstroem);
103 
105  void setNumberDesiredAtoms(double d);
106 
107  void setName(String name);
108 
109  void setScoringFunction(ScoringFunction* sf);
110 
111  private:
112  double countContainedAtoms(AtomContainer* sys);
113 
115  Matrix4x4 T_;
116 
117  double min_x_, max_x_, min_y_, max_y_, min_z_, max_z_;
118 
120  double ref_atoms_;
121 
123  bool atom_fraction_;
124 
126  double contained_atoms_;
127 
128  vector<Vector3> input_points_;
129 
131  Size number_reflig_atoms_;
132 
135  bool scale_by_size_;
136 
138  friend class BALL::VIEW::DockRLDialog;
139  };
140 
145  : public Constraint
146  {
147  public:
148  PharmacophoreConstraint(list<const AtomContainer*>& container_list, const list<String>& interaction_types, double desired_interaction_score, double penalty);
149 
150  PharmacophoreConstraint(const AtomContainer* container, const list<String>& interaction_types, double desired_interaction_score, double penalty);
151 
153 
155 
158  PharmacophoreConstraint(vector<String>& residue_IDs, const list<String>& interaction_types, double desired_interaction_score, double penalty);
159 
160  void setScoringFunction(ScoringFunction* sf);
161 
163  double calculateScore(AtomContainer* mol);
164 
166  double getInteractionScore();
167 
168  bool usesReceptorResidues();
169 
170  AtomContainer* getGridContainer();
171 
172  const list<String>* getInteractionTypes();
173 
174  const list<const AtomContainer*>* getInteractionPartners();
175 
176  private:
178  vector<String> residue_IDs_;
179  vector<String> chain_IDs_;
180 
181  list<const AtomContainer*> interaction_partners_;
182  list<String> interaction_types_;
183  double desired_interaction_score_;
184  double interaction_score_;
185  bool uses_receptor_residues_;
186 
188  AtomContainer grid_container_;
189 
191  unsigned int gridSetID_;
192 
194  friend class BALL::VIEW::DockRLDialog;
195  };
196 }
197 
198 #endif // BALL_DOCKING_COMMON_CONSTRAINTS
BALL_EXPORT AtomList atoms(const AtomContainer &fragment, const String &expression=String())
const char * getName()
Definition: rtti.h:97
ScoringFunction * scoring_function_
Definition: constraints.h:67
#define BALL_EXPORT
Definition: COMMON/global.h:50