SIRIUS 7.5.0
Electronic structure library and applications
Public Member Functions | Private Member Functions | Private Attributes | List of all members
sirius::Crystal_symmetry Class Reference

Representation of the crystal symmetry. More...

#include <crystal_symmetry.hpp>

Public Member Functions

 Crystal_symmetry (r3::matrix< double > const &lattice_vectors__, int num_atoms__, int num_atom_types__, std::vector< int > const &types__, sddk::mdarray< double, 2 > const &positions__, sddk::mdarray< double, 2 > const &spins__, bool spin_orbit__, double tolerance__, bool use_sym__)
 
int atom_symmetry_class (int ia__) const
 
int spacegroup_number () const
 
auto international_symbol () const
 
auto hall_symbol () const
 
auto transformation_matrix () const
 
auto origin_shift () const
 
int size () const
 Number of symmetries including the magnetic configuration. More...
 
auto const & operator[] (int isym__) const
 
auto const & lattice_vectors () const
 
auto const & inverse_lattice_vectors () const
 
auto num_atoms () const
 
auto num_atom_types () const
 
auto atom_type (int ia__) const
 
double metric_tensor_error () const
 Get an error in metric tensor. More...
 
double sym_op_R_error () const
 Get error in rotation matrix of the symmetry operation. More...
 
void print_info (std::ostream &out__, int verbosity__) const
 Print information about the unit cell symmetry. More...
 

Private Member Functions

int num_spg_sym () const
 Number of crystal symmetries without magnetic configuration. More...
 
auto const & space_group_symmetry (int isym__) const
 

Private Attributes

r3::matrix< double > lattice_vectors_
 Matrix of lattice vectors. More...
 
r3::matrix< double > inverse_lattice_vectors_
 Inverse of the lattice vectors matrix. More...
 
int num_atoms_
 Number of atoms in the unit cell. More...
 
int num_atom_types_
 Number of atom types. More...
 
std::vector< int > types_
 Atom types. More...
 
sddk::mdarray< double, 2 > positions_
 Atomic positions. More...
 
sddk::mdarray< double, 2 > magnetization_
 Magnetic moments of atoms. More...
 
double tolerance_
 
SpglibDataset * spg_dataset_ {nullptr}
 Crystal structure descriptor returned by spglib. More...
 
std::vector< space_group_symmetry_descriptorspace_group_symmetry_
 List of all space group symmetry operations. More...
 
std::vector< magnetic_group_symmetry_descriptormagnetic_group_symmetry_
 List of all magnetic group symmetry operations. More...
 

Detailed Description

Representation of the crystal symmetry.

Definition at line 93 of file crystal_symmetry.hpp.

Constructor & Destructor Documentation

◆ Crystal_symmetry()

sirius::Crystal_symmetry::Crystal_symmetry ( r3::matrix< double > const &  lattice_vectors__,
int  num_atoms__,
int  num_atom_types__,
std::vector< int > const &  types__,
sddk::mdarray< double, 2 > const &  positions__,
sddk::mdarray< double, 2 > const &  spins__,
bool  spin_orbit__,
double  tolerance__,
bool  use_sym__ 
)

Definition at line 185 of file crystal_symmetry.cpp.

◆ ~Crystal_symmetry()

sirius::Crystal_symmetry::~Crystal_symmetry ( )
inline

Definition at line 148 of file crystal_symmetry.hpp.

Member Function Documentation

◆ num_spg_sym()

int sirius::Crystal_symmetry::num_spg_sym ( ) const
inlineprivate

Number of crystal symmetries without magnetic configuration.

Definition at line 131 of file crystal_symmetry.hpp.

◆ space_group_symmetry()

auto const & sirius::Crystal_symmetry::space_group_symmetry ( int  isym__) const
inlineprivate

Definition at line 136 of file crystal_symmetry.hpp.

◆ atom_symmetry_class()

int sirius::Crystal_symmetry::atom_symmetry_class ( int  ia__) const
inline

Definition at line 155 of file crystal_symmetry.hpp.

◆ spacegroup_number()

int sirius::Crystal_symmetry::spacegroup_number ( ) const
inline

Definition at line 164 of file crystal_symmetry.hpp.

◆ international_symbol()

auto sirius::Crystal_symmetry::international_symbol ( ) const
inline

Definition at line 173 of file crystal_symmetry.hpp.

◆ hall_symbol()

auto sirius::Crystal_symmetry::hall_symbol ( ) const
inline

Definition at line 182 of file crystal_symmetry.hpp.

◆ transformation_matrix()

auto sirius::Crystal_symmetry::transformation_matrix ( ) const
inline

Definition at line 191 of file crystal_symmetry.hpp.

◆ origin_shift()

auto sirius::Crystal_symmetry::origin_shift ( ) const
inline

Definition at line 200 of file crystal_symmetry.hpp.

◆ size()

int sirius::Crystal_symmetry::size ( ) const
inline

