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