00001
00002
00003 #ifndef LATTICE_HEADER
00004 #define LATTICE_HEADER
00005
00006 #include <string>
00007 #include <vector>
00008
00009 #include "hkl_datatypes.hh"
00010
00011 enum CrystalSystem {NOSYSTEM, TRICLINIC, MONOCLINIC, ORTHORHOMBIC, TETRAGONAL,
00012 TRIGONAL, HEXAGONAL, CUBIC};
00013
00014 namespace scala
00015 {
00016 class hkl_symmetry;
00017
00021 std::string CheckInputRhombohedralSGname(const std::string& tag,
00022 const std::string& sgname,
00023 std::string& outstring);
00024
00026 bool AllowedLatticeType(const char& LatType);
00027
00029 char RhombohedralLatType(const char& type, const char& RH);
00030
00032 bool RhombohedralAxes(const std::vector<double>& unit_cell_dimensions);
00033
00035 std::string SetRlatticetype(const std::string& name, const char& L);
00036
00037
00038 class CrystalType
00040 {
00041 public:
00042 CrystalType()
00043 : crystalsystem(NOSYSTEM), latticetype(' ') {}
00044
00045 CrystalType(const CrystalSystem& CrysSys, const char& LatType)
00046 : crystalsystem(CrysSys), latticetype(LatType) {}
00047
00048 CrystalType(const hkl_symmetry& Symmetry);
00049
00050 CrystalSystem crystalSystem() const {return crystalsystem;}
00051
00052 bool isSet() const {return crystalsystem != NOSYSTEM;}
00053
00054
00055
00056 std::string format(const bool shortform=true) const;
00057
00058 friend bool operator == (const CrystalType& a,const CrystalType& b);
00059 friend bool operator != (const CrystalType& a,const CrystalType& b);
00060 friend bool EquivalentCentredMonoclinic(CrystalType& a,const CrystalType& b);
00061 friend bool EquivalentRhombohedral(CrystalType& a,const CrystalType& b);
00062
00063 private:
00064 CrystalSystem crystalsystem;
00065 char latticetype;
00066 };
00067
00068 }
00069
00070
00071 #endif