Number of symmetries including the magnetic configuration.

This is less or equal to the number of crystal symmetries.

Definition at line 213 of file crystal_symmetry.hpp.

◆ operator[]()

auto const & sirius::Crystal_symmetry::operator[] ( int  isym__) const
inline

Definition at line 218 of file crystal_symmetry.hpp.

◆ lattice_vectors()

auto const & sirius::Crystal_symmetry::lattice_vectors ( ) const
inline

Definition at line 224 of file crystal_symmetry.hpp.

◆ inverse_lattice_vectors()

auto const & sirius::Crystal_symmetry::inverse_lattice_vectors ( ) const
inline

Definition at line 229 of file crystal_symmetry.hpp.

◆ num_atoms()

auto sirius::Crystal_symmetry::num_atoms ( ) const
inline

Definition at line 234 of file crystal_symmetry.hpp.

◆ num_atom_types()

auto sirius::Crystal_symmetry::num_atom_types ( ) const
inline

Definition at line 239 of file crystal_symmetry.hpp.

◆ atom_type()

auto sirius::Crystal_symmetry::atom_type ( int  ia__) const
inline

Definition at line 244 of file crystal_symmetry.hpp.

◆ metric_tensor_error()

double sirius::Crystal_symmetry::metric_tensor_error ( ) const

Get an error in metric tensor.

Metric tensor in transformed under lattice symmetry operations and compareed with the initial value. It should stay invariant under transformation. This, however, is not always guaranteed numerically, especially when spglib uses large tolerance and find more symmeetry operations.

The error is the maximum value of \( |M_{ij} - \tilde M_{ij}| \) where \( M_{ij} \) is the initial metric tensor and \( \tilde M_{ij} \) is the transformed tensor.

Definition at line 303 of file crystal_symmetry.cpp.

◆ sym_op_R_error()

double sirius::Crystal_symmetry::sym_op_R_error ( ) const

Get error in rotation matrix of the symmetry operation.

Comparte rotation matrix in Cartesian coordinates with its inverse transpose. They should match.

The error is the maximum value of \( |R_{ij} - R_{ij}^{-T}| \), where \( R_{ij} \) is the rotation matrix and \( R_{ij}^{-T} \) inverse transpose of the rotation matrix.

Definition at line 313 of file crystal_symmetry.cpp.

◆ print_info()

void sirius::Crystal_symmetry::print_info ( std::ostream &  out__,
int  verbosity__ 
) const

Print information about the unit cell symmetry.

Definition at line 329 of file crystal_symmetry.cpp.

Member Data Documentation

◆ lattice_vectors_

r3::matrix<double> sirius::Crystal_symmetry::lattice_vectors_
private

Matrix of lattice vectors.

Spglib requires this matrix to have a positively defined determinant.

Definition at line 99 of file crystal_symmetry.hpp.

◆ inverse_lattice_vectors_

r3::matrix<double> sirius::Crystal_symmetry::inverse_lattice_vectors_
private

Inverse of the lattice vectors matrix.

Definition at line 102 of file crystal_symmetry.hpp.

◆ num_atoms_

int sirius::Crystal_symmetry::num_atoms_
private

Number of atoms in the unit cell.

Definition at line 105 of file crystal_symmetry.hpp.

◆ num_atom_types_

int sirius::Crystal_symmetry::num_atom_types_
private

Number of atom types.

Definition at line 108 of file crystal_symmetry.hpp.

◆ types_

std::vector<int> sirius::Crystal_symmetry::types_
private

Atom types.

Definition at line 111 of file crystal_symmetry.hpp.

◆ positions_

sddk::mdarray<double, 2> sirius::Crystal_symmetry::positions_
private

Atomic positions.

Definition at line 114 of file crystal_symmetry.hpp.

◆ magnetization_

sddk::mdarray<double, 2> sirius::Crystal_symmetry::magnetization_
private

Magnetic moments of atoms.

Definition at line 117 of file crystal_symmetry.hpp.

◆ tolerance_

double sirius::Crystal_symmetry::tolerance_
private

Definition at line 119 of file crystal_symmetry.hpp.

◆ spg_dataset_

SpglibDataset* sirius::Crystal_symmetry::spg_dataset_ {nullptr}
private

Crystal structure descriptor returned by spglib.

Definition at line 122 of file crystal_symmetry.hpp.

◆ space_group_symmetry_

std::vector<space_group_symmetry_descriptor> sirius::Crystal_symmetry::space_group_symmetry_
private

List of all space group symmetry operations.

Definition at line 125 of file crystal_symmetry.hpp.

◆ magnetic_group_symmetry_

std::vector<magnetic_group_symmetry_descriptor> sirius::Crystal_symmetry::magnetic_group_symmetry_
private

List of all magnetic group symmetry operations.

Definition at line 128 of file crystal_symmetry.hpp.


The documentation for this class was generated from the following files: