NAMD
Public Member Functions | List of all members
GlobalMasterFreeEnergy Class Reference

#include <GlobalMasterFreeEnergy.h>

Inheritance diagram for GlobalMasterFreeEnergy:
GlobalMaster

Public Member Functions

 GlobalMasterFreeEnergy ()
 
 ~GlobalMasterFreeEnergy ()
 
int getAtomID (const char *segid, int resid, const char *aname)
 
int getNumAtoms (const char *segid, int resid)
 
int getAtomID (const char *segid, int resid, int index)
 
double getMass (int atomid)
 
int requestAtom (int atomid)
 
int getPosition (int atomid, Position &position)
 
int addForce (int atomid, Force force)
 
- 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)
 

Additional Inherited Members

- Public Attributes inherited from GlobalMaster
int step
 
int old_num_groups_requested
 
- 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 ()
 
- 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

Definition at line 17 of file GlobalMasterFreeEnergy.h.

Constructor & Destructor Documentation

GlobalMasterFreeEnergy::GlobalMasterFreeEnergy ( )

Definition at line 188 of file GlobalMasterFreeEnergy.C.

References DebugM, Node::molecule, Node::Object(), and Node::simParameters.

189 : GlobalMaster() {
190  DebugM(3,"Constructing GlobalMasterFreeEnergy\n");
191  molecule = Node::Object()->molecule;
192  simParams = Node::Object()->simParameters;
193 
194  // now set up the free energy stuff
195  initialize();
196 }
static Node * Object()
Definition: Node.h:86
SimParameters * simParameters
Definition: Node.h:178
#define DebugM(x, y)
Definition: Debug.h:59
Molecule * molecule
Definition: Node.h:176
GlobalMasterFreeEnergy::~GlobalMasterFreeEnergy ( )

Definition at line 198 of file GlobalMasterFreeEnergy.C.

References DebugM.

198  {
199  DebugM(3,"Destructing GlobalMasterFreeEnergy\n");
200  delete config;
201 }
#define DebugM(x, y)
Definition: Debug.h:59

Member Function Documentation

int GlobalMasterFreeEnergy::addForce ( int  atomid,
Force  force 
)

Definition at line 178 of file GlobalMasterFreeEnergy.C.

References ResizeArray< T >::add(), DebugM, GlobalMaster::modifyAppliedForces(), GlobalMaster::modifyForcedAtoms(), and Molecule::numAtoms.

Referenced by ARestraint::DistributeForce().

179 {
180  DebugM(2,"Forcing "<<atomid<<" with "<<force<<"\n");
181  if ( atomid < 0 || atomid >= molecule->numAtoms ) return -1; // failure
182  modifyForcedAtoms().add(atomid);
183  modifyAppliedForces().add(force);
184  return 0; // success
185 }
ForceList & modifyAppliedForces()
Definition: GlobalMaster.C:162
#define DebugM(x, y)
Definition: Debug.h:59
AtomIDList & modifyForcedAtoms()
Definition: GlobalMaster.C:157
int numAtoms
Definition: Molecule.h:556
int add(const Elem &elem)
Definition: ResizeArray.h:97
int GlobalMasterFreeEnergy::getAtomID ( const char *  segid,
int  resid,
const char *  aname 
)

Definition at line 133 of file GlobalMasterFreeEnergy.C.

References Molecule::get_atom_from_name().

Referenced by AddAtom(), and AddResidues().

134 {
135  return molecule->get_atom_from_name(segid,resid,aname);
136 }
int get_atom_from_name(const char *segid, int resid, const char *aname) const
Definition: Molecule.C:121
int GlobalMasterFreeEnergy::getAtomID ( const char *  segid,
int  resid,
int  index 
)

Definition at line 145 of file GlobalMasterFreeEnergy.C.

References Molecule::get_atom_from_index_in_residue().

146 {
147  return molecule->get_atom_from_index_in_residue(segid,resid,index);
148 }
int get_atom_from_index_in_residue(const char *segid, int resid, int index) const
Definition: Molecule.C:158
double GlobalMasterFreeEnergy::getMass ( int  atomid)

Definition at line 150 of file GlobalMasterFreeEnergy.C.

References Molecule::atommass(), and Molecule::numAtoms.

Referenced by ARestraint::DistributeForce(), and ARestraint::UpdateCOMs().

151 {
152  if ( atomid < 0 || atomid >= molecule->numAtoms ) return -1.; // failure
153  return molecule->atommass(atomid);
154 }
int numAtoms
Definition: Molecule.h:556
Real atommass(int anum) const
Definition: Molecule.h:1038
int GlobalMasterFreeEnergy::getNumAtoms ( const char *  segid,
int  resid 
)

Definition at line 139 of file GlobalMasterFreeEnergy.C.

References Molecule::get_residue_size().

Referenced by AddResidues().

140 {
141  return molecule->get_residue_size(segid,resid);
142 }
int get_residue_size(const char *segid, int resid) const
Definition: Molecule.C:144
int GlobalMasterFreeEnergy::getPosition ( int  atomid,
Position position 
)

Definition at line 164 of file GlobalMasterFreeEnergy.C.

References GlobalMaster::getAtomIdBegin(), GlobalMaster::getAtomIdEnd(), and GlobalMaster::getAtomPositionBegin().

Referenced by ARestraint::UpdateCOMs().

165 {
169  for ( ; a_i != a_e; ++a_i, ++p_i ) {
170  if ( *a_i == atomid ) {
171  position = *p_i;
172  return 0; // success
173  }
174  }
175  return -1; // failure
176 }
const Elem * const_iterator
Definition: ResizeArray.h:38
AtomIDList::const_iterator getAtomIdBegin()
Definition: GlobalMaster.C:190
PositionList::const_iterator getAtomPositionBegin()
Definition: GlobalMaster.C:198
AtomIDList::const_iterator getAtomIdEnd()
Definition: GlobalMaster.C:194
int GlobalMasterFreeEnergy::requestAtom ( int  atomid)

Definition at line 157 of file GlobalMasterFreeEnergy.C.

References ResizeArray< T >::add(), GlobalMaster::modifyRequestedAtoms(), and Molecule::numAtoms.

Referenced by AddAtom(), and AddResidues().

158 {
159  if ( atomid < 0 || atomid >= molecule->numAtoms ) return -1; // failure
160  modifyRequestedAtoms().add(atomid);
161  return 0; // success
162 }
AtomIDList & modifyRequestedAtoms()
Definition: GlobalMaster.C:127
int numAtoms
Definition: Molecule.h:556
int add(const Elem &elem)
Definition: ResizeArray.h:97

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