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

Generated on Mon Nov 20 01:17:10 2017 for NAMD by  doxygen 1.4.7