NAMD
ComputeGridForce.h
Go to the documentation of this file.
1 
7 #ifndef COMPUTEGRIDFORCE_H
8 #define COMPUTEGRIDFORCE_H
9 
10 #include "ComputeHomePatch.h"
11 #include "ReductionMgr.h"
12 #include "GridForceGrid.h"
13 #include "SimParameters.h"
14 #include "HomePatch.h"
15 #include "Molecule.h"
16 
18 {
19 protected:
20  template <class T> void do_calc(T *grid, int gridnum, FullAtom *p, int numAtoms, Molecule *mol, Force *forces, BigReal &energy, Force &extForce, Tensor &extVirial);
21  // atoms that need gridforces applied
22  // i.e., mol->is_atom_gridforced(p[i].id, gridnum) == TRUE
24  std::vector< std::vector<int> > gridForcedAtomIdxList;
25  int checkGridForceRatio();
26  void createGridForcedIdxList(int numGridForcedAtoms);
27  bool idxChecked;
28 public:
29  ComputeGridForce(ComputeID c, PatchID pid); // Constructor
30  virtual ~ComputeGridForce(); // Destructor
31 
32  void doForce(FullAtom* p, Results* r);
33 
35 };
36 
37 #endif
int32 ComputeID
Definition: NamdTypes.h:278
Definition: Vector.h:72
ComputeGridForce(ComputeID c, PatchID pid)
void createGridForcedIdxList(int numGridForcedAtoms)
void doForce(FullAtom *p, Results *r)
Molecule stores the structural information for the system.
Definition: Molecule.h:175
virtual ~ComputeGridForce()
SubmitReduction * reduction
int checkGridForceRatio()
if fewer than half the atoms in the patch need grid forces, use a list
Definition: Tensor.h:15
void do_calc(T *grid, int gridnum, FullAtom *p, int numAtoms, Molecule *mol, Force *forces, BigReal &energy, Force &extForce, Tensor &extVirial)
int32 PatchID
Definition: NamdTypes.h:277
std::vector< std::vector< int > > gridForcedAtomIdxList
double BigReal
Definition: common.h:123