ComputeAngles.h

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

Generated on Thu Nov 23 01:17:10 2017 for NAMD by  doxygen 1.4.7