NAMD
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
GlobalMaster Class Reference

#include <GlobalMaster.h>

Inheritance diagram for GlobalMaster:
colvarproxy_namd GlobalMasterEasy GlobalMasterFreeEnergy GlobalMasterIMD GlobalMasterSMD GlobalMasterSymmetry GlobalMasterTcl GlobalMasterTest GlobalMasterTMD

Public Member Functions

void processData (AtomIDList::iterator a_i, AtomIDList::iterator a_e, PositionList::iterator p_i, PositionList::iterator g_i, PositionList::iterator g_e, BigRealList::iterator gm_i, BigRealList::iterator gm_e, ForceList::iterator gtf_i, ForceList::iterator gtf_e, IntList::iterator goi_i, IntList::iterator goi_e, BigRealList::iterator gov_i, BigRealList::iterator gov_e, AtomIDList::iterator last_atoms_forced_i, AtomIDList::iterator last_atoms_forced_e, ForceList::iterator last_forces_i, AtomIDList::iterator, AtomIDList::iterator, ForceList::iterator)
 
bool changedAtoms ()
 
const AtomIDListrequestedAtoms ()
 
bool changedForces ()
 
const AtomIDListforcedAtoms ()
 
const ForceListappliedForces ()
 
bool changedGroups ()
 
const ResizeArray< AtomIDList > & requestedGroups ()
 
const ForceListgroupForces ()
 
bool changedGridObjs ()
 
const IntListrequestedGridObjs ()
 
const BigRealListgridObjForces ()
 
bool requestedTotalForces ()
 
void clearChanged ()
 
virtual ~GlobalMaster ()
 
void check () const
 
void setLattice (const Lattice *lat)
 

Public Attributes

int step
 
int globalMasterStep
 
int old_num_groups_requested
 

Protected Member Functions

 GlobalMaster ()
 
virtual void calculate ()
 
AtomIDListmodifyRequestedAtoms ()
 
AtomIDListmodifyForcedAtoms ()
 
ForceListmodifyAppliedForces ()
 
ResizeArray< AtomIDList > & modifyRequestedGroups ()
 
ForceListmodifyGroupForces ()
 
IntListmodifyRequestedGridObjects ()
 
BigRealListmodifyGridObjForces ()
 
AtomIDList::const_iterator getAtomIdBegin ()
 
AtomIDList::const_iterator getAtomIdEnd ()
 
PositionList::const_iterator getAtomPositionBegin ()
 
PositionList::const_iterator getGroupPositionBegin ()
 
PositionList::const_iterator getGroupPositionEnd ()
 
ForceList::const_iterator getGroupTotalForceBegin ()
 
ForceList::const_iterator getGroupTotalForceEnd ()
 
IntList::const_iterator getGridObjIndexBegin ()
 
IntList::const_iterator getGridObjIndexEnd ()
 
BigRealList::const_iterator getGridObjValueBegin ()
 
BigRealList::const_iterator getGridObjValueEnd ()
 
AtomIDList::const_iterator getLastAtomsForcedBegin ()
 
AtomIDList::const_iterator getLastAtomsForcedEnd ()
 
ForceList::const_iterator getLastForcesBegin ()
 
AtomIDList::const_iterator getForceIdBegin ()
 
AtomIDList::const_iterator getForceIdEnd ()
 
ForceList::const_iterator getTotalForce ()
 
void requestTotalForce (bool yesno=true)
 
BigRealList::const_iterator getGroupMassBegin ()
 
BigRealList::const_iterator getGroupMassEnd ()
 

Protected Attributes

bool totalForceRequested
 
const Latticelattice
 
AtomIDList::iterator atomIdBegin
 
AtomIDList::iterator atomIdEnd
 
PositionList::iterator atomPositionBegin
 
PositionList::iterator groupPositionBegin
 
PositionList::iterator groupPositionEnd
 
BigRealList::iterator groupMassBegin
 
BigRealList::iterator groupMassEnd
 
ForceList::iterator groupTotalForceBegin
 
ForceList::iterator groupTotalForceEnd
 
IntList::iterator gridObjIndexBegin
 
IntList::iterator gridObjIndexEnd
 
BigRealList::iterator gridObjValueBegin
 
BigRealList::iterator gridObjValueEnd
 
AtomIDList::iterator lastAtomsForcedBegin
 
ForceList::iterator lastForcesBegin
 
AtomIDList::iterator lastAtomsForcedEnd
 
AtomIDList::iterator forceIdBegin
 
AtomIDList::iterator forceIdEnd
 
ForceList::iterator totalForceBegin
 
bool reqAtomsChanged
 
AtomIDList reqAtoms
 
bool appForcesChanged
 
AtomIDList fAtoms
 
ForceList appForces
 
