NAMD
ComputePme.h
Go to the documentation of this file.
1 
7 #ifndef COMPUTEPME_H
8 #define COMPUTEPME_H
9 
10 #include "Compute.h"
11 #include "PmeBase.h"
12 #include "NamdTypes.h"
13 #include "PatchTypes.h"
14 #include "Box.h"
15 #include "OwnerBox.h"
16 
17 class PmeRealSpace;
18 class ComputeMgr;
19 class SubmitReduction;
20 class PmeGridMsg;
21 class ComputePmeMgr;
22 class Patch;
23 
25 
26 public:
27 
30  static void select(void);
31 
32  static int numGrids;
33  static Bool alchOn;
34  static Bool alchFepOn;
38  static Bool lesOn;
39  static int lesFactor;
40  static Bool pairOn; // alias for pairInteractionOn
41  static Bool selfOn; // alias for pairInteractionSelf
42 
43 };
44 
45 
46 class ComputePme : public Compute, public ComputePmeUtil {
47 public:
49  virtual ~ComputePme();
50  void initialize();
51  void atomUpdate();
52  int noWork();
53  void doWork();
54  void doQMWork() ;
55  void ungridForces();
56  void setMgr(ComputePmeMgr *mgr) { myMgr = mgr; }
57 
58  friend class ComputePmeMgr;
59  private:
60 #ifdef NAMD_CUDA
61  int cuda_atoms_offset;
62  float *f_data_host; // force buffers for CUDA
63  float *f_data_dev;
64 #endif
65 
66  PatchID patchID;
67  Patch *patch;
68  Box<Patch,CompAtom> *positionBox;
69  Box<Patch,CompAtom> *avgPositionBox;
70  Box<Patch,Results> *forceBox;
71 
72  PmeGrid myGrid;
73  int numGridsMax; // Only used for deallocating arrays
74  int offload;
75 
76  Bool qmForcesOn;
77 
78  PmeRealSpace *myRealSpace[PME_MAX_EVALS];
79  int numLocalAtoms;
80  PmeParticle *localData;
81  ResizeArray<PmeParticle> localData_alloc;
82  unsigned char *localPartition;
83  ResizeArray<unsigned char> localPartition_alloc;
84  ResizeArray<Vector> localResults_alloc;
85  int numGridAtoms[PME_MAX_EVALS];
86  PmeParticle *localGridData[PME_MAX_EVALS];
87  ComputePmeMgr *myMgr;
88 
89  int atomsChanged;
90 
91  // Local array constructed at each time step with QM charges for
92  Real *qmLocalCharges ;
93  // Local array with indices of QM atoms
94  int *qmLoclIndx ;
95  int numLocalQMAtoms;
96 
97 };
98 
100 
101 #endif
102 
void ungridForces()
Definition: ComputePme.C:4012
int ComputeID
Definition: NamdTypes.h:183
void doWork()
Definition: ComputePme.C:3091
void doQMWork()
Definition: ComputePme.C:3033
float Real
Definition: common.h:109
static int numGrids
Definition: ComputePme.h:32
static Bool alchOn
Definition: ComputePme.h:33
float * f_data_host
Definition: ComputePme.C:420
Definition: Patch.h:35
ResizeArray< ComputePme * > & getComputes(ComputePmeMgr *mgr)
Definition: ComputePme.C:587
float * f_data_dev
Definition: ComputePme.C:421
int Bool
Definition: common.h:133
static BigReal alchElecLambdaStart
Definition: ComputePme.h:37
ComputePme(ComputeID c, PatchID pid)
Definition: ComputePme.C:2667
int noWork()
Definition: ComputePme.C:2994
int PatchID
Definition: NamdTypes.h:182
void setMgr(ComputePmeMgr *mgr)
Definition: ComputePme.h:56
static Bool alchDecouple
Definition: ComputePme.h:36
static int lesFactor
Definition: ComputePme.h:39
void initialize()
Definition: ComputePme.C:2706
static Bool pairOn
Definition: ComputePme.h:40
static Bool lesOn
Definition: ComputePme.h:38
#define PME_MAX_EVALS
Definition: PmeBase.h:30
static void select(void)
Definition: ComputePme.C:6358
static Bool selfOn
Definition: ComputePme.h:41
virtual ~ComputePme()
Definition: ComputePme.C:2940
void atomUpdate()
Definition: ComputePme.C:2665
static Bool alchFepOn
Definition: ComputePme.h:34
double BigReal
Definition: common.h:114
static Bool alchThermIntOn
Definition: ComputePme.h:35