Collective Variables Module - Developer Documentation
Loading...
Searching...
No Matches
GlobalMasterColvars.h
1#ifndef GLOBALMASTERCOLVARS_H
2#define GLOBALMASTERCOLVARS_H
3
4#include <memory>
5
6#include "GlobalMaster.h"
7
8
10
11class GlobalMasterColvars : public GlobalMaster {
12public:
13
15
17
18 void reset();
19
20 void calculate() override;
21
22 inline void requestTotalForcePublic(bool yesno = true)
23 {
24 requestTotalForce(yesno);
25 }
26
27 inline AtomIDList &modifyRequestedAtomsPublic()
28 {
29 return modifyRequestedAtoms();
30 }
31
32 inline AtomIDList &modifyForcedAtomsPublic()
33 {
34 return modifyForcedAtoms();
35 }
36
37 inline ForceList &modifyAppliedForcesPublic()
38 {
39 return modifyAppliedForces();
40 }
41
42 inline ResizeArray<AtomIDList> &modifyRequestedGroupsPublic()
43 {
44 return modifyRequestedGroups();
45 }
46
47 inline ForceList &modifyGroupForcesPublic()
48 {
49 return modifyGroupForces();
50 }
51
52 inline IntList &modifyRequestedGridObjectsPublic()
53 {
54 return modifyRequestedGridObjects();
55 }
56
57 inline BigRealList &modifyGridObjForcesPublic()
58 {
59 return modifyGridObjForces();
60 }
61
62 inline AtomIDList::const_iterator getAtomIdBeginPublic()
63 {
64 return getAtomIdBegin();
65 }
66
67 inline AtomIDList::const_iterator getAtomIdEndPublic()
68 {
69 return getAtomIdEnd();
70 }
71
72 inline PositionList::const_iterator getAtomPositionBeginPublic()
73 {
74 return getAtomPositionBegin();
75 }
76
77 inline PositionList::const_iterator getGroupPositionBeginPublic()
78 {
79 return getGroupPositionBegin();
80 }
81
82 inline PositionList::const_iterator getGroupPositionEndPublic()
83 {
84 return getGroupPositionEnd();
85 }
86
87 inline ForceList::const_iterator getGroupTotalForceBeginPublic()
88 {
89 return getGroupTotalForceBegin();
90 }
91
92 inline ForceList::const_iterator getGroupTotalForceEndPublic()
93 {
94 return getGroupTotalForceEnd();
95 }
96
97 inline IntList::const_iterator getGridObjIndexBeginPublic()
98 {
99 return getGridObjIndexBegin();
100 }
101
102 inline IntList::const_iterator getGridObjIndexEndPublic()
103 {
104 return getGridObjIndexEnd();
105 }
106
107 inline BigRealList::const_iterator getGridObjValueBeginPublic()
108 {
109 return getGridObjValueBegin();
110 }
111
112 inline BigRealList::const_iterator getGridObjValueEndPublic()
113 {
114 return getGridObjValueEnd();
115 }
116
117 inline AtomIDList::const_iterator getForceIdBeginPublic()
118 {
119 return getForceIdBegin();
120 }
121
122 inline AtomIDList::const_iterator getForceIdEndPublic()
123 {
124 return getForceIdEnd();
125 }
126
127 inline ForceList::const_iterator getTotalForcePublic()
128 {
129 return getTotalForce();
130 }
131
132 inline void addReductionEnergyPublic(int reductionTag, BigReal energy)
133 {
134 addReductionEnergy(reductionTag, energy);
135 }
136
137 inline Lattice const *get_lattice() const
138 {
139 return lattice;
140 }
141
142protected:
143
144 std::unique_ptr<colvarproxy_namd> proxy;
145};
146
147
148namespace {
149 // Constants used for profiling CkLoop calls
150 constexpr int32_t GLOBAL_MASTER_CKLOOP_CALC_ITEM = 2000;
151 constexpr int32_t GLOBAL_MASTER_CKLOOP_CALC_BIASES = 2001;
152 constexpr int32_t GLOBAL_MASTER_CKLOOP_CALC_SCRIPTED_BIASES = 2002;
153}
154
155#endif
Definition: GlobalMasterColvars.h:11
Communication between colvars and NAMD (implementation of colvarproxy)
Definition: colvarproxy_namd.h:34