bool reqGroupsChanged
 
ResizeArray< AtomIDListreqGroups
 
ForceList grpForces
 
bool reqGridObjsChanged
 
IntList reqGridObjs
 
BigRealList gridobjForces
 

Detailed Description

Definition at line 30 of file GlobalMaster.h.

Constructor & Destructor Documentation

◆ ~GlobalMaster()

virtual GlobalMaster::~GlobalMaster ( )
inlinevirtual

Definition at line 74 of file GlobalMaster.h.

74 {}; // necessary for abstract classes '-P

◆ GlobalMaster()

GlobalMaster::GlobalMaster ( )
protected

Definition at line 85 of file GlobalMaster.C.

References atomIdBegin, atomIdEnd, atomPositionBegin, clearChanged(), forceIdBegin, forceIdEnd, gridObjValueBegin, gridObjValueEnd, groupMassBegin, groupMassEnd, groupPositionBegin, groupPositionEnd, lastAtomsForcedBegin, lastAtomsForcedEnd, lastForcesBegin, lattice, old_num_groups_requested, step, totalForceBegin, and totalForceRequested.

85  {
86  step = -1;
88  clearChanged();
89  atomIdBegin = 0;
90  atomIdEnd = 0;
93  groupPositionEnd = 0;
94  groupMassBegin = 0;
95  groupMassEnd = 0;
97  gridObjValueEnd = 0;
100  lastForcesBegin = 0;
101  forceIdBegin = 0;
102  forceIdEnd = 0;
103  totalForceBegin = 0;
104  lattice = 0;
105  totalForceRequested = false;
106 }
int old_num_groups_requested
Definition: GlobalMaster.h:57
bool totalForceRequested
Definition: GlobalMaster.h:133
BigRealList::iterator gridObjValueEnd
Definition: GlobalMaster.h:161
ForceList::iterator totalForceBegin
Definition: GlobalMaster.h:171
AtomIDList::iterator lastAtomsForcedEnd
Definition: GlobalMaster.h:166
ForceList::iterator lastForcesBegin
Definition: GlobalMaster.h:165
AtomIDList::iterator lastAtomsForcedBegin
Definition: GlobalMaster.h:164
PositionList::iterator atomPositionBegin
Definition: GlobalMaster.h:151
BigRealList::iterator gridObjValueBegin
Definition: GlobalMaster.h:160
AtomIDList::iterator atomIdEnd
Definition: GlobalMaster.h:150
BigRealList::iterator groupMassBegin
Definition: GlobalMaster.h:154
AtomIDList::iterator atomIdBegin
Definition: GlobalMaster.h:149
BigRealList::iterator groupMassEnd
Definition: GlobalMaster.h:155
const Lattice * lattice
Definition: GlobalMaster.h:142
PositionList::iterator groupPositionBegin
Definition: GlobalMaster.h:152
AtomIDList::iterator forceIdBegin
Definition: GlobalMaster.h:169
void clearChanged()
Definition: GlobalMaster.C:74
AtomIDList::iterator forceIdEnd
Definition: GlobalMaster.h:170
PositionList::iterator groupPositionEnd
Definition: GlobalMaster.h:153

Member Function Documentation

◆ appliedForces()

const ForceList & GlobalMaster::appliedForces ( )

Definition at line 138 of file GlobalMaster.C.

References appForces.

Referenced by GlobalMasterTest::calculate().

138  {
139  return appForces;
140 }
ForceList appForces
Definition: GlobalMaster.h:180

◆ calculate()

void GlobalMaster::calculate ( )
protectedvirtual

Reimplemented in colvarproxy_namd, GlobalMasterIMD, GlobalMasterTcl, and GlobalMasterTest.

Definition at line 81 of file GlobalMaster.C.

References NAMD_die().

Referenced by processData().

81  {
82  NAMD_die("Internal error: pure virtual function called");
83 }
void NAMD_die(const char *err_msg)
Definition: common.C:147

◆ changedAtoms()

bool GlobalMaster::changedAtoms ( )

Definition at line 108 of file GlobalMaster.C.

References reqAtomsChanged.

108  {
109  return reqAtomsChanged;
110 }
bool reqAtomsChanged
Definition: GlobalMaster.h:175

◆ changedForces()

bool GlobalMaster::changedForces ( )

Definition at line 112 of file GlobalMaster.C.

References appForcesChanged.

112  {
113  return appForcesChanged;
114 }
bool appForcesChanged
Definition: GlobalMaster.h:178

◆ changedGridObjs()

bool GlobalMaster::changedGridObjs ( )

Definition at line 120 of file GlobalMaster.C.

References reqGridObjsChanged.

120  {
121  return reqGridObjsChanged;
122 }
bool reqGridObjsChanged
Definition: GlobalMaster.h:186

