BALL  1.5.0
result.h
Go to the documentation of this file.
1 // ----------------------------------------------------
2 // $Maintainer: Marc Röttig $
3 // $Authors: Marc Röttig, Marcel Schumann $
4 // ----------------------------------------------------
5 
6 #ifndef BALL_DOCKING_RESULT_H
7 #define BALL_DOCKING_RESULT_H
8 
11 #include <vector>
12 #include <map>
13 
14 
15 namespace BALL
16 {
22  {
23  public:
24 
25  enum BALL_EXPORT Method
26  {
27  UNKNOWN = -1,
34  MOLECULE_CHECK
35  };
36 
38  {
39  public:
41  ResultData(int result_type);
50  void setScoringMethod(int method);
51  bool hasScoringMethod() const;
52  int getScoringMethod() const;
53  void setEnergy(double e);
54  double getEnergy() const;
55  bool hasEnergy() const;
56  bool check() const;
59  private:
60  Conformation* conformation;
61  bool has_rec_id;
62  bool has_lig_id;
63  bool has_energy;
64  bool has_method;
65  String rec_conf_id;
66  String lig_conf_id;
67  int scoringmethod;
68  double energy;
69  int resulttype;
70  };
71 
72  static Result::Method getMethod(int i);
78  Result();
79 
80  /* Constructor.
81  */
82  Result(const Result::Method& _method);
83 
85  Result(const Result& res);
86 
88  Result(const Result& res, const HashSet<String>& IDs);
89 
90  /* Destructor.
91  */
92  virtual ~Result();
93 
96  void clear();
97 
99  void operator = (const Result& res);
100 
102  void operator += (const Result& res);
103 
107  Result::Method getMethod();
108 
112  String getMethodString();
113 
117  void setMethod(Result::Method _method);
118 
122  const vector < String > * getInputConformations();
123 
129  Conformation* getInputConformer(Ligand* lig);
130 
136  Conformation* getFirstOutputConformation(Ligand* lig);
137 
142  vector < Result::ResultData > getOutputConformations(Ligand* lig);
143 
144  const HashSet<String>* getInputIds();
145  HashSet<String> getOutputIds();
146  ResultData getOutputData(String id);
147  bool hasOutputData(String id);
148 
153  void add(Conformation* lig_conf_in, ResultData &rd);
154 
162  void add(Conformation* lig_conf_in, Conformation* lig_conf_out, int scoringmethod, double energy, Conformation* rec_conf);
163 
164  void add(const String& lig_conf_in, const String& lig_conf_out, int scoringmethod, double energy, const String& rec_conf);
165 
170  void add(String lig_conf_id_in, Result::ResultData &rd);
171 
176  const vector<Result::ResultData>* get(String inpose_id);
177 
178  static String toString(const ResultData &rd);
179 
181  void erase(const FlexibleMolecule* flexmol);
182 
183  void erase(const String& ID);
184 
185  void sort(const list<String>& input_order, list<String>& output_order);
186 
187  void setTimestamp(const String& timestamp);
188 
189  const String& getTimestamp();
190 
191  void setDescription(const String& text);
192 
193  const String& getDescription();
194 
195  void setToolInfo(const String& toolinfo);
196 
197  const String& getToolInfo();
198 
199  const HashMap<String, vector<ResultData> >* getData();
200 
201  protected:
202 
203  String timestamp_;
204  String toolinfo_;
205  Result::Method method;
206  HashMap<String, vector<ResultData> > result_data_;
207  HashMap<String, ResultData> result_output_data_;
208  vector < String > input_conformations_;
209  HashSet < String > input_conformations_map_;
210 
212  String description_;
213  };
214 }
215 #endif /* BALL_DOCKING_RESULT_H */
BALL_EXPORT
#define BALL_EXPORT
Definition: COMMON/global.h:50
BALL::Result::ResultData::setConformation
void setConformation(Conformation *conf)
BALL::Result::makeRescoringResult
static Result * makeRescoringResult()
BALL::Result::ResultData::getEnergy
double getEnergy() const
BALL::Result::ResultData::setLigandConformation
void setLigandConformation(Conformation *conf)
RECEPTORIMPORT
RECEPTORIMPORT
Definition: result.h:28
DOCKING
DOCKING
Definition: result.h:30
BALL::Result::makeLigandImportResult
static Result * makeLigandImportResult()
BALL::HashMap
HashMap class based on the STL map (containing serveral convenience functions)
Definition: hashMap.h:74
BALL::Result::ResultData::check
bool check() const
BALL::Result::ResultData::setScoringMethod
void setScoringMethod(int method)
BALL::Result::ResultData::setLigandConformationId
void setLigandConformationId(String id)
BALL::FlexibleMolecule
Definition: flexibleMolecule.h:23
BALL::Result::ResultData::ResultData
ResultData()
BALL::Result::ResultData::setReceptorConformationId
void setReceptorConformationId(String id)
BALL::Result
Definition: result.h:22
BALL::Result::makeReceptorImportResult
static Result * makeReceptorImportResult()
BALL::String
Definition: string.h:57
BALL::Result::ResultData::hasLigandConformationId
bool hasLigandConformationId() const
BALL::Result::ResultData::ResultData
ResultData(int result_type)
BALL
Definition: constants.h:13
BALL::HashSet
Definition: hashSet.h:46
BALL::Result::ResultData::hasReceptorConformationId
bool hasReceptorConformationId() const
MDRESCORING
MDRESCORING
Definition: result.h:32
flexibleMolecule.h
BALL::Result::ResultData::getLigandConformationId
String getLigandConformationId() const
BALL::Result::ResultData::setReceptorConformation
void setReceptorConformation(Conformation *conf)
BALL::Conformation
Definition: conformation.h:25
BALL::Result::ResultData
Definition: result.h:38
UNKNOWN
UNKNOWN
Definition: result.h:27
BALL::Result::ResultData::getReceptorConformationId
String getReceptorConformationId() const
CONSENSUSRESCORING
CONSENSUSRESCORING
Definition: result.h:33
RESCORING
RESCORING
Definition: result.h:31
BALL::Result::getMethod
static Result::Method getMethod(int i)
BALL::Result::makeDockingResult
static Result * makeDockingResult()
LIGANDIMPORT
LIGANDIMPORT
Definition: result.h:29
BALL_CREATE
#define BALL_CREATE(name)
Definition: create.h:62
BALL::Result::ResultData::setEnergy
void setEnergy(double e)
BALL::Result::ResultData::getScoringMethod
int getScoringMethod() const
receptor.h
BALL::Result::ResultData::getConformation
Conformation * getConformation()
BALL::Result::ResultData::hasEnergy
bool hasEnergy() const
BALL::Result::ResultData::hasScoringMethod
bool hasScoringMethod() const