00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef _OBJCRYST_SPACEGROUP_H_
00013 #define _OBJCRYST_SPACEGROUP_H_
00014
00015 #include "CrystVector/CrystVector.h"
00016
00017 #include "ObjCryst/General.h"
00018 #include "RefinableObj/RefinableObj.h"
00019
00020
00021 namespace ObjCryst
00022 {
00023
00024
00025
00026 extern "C"
00027 {
00028 #include "sglite/sglite.h"
00029 }
00030
00031
00045
00046
00047 class AsymmetricUnit
00048 {
00049 public:
00051 AsymmetricUnit();
00053 AsymmetricUnit(const SpaceGroup &spg);
00054 ~AsymmetricUnit();
00056 void SetSpaceGroup(const SpaceGroup &spg);
00058 bool IsInAsymmetricUnit(const double x, const double y, const double z)const;
00059 double Xmin() const;
00060 double Xmax() const;
00061 double Ymin() const;
00062 double Ymax() const;
00063 double Zmin() const;
00064 double Zmax() const;
00065 protected:
00066 private:
00067 double mXmin,mXmax,mYmin,mYmax,mZmin,mZmax;
00068 };
00069
00070
00071
00094
00095
00096
00097 class SpaceGroup
00098 {
00099 public:
00103 SpaceGroup();
00109 SpaceGroup(const string &spgId);
00111 ~SpaceGroup();
00113 void ChangeSpaceGroup(const string &spgId);
00116 const string& GetName()const;
00118 bool IsInAsymmetricUnit(const double x, const double y, const double z) const;
00122 void ChangeToAsymmetricUnit(double x, double y, double z) const;
00124
00125
00127 int GetSpaceGroupNumber()const;
00128
00130 bool IsCentrosymmetric()const;
00131
00136 int GetNbTranslationVectors()const;
00137
00153 CrystMatrix_double GetTranslationVectors()const;
00154
00176 CrystMatrix_double GetAllSymmetrics(const double x, const double y, const double z,
00177 const bool noCenter=false,const bool noTransl=false,
00178 const bool noIdentical=false) const;
00179
00186 int GetNbSymmetrics(const bool noCenter=false,const bool noTransl=false)const;
00187
00191 void Print()const;
00193 bool HasInversionCenter()const;
00195 bool IsInversionCenterAtOrigin()const;
00197 const T_SgOps& GetSgOps()const;
00200 const RefinableObjClock& GetClockSpaceGroup() const;
00202 const T_HM_as_Hall& GetHM_as_Hall()const;
00204 unsigned int GetUniqueAxis()const;
00205 protected:
00206 private:
00213 void InitSpaceGroup(const string &spgId);
00214
00218 string mId;
00219
00226 T_SgOps mSgOps;
00227
00231 bool mHasInversionCenter;
00235 bool mIsInversionCenterAtOrigin;
00236
00243 T_HM_as_Hall mHM_as_Hall;
00244
00245
00247 AsymmetricUnit mAsymmetricUnit;
00248
00260 const static bool mUseGeomStructFactor=false;
00261
00263 RefinableObjClock mClock;
00265 unsigned int mUniqueAxisId;
00266 };
00267
00268 }
00269 #endif //_OBJCRYST_SPACEGROUP_H_