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