◆ changedGroups()

bool GlobalMaster::changedGroups ( )

Definition at line 116 of file GlobalMaster.C.

References reqGroupsChanged.

116  {
117  return reqGroupsChanged;
118 }
bool reqGroupsChanged
Definition: GlobalMaster.h:182

◆ check()

void GlobalMaster::check ( ) const

Definition at line 64 of file GlobalMaster.C.

References appForces, fAtoms, gridobjForces, groupMassBegin, groupMassEnd, grpForces, NAMD_die(), reqGridObjs, and ResizeArray< Elem >::size().

Referenced by processData().

64  {
65  /* check to make sure the force arrays still match */
66  if(fAtoms.size() != appForces.size())
67  NAMD_die("# of atoms forced != # of forces given");
69  NAMD_die("# of groups forced != # of groups requested");
71  NAMD_die("# of grid objects forced != # of grid objects requested");
72 }
ForceList grpForces
Definition: GlobalMaster.h:184
int size(void) const
Definition: ResizeArray.h:131
ForceList appForces
Definition: GlobalMaster.h:180
BigRealList gridobjForces
Definition: GlobalMaster.h:188
BigRealList::iterator groupMassBegin
Definition: GlobalMaster.h:154
IntList reqGridObjs
Definition: GlobalMaster.h:187
void NAMD_die(const char *err_msg)
Definition: common.C:147
BigRealList::iterator groupMassEnd
Definition: GlobalMaster.h:155
AtomIDList fAtoms
Definition: GlobalMaster.h:179

◆ clearChanged()

void GlobalMaster::clearChanged ( )

Definition at line 74 of file GlobalMaster.C.

References appForcesChanged, reqAtomsChanged, reqGridObjsChanged, and reqGroupsChanged.

Referenced by GlobalMaster().

74  {
75  reqAtomsChanged = false;
76  appForcesChanged = false;
77  reqGroupsChanged = false;
78  reqGridObjsChanged = false;
79 }
bool reqGroupsChanged
Definition: GlobalMaster.h:182
bool reqGridObjsChanged
Definition: GlobalMaster.h:186
bool reqAtomsChanged
Definition: GlobalMaster.h:175
bool appForcesChanged
Definition: GlobalMaster.h:178

◆ forcedAtoms()

const AtomIDList & GlobalMaster::forcedAtoms ( )

Definition at line 134 of file GlobalMaster.C.

References fAtoms.

134  {
135  return fAtoms;
136 }
AtomIDList fAtoms
Definition: GlobalMaster.h:179

◆ getAtomIdBegin()

AtomIDList::const_iterator GlobalMaster::getAtomIdBegin ( )
protected

Definition at line 191 of file GlobalMaster.C.

References atomIdBegin.

Referenced by GlobalMasterTest::calculate(), colvarproxy_namd::calculate(), GlobalMasterEasy::getPosition(), and GlobalMasterFreeEnergy::getPosition().

191  {
192  return atomIdBegin;
193 }
AtomIDList::iterator atomIdBegin
Definition: GlobalMaster.h:149

◆ getAtomIdEnd()

AtomIDList::const_iterator GlobalMaster::getAtomIdEnd ( )
protected

Definition at line 195 of file GlobalMaster.C.

References atomIdEnd.

Referenced by GlobalMasterTest::calculate(), colvarproxy_namd::calculate(), GlobalMasterEasy::getPosition(), and GlobalMasterFreeEnergy::getPosition().

195  {
196  return atomIdEnd;
197 }
AtomIDList::iterator atomIdEnd
Definition: GlobalMaster.h:150

◆ getAtomPositionBegin()

PositionList::const_iterator GlobalMaster::getAtomPositionBegin ( )
protected

Definition at line 199 of file GlobalMaster.C.

References atomPositionBegin.

Referenced by GlobalMasterTest::calculate(), colvarproxy_namd::calculate(), GlobalMasterEasy::getPosition(), and GlobalMasterFreeEnergy::getPosition().

199  {
200  return atomPositionBegin;
201 }
PositionList::iterator atomPositionBegin
Definition: GlobalMaster.h:151

◆ getForceIdBegin()

AtomIDList::const_iterator GlobalMaster::getForceIdBegin ( )
protected

Definition at line 256 of file GlobalMaster.C.

References forceIdBegin.

Referenced by colvarproxy_namd::calculate().

257 {
258  return forceIdBegin;
259 }
AtomIDList::iterator forceIdBegin
Definition: GlobalMaster.h:169

◆ getForceIdEnd()

AtomIDList::const_iterator GlobalMaster::getForceIdEnd ( )
protected

Definition at line 261 of file GlobalMaster.C.

References forceIdEnd.

Referenced by colvarproxy_namd::calculate().

