ComputeAniso.h

Go to the documentation of this file.
00001 
00007 #ifndef COMPUTEANISO_H
00008 #define COMPUTEANISO_H
00009 
00010 #include "ComputeHomeTuples.h"
00011 #include "ComputeSelfTuples.h"
00012 #include "ReductionMgr.h"
00013 
00014 class Molecule;
00015 //class AnisoValue;
00016 typedef Aniso AnisoValue;
00017 
00018 class AnisoElem {
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(AnisoElem*, int, BigReal*, BigReal *);
00027 
00028     static void getMoleculePointers(Molecule*, int*, int32***, Aniso**);
00029     static void getParameterPointers(Parameters*, const AnisoValue**);
00030     static void getTupleInfo(AtomSignature* sig, int *count, TupleSignature** t) {
00031         NAMD_die("Can't use Aniso with memory optimized version of NAMD.");
00032         // *count = sig->ansioCnt;
00033         // *t = sig->anisoSigs;
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 AnisoValue *value;
00044 
00045   int hash() const { 
00046     return 0x7FFFFFFF &((atomID[0]<<24) + (atomID[1]<<16) + (atomID[2]<<8) + atomID[3]);
00047   }
00048 
00049   enum { anisoEnergyIndex, anisoEnergyIndex_f, anisoEnergyIndex_ti_1,
00050          anisoEnergyIndex_ti_2, TENSOR(virialIndex), reductionDataSize };
00051   enum { reductionChecksumLabel = REDUCTION_ANISO_CHECKSUM };
00052   static void submitReductionData(BigReal*,SubmitReduction*);
00053 
00054   inline AnisoElem();
00055   inline AnisoElem(AtomID atom0, const TupleSignature *sig, const AnisoValue *v);
00056   inline AnisoElem(const Aniso *a, const AnisoValue *v);
00057   inline AnisoElem(AtomID atom0, AtomID atom1, AtomID atom2, AtomID atom3);
00058   ~AnisoElem() {};
00059 
00060   inline int operator==(const AnisoElem &a) const;
00061   inline int operator<(const AnisoElem &a) const;
00062 };
00063 
00064 class ComputeAniso : public ComputeHomeTuples<AnisoElem,Aniso,AnisoValue>
00065 {
00066 public:
00067 
00068   ComputeAniso(ComputeID c, PatchIDList &p) : ComputeHomeTuples<AnisoElem,Aniso,AnisoValue>(c,p) { ; }
00069 
00070 };
00071 
00072 class ComputeSelfAniso : public ComputeSelfTuples<AnisoElem,Aniso,AnisoValue>
00073 {
00074 public:
00075 
00076   ComputeSelfAniso(ComputeID c, PatchID p) : ComputeSelfTuples<AnisoElem,Aniso,AnisoValue>(c,p) { ; }
00077 
00078 };
00079 
00080 #include "ComputeAniso.inl"
00081 
00082 #endif
00083 

Generated on Sat May 26 01:17:11 2018 for NAMD by  doxygen 1.4.7