NAMD
ComputeDihedrals.h
Go to the documentation of this file.
1 
7 #ifndef COMPUTEDIHEDRALS_H
8 #define COMPUTEDIHEDRALS_H
9 
10 #include "ComputeHomeTuples.h"
11 #include "ComputeSelfTuples.h"
12 #include "ReductionMgr.h"
13 
14 class Molecule;
15 class DihedralValue;
16 
17 class DihedralElem {
18 public:
19  // ComputeHomeTuples interface
20  enum { size = 4 };
25  static void computeForce(DihedralElem*, int, BigReal*, BigReal *);
26 
27  static void getMoleculePointers(Molecule*, int*, int32***, Dihedral**);
28  static void getParameterPointers(Parameters*, const DihedralValue**);
29  static void getTupleInfo(AtomSignature* sig, int *count, TupleSignature** t) {
30  *count = sig->dihedralCnt;
31  *t = sig->dihedralSigs;
32  }
33 
34  // pressure profile parameters
39 
40  // Internal data
42 
43  int hash() const {
44  return 0x7FFFFFFF &((atomID[0]<<24) + (atomID[1]<<16) + (atomID[2]<<8) + atomID[3]);
45  }
46 
51 
52  inline DihedralElem();
53  inline DihedralElem(AtomID atom0, const TupleSignature *sig, const DihedralValue *v);
54  inline DihedralElem(const Dihedral *a, const DihedralValue *v);
55  inline DihedralElem(AtomID atom0, AtomID atom1, AtomID atom2, AtomID atom3);
57 
58  inline int operator==(const DihedralElem &a) const;
59  inline int operator<(const DihedralElem &a) const;
60 };
61 
62 class ComputeDihedrals : public ComputeHomeTuples<DihedralElem,Dihedral,DihedralValue>
63 {
64 public:
65 
67 
68 };
69 
70 class ComputeSelfDihedrals : public ComputeSelfTuples<DihedralElem,Dihedral,DihedralValue>
71 {
72 public:
73 
75 
76 };
77 
78 #include "ComputeDihedrals.inl"
79 
80 #endif
81 
int hash() const
short int32
Definition: dumpdcd.c:24
int ComputeID
Definition: NamdTypes.h:183
int AtomID
Definition: NamdTypes.h:29
TupleSignature * dihedralSigs
Definition: structures.h:335
float Real
Definition: common.h:109
static void computeForce(DihedralElem *, int, BigReal *, BigReal *)
static BigReal pressureProfileMin
int localIndex[size]
static int pressureProfileAtomTypes
static BigReal pressureProfileThickness
const DihedralValue * value
int operator<(const DihedralElem &a) const
int operator==(const DihedralElem &a) const
AtomID atomID[size]
int PatchID
Definition: NamdTypes.h:182
static void submitReductionData(BigReal *, SubmitReduction *)
static void getTupleInfo(AtomSignature *sig, int *count, TupleSignature **t)
ComputeSelfDihedrals(ComputeID c, PatchID p)
static int pressureProfileSlabs
TuplePatchElem * p[size]
ComputeDihedrals(ComputeID c, PatchIDList &p)
static void getParameterPointers(Parameters *, const DihedralValue **)
static void getMoleculePointers(Molecule *, int *, int32 ***, Dihedral **)
double BigReal
Definition: common.h:114