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, TENSOR(virialIndex), reductionDataSize };
00050   enum { reductionChecksumLabel = REDUCTION_THOLE_CHECKSUM };
00051   static void submitReductionData(BigReal*,SubmitReduction*);
00052 
00053   inline TholeElem();
00054   inline TholeElem(AtomID atom0, const TupleSignature *sig, const TholeValue *v);
00055   inline TholeElem(const Thole *a, const TholeValue *v);
00056   inline TholeElem(AtomID atom0, AtomID atom1, AtomID atom2, AtomID atom3);
00057   ~TholeElem() {};
00058 
00059   inline int operator==(const TholeElem &a) const;
00060   inline int operator<(const TholeElem &a) const;
00061 };
00062 
00063 class ComputeThole : public ComputeHomeTuples<TholeElem,Thole,TholeValue>
00064 {
00065 public:
00066 
00067   ComputeThole(ComputeID c, PatchIDList &p) : ComputeHomeTuples<TholeElem,Thole,TholeValue>(c,p) { ; }
00068 
00069 };
00070 
00071 class ComputeSelfThole : public ComputeSelfTuples<TholeElem,Thole,TholeValue>
00072 {
00073 public:
00074 
00075   ComputeSelfThole(ComputeID c, PatchID p) : ComputeSelfTuples<TholeElem,Thole,TholeValue>(c,p) { ; }
00076 
00077 };
00078 
00079 #include "ComputeThole.inl"
00080 
00081 #endif
00082 

Generated on Wed Nov 22 01:17:14 2017 for NAMD by  doxygen 1.4.7