hydrogenBond.h

Go to the documentation of this file.
00001 // $Id: hydrogenBond.h,v 1.3 2006/05/17 12:49:15 anker Exp $
00002 // Molecular Mechanics: Fresno force field, hydrogen bond component
00003 
00004 #ifndef BALL_SCORING_COMPONENTS_HYDROGENBOND_H
00005 #define BALL_SCORING_COMPONENTS_HYDROGENBOND_H
00006 
00007 #include <BALL/SCORING/COMMON/scoringComponent.h>
00008 #include <BALL/SCORING/COMMON/scoringFunction.h>
00009 #include <BALL/DATATYPE/options.h>
00010 
00011 namespace BALL
00012 {
00013 
00017   class HydrogenBond
00018     : public ScoringComponent
00019   {
00020 
00021     public:
00022 
00023 
00024     struct Option
00025     {
00028       static const char* HB_IDEAL_LENGTH;
00029 
00032       static const char* HB_IDEAL_ANGLE;
00033 
00036       static const char* HB_DIST_LOWER;
00037 
00040       static const char* HB_DIST_UPPER;
00041 
00044       static const char* HB_ANG_LOWER;
00045 
00048       static const char* HB_ANG_UPPER;
00049 
00052       static const char* VERBOSITY;
00053     };
00054 
00057     struct Default
00058     {
00061       static const float HB_IDEAL_LENGTH;
00062 
00065       static const float HB_IDEAL_ANGLE;
00066 
00069       static const float HB_DIST_LOWER;
00070 
00073       static const float HB_DIST_UPPER;
00074 
00077       static const float HB_ANG_LOWER;
00078 
00081       static const float HB_ANG_UPPER;
00082 
00085       static const Size VERBOSITY;
00086 
00087     };
00088 
00089 
00090 
00091 
00092     BALL_CREATE(HydrogenBond)
00093 
00094     
00097 
00100     HydrogenBond()
00101       ;
00102 
00105     HydrogenBond(ScoringFunction& sf)
00106       ;
00107 
00110     HydrogenBond(ScoringComponent& sc)
00111       ;
00112 
00115     HydrogenBond(const HydrogenBond& fhb)
00116       ;
00117 
00120     virtual ~HydrogenBond()
00121       ;
00122 
00124 
00127 
00130     const HydrogenBond& operator = (const HydrogenBond& fhb)
00131       ;
00132 
00135     virtual void clear()
00136       ;
00137 
00139 
00142 
00143     bool operator == (const HydrogenBond& fhb) const
00144       ;
00145 
00147 
00150 
00153     virtual bool setup()
00154       ;
00155 
00157 
00160 
00163     virtual double calculateScore()
00164       ;
00165 
00166     const HashMap<const Atom*, Size>& getFresnoTypes()
00167       ;
00169 
00170     private:
00171 
00172     /*_ This vector contains all possible hydrogen bonds. It is created
00173      * during the setup process. Pairs are always of the form (hydrogen,
00174      * acceptor). The donor can be found easily by following the only bond
00175      * of the hydrogen.
00176     */
00177     std::vector< std::pair<const Atom*, const Atom*> > possible_hydrogen_bonds_;
00178 
00179     /*_ A hash map containing all hydrogens and bools indicating whether
00180      * this hydrigen was already used for scoring a hydrogen bond. At the
00181      * moment we use the first hydrogen bond we find and hope that this
00182      * will indeed be the only one contributing to the energy score. This
00183      * HashMap will only be used by updateEnergy() but we build it in
00184      * setup().
00185     */
00186     HashMap<const Atom*, bool> already_used_;
00187 
00188     /*_
00189     */
00190     double factor_;
00191 
00192     /*_
00193     */
00194     double h_bond_distance_lower_;
00195 
00196     /*_
00197     */
00198     double h_bond_distance_upper_;
00199 
00200     /*_
00201     */
00202     double h_bond_angle_lower_;
00203 
00204     /*_
00205     */
00206     double h_bond_angle_upper_;
00207 
00208     /*_ The ideal hbond length.
00209     */
00210     double ideal_hbond_length_;
00211 
00212     /*_ The ideal hbond angle.
00213     */
00214     double ideal_hbond_angle_;
00215 
00216     /*_ 
00217     */
00218     HashMap<const Atom*, Size> fresno_types;
00219 
00220 
00221   };
00222 
00223 } // namespace BALL
00224 
00225 #endif // BALL_SCORING_COMPONENTS_HYDROGENBOND_H