BALL  1.4.1
HBondShiftProcessor.h
Go to the documentation of this file.
00001 // -*- Mode: C++; tab-width: 2; -*-
00002 // vi: set ts=2:
00003 //
00004 // $Id: HBondShiftProcessor.h,v 1.14.10.5 2007-04-12 13:53:53 anne Exp $
00005 //
00006 
00007 #ifndef BALL_NMR_HBONDSHIFTPROCESSOR_H
00008 #define BALL_NMR_HBONDSHIFTPROCESSOR_H
00009 
00010 #ifndef BALL_KERNEL_PTE_H
00011 # include <BALL/KERNEL/PTE.h>
00012 #endif
00013 
00014 #ifndef BALL_KERNEL_BOND_H
00015 # include <BALL/KERNEL/bond.h>
00016 #endif
00017 
00018 #ifndef BALL_KERNEL_ATOM_H
00019 # include <BALL/KERNEL/atom.h>
00020 #endif
00021 
00022 #ifndef BALL_NMR_SHIFT_MODULE_H
00023 # include <BALL/NMR/shiftModule.h>
00024 #endif
00025 
00026 #ifndef BALL_FORMAT_PARAMETERSECTION_H
00027 # include <BALL/FORMAT/parameterSection.h>
00028 #endif
00029 
00030 #include <map>
00031 
00032 namespace BALL
00033 {
00037   class BALL_EXPORT HBondShiftProcessor
00038   : public ShiftModule
00039   {
00040     public:
00041     BALL_CREATE(HBondShiftProcessor)
00042 
00043     
00046 
00047     static const char* PROPERTY__HBOND_SHIFT;
00048 
00050 
00053 
00056     HBondShiftProcessor()
00057       ;
00058 
00061     HBondShiftProcessor(const HBondShiftProcessor& processor)
00062       ;
00063 
00066     virtual ~HBondShiftProcessor()
00067       ;
00068 
00070 
00073 
00113     virtual void init();
00114 
00116 
00119 
00123     virtual bool start();
00124 
00129     virtual Processor::Result operator () (Composite& composite);
00130 
00131     
00165     virtual bool finish();
00166 
00168 
00169     protected:
00170     
00171     /*_ Vector of hydrogen bond acceptor types collected from the <tt>ShiftX.ini-file</tt> by <tt>init ()</tt>.
00172      */
00173     std::vector<String>         acceptor_types_;
00174     
00175     /*_ Vector of hydrogen bond donors collected by <tt>operator ()</tt>.
00176      */
00177     std::vector<Atom*>            donors_;
00178 
00179     /*_ Vector of hydrogen bond acceptors collected by <tt>operator ()</tt> as defined in <tt>acceptor_types_</tt>. 
00180      */
00181     std::vector<Atom*>            acceptors_;
00182 
00183     /*_  A flag indicating whether the HBond effect affects amide protons too.
00184      */
00185     bool                        amide_protons_are_targets_;
00186     
00187     /*_  The default factor for computing the amide protons shift.
00188      */
00189     float                       amide_proton_factor_ ; 
00190     
00191     /*_  The default subtrahend for computing the amide protons shift.
00192      */
00193     float                       amide_proton_subtrahend_;
00194 
00195     /*_  The default distance between oxygen and hydrogen for amide hydrogens.
00196      */
00197     float                       amide_proton_oxygen_hydrogen_separation_distance_;
00198     
00199     /*_  The default distance between oxygen and hydrogen for alpha hydrogens.
00200      */
00201     float                       alpha_proton_oxygen_hydrogen_separation_distance_;
00202     
00203     /*_  A flag indicating whether the HBond-donar and acceptor must be on different residues.
00204      *   The default value is true. 
00205      */
00206     bool                        exclude_selfinteraction_;
00207 
00208     /*_  A flag indicating whether the HBonds should be computed ShiftX-wise. 
00209      *   NOTE: This will just compute __temporarily__  hydrogen bonds 
00210      *          found with the ShiftX - algorithm, whose definition of a 
00211      *          hydrogen bond differ substantially from a BALL definition.
00212      *         The ShiftX definition of hydrogen bonds is: 
00213      *          Donors are: H and HA
00214      *          Acceptors are: O, OD_n, OE_n, OG_n, OH_n or water in the solvent! ...
00215      *          By now, we do not consider water!  
00216      *   The default value is false! 
00217      */
00218     bool                        ShiftXwise_hydrogen_bonds_computation_;
00219 
00220     private:
00221     void      printParameters_();
00222     void      printEffectors_();
00223     void      printTargets_();
00224     Atom*     getDonor_(Atom* a);
00225     void      postprocessing_();
00226 
00227 
00228     /* Distance, donor, acceptor for the ShiftXwise hydrogenbond determination.*/
00229     std::multimap<float, std::pair<Atom*, Atom*> >  hbonds_;
00230     std::map<Atom*, bool> donor_occupied_;
00231     std::map<Atom*, bool> acceptor_occupied_;
00232 };
00233 } // namespace BALL
00234 
00235 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines