ComputeThole.h

Go to the documentation of this file.
00001 
00007 #ifndef COMPUTETHOLE_H
00008 #define COMPUTETHOLE_H
00009 
00010 #include "ComputeHomeTuples.h"
00011 #include "ComputeSelfTuples.h"
00012 #include "ReductionMgr.h"
00013 
00014 class Molecule;
00015 //class TholeValue;
00016 typedef Thole TholeValue;
00017 
00018 class TholeElem {
00019 public:
00020     // ComputeHomeTuples interface
00021     enum { size = 4 };
00022     AtomID atomID[size];
00023     int    localIndex[size];
00024     TuplePatchElem *p[size];
00025     Real scale;
00026     static void computeForce(TholeElem*, int, BigReal*, BigReal *);
00027 
00028     static void getMoleculePointers(Molecule*, int*, int32***, Thole**);
00029     static void getParameterPointers(Parameters*, const TholeValue**);
00030     static void getTupleInfo(AtomSignature* sig, int *count, TupleSignature** t) {
00031         NAMD_die("Can't use Thole with memory optimized version of NAMD.");
00032         // *count = sig->tholeCnt;
00033         // *t = sig->tholeSigs;
00034     }
00035 
00036     // pressure profile parameters
00037     static int pressureProfileSlabs;
00038     static int pressureProfileAtomTypes;
00039     static BigReal pressureProfileThickness;
00040     static BigReal pressureProfileMin;
00041 
00042     // Internal data
00043     const TholeValue *value;
00044 
00045   int hash() const { 
00046     return 0x7FFFFFFF &((atomID[0]<<24) + (atomID[1]<<16) + (atomID[2]<<8) + atomID[3]);
00047   }
00048 
00049   enum { tholeEnergyIndex, tholeEnergyIndex_f, tholeEnergyIndex_ti_1,
00050          tholeEnergyIndex_ti_2, TENSOR(virialIndex), reductionDataSize };
00051   enum { reductionChecksumLabel = REDUCTION_THOLE_CHECKSUM };
00052   static void submitReductionData(BigReal*,SubmitReduction*);
00053 
00054   inline TholeElem();
00055   inline TholeElem(AtomID atom0, const TupleSignature *sig, const TholeValue *v);
00056   inline TholeElem(const Thole *a, const TholeValue *v);
00057   inline TholeElem(AtomID atom0, AtomID atom1, AtomID atom2, AtomID atom3);
00058   ~TholeElem() {};
00059 
00060   inline int operator==(const TholeElem &a) const;
00061   inline int operator<(const TholeElem &a) const;
00062 };
00063 
00064 class ComputeThole : public ComputeHomeTuples<TholeElem,Thole,TholeValue>
00065 {
00066 public:
00067 
00068   ComputeThole(ComputeID c, PatchIDList &p) : ComputeHomeTuples<TholeElem,Thole,TholeValue>(c,p) { ; }
00069 
00070 };
00071 
00072 class ComputeSelfThole : public ComputeSelfTuples<TholeElem,Thole,TholeValue>
00073 {
00074 public:
00075 
00076   ComputeSelfThole(ComputeID c, PatchID p) : ComputeSelfTuples<TholeElem,Thole,TholeValue>(c,p) { ; }
00077 
00078 };
00079 
00080 #include "ComputeThole.inl"
00081 
00082 #endif
00083 

Generated on Fri Jun 22 01:17:13 2018 for NAMD by  doxygen 1.4.7