00001
00002
00003
00004 #ifndef BALL_SCORING_COMPONENTS_CHPI_H
00005 #define BALL_SCORING_COMPONENTS_CHPI_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
00018 class CHPI
00019 : public ScoringComponent
00020 {
00021 public:
00022
00025 class AromaticRing
00026 {
00027 public:
00028
00030 AromaticRing()
00031 ;
00032
00034 AromaticRing(const AromaticRing& aromatic_ring)
00035 ;
00036
00038 AromaticRing(const std::vector<Atom*>& atoms)
00039 ;
00040
00042 const Vector3& getCentre() const
00043 ;
00044
00046 const Vector3& getNormalVector() const
00047 ;
00048
00050 void setRing(const std::vector<Atom*>& atoms)
00051 ;
00052
00053
00054 const std::vector<Atom*>& getRing() const
00055 ;
00056
00058 void dump(std::ostream& s = std::cout) const
00059 ;
00060
00061 private:
00062
00063
00064 std::vector<Atom*> ring_atoms_;
00065
00066
00067 Vector3 centre_;
00068
00069
00070 Vector3 normal_vector_;
00071
00072
00073 void computeCentre_()
00074 ;
00075
00076
00077 void computeNormalVector_()
00078 ;
00079
00080 };
00081
00082
00085 class CHGroup
00086 {
00087 public:
00088
00090 CHGroup()
00091 ;
00092
00094 ~CHGroup()
00095 ;
00096
00098 CHGroup(const CHGroup& CH_groups)
00099 ;
00100
00102 CHGroup (const Atom* C_atom, const Atom* H_atom)
00103 ;
00104
00106 void setCAtom(const Atom* C_atom)
00107 ;
00108
00110 void setHAtom(const Atom* H_atom)
00111 ;
00112
00114 void setAtoms(const Atom* C_atom, const Atom* H_atom)
00115 ;
00116
00118 const Atom* getHAtom() const
00119
00120 {
00121 return(H_atom_);
00122 }
00123
00125 const Atom* getCAtom() const
00126
00127 {
00128 return(C_atom_);
00129 }
00130
00131 void dump(std::ostream& s = std::cout) const
00132 ;
00133
00134 private :
00135
00136
00137 const Atom* H_atom_;
00138
00139
00140 const Atom* C_atom_;
00141
00142 };
00143
00144
00145 struct Option
00146 {
00147
00149 static const String VERBOSITY;
00150
00152 static const String CX_DISTANCE_UPPER;
00153
00155 static const String CHX_ANGLE_LOWER;
00156
00158 static const String HX_PROJECTED_DISTANCE_LOWER;
00159
00161 static const String HX_PROJECTED_DISTANCE_UPPER;
00162
00164 static const String DISTANCE_TOLERANCE;
00165
00167 static const String ANGLE_TOLERANCE;
00168
00170 static const String LIMIT;
00171
00173 static const String CREATE_INTERACTION_FILE;
00174
00175 };
00176
00177
00178 struct Default
00179 {
00180
00182 static const Size VERBOSITY;
00183
00185 static const float CX_DISTANCE_UPPER;
00186
00188 static const float CHX_ANGLE_LOWER;
00189
00191 static const float HX_PROJECTED_DISTANCE_LOWER;
00192
00194 static const float HX_PROJECTED_DISTANCE_UPPER;
00195
00197 static const float DISTANCE_TOLERANCE;
00198
00200 static const float ANGLE_TOLERANCE;
00201
00203 static const float LIMIT;
00204
00206 static const bool CREATE_INTERACTION_FILE;
00207
00208 };
00209
00210
00214
00217 CHPI()
00218 ;
00219
00222 CHPI(ScoringFunction& sf)
00223 ;
00224
00227 CHPI(const CHPI& chpi)
00228 ;
00229
00232 virtual ~CHPI()
00233 ;
00234
00236
00239
00242 const CHPI& operator = (const CHPI& chpi)
00243 ;
00244
00247 virtual void clear()
00248 ;
00249
00251
00254
00255 bool operator == (const CHPI& chpi) const
00256 ;
00257
00259
00262
00265 virtual bool setup()
00266 ;
00267
00268 virtual double calculateScore()
00269 ;
00270
00272 Options options;
00273
00274 private:
00275
00276
00277
00278 std::vector< std::pair<const AromaticRing*, const CHGroup*> > possible_interactions_;
00279
00280
00281 std::vector<CHGroup> all_CH_groups_;
00282
00283
00284 std::vector<AromaticRing> all_aromatic_rings_;
00285
00286
00287 float CX_distance_upper_;
00288
00289
00290 float CHX_angle_lower_;
00291
00292
00293 float HX_projected_distance_lower_;
00294
00295
00296 float HX_projected_distance_upper_;
00297
00298
00299
00300 float distance_tolerance_;
00301 float angle_tolerance_;
00302
00303
00304
00305 float limit_;
00306
00307
00308 Size verbosity_;
00309
00310
00311
00312 bool write_interactions_file_;
00313
00314 };
00315
00316
00317
00318 }
00319
00320 #endif // BALL_SCORING_COMPONENTS_CHPI_H