NAMD
ComputeThole.h
Go to the documentation of this file.
1 
7 #ifndef COMPUTETHOLE_H
8 #define COMPUTETHOLE_H
9 
10 #include "ComputeHomeTuples.h"
11 #include "ComputeSelfTuples.h"
12 #include "ReductionMgr.h"
13 
14 class Molecule;
15 //class TholeValue;
16 typedef Thole TholeValue;
17 
18 class TholeElem {
19 public:
20  // ComputeHomeTuples interface
21  enum { size = 4 };
26  static void computeForce(TholeElem*, int, BigReal*, BigReal *);
27 
28  static void getMoleculePointers(Molecule*, int*, int32***, Thole**);
29  static void getParameterPointers(Parameters*, const TholeValue**);
30  static void getTupleInfo(AtomSignature* sig, int *count, TupleSignature** t) {
31  NAMD_die("Can't use Thole with memory optimized version of NAMD.");
32  // *count = sig->tholeCnt;
33  // *t = sig->tholeSigs;
34  }
35 
36  // pressure profile parameters
41 
42  // Internal data
43  const TholeValue *value;
44 
45  int hash() const {
46  return 0x7FFFFFFF &((atomID[0]<<24) + (atomID[1]<<16) + (atomID[2]<<8) + atomID[3]);
47  }
48 
53 
54  inline TholeElem();
55  inline TholeElem(AtomID atom0, const TupleSignature *sig, const TholeValue *v);
56  inline TholeElem(const Thole *a, const TholeValue *v);
57  inline TholeElem(AtomID atom0, AtomID atom1, AtomID atom2, AtomID atom3);
58  ~TholeElem() {};
59 
60  inline int operator==(const TholeElem &a) const;
61  inline int operator<(const TholeElem &a) const;
62 };
63 
64 class ComputeThole : public ComputeHomeTuples<TholeElem,Thole,TholeValue>
65 {
66 public:
67 
69 
70 };
71 
72 class ComputeSelfThole : public ComputeSelfTuples<TholeElem,Thole,TholeValue>
73 {
74 public:
75 
77 
78 };
79 
80 #include "ComputeThole.inl"
81 
82 #endif
83 
short int32
Definition: dumpdcd.c:24
int ComputeID
Definition: NamdTypes.h:183
int AtomID
Definition: NamdTypes.h:29
int hash() const
Definition: ComputeThole.h:45
int operator==(const TholeElem &a) const
float Real
Definition: common.h:109
static int pressureProfileSlabs
Definition: ComputeThole.h:37
static void getMoleculePointers(Molecule *, int *, int32 ***, Thole **)
Definition: ComputeThole.C:26
static void computeForce(TholeElem *, int, BigReal *, BigReal *)
Definition: ComputeThole.C:41
static void getParameterPointers(Parameters *, const TholeValue **)
Definition: ComputeThole.C:37
static void submitReductionData(BigReal *, SubmitReduction *)
Definition: ComputeThole.C:239
static void getTupleInfo(AtomSignature *sig, int *count, TupleSignature **t)
Definition: ComputeThole.h:30
int PatchID
Definition: NamdTypes.h:182
static BigReal pressureProfileMin
Definition: ComputeThole.h:40
void NAMD_die(const char *err_msg)
Definition: common.C:83
ComputeThole(ComputeID c, PatchIDList &p)
Definition: ComputeThole.h:68
const TholeValue * value
Definition: ComputeThole.h:43
Real scale
Definition: ComputeThole.h:25
static int pressureProfileAtomTypes
Definition: ComputeThole.h:38
Thole TholeValue
Definition: ComputeThole.h:14
int localIndex[size]
Definition: ComputeThole.h:23
TuplePatchElem * p[size]
Definition: ComputeThole.h:24
static BigReal pressureProfileThickness
Definition: ComputeThole.h:39
ComputeSelfThole(ComputeID c, PatchID p)
Definition: ComputeThole.h:76
int operator<(const TholeElem &a) const
AtomID atomID[size]
Definition: ComputeThole.h:22
double BigReal
Definition: common.h:114