BALL  1.5.0
conformation.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 #ifndef BALL_DOCKING_COMMON_CONFORMATION_H
6 #define BALL_DOCKING_COMMON_CONFORMATION_H
7 
10 
11 #include <QtCore/QCryptographicHash>
12 
13 namespace BALL
14 {
15 
25  {
26  public:
27 
28  /* Default Constructor.
29  */
31 
32  /* Constructor.
33  @param pointer to AtomContainer
34  */
35  Conformation(AtomContainer* parent, AtomContainer* conformation_molecule);
36 
37  /* Copy Constructor.
38  */
39  Conformation (const Conformation& conf);
40 
41  /* Destructor.
42  */
43  virtual ~Conformation();
44 
46  static void generateHash(const AtomContainer* mol, String& hash);
47 
50  bool operator == (const Conformation& conf);
51 
54  bool operator != (const Conformation& conf);
55 
60 
65 
69  void setAtomPositions(const AtomContainer* parent, const HashMap<Size, Vector3>& pos);
70 
72 
73  void setParent(AtomContainer* parent);
74 
79 
81  bool checkID(String& hash);
82 
83  void setID(String& hash);
84 
88  void addProperty(const String& name, const String& value);
89 
90  const std::vector<std::pair<String, String> >* getProperties();
91 
92  Size getNoOfAtoms() const;
93 
94  private:
95 
99  void takeConformation(const AtomContainer* parent, AtomContainer* ac);
100 
104  void takeConformation(const AtomContainer& parent, const AtomContainer& ac);
105 
107  static String doubleToString(const double& value);
108 
111  void generateHash(const AtomContainer* mol, const HashMap<Size, Vector3>& positions, String& hash);
112 
113  String id_;
114  const AtomContainer* source_;
115  Size number_of_atoms_;
116 
118  HashMap<Size, Vector3> atom_positions_;
119 
120  std::vector<std::pair<String, String> > properties_;
121  };
122 }
123 
124 #endif // BALL_DOCKING_COMMON_CONFORMATION_H
BALL_EXPORT
#define BALL_EXPORT
Definition: COMMON/global.h:50
BALL::Conformation::setID
void setID(String &hash)
BALL::operator!=
BALL_EXPORT bool operator!=(const String &s1, const String &s2)
property.h
BALL::HashMap
HashMap class based on the STL map (containing serveral convenience functions)
Definition: hashMap.h:74
BALL::AtomContainer
Definition: atomContainer.h:32
BALL::Conformation::generateHash
static void generateHash(const AtomContainer *mol, String &hash)
BALL::Conformation::getAtomPositions
const HashMap< Size, Vector3 > * getAtomPositions()
BALL::Conformation::getProperties
const std::vector< std::pair< String, String > > * getProperties()
BALL::String
Definition: string.h:57
BALL
Definition: constants.h:13
BALL::Conformation::getNoOfAtoms
Size getNoOfAtoms() const
BALL::Conformation::checkID
bool checkID(String &hash)
BALL::Conformation::Conformation
Conformation(const Conformation &conf)
BALL::Conformation::~Conformation
virtual ~Conformation()
BALL_SIZE_TYPE
BALL::Conformation::setParent
void setParent(AtomContainer *parent)
BALL::Conformation::getId
String getId()
BALL::Conformation::Conformation
Conformation(AtomContainer *parent, AtomContainer *conformation_molecule)
BALL::Conformation::applyConformation
void applyConformation(AtomContainer &ac) const
BALL::Conformation
Definition: conformation.h:25
BALL::Conformation::setAtomPositions
void setAtomPositions(const AtomContainer *parent, const HashMap< Size, Vector3 > &pos)
BALL::Conformation::Conformation
Conformation()
BALL::Conformation::addProperty
void addProperty(const String &name, const String &value)
BALL::operator==
BALL_EXPORT bool operator==(const String &s1, const String &s2)
BALL::Conformation::getParent
const AtomContainer * getParent()
atomContainer.h