BALL  1.5.0
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
BALL::ConformationSet::snapshot_order_
std::vector< Conformation > snapshot_order_
Definition: conformationSet.h:106
snapShot.h
BALL::ConformationSet::Conformation
std::pair< Index, float > Conformation
Definition: conformationSet.h:39
hashMap.h
BALL::ConformationSet
Definition: conformationSet.h:32
BALL::System
Definition: KERNEL/system.h:38
BALL::ConformationSet::getParent
const ConformationSet * getParent() const
Definition: conformationSet.h:97
BALL::ConformationSet::ConformationSet
ConformationSet()
Definition: conformationSet.h:41
BALL::String
Definition: string.h:56
BALL::ConformationSet::system_
System system_
Definition: conformationSet.h:110
BALL
Definition: constants.h:12
BALL::ConformationSet::structures_
vector< SnapShot > structures_
Definition: conformationSet.h:114
BALL_INDEX_TYPE
BALL_SIZE_TYPE
BALL::ConformationSet::parent_
ConformationSet * parent_
Definition: conformationSet.h:118
BALL::ConformationSet::~ConformationSet
virtual ~ConformationSet()
Definition: conformationSet.h:47
DCDFile.h
BALL::ConformationSet::setParent
void setParent(ConformationSet *new_parent)
Definition: conformationSet.h:93
BALL_EXPORT
#define BALL_EXPORT
Definition: COMMON/global.h:50
system.h
BALL::ConformationSet::getParent
ConformationSet * getParent()
Definition: conformationSet.h:95
BALL::SnapShot
Definition: snapShot.h:29