.. _program_listing_file_include_dx2_crystal.hpp: Program Listing for File crystal.hpp ==================================== |exhale_lsh| :ref:`Return to documentation for file ` (``include/dx2/crystal.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #pragma once #include "dx2/utils.hpp" #include #include #include #include #include #include #include using json = nlohmann::json; using Eigen::Matrix3d; using Eigen::Vector3d; Matrix3d Matrix3d_from_gemmi_cb(gemmi::Op cb); class Crystal { public: Crystal() = default; Crystal(Vector3d a, Vector3d b, Vector3d c, gemmi::SpaceGroup space_group); Crystal(json crystal_data); Crystal(Matrix3d A, gemmi::SpaceGroup space_group); const gemmi::UnitCell &get_unit_cell() const; const gemmi::SpaceGroup &get_space_group() const; Matrix3d get_A_matrix() const; Matrix3d get_U_matrix() const; Matrix3d get_B_matrix() const; void niggli_reduce(); void set_A_matrix(Matrix3d A); json to_json() const; protected: void init_from_abc(Vector3d a, Vector3d b, Vector3d c); gemmi::SpaceGroup space_group_; gemmi::UnitCell unit_cell_; Matrix3d B_; Matrix3d A_; Matrix3d U_; };