BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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,
30  DOCKING,
31  RESCORING,
34  MOLECULE_CHECK
35  };
36 
38  {
39  public:
40  ResultData();
41  ResultData(int result_type);
42  void setReceptorConformationId(String id);
43  void setReceptorConformation(Conformation* conf);
44  bool hasReceptorConformationId() const;
45  String getReceptorConformationId() const;
46  void setLigandConformationId(String id);
47  void setLigandConformation(Conformation* conf);
48  String getLigandConformationId() const;
49  bool hasLigandConformationId() const;
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;
57  void setConformation(Conformation* conf);
58  Conformation* getConformation();
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);
73  static Result* makeLigandImportResult();
74  static Result* makeReceptorImportResult();
75  static Result* makeDockingResult();
76  static Result* makeRescoringResult();
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 
128  Conformation* getInputConformer(Ligand* lig) throw(Exception::GeneralException);
129 
134  Conformation* getFirstOutputConformation(Ligand* lig) throw(Exception::GeneralException);
135 
140  vector < Result::ResultData > getOutputConformations(Ligand* lig);
141 
142  const HashSet<String>* getInputIds();
143  HashSet<String> getOutputIds();
144  ResultData getOutputData(String id);
145  bool hasOutputData(String id);
146 
151  void add(Conformation* lig_conf_in, ResultData &rd);
152 
160  void add(Conformation* lig_conf_in, Conformation* lig_conf_out, int scoringmethod, double energy, Conformation* rec_conf);
161 
162  void add(const String& lig_conf_in, const String& lig_conf_out, int scoringmethod, double energy, const String& rec_conf);
163 
168  void add(String lig_conf_id_in, Result::ResultData &rd);
169 
174  const vector<Result::ResultData>* get(String inpose_id);
175 
176  static String toString(const ResultData &rd);
177 
179  void erase(const FlexibleMolecule* flexmol);
180 
181  void erase(const String& ID);
182 
183  void sort(const list<String>& input_order, list<String>& output_order);
184 
185  void setTimestamp(const String& timestamp);
186 
187  const String& getTimestamp();
188 
189  void setDescription(const String& text);
190 
191  const String& getDescription();
192 
193  void setToolInfo(const String& toolinfo);
194 
195  const String& getToolInfo();
196 
197  const HashMap<String, vector<ResultData> >* getData();
198 
199  protected:
200 
201  String timestamp_;
202  String toolinfo_;
203  Result::Method method;
204  HashMap<String, vector<ResultData> > result_data_;
205  HashMap<String, ResultData> result_output_data_;
206  vector < String > input_conformations_;
207  HashSet < String > input_conformations_map_;
208 
210  String description_;
211  };
212 }
213 #endif /* BALL_DOCKING_RESULT_H */
#define BALL_CREATE(name)
Definition: create.h:62
LIGANDIMPORT
Definition: result.h:27
RESCORING
Definition: result.h:27
UNKNOWN
Definition: result.h:27
MDRESCORING
Definition: result.h:27
CONSENSUSRESCORING
Definition: result.h:27
DOCKING
Definition: result.h:27
RECEPTORIMPORT
Definition: result.h:27
HashMap class based on the STL map (containing serveral convenience functions)
Definition: hashMap.h:73
#define BALL_EXPORT
Definition: COMMON/global.h:50