Loading...
Searching...
No Matches
result.h
Go to the documentation of this file.
// ----------------------------------------------------
// $Maintainer: Marc Röttig $
// $Authors: Marc Röttig, Marcel Schumann $
// ----------------------------------------------------
#ifndef BALL_DOCKING_RESULT_H
#define BALL_DOCKING_RESULT_H
#include <BALL/DOCKING/COMMON/receptor.h>
#include <BALL/DOCKING/COMMON/flexibleMolecule.h>
#include <vector>
#include <map>
namespace BALL
{
class BALL_EXPORT Result
{
public:
enum BALL_EXPORT Method
{
UNKNOWN = -1,
RECEPTORIMPORT,
LIGANDIMPORT,
DOCKING,
RESCORING,
MDRESCORING,
CONSENSUSRESCORING,
MOLECULE_CHECK
};
class BALL_EXPORT ResultData
{
public:
ResultData();
ResultData(int result_type);
void setReceptorConformationId(String id);
void setReceptorConformation(Conformation* conf);
bool hasReceptorConformationId() const;
String getReceptorConformationId() const;
void setLigandConformationId(String id);
void setLigandConformation(Conformation* conf);
String getLigandConformationId() const;
bool hasLigandConformationId() const;
void setScoringMethod(int method);
bool hasScoringMethod() const;
int getScoringMethod() const;
void setEnergy(double e);
double getEnergy() const;
bool hasEnergy() const;
bool check() const;
void setConformation(Conformation* conf);
Conformation* getConformation();
private:
Conformation* conformation;
bool has_rec_id;
bool has_lig_id;
bool has_energy;
bool has_method;
String rec_conf_id;
String lig_conf_id;
int scoringmethod;
double energy;
int resulttype;
};
static Result::Method getMethod(int i);
static Result* makeLigandImportResult();
static Result* makeReceptorImportResult();
static Result* makeDockingResult();
static Result* makeRescoringResult();
BALL_CREATE(Result)
Result();
/* Constructor.
*/
Result(const Result::Method& _method);
Result(const Result& res);
Result(const Result& res, const HashSet<String>& IDs);
/* Destructor.
*/
virtual ~Result();
void clear();
void operator = (const Result& res);
void operator += (const Result& res);
Result::Method getMethod();
String getMethodString();
void setMethod(Result::Method _method);
const vector < String > * getInputConformations();
Conformation* getInputConformer(Ligand* lig);
Conformation* getFirstOutputConformation(Ligand* lig);
vector < Result::ResultData > getOutputConformations(Ligand* lig);
const HashSet<String>* getInputIds();
HashSet<String> getOutputIds();
ResultData getOutputData(String id);
bool hasOutputData(String id);
void add(Conformation* lig_conf_in, ResultData &rd);
void add(Conformation* lig_conf_in, Conformation* lig_conf_out, int scoringmethod, double energy, Conformation* rec_conf);
void add(const String& lig_conf_in, const String& lig_conf_out, int scoringmethod, double energy, const String& rec_conf);
void add(String lig_conf_id_in, Result::ResultData &rd);
const vector<Result::ResultData>* get(String inpose_id);
static String toString(const ResultData &rd);
void erase(const FlexibleMolecule* flexmol);
void erase(const String& ID);
void sort(const list<String>& input_order, list<String>& output_order);
void setTimestamp(const String& timestamp);
const String& getTimestamp();
void setDescription(const String& text);
const String& getDescription();
void setToolInfo(const String& toolinfo);
const String& getToolInfo();
const HashMap<String, vector<ResultData> >* getData();
protected:
String timestamp_;
String toolinfo_;
Result::Method method;
HashMap<String, vector<ResultData> > result_data_;
HashMap<String, ResultData> result_output_data_;
vector < String > input_conformations_;
HashSet < String > input_conformations_map_;
String description_;
};
}
#endif /* BALL_DOCKING_RESULT_H */
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
BALL::Conformation
Definition conformation.h:25
BALL::FlexibleMolecule
Definition flexibleMolecule.h:23
BALL::HashMap
HashMap class based on the STL map (containing serveral convenience functions).
Definition hashMap.h:74
BALL::HashSet
Definition hashSet.h:46
BALL::Result::ResultData
Definition result.h:38
BALL::Result::ResultData::getScoringMethod
int getScoringMethod() const
BALL::Result::ResultData::hasLigandConformationId
bool hasLigandConformationId() const
BALL::Result::ResultData::check
bool check() const
BALL::Result::ResultData::getEnergy
double getEnergy() const
BALL::Result::ResultData::setLigandConformation
void setLigandConformation(Conformation *conf)
BALL::Result::ResultData::hasEnergy
bool hasEnergy() const
BALL::Result::ResultData::ResultData
ResultData()
BALL::Result::ResultData::ResultData
ResultData(int result_type)
BALL::Result::ResultData::setReceptorConformation
void setReceptorConformation(Conformation *conf)
BALL::Result::ResultData::getConformation
Conformation * getConformation()
BALL::Result::ResultData::setReceptorConformationId
void setReceptorConformationId(String id)
BALL::Result::ResultData::setLigandConformationId
void setLigandConformationId(String id)
BALL::Result::ResultData::getLigandConformationId
String getLigandConformationId() const
BALL::Result::ResultData::hasReceptorConformationId
bool hasReceptorConformationId() const
BALL::Result::ResultData::setConformation
void setConformation(Conformation *conf)
BALL::Result::ResultData::setScoringMethod
void setScoringMethod(int method)
BALL::Result::ResultData::setEnergy
void setEnergy(double e)
BALL::Result::ResultData::getReceptorConformationId
String getReceptorConformationId() const
BALL::Result::ResultData::hasScoringMethod
bool hasScoringMethod() const
BALL::Result::setToolInfo
void setToolInfo(const String &toolinfo)
BALL::Result::description_
String description_
Definition result.h:212
BALL::Result::getInputConformer
Conformation * getInputConformer(Ligand *lig)
BALL::Result::getOutputConformations
vector< Result::ResultData > getOutputConformations(Ligand *lig)
BALL::Result::getMethod
static Result::Method getMethod(int i)
BALL::Result::getDescription
const String & getDescription()
BALL::Result::getToolInfo
const String & getToolInfo()
BALL::Result::sort
void sort(const list< String > &input_order, list< String > &output_order)
BALL::Result::result_data_
HashMap< String, vector< ResultData > > result_data_
Definition result.h:206
BALL::Result::makeReceptorImportResult
static Result * makeReceptorImportResult()
BALL::Result::method
Result::Method method
Definition result.h:205
BALL::Result::setDescription
void setDescription(const String &text)
BALL::Result::result_output_data_
HashMap< String, ResultData > result_output_data_
Definition result.h:207
BALL::Result::toolinfo_
String toolinfo_
Definition result.h:204
BALL::Result::getFirstOutputConformation
Conformation * getFirstOutputConformation(Ligand *lig)
BALL::Result::clear
void clear()
BALL::Result::input_conformations_
vector< String > input_conformations_
Definition result.h:208
BALL::Result::makeRescoringResult
static Result * makeRescoringResult()
BALL::Result::hasOutputData
bool hasOutputData(String id)
BALL::Result::getInputIds
const HashSet< String > * getInputIds()
BALL::Result::setTimestamp
void setTimestamp(const String &timestamp)
BALL::Result::makeLigandImportResult
static Result * makeLigandImportResult()
BALL::Result::getOutputData
ResultData getOutputData(String id)
BALL::Result::getInputConformations
const vector< String > * getInputConformations()
BALL::Result::getData
const HashMap< String, vector< ResultData > > * getData()
BALL::Result::erase
void erase(const FlexibleMolecule *flexmol)
BALL::Result::getTimestamp
const String & getTimestamp()
BALL::Result::getMethodString
String getMethodString()
BALL::Result::timestamp_
String timestamp_
Definition result.h:203
BALL::Result::setMethod
void setMethod(Result::Method _method)
BALL::Result::add
void add(Conformation *lig_conf_in, ResultData &rd)
BALL::Result::toString
static String toString(const ResultData &rd)
BALL::Result::getOutputIds
HashSet< String > getOutputIds()
BALL::Result::makeDockingResult
static Result * makeDockingResult()
BALL::Result::input_conformations_map_
HashSet< String > input_conformations_map_
Definition result.h:209
BALL::Result::Result
Result()
BALL::Result::get
const vector< Result::ResultData > * get(String inpose_id)
BALL::String
Definition string.h:57
BALL_CREATE
#define BALL_CREATE(name)
Definition create.h:62
flexibleMolecule.h
BALL
Definition constants.h:13
BALL::Ligand
FlexibleMolecule Ligand
Definition flexibleMolecule.h:121
receptor.h
RESCORING
RESCORING
Definition result.h:31
RECEPTORIMPORT
RECEPTORIMPORT
Definition result.h:28
DOCKING
DOCKING
Definition result.h:30
MDRESCORING
MDRESCORING
Definition result.h:32
CONSENSUSRESCORING
CONSENSUSRESCORING
Definition result.h:33
UNKNOWN
UNKNOWN
Definition result.h:27
LIGANDIMPORT
LIGANDIMPORT
Definition result.h:29