BALL  1.4.79
 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_DOCKING_COMMON_DOCKRESULT_H
8 #define BALL_DOCKING_COMMON_DOCKRESULT_H
9 
10 #ifndef BALL_DATATYPE_OPTIONS_H
11 # include <BALL/DATATYPE/options.h>
12 #endif
13 
14 #ifndef BALL_DOCKING_COMMON_CONFORMATIONSET_H
16 #endif
17 
18 namespace BALL
19 {
30  {
31  public:
32 
36 
39  DockResult()
40  throw();
41 
44  DockResult(const String& docking_algorithm, ConformationSet* conformation_set,
45  const Options& docking_options)
46  throw();
47 
50  DockResult(const DockResult& dock_res)
51  throw();
52 
55  virtual ~DockResult()
56  throw();
57 
59 
63 
66  const DockResult& operator = (const DockResult& dock_res)
67  throw();
68 
70 
74 
77  void setConformationSet(ConformationSet* conformation_set)
78  throw();
79 
82  const String& getDockingAlgorithm() const
83  throw();
84 
87  const Options& getDockingOptions() const
88  throw();
89 
92  const ConformationSet* getConformationSet() const
93  throw();
94 
97  ConformationSet* getConformationSet()
98  throw();
99 
100  /* Sets scoring flag by which all scores are sorted displayed
101  a negative index corresponds to sorting by snapshot index
102  */
103  void sortBy(Index scoring_index)
105 
106  /* Get the number of the scoring by which all scores are sorted displayed
107  */
108  Index isSortedBy() const
109  throw();
110 
114  float operator()(Position i, Position j)
116 
119  const vector < ConformationSet::Conformation > getScores(Position i) const
121 
124  const String& getScoringName(Position i) const
126 
129  const Options& getScoringOptions(Position i) const
131 
134  Size numberOfScorings() const
135  throw();
136 
142  void addScoring(const String& name, const Options& options, vector < ConformationSet::Conformation > scores)
143  throw();
144 
147  void deleteScoring(Position i)
149 
151 
155 
162  bool writeDockResult(const String& filename)
163  throw();
164 
170  bool writeDockResult(std::ostream& file) const
171  throw();
172 
179  bool readDockResult(const String& filename)
180  throw();
181 
187  bool readDockResult(std::istream& file)
188  throw();
189 
193  friend std::ostream& operator <<(std::ostream& out, const DockResult& dock_res)
194  throw();
195 
199  friend std::istream& operator >>(std::istream& in, DockResult& dock_res)
200  throw();
201 
203 
204  protected:
205 
212  class Scoring_
213  {
214  public:
215 
218  Scoring_() throw();
219 
222  Scoring_(const Scoring_& scoring)
223  throw();
224 
227  Scoring_(const String& name, const Options& options, const vector<float>& scores, const vector<Index>& snapshot_order) throw();
228 
231  ~Scoring_() throw();
232 
235  const Scoring_& operator = (const Scoring_& scoring)
236  throw();
237 
247  vector<float> scores_;
251  vector<Index> snapshot_order_;
252  };
253 
260  class Compare_
261  {
262  public:
263 
266  Compare_() throw();
267 
270  ~Compare_() throw();
271 
274  //bool operator() (const std::pair<Index, float>& a, const std::pair<Index, float>& b) const
275  bool operator() (const ConformationSet::Conformation& a, const ConformationSet::Conformation& b) const
276  throw();
277  };
278 
291  vector<Scoring_> scorings_;
297  };
298 
299  std::ostream& operator <<(std::ostream& out, const DockResult& dock_res)
300  throw();
301 
302  std::istream& operator >>(std::istream& in, DockResult& dock_res)
303  throw();
304 }
305 #endif
String docking_algorithm_
Definition: dockResult.h:281
std::istream & operator>>(std::istream &is, TRegularData1D< ValueType > &grid)
Input operator.
vector< Index > snapshot_order_
Definition: dockResult.h:251
BALL_EXPORT std::ostream & operator<<(std::ostream &os, const Exception::GeneralException &e)
Options docking_options_
Definition: dockResult.h:284
std::pair< Index, float > Conformation
ConformationSet * conformation_set_
Definition: dockResult.h:287
vector< float > scores_
Definition: dockResult.h:247
#define BALL_EXPORT
Definition: COMMON/global.h:50
vector< Scoring_ > scorings_
Definition: dockResult.h:291