BALL  1.5.0
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 
104  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 
115  float operator()(Position i, Position j);
116 
120  const vector < ConformationSet::Conformation > getScores(Position i) const;
121 
125  const String& getScoringName(Position i) const;
126 
130  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 
148  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
BALL::ConformationSet::Conformation
std::pair< Index, float > Conformation
Definition: conformationSet.h:39
BALL::DockResult::Compare_
Definition: dockResult.h:260
BALL::Options
Definition: options.h:46
conformationSet.h
BALL::ConformationSet
Definition: conformationSet.h:32
BALL::DockResult::Scoring_::name_
String name_
Definition: dockResult.h:240
BALL::DockResult::Scoring_
Definition: dockResult.h:212
BALL::String
Definition: string.h:56
BALL::DockResult::conformation_set_
ConformationSet * conformation_set_
Definition: dockResult.h:287
BALL
Definition: constants.h:12
BALL::DockResult::Scoring_::scores_
vector< float > scores_
Definition: dockResult.h:247
BALL::DockResult::scorings_
vector< Scoring_ > scorings_
Definition: dockResult.h:291
options.h
BALL_INDEX_TYPE
BALL_SIZE_TYPE
BALL::DockResult::Scoring_::options_
Options options_
Definition: dockResult.h:243
BALL::DockResult::docking_algorithm_
String docking_algorithm_
Definition: dockResult.h:281
BALL::DockResult::docking_options_
Options docking_options_
Definition: dockResult.h:284
BALL::operator<<
BALL_EXPORT std::ostream & operator<<(std::ostream &os, const Exception::GeneralException &e)
BALL::operator>>
std::istream & operator>>(std::istream &is, TRegularData1D< ValueType > &grid)
Input operator.
Definition: regularData1D.h:802
BALL::DockResult
Definition: dockResult.h:29
BALL::DockResult::Scoring_::snapshot_order_
vector< Index > snapshot_order_
Definition: dockResult.h:251
BALL::DockResult::sorted_by_
Index sorted_by_
Definition: dockResult.h:296
BALL_EXPORT
#define BALL_EXPORT
Definition: COMMON/global.h:50