262 {
263  return forceIdEnd;
264 }
AtomIDList::iterator forceIdEnd
Definition: GlobalMaster.h:170

◆ getGridObjIndexBegin()

IntList::const_iterator GlobalMaster::getGridObjIndexBegin ( )
protected

Definition at line 219 of file GlobalMaster.C.

References gridObjIndexBegin.

Referenced by colvarproxy_namd::calculate().

219  {
220  return gridObjIndexBegin;
221 }
IntList::iterator gridObjIndexBegin
Definition: GlobalMaster.h:158

◆ getGridObjIndexEnd()

IntList::const_iterator GlobalMaster::getGridObjIndexEnd ( )
protected

Definition at line 223 of file GlobalMaster.C.

References gridObjIndexEnd.

Referenced by colvarproxy_namd::calculate().

223  {
224  return gridObjIndexEnd;
225 }
IntList::iterator gridObjIndexEnd
Definition: GlobalMaster.h:159

◆ getGridObjValueBegin()

BigRealList::const_iterator GlobalMaster::getGridObjValueBegin ( )
protected

Definition at line 227 of file GlobalMaster.C.

References gridObjValueBegin.

Referenced by colvarproxy_namd::calculate().

227  {
228  return gridObjValueBegin;
229 }
BigRealList::iterator gridObjValueBegin
Definition: GlobalMaster.h:160

◆ getGridObjValueEnd()

BigRealList::const_iterator GlobalMaster::getGridObjValueEnd ( )
protected

Definition at line 231 of file GlobalMaster.C.

References gridObjValueEnd.

Referenced by colvarproxy_namd::calculate().

231  {
232  return gridObjValueEnd;
233 }
BigRealList::iterator gridObjValueEnd
Definition: GlobalMaster.h:161

◆ getGroupMassBegin()

BigRealList::const_iterator GlobalMaster::getGroupMassBegin ( )
protected

Definition at line 235 of file GlobalMaster.C.

References groupMassBegin.

Referenced by GlobalMasterTcl::calculate().

236 {
237  return groupMassBegin;
238 }
BigRealList::iterator groupMassBegin
Definition: GlobalMaster.h:154

◆ getGroupMassEnd()

BigRealList::const_iterator GlobalMaster::getGroupMassEnd ( )
protected

Definition at line 240 of file GlobalMaster.C.

References groupMassEnd.

Referenced by GlobalMasterTcl::calculate().

240  {
241  return groupMassEnd;
242 }
BigRealList::iterator groupMassEnd
Definition: GlobalMaster.h:155

◆ getGroupPositionBegin()

PositionList::const_iterator GlobalMaster::getGroupPositionBegin ( )
protected

Definition at line 203 of file GlobalMaster.C.

References groupPositionBegin.

Referenced by colvarproxy_namd::calculate().

203  {
204  return groupPositionBegin;
205 }
PositionList::iterator groupPositionBegin
Definition: GlobalMaster.h:152

◆ getGroupPositionEnd()

PositionList::const_iterator GlobalMaster::getGroupPositionEnd ( )
protected

Definition at line 207 of file GlobalMaster.C.

References groupPositionEnd.

Referenced by colvarproxy_namd::calculate().

207  {
208  return groupPositionEnd;
209 }
PositionList::iterator groupPositionEnd
Definition: GlobalMaster.h:153

◆ getGroupTotalForceBegin()

ForceList::const_iterator GlobalMaster::getGroupTotalForceBegin ( )
protected

Definition at line 211 of file GlobalMaster.C.

References groupTotalForceBegin.

Referenced by colvarproxy_namd::calculate().

211  {
212  return groupTotalForceBegin;
213 }
ForceList::iterator groupTotalForceBegin
Definition: GlobalMaster.h:156

◆ getGroupTotalForceEnd()

ForceList::const_iterator GlobalMaster::getGroupTotalForceEnd ( )
protected

Definition at line 215 of file GlobalMaster.C.

References groupTotalForceEnd.

Referenced by colvarproxy_namd::calculate().

215  {
216  return groupTotalForceEnd;
217 }
ForceList::iterator groupTotalForceEnd
Definition: GlobalMaster.h:157

◆ getLastAtomsForcedBegin()

AtomIDList::const_iterator GlobalMaster::getLastAtomsForcedBegin ( )
protected

Definition at line 244 of file GlobalMaster.C.

References lastAtomsForcedBegin.

244  {
245  return lastAtomsForcedBegin;
246 }
AtomIDList::iterator lastAtomsForcedBegin
Definition: GlobalMaster.h:164

◆ getLastAtomsForcedEnd()

AtomIDList::const_iterator GlobalMaster::getLastAtomsForcedEnd ( )
protected

Definition at line 248 of file GlobalMaster.C.

