00001
00002
00003 #ifndef SYM_LATSYM
00004 #define SYM_LATSYM
00005
00006 #include <cctbx/crystal/symmetry.h>
00007 #include <cctbx/sgtbx/lattice_symmetry.h>
00008
00009 namespace CCtbxSym
00010 {
00011
00012
00013
00014
00015
00016 std::string SpaceGroupName(const cctbx::sgtbx::space_group_type& SGtype,
00017 const char Rlattice = 'R', const bool& ReferenceSetting=true);
00018
00019
00020
00021 std::string SpaceGroupName(const cctbx::sgtbx::space_group& SG,
00022 const char Rlattice = 'R', const bool& ReferenceSetting=true);
00023
00024
00025
00026 std::string SpaceGroupName(const std::string& SGname,
00027 const char Rlattice = 'R', const bool& ReferenceSetting=true);
00028
00029 std::string SpaceGroupName(const int& SpGpNumber,
00030 const char Rlattice = 'R', const bool& ReferenceSetting=true);
00031
00032
00033
00034
00035 std::string SpaceGroup_xHM(const int& SpGpNumber,
00036 const char Rlattice = 'H');
00037
00038 bool RhombohedralAxes(const std::vector<double>& unit_cell_dimensions);
00039
00040 void
00041 show_space_group_type(cctbx::sgtbx::space_group_type const& space_group_type);
00042
00043 void
00044 show_unit_cell(cctbx::uctbx::unit_cell const& unit_cell);
00045
00046 cctbx::sgtbx::change_of_basis_op ReduceCell(const cctbx::uctbx::unit_cell& cell,
00047 const cctbx::sgtbx::change_of_basis_op RefOp = cctbx::sgtbx::change_of_basis_op());
00048
00049 class LatticeSymmetry{
00050 public:
00051
00052 LatticeSymmetry(const std::vector<double>& unit_cell_dimensions,
00053 const char lattice_type,
00054 const int& AllowI2,
00055 const double max_delta = 3.0);
00056 void print() const;
00057
00058
00059 std::string best_spacegroup_symbol() const;
00060
00061
00062
00063
00064 std::vector<double> best_sg_reindex_op() const;
00065
00066 std::vector<double> best_unit_cell() const;
00067
00068 std::vector<double> orig_unit_cell() const;
00069
00070 double Delta() const {return delta;}
00071
00072 private:
00073
00074 cctbx::crystal::symmetry input_symmetry_;
00075 cctbx::crystal::symmetry lattice_symmetry_;
00076 cctbx::crystal::symmetry best_symmetry_;
00077
00078 cctbx::sgtbx::change_of_basis_op cb_op_inp_best;
00079
00080 char lattice_type_;
00081 double max_delta_;
00082 double delta;
00083 };
00084
00085 }
00086
00087 #endif