BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HBondShiftProcessor.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 // $Id: HBondShiftProcessor.h,v 1.14.10.5 2007-04-12 13:53:53 anne Exp $
5 //
6 
7 #ifndef BALL_NMR_HBONDSHIFTPROCESSOR_H
8 #define BALL_NMR_HBONDSHIFTPROCESSOR_H
9 
10 #ifndef BALL_KERNEL_PTE_H
11 # include <BALL/KERNEL/PTE.h>
12 #endif
13 
14 #ifndef BALL_KERNEL_BOND_H
15 # include <BALL/KERNEL/bond.h>
16 #endif
17 
18 #ifndef BALL_KERNEL_ATOM_H
19 # include <BALL/KERNEL/atom.h>
20 #endif
21 
22 #ifndef BALL_NMR_SHIFT_MODULE_H
23 # include <BALL/NMR/shiftModule.h>
24 #endif
25 
26 #ifndef BALL_FORMAT_PARAMETERSECTION_H
28 #endif
29 
30 #include <map>
31 
32 namespace BALL
33 {
38  : public ShiftModule
39  {
40  public:
42 
43 
46 
47  static const char* PROPERTY__HBOND_SHIFT;
48 
50 
53 
57  ;
58 
62  ;
63 
66  virtual ~HBondShiftProcessor()
67  ;
68 
70 
73 
113  virtual void init();
114 
116 
119 
123  virtual bool start();
124 
129  virtual Processor::Result operator () (Composite& composite);
130 
131 
165  virtual bool finish();
166 
168 
169  protected:
170 
171  /*_ Vector of hydrogen bond acceptor types collected from the <tt>ShiftX.ini-file</tt> by <tt>init ()</tt>.
172  */
173  std::vector<String> acceptor_types_;
174 
175  /*_ Vector of hydrogen bond donors collected by <tt>operator ()</tt>.
176  */
177  std::vector<Atom*> donors_;
178 
179  /*_ Vector of hydrogen bond acceptors collected by <tt>operator ()</tt> as defined in <tt>acceptor_types_</tt>.
180  */
181  std::vector<Atom*> acceptors_;
182 
183  /*_ A flag indicating whether the HBond effect affects amide protons too.
184  */
185  bool amide_protons_are_targets_;
186 
187  /*_ The default factor for computing the amide protons shift.
188  */
189  float amide_proton_factor_ ;
190 
191  /*_ The default subtrahend for computing the amide protons shift.
192  */
193  float amide_proton_subtrahend_;
194 
195  /*_ The default distance between oxygen and hydrogen for amide hydrogens.
196  */
197  float amide_proton_oxygen_hydrogen_separation_distance_;
198 
199  /*_ The default distance between oxygen and hydrogen for alpha hydrogens.
200  */
201  float alpha_proton_oxygen_hydrogen_separation_distance_;
202 
203  /*_ A flag indicating whether the HBond-donar and acceptor must be on different residues.
204  * The default value is true.
205  */
206  bool exclude_selfinteraction_;
207 
208  /*_ A flag indicating whether the HBonds should be computed ShiftX-wise.
209  * NOTE: This will just compute __temporarily__ hydrogen bonds
210  * found with the ShiftX - algorithm, whose definition of a
211  * hydrogen bond differ substantially from a BALL definition.
212  * The ShiftX definition of hydrogen bonds is:
213  * Donors are: H and HA
214  * Acceptors are: O, OD_n, OE_n, OG_n, OH_n or water in the solvent! ...
215  * By now, we do not consider water!
216  * The default value is false!
217  */
218  bool ShiftXwise_hydrogen_bonds_computation_;
219 
220  private:
221  void printParameters_();
222  void printEffectors_();
223  void printTargets_();
224  Atom* getDonor_(Atom* a);
225  void postprocessing_();
226 
227 
228  /* Distance, donor, acceptor for the ShiftXwise hydrogenbond determination.*/
229  std::multimap<float, std::pair<Atom*, Atom*> > hbonds_;
230  std::map<Atom*, bool> donor_occupied_;
231  std::map<Atom*, bool> acceptor_occupied_;
232 };
233 } // namespace BALL
234 
235 #endif
#define BALL_CREATE(name)
Definition: create.h:62
#define BALL_EXPORT
Definition: COMMON/global.h:50