References lastAtomsForcedEnd.

248  {
249  return lastAtomsForcedEnd;
250 }
AtomIDList::iterator lastAtomsForcedEnd
Definition: GlobalMaster.h:166

◆ getLastForcesBegin()

ForceList::const_iterator GlobalMaster::getLastForcesBegin ( )
protected

Definition at line 252 of file GlobalMaster.C.

References lastForcesBegin.

252  {
253  return lastForcesBegin;
254 }
ForceList::iterator lastForcesBegin
Definition: GlobalMaster.h:165

◆ getTotalForce()

ForceList::const_iterator GlobalMaster::getTotalForce ( )
protected

Definition at line 266 of file GlobalMaster.C.

References totalForceBegin.

Referenced by colvarproxy_namd::calculate().

267 {
268  return totalForceBegin;
269 }
ForceList::iterator totalForceBegin
Definition: GlobalMaster.h:171

◆ gridObjForces()

const BigRealList & GlobalMaster::gridObjForces ( )

Definition at line 146 of file GlobalMaster.C.

References gridobjForces.

146  {
147  return gridobjForces;
148 }
BigRealList gridobjForces
Definition: GlobalMaster.h:188

◆ groupForces()

const ForceList & GlobalMaster::groupForces ( )

Definition at line 142 of file GlobalMaster.C.

References grpForces.

142  {
143  return grpForces;
144 }
ForceList grpForces
Definition: GlobalMaster.h:184

◆ modifyAppliedForces()

ForceList & GlobalMaster::modifyAppliedForces ( )
protected

◆ modifyForcedAtoms()

AtomIDList & GlobalMaster::modifyForcedAtoms ( )
protected

◆ modifyGridObjForces()

BigRealList & GlobalMaster::modifyGridObjForces ( )
protected

Definition at line 180 of file GlobalMaster.C.

References appForcesChanged, and gridobjForces.

Referenced by colvarproxy_namd::calculate(), colvarproxy_namd::reset(), and colvarproxy_namd::setup().

180  {
181  appForcesChanged = true;
182  return gridobjForces;
183 }
BigRealList gridobjForces
Definition: GlobalMaster.h:188
bool appForcesChanged
Definition: GlobalMaster.h:178

◆ modifyGroupForces()

ForceList & GlobalMaster::modifyGroupForces ( )
protected

Definition at line 168 of file GlobalMaster.C.

References appForcesChanged, and grpForces.

Referenced by GlobalMasterTcl::calculate(), GlobalMasterIMD::calculate(), colvarproxy_namd::calculate(), colvarproxy_namd::init_atom_group(), and colvarproxy_namd::reset().

168  {
169  // XXX should we mark something else here?
170  appForcesChanged = true;
171  return grpForces;
172 }
ForceList grpForces
Definition: GlobalMaster.h:184
bool appForcesChanged
Definition: GlobalMaster.h:178

◆ modifyRequestedAtoms()

AtomIDList & GlobalMaster::modifyRequestedAtoms ( )
protected

Definition at line 128 of file GlobalMaster.C.

References DebugM, endi(), reqAtoms, and reqAtomsChanged.

Referenced by GlobalMasterTest::calculate(), colvarproxy_namd::init_atom(), GlobalMasterEasy::requestAtom(), GlobalMasterFreeEnergy::requestAtom(), colvarproxy_namd::reset(), and colvarproxy_namd::update_atoms_map().

128  {
129  reqAtomsChanged = true;
130  DebugM(3,"modifyRequestedAtoms()\n" << endi);
131  return reqAtoms;
132 }
AtomIDList reqAtoms
Definition: GlobalMaster.h:176
#define DebugM(x, y)
Definition: Debug.h:75
std::ostream & endi(std::ostream &s)
Definition: InfoStream.C:54
bool reqAtomsChanged
Definition: GlobalMaster.h:175

◆ modifyRequestedGridObjects()

IntList & GlobalMaster::modifyRequestedGridObjects ( )
protected

Definition at line 174 of file GlobalMaster.C.

References DebugM, endi(), reqGridObjs, and reqGridObjsChanged.

Referenced by colvarproxy_namd::init_volmap_by_id(), colvarproxy_namd::init_volmap_by_name(), and colvarproxy_namd::reset().

174  {
175  reqGridObjsChanged = true;
176  DebugM(3,"modifyRequestedGridObjects()\n" << endi);
177  return reqGridObjs;
178 }
#define DebugM(x, y)
Definition: Debug.h:75
std::ostream & endi(std::ostream &s)
Definition: InfoStream.C:54
bool reqGridObjsChanged
Definition: GlobalMaster.h:186
IntList reqGridObjs
Definition: GlobalMaster.h:187

◆ modifyRequestedGroups()

