BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
dockResult.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 // $Id: dockResult.h,v 1.2.16.2 2007/08/07 16:16:15 bertsch Exp $
5 //
6 
7 #ifndef BALL_STRUCTURE_DOCKING_DOCKRESULT_H
8 #define BALL_STRUCTURE_DOCKING_DOCKRESULT_H
9 
10 #ifndef BALL_DATATYPE_OPTIONS_H
11 # include <BALL/DATATYPE/options.h>
12 #endif
13 
14 #ifndef BALL_STRUCTURE_DOCKING_CONFORMATIONSET_H
16 #endif
17 
18 namespace BALL
19 {
30  {
31  public:
32 
36 
39  DockResult()
40  ;
41 
44  DockResult(const String& docking_algorithm, ConformationSet* conformation_set,
45  const Options& docking_options)
46  ;
47 
50  DockResult(const DockResult& dock_res)
51  ;
52 
55  virtual ~DockResult()
56  ;
57 
59 
63 
66  const DockResult& operator =(const DockResult& dock_res)
67  ;
68 
70 
74 
77  void setConformationSet(ConformationSet* conformation_set)
78  ;
79 
82  const String& getDockingAlgorithm() const
83  ;
84 
87  const Options& getDockingOptions() const
88  ;
89 
92  const ConformationSet* getConformationSet() const
93  ;
94 
97  ConformationSet* getConformationSet()
98  ;
99 
105  const System& getSystem() const
106  throw();
107 
108  /* Sets scoring flag by which all scores are sorted displayed
109  a negative index corresponds to sorting by snapshot index
110  */
111  void sortBy(Index scoring_index)
113 
114  /* Get the number of the scoring by which all scores are sorted displayed
115  */
116  Index isSortedBy() const
117  ;
118 
122  float operator()(Position i, Position j)
124 
127  const vector<ConformationSet::Conformation> getScores(Position i) const
129 
132  const String& getScoringName(Position i) const
134 
137  const Options& getScoringOptions(Position i) const
139 
142  Size numberOfScorings() const
143  ;
144 
150  void addScoring(const String& name, const Options& options, vector<ConformationSet::Conformation> scores)
151  ;
152 
155  void deleteScoring(Position i)
157 
159 
163 
170  bool writeDockResult(const String& filename)
171  ;
172 
178  bool writeDockResult(std::ostream& file) const
179  ;
180 
187  bool readDockResult(const String& filename)
188  ;
189 
195  bool readDockResult(std::istream& file)
196  ;
197 
201  friend std::ostream& operator <<(std::ostream& out, const DockResult& dock_res)
202  ;
203 
207  friend std::istream& operator >>(std::istream& in, DockResult& dock_res)
208  ;
209 
211 
212  protected:
213 
220  class Scoring_
221  {
222  public:
223 
226  Scoring_() ;
227 
230  Scoring_(const Scoring_& scoring)
231  ;
232 
235  Scoring_(const String& name, const Options& options, const vector<float>& scores, const vector<Index>& snapshot_order) ;
236 
239  ~Scoring_() ;
240 
243  const Scoring_& operator =(const Scoring_& scoring)
244  ;
245 
255  vector<float> scores_;
259  vector<Index> snapshot_order_;
260  };
261 
268  class Compare_
269  {
270  public:
271 
274  Compare_() ;
275 
278  ~Compare_() ;
279 
282  //bool operator() (const std::pair<Index, float>& a, const std::pair<Index, float>& b) const
283  bool operator() (const ConformationSet::Conformation& a, const ConformationSet::Conformation& b) const
284  ;
285  };
286 
299  vector<Scoring_> scorings_;
305 
309  };
310 
311  std::ostream& operator <<(std::ostream& out, const DockResult& dock_res)
312  ;
313 
314  std::istream& operator >>(std::istream& in, DockResult& dock_res)
315  ;
316 }
317 #endif