ComputeGromacsPair.h

Go to the documentation of this file.
00001 
00008 #ifndef COMPUTEGROMACSPAIR_H
00009 #define COMPUTEGROMACSPAIR_H
00010 
00011 #include "common.h"
00012 #include "NamdTypes.h"
00013 #include "Molecule.h"
00014 #include "ReductionMgr.h"
00015 #include "ComputeHomeTuples.h"
00016 #include "ComputeSelfTuples.h"
00017 
00018 class TuplePatchElem;
00019 
00020 //class Molecule;
00021 //class GromacsPairValue;
00022 
00023 class GromacsPairElem { 
00024 public:
00025     // ComputeHomeTuples interface
00026     enum { size = 2 };
00027     AtomID atomID[size];
00028     int    localIndex[size];
00029     TuplePatchElem *p[size];
00030     Real scale;
00031     static void computeForce(GromacsPairElem*, int, BigReal*, BigReal *);
00032     //void doWork();
00033 
00034     static void getMoleculePointers(Molecule*, int*, int32***, GromacsPair**);
00035     //static void getParameterPointers(Parameters*, const GromacsPairValue**);
00036     static void getParameterPointers(Parameters*, const GromacsPairValue**);
00037     static void getTupleInfo(AtomSignature* sig, int *count, TupleSignature** t) {
00038         *count = sig->gromacsPairCnt;
00039         *t = sig->gromacsPairSigs;
00040     }
00041 
00042     // pressure profile parameters
00043     static int pressureProfileSlabs;
00044     static int pressureProfileAtomTypes;
00045     static BigReal pressureProfileThickness;
00046     static BigReal pressureProfileMin;
00047 
00048     int hash() const { return 0x7FFFFFFF & ( (atomID[0]<<16) + (atomID[1])); }
00049 
00050     // Internal data
00051     const GromacsPairValue *value;
00052 
00053   enum { gromacsPairEnergyIndex, TENSOR(virialIndex), reductionDataSize };
00054 
00055   enum { reductionChecksumLabel = REDUCTION_GRO_LJ_CHECKSUM };
00056   static void submitReductionData(BigReal*,SubmitReduction*);
00057   inline GromacsPairElem();
00058   inline GromacsPairElem(AtomID atom0, const TupleSignature *sig, const GromacsPairValue *v);
00059   inline GromacsPairElem(const GromacsPair *a, const GromacsPairValue *v);
00060   inline GromacsPairElem(AtomID atom0, AtomID atom1);
00061   ~GromacsPairElem() {};
00062 
00063   inline int operator==(const GromacsPairElem &a) const;
00064   inline int operator<(const GromacsPairElem &a) const;
00065 };
00066 
00067 class ComputeGromacsPair : public ComputeHomeTuples<GromacsPairElem,GromacsPair,GromacsPairValue>
00068 {
00069 public:
00070 
00071   ComputeGromacsPair(ComputeID c, PatchIDList &p) : ComputeHomeTuples<GromacsPairElem,GromacsPair,GromacsPairValue>(c,p) { ; }
00072 
00073 };
00074 
00075 class ComputeSelfGromacsPair : public ComputeSelfTuples<GromacsPairElem,GromacsPair,GromacsPairValue>
00076 {
00077 public:
00078 
00079   ComputeSelfGromacsPair(ComputeID c, PatchID p) : ComputeSelfTuples<GromacsPairElem,GromacsPair,GromacsPairValue>(c,p) { ; }
00080 
00081 };
00082 
00083 #include "ComputeGromacsPair.inl"
00084 
00085 #endif

Generated on Sat Nov 18 01:17:12 2017 for NAMD by  doxygen 1.4.7