ResizeArray< AtomIDList > & GlobalMaster::modifyRequestedGroups ( )
protected

Definition at line 185 of file GlobalMaster.C.

References DebugM, reqGroups, and reqGroupsChanged.

Referenced by colvarproxy_namd::init_atom_group(), colvarproxy_namd::reset(), colvarproxy_namd::setup(), and colvarproxy_namd::update_group_properties().

185  {
186  reqGroupsChanged = true;
187  DebugM(1,"Groups have changed.\n");
188  return reqGroups;
189 }
ResizeArray< AtomIDList > reqGroups
Definition: GlobalMaster.h:183
#define DebugM(x, y)
Definition: Debug.h:75
bool reqGroupsChanged
Definition: GlobalMaster.h:182

◆ processData()

void GlobalMaster::processData ( AtomIDList::iterator  a_i,
AtomIDList::iterator  a_e,
PositionList::iterator  p_i,
PositionList::iterator  g_i,
PositionList::iterator  g_e,
BigRealList::iterator  gm_i,
BigRealList::iterator  gm_e,
ForceList::iterator  gtf_i,
ForceList::iterator  gtf_e,
IntList::iterator  goi_i,
IntList::iterator  goi_e,
BigRealList::iterator  gov_i,
BigRealList::iterator  gov_e,
AtomIDList::iterator  last_atoms_forced_i,
AtomIDList::iterator  last_atoms_forced_e,
ForceList::iterator  last_forces_i,
AtomIDList::iterator  forceid_i,
AtomIDList::iterator  forceid_e,
ForceList::iterator  totalforce_i 
)

Definition at line 17 of file GlobalMaster.C.

References appForcesChanged, atomIdBegin, atomIdEnd, atomPositionBegin, calculate(), check(), forceIdBegin, forceIdEnd, gridObjIndexBegin, gridObjIndexEnd, gridObjValueBegin, gridObjValueEnd, groupMassBegin, groupMassEnd, groupPositionBegin, groupPositionEnd, groupTotalForceBegin, groupTotalForceEnd, lastAtomsForcedBegin, lastAtomsForcedEnd, lastForcesBegin, and totalForceBegin.

35  {
36  atomIdBegin = a_i;
37  atomIdEnd = a_e;
38  atomPositionBegin = p_i;
39  groupPositionBegin = g_i;
40  groupPositionEnd = g_e;
41  groupMassBegin = gm_i;
42  groupMassEnd = gm_e;
43  groupTotalForceBegin = gtf_i;
44  groupTotalForceEnd = gtf_e;
45  gridObjIndexBegin = goi_i;
46  gridObjIndexEnd = goi_e;
47  gridObjValueBegin = gov_i;
48  gridObjValueEnd = gov_e;
49  lastAtomsForcedBegin = last_atoms_forced_i;
50  lastAtomsForcedEnd = last_atoms_forced_e;
51  lastForcesBegin = last_forces_i;
52  forceIdBegin = forceid_i;
53  forceIdEnd = forceid_e;
54  totalForceBegin = totalforce_i;
55 
56  calculate();
57 
58  /* check to make sure the force arrays still match */
59  if(appForcesChanged) {
60  check();
61  }
62 }
BigRealList::iterator gridObjValueEnd
Definition: GlobalMaster.h:161
IntList::iterator gridObjIndexBegin
Definition: GlobalMaster.h:158
ForceList::iterator totalForceBegin
Definition: GlobalMaster.h:171
AtomIDList::iterator lastAtomsForcedEnd
Definition: GlobalMaster.h:166
ForceList::iterator lastForcesBegin
Definition: GlobalMaster.h:165
AtomIDList::iterator lastAtomsForcedBegin
Definition: GlobalMaster.h:164
virtual void calculate()
Definition: GlobalMaster.C:81
PositionList::iterator atomPositionBegin
Definition: GlobalMaster.h:151
ForceList::iterator groupTotalForceEnd
Definition: GlobalMaster.h:157
BigRealList::iterator gridObjValueBegin
Definition: GlobalMaster.h:160
AtomIDList::iterator atomIdEnd
Definition: GlobalMaster.h:150
BigRealList::iterator groupMassBegin
Definition: GlobalMaster.h:154
IntList::iterator gridObjIndexEnd
Definition: GlobalMaster.h:159
AtomIDList::iterator atomIdBegin
Definition: GlobalMaster.h:149
BigRealList::iterator groupMassEnd
Definition: GlobalMaster.h:155
PositionList::iterator groupPositionBegin
Definition: GlobalMaster.h:152
bool appForcesChanged
Definition: GlobalMaster.h:178
AtomIDList::iterator forceIdBegin
Definition: GlobalMaster.h:169
AtomIDList::iterator forceIdEnd
Definition: GlobalMaster.h:170
void check() const
Definition: GlobalMaster.C:64
ForceList::iterator groupTotalForceBegin
Definition: GlobalMaster.h:156
PositionList::iterator groupPositionEnd
Definition: GlobalMaster.h:153

