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

#include <GlobalMasterTcl.h>

Inheritance diagram for GlobalMasterTcl:
GlobalMaster

Public Member Functions

 GlobalMasterTcl ()
 
 ~GlobalMasterTcl ()
 
- 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)
 

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 ()
 
void addReductionEnergy (int reductionTag, BigReal energy)
 
SubmitReductiongetCurrentReduction ()
 
void submitReduction ()
 

Additional Inherited Members

- Public Attributes inherited from GlobalMaster
int step
 
int globalMasterStep
 
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 20 of file GlobalMasterTcl.h.

Constructor & Destructor Documentation

◆ GlobalMasterTcl()

GlobalMasterTcl::GlobalMasterTcl ( )

Definition at line 524 of file GlobalMasterTcl.C.

References DebugM, and GlobalMaster::requestedGroups().

524  {
525  DebugM(3,"Constructing GlobalMasterTcl\n");
526 #ifdef NAMD_TCL
527  interp = 0;
528 #endif
529  initialize();
530  DebugM(2,"Done constructing ("<<requestedGroups().size()<<" initial groups)\n");
531 }
#define DebugM(x, y)
Definition: Debug.h:75
const ResizeArray< AtomIDList > & requestedGroups()
Definition: GlobalMaster.C:189

◆ ~GlobalMasterTcl()

GlobalMasterTcl::~GlobalMasterTcl ( )

Definition at line 533 of file GlobalMasterTcl.C.

References DebugM.

533  {
534  DebugM(3,"Destructing GlobalMasterTcl\n");
535 #ifdef NAMD_TCL
536 /*
537  if ( interp ) Tcl_DeleteInterp(interp);
538 */
539 #endif
540 }
#define DebugM(x, y)
Definition: Debug.h:75

Member Function Documentation

◆ calculate()

void GlobalMasterTcl::calculate ( )
protectedvirtual

Reimplemented from GlobalMaster.

Definition at line 619 of file GlobalMasterTcl.C.

References DebugM, GlobalMaster::getGroupMassBegin(), GlobalMaster::getGroupMassEnd(), GlobalMaster::modifyAppliedForces(), GlobalMaster::modifyForcedAtoms(), GlobalMaster::modifyGroupForces(), NAMD_die(), ResizeArray< Elem >::resize(), and ResizeArray< Elem >::setall().

619  {
620  DebugM(4,"Calculating forces on master\n");
621 
622  /* clear out the requested forces first! */
626  modifyGroupForces().setall(Vector(0,0,0));
627 
628 #ifdef NAMD_TCL
629  // Call interpreter to calculate forces
630 
631  char cmd[129]; int code;
632  strcpy(cmd,"calcforces"); code = Tcl_Eval(interp,cmd);
633  const char *result = Tcl_GetStringResult(interp);
634  if (*result != 0) CkPrintf("TCL: %s\n",result);
635  if (code != TCL_OK) {
636  const char *errorInfo = Tcl_GetVar(interp,"errorInfo",0);
637  NAMD_die(errorInfo ? errorInfo : "Unknown Tcl error");
638  }
639 #endif
640 
641 }
ForceList & modifyAppliedForces()
Definition: GlobalMaster.C:202
Definition: Vector.h:72
#define DebugM(x, y)
Definition: Debug.h:75
BigRealList::const_iterator getGroupMassEnd()
Definition: GlobalMaster.C:279
void resize(int i)
Definition: ResizeArray.h:84
void setall(const Elem &elem)
Definition: ResizeArray.h:94
AtomIDList & modifyForcedAtoms()
Definition: GlobalMaster.C:197
void NAMD_die(const char *err_msg)
Definition: common.C:147
BigRealList::const_iterator getGroupMassBegin()
Definition: GlobalMaster.C:274
ForceList & modifyGroupForces()
Definition: GlobalMaster.C:207

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