BALL
1.4.1
|
00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 // $Id: dockResult.h,v 1.2.16.2 2007/08/07 16:16:15 bertsch Exp $ 00005 // 00006 00007 #ifndef BALL_STRUCTURE_DOCKING_DOCKRESULT_H 00008 #define BALL_STRUCTURE_DOCKING_DOCKRESULT_H 00009 00010 #ifndef BALL_DATATYPE_OPTIONS_H 00011 # include <BALL/DATATYPE/options.h> 00012 #endif 00013 00014 #ifndef BALL_STRUCTURE_DOCKING_CONFORMATIONSET_H 00015 # include <BALL/STRUCTURE/DOCKING/conformationSet.h> 00016 #endif 00017 00018 namespace BALL 00019 { 00029 class BALL_EXPORT DockResult 00030 { 00031 public: 00032 00036 00039 DockResult() 00040 ; 00041 00044 DockResult(const String& docking_algorithm, ConformationSet* conformation_set, 00045 const Options& docking_options) 00046 ; 00047 00050 DockResult(const DockResult& dock_res) 00051 ; 00052 00055 virtual ~DockResult() 00056 ; 00057 00059 00063 00066 const DockResult& operator =(const DockResult& dock_res) 00067 ; 00068 00070 00074 00077 void setConformationSet(ConformationSet* conformation_set) 00078 ; 00079 00082 const String& getDockingAlgorithm() const 00083 ; 00084 00087 const Options& getDockingOptions() const 00088 ; 00089 00092 const ConformationSet* getConformationSet() const 00093 ; 00094 00097 ConformationSet* getConformationSet() 00098 ; 00099 00105 const System& getSystem() const 00106 throw(); 00107 00108 /* Sets scoring flag by which all scores are sorted displayed 00109 a negative index corresponds to sorting by snapshot index 00110 */ 00111 void sortBy(Index scoring_index) 00112 throw(Exception::IndexOverflow); 00113 00114 /* Get the number of the scoring by which all scores are sorted displayed 00115 */ 00116 Index isSortedBy() const 00117 ; 00118 00122 float operator()(Position i, Position j) 00123 throw(Exception::IndexOverflow); 00124 00127 const vector<ConformationSet::Conformation> getScores(Position i) const 00128 throw(Exception::IndexOverflow); 00129 00132 const String& getScoringName(Position i) const 00133 throw(Exception::IndexOverflow); 00134 00137 const Options& getScoringOptions(Position i) const 00138 throw(Exception::IndexOverflow); 00139 00142 Size numberOfScorings() const 00143 ; 00144 00150 void addScoring(const String& name, const Options& options, vector<ConformationSet::Conformation> scores) 00151 ; 00152 00155 void deleteScoring(Position i) 00156 throw(Exception::IndexOverflow); 00157 00159 00163 00170 bool writeDockResult(const String& filename) 00171 ; 00172 00178 bool writeDockResult(std::ostream& file) const 00179 ; 00180 00187 bool readDockResult(const String& filename) 00188 ; 00189 00195 bool readDockResult(std::istream& file) 00196 ; 00197 00201 friend std::ostream& operator <<(std::ostream& out, const DockResult& dock_res) 00202 ; 00203 00207 friend std::istream& operator >>(std::istream& in, DockResult& dock_res) 00208 ; 00209 00211 00212 protected: 00213 00220 class Scoring_ 00221 { 00222 public: 00223 00226 Scoring_() ; 00227 00230 Scoring_(const Scoring_& scoring) 00231 ; 00232 00235 Scoring_(const String& name, const Options& options, const vector<float>& scores, const vector<Index>& snapshot_order) ; 00236 00239 ~Scoring_() ; 00240 00243 const Scoring_& operator =(const Scoring_& scoring) 00244 ; 00245 00248 String name_; 00251 Options options_; 00255 vector<float> scores_; 00259 vector<Index> snapshot_order_; 00260 }; 00261 00268 class Compare_ 00269 { 00270 public: 00271 00274 Compare_() ; 00275 00278 ~Compare_() ; 00279 00282 //bool operator() (const std::pair<Index, float>& a, const std::pair<Index, float>& b) const 00283 bool operator() (const ConformationSet::Conformation& a, const ConformationSet::Conformation& b) const 00284 ; 00285 }; 00286 00289 String docking_algorithm_; 00292 Options docking_options_; 00295 ConformationSet* conformation_set_; 00299 vector<Scoring_> scorings_; 00304 Index sorted_by_; 00305 00308 System docked_system_; 00309 }; 00310 00311 std::ostream& operator <<(std::ostream& out, const DockResult& dock_res) 00312 ; 00313 00314 std::istream& operator >>(std::istream& in, DockResult& dock_res) 00315 ; 00316 } 00317 #endif