◆ requestedAtoms()

const AtomIDList & GlobalMaster::requestedAtoms ( )

Definition at line 124 of file GlobalMaster.C.

References reqAtoms.

Referenced by GlobalMasterTest::calculate().

124  {
125  return reqAtoms;
126 }
AtomIDList reqAtoms
Definition: GlobalMaster.h:176

◆ requestedGridObjs()

const IntList & GlobalMaster::requestedGridObjs ( )

Definition at line 154 of file GlobalMaster.C.

References reqGridObjs.

Referenced by colvarproxy_namd::calculate().

154  {
155  return reqGridObjs;
156 }
IntList reqGridObjs
Definition: GlobalMaster.h:187

◆ requestedGroups()

const ResizeArray< AtomIDList > & GlobalMaster::requestedGroups ( )

Definition at line 150 of file GlobalMaster.C.

References reqGroups.

Referenced by colvarproxy_namd::calculate(), GlobalMasterIMD::GlobalMasterIMD(), GlobalMasterSMD::GlobalMasterSMD(), and GlobalMasterTcl::GlobalMasterTcl().

150  {
151  return reqGroups;
152 }
ResizeArray< AtomIDList > reqGroups
Definition: GlobalMaster.h:183

◆ requestedTotalForces()

bool GlobalMaster::requestedTotalForces ( )
inline

Definition at line 70 of file GlobalMaster.h.

References totalForceRequested.

70 { return totalForceRequested; }
bool totalForceRequested
Definition: GlobalMaster.h:133

◆ requestTotalForce()

void GlobalMaster::requestTotalForce ( bool  yesno = true)
inlineprotected

◆ setLattice()

void GlobalMaster::setLattice ( const Lattice lat)
inline

Definition at line 78 of file GlobalMaster.h.

References lattice.

Referenced by GlobalMasterServer::addClient().

78 { lattice = lat; }
const Lattice * lattice
Definition: GlobalMaster.h:142

Member Data Documentation

◆ appForces

ForceList GlobalMaster::appForces
protected

Definition at line 180 of file GlobalMaster.h.

Referenced by appliedForces(), check(), and modifyAppliedForces().

◆ appForcesChanged

bool GlobalMaster::appForcesChanged
protected

◆ atomIdBegin

AtomIDList::iterator GlobalMaster::atomIdBegin
protected

Definition at line 149 of file GlobalMaster.h.

Referenced by getAtomIdBegin(), GlobalMaster(), and processData().

◆ atomIdEnd

AtomIDList::iterator GlobalMaster::atomIdEnd
protected

Definition at line 150 of file GlobalMaster.h.

Referenced by getAtomIdEnd(), GlobalMaster(), and processData().

◆ atomPositionBegin

PositionList::iterator GlobalMaster::atomPositionBegin
protected

Definition at line 151 of file GlobalMaster.h.

Referenced by getAtomPositionBegin(), GlobalMaster(), and processData().

◆ fAtoms

AtomIDList GlobalMaster::fAtoms
protected

Definition at line 179 of file GlobalMaster.h.

Referenced by check(), forcedAtoms(), and modifyForcedAtoms().

◆ forceIdBegin

AtomIDList::iterator GlobalMaster::forceIdBegin
protected

Definition at line 169 of file GlobalMaster.h.

Referenced by getForceIdBegin(), GlobalMaster(), and processData().

◆ forceIdEnd

AtomIDList::iterator GlobalMaster::forceIdEnd
protected

Definition at line 170 of file GlobalMaster.h.

Referenced by getForceIdEnd(), GlobalMaster(), and processData().

◆ globalMasterStep

int GlobalMaster::globalMasterStep

Definition at line 56 of file GlobalMaster.h.

◆ gridobjForces

BigRealList GlobalMaster::gridobjForces
protected

Definition at line 188 of file GlobalMaster.h.

Referenced by check(), gridObjForces(), and modifyGridObjForces().

◆ gridObjIndexBegin

IntList::iterator GlobalMaster::gridObjIndexBegin
protected

Definition at line 158 of file GlobalMaster.h.

Referenced by getGridObjIndexBegin(), and processData().

◆ gridObjIndexEnd

IntList::iterator GlobalMaster::gridObjIndexEnd
protected

Definition at line 159 of file GlobalMaster.h.

Referenced by getGridObjIndexEnd(), and processData().

◆ gridObjValueBegin

BigRealList::iterator GlobalMaster::gridObjValueBegin
protected

Definition at line 160 of file GlobalMaster.h.

