25#ifndef __CRYSTAL_SYMMETRY_HPP__
26#define __CRYSTAL_SYMMETRY_HPP__
136 inline auto const& space_group_symmetry(
int isym__)
const
144 Crystal_symmetry(r3::matrix<double>
const& lattice_vectors__,
int num_atoms__,
int num_atom_types__,
145 std::vector<int>
const& types__, sddk::mdarray<double, 2>
const& positions__,
146 sddk::mdarray<double, 2>
const& spins__,
bool spin_orbit__,
double tolerance__,
bool use_sym__);
155 inline int atom_symmetry_class(
int ia__)
const
164 inline int spacegroup_number()
const
173 inline auto international_symbol()
const
178 return std::string(
"n/a");
182 inline auto hall_symbol()
const
187 return std::string(
"n/a");
191 inline auto transformation_matrix()
const
194 return r3::matrix<double>(
spg_dataset_->transformation_matrix);
196 return r3::matrix<double>({{1.0, 0, 0}, {0, 1.0, 0}, {0, 0, 1.0}});
200 inline auto origin_shift()
const
203 return r3::vector<double>(
spg_dataset_->origin_shift[0],
207 return r3::vector<double>(0, 0, 0);
218 inline auto const& operator[](
int isym__)
const
220 assert(isym__ >= 0 && isym__ < this->
size());
224 auto const& lattice_vectors()
const
229 auto const& inverse_lattice_vectors()
const
234 inline auto num_atoms()
const
239 inline auto num_atom_types()
const
244 inline auto atom_type(
int ia__)
const
267 void print_info(std::ostream& out__,
int verbosity__)
const;
Representation of the crystal symmetry.
int num_atom_types_
Number of atom types.
void print_info(std::ostream &out__, int verbosity__) const
Print information about the unit cell symmetry.
std::vector< space_group_symmetry_descriptor > space_group_symmetry_
List of all space group symmetry operations.
r3::matrix< double > inverse_lattice_vectors_
Inverse of the lattice vectors matrix.
int num_atoms_
Number of atoms in the unit cell.
double metric_tensor_error() const
Get an error in metric tensor.
std::vector< int > types_
Atom types.
sddk::mdarray< double, 2 > positions_
Atomic positions.
int num_spg_sym() const
Number of crystal symmetries without magnetic configuration.
std::vector< magnetic_group_symmetry_descriptor > magnetic_group_symmetry_
List of all magnetic group symmetry operations.
int size() const
Number of symmetries including the magnetic configuration.
sddk::mdarray< double, 2 > magnetization_
Magnetic moments of atoms.
double sym_op_R_error() const
Get error in rotation matrix of the symmetry operation.
r3::matrix< double > lattice_vectors_
Matrix of lattice vectors.
SpglibDataset * spg_dataset_
Crystal structure descriptor returned by spglib.
Multidimensional array with the column-major (Fortran) order.
Memory management functions and classes.
Namespace of the SIRIUS library.
Simple classes and functions to work with vectors and matrices of the R^3 space.
Descriptor of the magnetic group symmetry operation.
space_group_symmetry_descriptor spg_op
Element of space group symmetry.
r3::matrix< double > spin_rotation_inv
Inverse of proper spin rotation matrix in Cartesian coordinates.
r3::matrix< double > spin_rotation
Proper rotation matrix in Cartesian coordinates.
Descriptor of the space group symmetry operation.
std::vector< int > sym_atom
Symmetry table.
r3::matrix< double > Rc
(Im)proper Rotation matrix in Cartesian coordinates.
r3::vector< double > t
Fractional translation.
std::vector< int > inv_sym_atom
Invere symmetry table.
int proper
Proper (+1) or improper (-1) rotation.
r3::matrix< int > invR
Inverse of R.
r3::matrix< int > R
Rotational part of symmetry operation (fractional coordinates).
r3::matrix< double > Rcp
Proper rotation matrix in Cartesian coordinates.
r3::vector< double > euler_angles
Three Euler angles that generate the proper rotation matrix.
std::vector< r3::vector< int > > inv_sym_atom_T
Translation vector that prings symmetry-transformed atom back to the unit cell.
r3::matrix< int > invRT
Inverse transposed of R.