BALL  1.4.79
CHPI.h
Go to the documentation of this file.
1 /* CHPI.h
2 *
3 * Copyright (C) 2011 Marcel Schumann
4 *
5 * This program free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or (at
8 * your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 // ----------------------------------------------------
20 // $Maintainer: Marcel Schumann $
21 // $Authors: Slick-development Team, Marcel Schumann $
22 // ----------------------------------------------------
23 
24 #ifndef BALL_SCORING_COMPONENTS_CHPI_H
25 #define BALL_SCORING_COMPONENTS_CHPI_H
26 
29 #include <BALL/DATATYPE/options.h>
32 
33 namespace BALL
34 {
39  {
40  public:
44  {
45  public:
47  AromaticRing();
48 
50  AromaticRing(const AromaticRing& aromatic_ring);
51 
53  AromaticRing(const std::vector<Atom*>& atoms);
54 
56  const Vector3& getCentre() const;
57 
59  const Vector3& getNormalVector() const;
60 
62  void setRing(const std::vector<Atom*>& atoms);
63 
64  // accessors for the private data members
65  const std::vector<Atom*>& getRing() const;
66 
68  void dump(std::ostream& s = std::cout) const;
69 
71  void update();
72 
73  private:
74  //_ A hash set containing pointers to all ring atoms:
75  std::vector<Atom*> ring_atoms_;
76 
77  //_ The centre of the aromatic ring.
78  Vector3 centre_;
79 
80  //_ The normal vector of the ring plane.
81  Vector3 normal_vector_;
82 
83  //_
84  void computeCentre_();
85 
86  //_
87  void computeNormalVector_();
88  };
89 
92  class CHGroup
93  {
94  public:
96  CHGroup();
97 
99  ~CHGroup();
100 
102  CHGroup(const CHGroup& CH_groups);
103 
105  CHGroup (const Atom* C_atom, const Atom* H_atom);
106 
108  void setCAtom(const Atom* C_atom);
109 
111  void setHAtom(const Atom* H_atom);
112 
114  void setAtoms(const Atom* C_atom, const Atom* H_atom);
115 
117  const Atom* getHAtom() const
118  {
119  return(H_atom_);
120  }
121 
123  const Atom* getCAtom() const
124  {
125  return(C_atom_);
126  }
127 
128  void dump(std::ostream& s = std::cout) const;
129 
130  private :
131  //_
132  const Atom* H_atom_;
133 
134  //_
135  const Atom* C_atom_;
136  };
137 
138  struct Option
139  {
141  static const String VERBOSITY;
142 
144  static const String CX_DISTANCE_UPPER;
145 
147  static const String CHX_ANGLE_LOWER;
148 
151 
154 
157 
159  static const String ANGLE_TOLERANCE;
160 
162  static const String LIMIT;
163 
166  };
167 
168  struct Default
169  {
171  static const Size VERBOSITY;
172 
174  static const float CX_DISTANCE_UPPER;
175 
177  static const float CHX_ANGLE_LOWER;
178 
180  static const float HX_PROJECTED_DISTANCE_LOWER;
181 
183  static const float HX_PROJECTED_DISTANCE_UPPER;
184 
186  static const float DISTANCE_TOLERANCE;
187 
189  static const float ANGLE_TOLERANCE;
190 
192  static const float LIMIT;
193 
195  static const bool CREATE_INTERACTION_FILE;
196  };
197 
201 
204  CHPI();
205 
208  CHPI(ScoringFunction& sf);
209 
212  CHPI(const CHPI& chpi);
213 
216  virtual ~CHPI();
217 
219 
222 
225  const CHPI& operator = (const CHPI& chpi);
226 
229  virtual void clear();
230 
232 
235 
236  bool operator == (const CHPI& chpi) const;
237 
239 
242 
245  virtual bool setup();
246 
247  void setupLigand();
248 
249  void update(const vector<std::pair<Atom*, Atom*> >&);
250 
254  virtual double updateScore();
255 
258 
259  private:
263  void calculatePossibleInteractions();
264 
269  TimeStamp update_time_stamp_;
270 
271  //_ A vector containing all possible interactions between aliphatic C-H groups and aromatic rings
272  std::vector<std::pair<const AromaticRing*, const CHGroup*> > possible_interactions_;
273 
274  // A vector containing all aliphatic C-H groups of the ligand.
275  std::vector<CHGroup*> ligand_CH_groups_;
276 
277  // A vector containing all aromatic rings of the receptor.
278  std::vector<AromaticRing*> receptor_aromatic_rings_;
279 
280  // A vector containing all aliphatic C-H groups of the ligand.
281  std::vector<CHGroup*> receptor_CH_groups_;
282 
283  // A vector containing all aromatic rings of the receptor.
284  std::vector<AromaticRing*> ligand_aromatic_rings_;
285 
286  //_
287  float CX_distance_upper_;
288 
289  //_
290  float CHX_angle_lower_;
291 
292  //_
293  float HX_projected_distance_lower_;
294 
295  //_
296  float HX_projected_distance_upper_;
297 
298  //_ The tolerance area for creating scores instead of simply counted
299  //_ interactions.
300  float distance_tolerance_;
301  float angle_tolerance_;
302 
303  //_ A limit for ignoring interactions that have only very small
304  //_ scores
305  float limit_;
306 
307  //_ Verbosity of the code
308  Size verbosity_;
309 
310  //_ Flag for writing HIN file containing pseudomolecules for the CHPI
311  //_ interactions found in the system
312  bool write_interactions_file_;
313 
316 
317  float distance_cutoff_;
318  };
319 } // namespace BALL
320 
321 #endif // BALL_SCORING_COMPONENTS_CHPI_H
static const String CREATE_INTERACTION_FILE
Definition: CHPI.h:165
Options options
Definition: CHPI.h:257
static const float HX_PROJECTED_DISTANCE_LOWER
Definition: CHPI.h:180
static const String HX_PROJECTED_DISTANCE_UPPER
Definition: CHPI.h:153
static const Size VERBOSITY
Definition: CHPI.h:171
static const String CX_DISTANCE_UPPER
Definition: CHPI.h:144
static const String ANGLE_TOLERANCE
Definition: CHPI.h:159
const Atom * getCAtom() const
Definition: CHPI.h:123
BALL_EXPORT AtomList atoms(const AtomContainer &fragment, const String &expression=String())
static const bool CREATE_INTERACTION_FILE
Definition: CHPI.h:195
static const float DISTANCE_TOLERANCE
Definition: CHPI.h:186
static const String HX_PROJECTED_DISTANCE_LOWER
Definition: CHPI.h:150
static const String DISTANCE_TOLERANCE
Definition: CHPI.h:156
static const String CHX_ANGLE_LOWER
Definition: CHPI.h:147
static const float HX_PROJECTED_DISTANCE_UPPER
Definition: CHPI.h:183
-*- Mode: C++; tab-width: 2; -*-
Definition: constants.h:12
static const String LIMIT
Definition: CHPI.h:162
static const float ANGLE_TOLERANCE
Definition: CHPI.h:189
This processor provides methods for detection and assignment of aromaticity.
static const String VERBOSITY
Definition: CHPI.h:141
static const float LIMIT
Definition: CHPI.h:192
static const float CHX_ANGLE_LOWER
Definition: CHPI.h:177
const Atom * getHAtom() const
Definition: CHPI.h:117
#define BALL_EXPORT
Definition: COMMON/global.h:50
static const float CX_DISTANCE_UPPER
Definition: CHPI.h:174