Referenced by getGridObjValueBegin(), GlobalMaster(), and processData().

◆ gridObjValueEnd

BigRealList::iterator GlobalMaster::gridObjValueEnd
protected

Definition at line 161 of file GlobalMaster.h.

Referenced by getGridObjValueEnd(), GlobalMaster(), and processData().

◆ groupMassBegin

BigRealList::iterator GlobalMaster::groupMassBegin
protected

Definition at line 154 of file GlobalMaster.h.

Referenced by check(), getGroupMassBegin(), GlobalMaster(), and processData().

◆ groupMassEnd

BigRealList::iterator GlobalMaster::groupMassEnd
protected

Definition at line 155 of file GlobalMaster.h.

Referenced by check(), getGroupMassEnd(), GlobalMaster(), and processData().

◆ groupPositionBegin

PositionList::iterator GlobalMaster::groupPositionBegin
protected

Definition at line 152 of file GlobalMaster.h.

Referenced by getGroupPositionBegin(), GlobalMaster(), and processData().

◆ groupPositionEnd

PositionList::iterator GlobalMaster::groupPositionEnd
protected

Definition at line 153 of file GlobalMaster.h.

Referenced by getGroupPositionEnd(), GlobalMaster(), and processData().

◆ groupTotalForceBegin

ForceList::iterator GlobalMaster::groupTotalForceBegin
protected

Definition at line 156 of file GlobalMaster.h.

Referenced by getGroupTotalForceBegin(), and processData().

◆ groupTotalForceEnd

ForceList::iterator GlobalMaster::groupTotalForceEnd
protected

Definition at line 157 of file GlobalMaster.h.

Referenced by getGroupTotalForceEnd(), and processData().

◆ grpForces

ForceList GlobalMaster::grpForces
protected

Definition at line 184 of file GlobalMaster.h.

Referenced by check(), groupForces(), and modifyGroupForces().

◆ lastAtomsForcedBegin

AtomIDList::iterator GlobalMaster::lastAtomsForcedBegin
protected

Definition at line 164 of file GlobalMaster.h.

Referenced by getLastAtomsForcedBegin(), GlobalMaster(), and processData().

◆ lastAtomsForcedEnd

AtomIDList::iterator GlobalMaster::lastAtomsForcedEnd
protected

Definition at line 166 of file GlobalMaster.h.

Referenced by getLastAtomsForcedEnd(), GlobalMaster(), and processData().

◆ lastForcesBegin

ForceList::iterator GlobalMaster::lastForcesBegin
protected

Definition at line 165 of file GlobalMaster.h.

Referenced by getLastForcesBegin(), GlobalMaster(), and processData().

◆ lattice

const Lattice* GlobalMaster::lattice
protected

◆ old_num_groups_requested

int GlobalMaster::old_num_groups_requested

Definition at line 57 of file GlobalMaster.h.

Referenced by GlobalMaster().

◆ reqAtoms

AtomIDList GlobalMaster::reqAtoms
protected

Definition at line 176 of file GlobalMaster.h.

Referenced by modifyRequestedAtoms(), and requestedAtoms().

◆ reqAtomsChanged

bool GlobalMaster::reqAtomsChanged
protected

Definition at line 175 of file GlobalMaster.h.

Referenced by changedAtoms(), clearChanged(), and modifyRequestedAtoms().

◆ reqGridObjs

IntList GlobalMaster::reqGridObjs
protected

Definition at line 187 of file GlobalMaster.h.

Referenced by check(), modifyRequestedGridObjects(), and requestedGridObjs().

◆ reqGridObjsChanged

bool GlobalMaster::reqGridObjsChanged
protected

Definition at line 186 of file GlobalMaster.h.

Referenced by changedGridObjs(), clearChanged(), and modifyRequestedGridObjects().

◆ reqGroups

ResizeArray<AtomIDList> GlobalMaster::reqGroups
protected

Definition at line 183 of file GlobalMaster.h.

Referenced by modifyRequestedGroups(), and requestedGroups().

◆ reqGroupsChanged

bool GlobalMaster::reqGroupsChanged
protected

Definition at line 182 of file GlobalMaster.h.

Referenced by changedGroups(), clearChanged(), and modifyRequestedGroups().

◆ step

int GlobalMaster::step

◆ totalForceBegin

ForceList::iterator GlobalMaster::totalForceBegin
protected

Definition at line 171 of file GlobalMaster.h.

Referenced by getTotalForce(), GlobalMaster(), and processData().

◆ totalForceRequested

bool GlobalMaster::totalForceRequested
protected

Definition at line 133 of file GlobalMaster.h.

Referenced by GlobalMaster(), requestedTotalForces(), and requestTotalForce().


The documentation for this class was generated from the following files: