BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
conformationSet.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_CONFORMATIONSET_H
6 #define BALL_DOCKING_COMMON_CONFORMATIONSET_H
7 
8 #ifndef BALL_DATATYPE_HASHMAP_H
9 # include <BALL/DATATYPE/hashMap.h>
10 #endif
11 
12 #ifndef BALL_KERNEL_SYSTEM_H
13 # include <BALL/KERNEL/system.h>
14 #endif
15 
16 #ifndef BALL_MOLMEC_COMMON_SNAPSHOT_H
18 #endif
19 
20 #ifndef BALL_FORMAT_DCDFILE_H
21 # include <BALL/FORMAT/DCDFile.h>
22 #endif
23 
24 #include <vector>
25 #include <set>
26 
27 namespace BALL
28 {
33  {
34  public:
35 
39  typedef std::pair < Index, float > Conformation;
40 
42 
44 
45  ConformationSet(const System& system);
46 
47  virtual ~ConformationSet() {};
48 
51  void setup(const System& system);
52 
53  void add(const float score, const System& conformation);
54 
55  const System& getSystem() const;
56 
57  System& getSystem();
58 
61  void setScoring(std::vector < Conformation > & score);
62 
65  const std::vector < Conformation > & getScoring() const;
66 
70  void resetScoring();
71 
75  const std::vector < SnapShot > & getUnscoredConformations() const;
76 
80  const SnapShot& operator [] (const Index pos) const;
81 
85  bool writeDCDFile(const String& filename, const Size num = 0);
86 
87  bool readDCDFile(const String& filename);
88 
91  Size size() const;
92 
93  void setParent(ConformationSet* new_parent){parent_= new_parent;}
94 
95  ConformationSet* getParent() {return parent_;}
96 
97  const ConformationSet* getParent() const {return parent_;}
98 
99  protected:
100 
104  // Indices of the conformations in the SnapShotManager.
105  // Sorted according to their score
106  std::vector < Conformation > snapshot_order_;
107 
111 
114  vector<SnapShot> structures_;
115 
119  };
120 
121 }
122 #endif
ConformationSet * getParent()
vector< SnapShot > structures_
const ConformationSet * getParent() const
void setParent(ConformationSet *new_parent)
std::vector< Conformation > snapshot_order_
std::pair< Index, float > Conformation
#define BALL_EXPORT
Definition: COMMON/global.h:50
ConformationSet * parent_