ComputeAniso.inl

Go to the documentation of this file.
00001 
00007 #ifndef COMPUTEANISO_INL
00008 #define COMPUTEANISO_INL
00009 
00010 #include "ComputeAniso.h"
00011 
00012 inline AnisoElem::AnisoElem() { ; }
00013 
00014 inline AnisoElem::AnisoElem(AtomID atom0, const TupleSignature *sig, const AnisoValue *v){
00015     NAMD_die("Can't use Aniso with memory optimized version of NAMD.");
00016     // atomID[0] = atom0;
00017     // atomID[1] = atom0 + sig->offset[0];
00018     // atomID[2] = atom0 + sig->offset[1];
00019     // atomID[3] = atom0 + sig->offset[2];
00020     // value = &v[sig->tupleParamType];
00021 }
00022 
00023 inline AnisoElem::AnisoElem(const Aniso *a, const AnisoValue *v)
00024   {
00025     atomID[0] = a->atom1;
00026     atomID[1] = a->atom2;
00027     atomID[2] = a->atom3;
00028     atomID[3] = a->atom4;
00029     value = a;  // expect v to be NULL
00030   }
00031 
00032 inline AnisoElem::AnisoElem(AtomID atom0, AtomID atom1,
00033                                   AtomID atom2, AtomID atom3)
00034   {
00035     // do not rearrange atom ordering of Aniso
00036     // the first atom is special
00037     atomID[0] = atom0;
00038     atomID[1] = atom1;
00039     atomID[2] = atom2;
00040     atomID[3] = atom3;
00041   }
00042 
00043 inline int AnisoElem::operator==(const AnisoElem &a) const
00044   {
00045     return (a.atomID[0] == atomID[0] && a.atomID[1] == atomID[1] &&
00046         a.atomID[2] == atomID[2] && a.atomID[3] == atomID[3]);
00047   }
00048 
00049 inline int AnisoElem::operator<(const AnisoElem &a) const
00050   {
00051     return  (atomID[0] < a.atomID[0] ||
00052             (atomID[0] == a.atomID[0] &&
00053             (atomID[1] < a.atomID[1] ||
00054             (atomID[1] == a.atomID[1] &&
00055             (atomID[2] < a.atomID[2] ||
00056             (atomID[2] == a.atomID[2] &&
00057              atomID[3] < a.atomID[3] 
00058              ))))));
00059   }
00060 
00061 #endif
00062 

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