NAMD
Protected Member Functions | List of all members
GlobalMasterTest Class Reference

#include <GlobalMasterTest.h>

Inheritance diagram for GlobalMasterTest:
GlobalMaster

Protected Member Functions

virtual void calculate ()
 
- Protected Member Functions inherited from GlobalMaster
 GlobalMaster ()
 
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 ()
 

Additional Inherited Members

- Public Member Functions inherited from GlobalMaster
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 inherited from GlobalMaster
int step
 
int old_num_groups_requested
 
- Protected Attributes inherited from GlobalMaster
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

Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by The Board of Trustees of the University of Illinois. All rights reserved.

Definition at line 13 of file GlobalMasterTest.h.

Member Function Documentation

void GlobalMasterTest::calculate ( )
protectedvirtual

Reimplemented from GlobalMaster.

Definition at line 15 of file GlobalMasterTest.C.

References ResizeArray< T >::add(), GlobalMaster::appliedForces(), DebugM, GlobalMaster::getAtomIdBegin(), GlobalMaster::getAtomIdEnd(), GlobalMaster::getAtomPositionBegin(), ResizeArray< T >::item(), GlobalMaster::modifyAppliedForces(), GlobalMaster::modifyForcedAtoms(), GlobalMaster::modifyRequestedAtoms(), NAMD_die(), GlobalMaster::requestedAtoms(), ResizeArray< T >::resize(), ResizeArray< T >::size(), Vector::x, Vector::y, and Vector::z.

15  {
16  DebugM(3,"Test calculate called\n");
17  if(requestedAtoms().size() != 2) {
18  DebugM(3,"putting two atoms into request list");
23 
24  int s = appliedForces().size();
26  modifyAppliedForces().item(s).x = 2;
27  modifyAppliedForces().item(s).y = 0;
28  modifyAppliedForces().item(s).z = 0;
29  return; // we can't expect to have the rights atoms yet, so go on
30  }
31 
32  const AtomID *atomID_ptr = getAtomIdBegin();
33  const AtomID *atomID_end = getAtomIdEnd();
34  const Position *position_ptr = getAtomPositionBegin();
35 
36  if(atomID_end - atomID_ptr != 2) {
37  DebugM(3,"found " << atomID_end - atomID_ptr << " atoms\n");
38  NAMD_die("Wrong number of atoms.");
39  }
40 
41  while(atomID_ptr != atomID_end) {
42  DebugM(2,"Atom " << *atomID_ptr << " is at "
43  << position_ptr->x << " " << position_ptr->y << " "
44  << position_ptr->z << "\n");
45  position_ptr ++;
46  atomID_ptr ++;
47  }
48 }
ForceList & modifyAppliedForces()
Definition: GlobalMaster.C:162
AtomIDList & modifyRequestedAtoms()
Definition: GlobalMaster.C:127
int AtomID
Definition: NamdTypes.h:29
AtomIDList::const_iterator getAtomIdBegin()
Definition: GlobalMaster.C:190
Definition: Vector.h:64
#define DebugM(x, y)
Definition: Debug.h:59
BigReal z
Definition: Vector.h:66
Elem & item(int i)
Definition: ResizeArray.h:115
PositionList::const_iterator getAtomPositionBegin()
Definition: GlobalMaster.C:198
const ForceList & appliedForces()
Definition: GlobalMaster.C:137
BigReal x
Definition: Vector.h:66
AtomIDList & modifyForcedAtoms()
Definition: GlobalMaster.C:157
void NAMD_die(const char *err_msg)
Definition: common.C:83
int add(const Elem &elem)
Definition: ResizeArray.h:97
void resize(int i)
Definition: ResizeArray.h:84
AtomIDList::const_iterator getAtomIdEnd()
Definition: GlobalMaster.C:194
BigReal y
Definition: Vector.h:66
int size(void) const
Definition: ResizeArray.h:127
const AtomIDList & requestedAtoms()
Definition: GlobalMaster.C:123

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