Cartesius Library
symmetry_mod Module Reference

Collects procedures for handling symmetries. More...

Data Types

type  space_group
 

Functions/Subroutines

subroutine init_space_group_from_hall (sg, symb)
 
type(point) function parse_hall_rotation_symbol (symb, num, prev_rot, prev_axis, stat)
 Returns a space group generator based on the given Hall rotation symbol. More...
 
type(point) function parse_brace_symop (inbraces, stat)
 Returns a symmetry operation given by e.g. (x+1/2,x-y,z-1/2) More...
 
type(point) function parse_symop_trans_shorthand (inbraces, stat)
 Parses shorthand symmmetry operation given only by translation e.g. (1,4,5) More...
 
type(point_ptr) function, dimension(:), allocatable space_group_geners_from_hall (hall_symb, stat)
 Parses given space group Hall symbol and returns the generators of the group defined by it. More...
 
type(point_ptr) function, dimension(:), allocatable propagate_space_group_geners (geners, stat)
 Finds all space group elements from the given set of generators. More...
 
subroutine space_group_set_cayley_and_inversion_tables (sp_group)
 Sets the Cayley (multiplication) table and the inversion table for given space group. More...
 
type(point_ptr) function, dimension(size(indices)) space_group_elements_from_indices (sp_group, indices)
 Returns an array of pointers to elements of the given space group given the indices in its sym_ops array. More...
 
integer function, dimension(size(elems)) space_group_indices_from_elements (sp_group, elems)
 Returns an array of indices in the sym_ops array of the space group, corresponding to the given symmetry elements. The given elements must point to the same location in memory as the elements in the sym_ops array. More...
 
integer function, dimension(size(subgroup_inds), size(sp_group%sym_ops)/size(subgroup_inds)) space_group_left_cosets_indices (sp_group, subgroup_inds)
 Returns all left cosets for the given subgroup of the space group. First index enumarates the elements of a coset, second index corresponds to different cosets. More...
 
integer function, dimension(size(cosets_ind, 1) *size(cosets_ind, 2)) space_group_coset_reprarray (cosets_ind)
 
integer function, dimension(size(sp_group%sym_ops)/size(subgroup_inds)) space_group_left_coset_representatives_indices (sp_group, subgroup_inds)
 Given the indices of a subgroup of the given group, returns the set of (left) coset representatives for this subgroup. A coset representative is any element of the equivalence class corresponding to the coset. More...
 
integer function, dimension(:), allocatable space_group_atom_stabilizer_indices (sp_group, pAtom)
 Returns the subgroup (indices) of the given group which keeps the atomic position intact (up to translation). More...
 
type(point_ptr) function, dimension(:), allocatable space_group_atom_stabilizer (sp_group, pAtom)
 Returns the subgroup of the given group which keeps the atomic position intact (up to translation). More...
 
type(point_ptr) function, dimension(:), allocatable space_group_atom_orbit_representatives (sp_group, pAtom)
 Returns the subset of the given space group which is sufficient to decribe all symmetric positions of the atom in the unit cell. More...
 
integer function, dimension(:), allocatable space_group_elec_group_stabilizer_indices (sp_group, elec_group, atom_swaps)
 Finds the subgroup (indices) of the given space group which keeps the elec_group geometry intact (up to translation) More...
 
type(point_ptr) function, dimension(:), allocatable space_group_elec_group_stabilizer (sp_group, elec_group, atom_swaps)
 Finds the subgroup of the given space group which keeps the elec_group geometry intact (up to translation) More...
 
type(point_ptr) function, dimension(:), allocatable space_group_elec_group_orbit_representatives (sp_group, elec_group)
 Returns the subset of the given space group which is sufficient to decribe all symmetric positions of the electronic group in the unit cell. More...
 
subroutine deallocate_space_group_native (pspgroup)
 
subroutine deallocate_space_group (pspgroup)
 

Variables

real, dimension(3), parameter, private tr_0 = [0., 0., 0. ]
 
real, dimension(3), parameter, private tr_a = [0.5, 0., 0. ]
 
real, dimension(3), parameter, private tr_b = [0., 0.5, 0. ]
 
real, dimension(3), parameter, private tr_c = [0., 0., 0.5 ]
 
real, dimension(3), parameter, private tr_n = [0.5, 0.5, 0.5 ]
 
real, dimension(3), parameter, private tr_u = [0.25, 0., 0. ]
 
real, dimension(3), parameter, private tr_v = [0., 0.25, 0. ]
 
real, dimension(3), parameter, private tr_w = [0., 0., 0.25]
 
real, dimension(3), parameter, private tr_d = [0.25, 0.25, 0.25]
 
real, dimension(3, 3), parameter, private rot_1 = E3
 
real, dimension(3, 3), parameter, private rot_2x = transpose(reshape([ 1., 0., 0., 0., -1., 0., 0., 0., -1.], [3,3]))
 
real, dimension(3, 3), parameter, private rot_2y = transpose(reshape([-1., 0., 0., 0., 1., 0., 0., 0., -1.], [3,3]))
 
real, dimension(3, 3), parameter, private rot_2z = transpose(reshape([-1., 0., 0., 0., -1., 0., 0., 0., 1.], [3,3]))
 
real, dimension(3, 3), parameter, private rot_3x = transpose(reshape([ 1., 0., 0., 0., 0., -1., 0., 1., -1.], [3,3]))
 
real, dimension(3, 3), parameter, private rot_3y = transpose(reshape([-1., 0., 1., 0., 1., 0., -1., 0., 0.], [3,3]))
 
real, dimension(3, 3), parameter, private rot_3z = transpose(reshape([ 0., -1., 0., 1., -1., 0., 0., 0., 1.], [3,3]))
 
real, dimension(3, 3), parameter, private rot_4x = transpose(reshape([ 1., 0., 0., 0., 0., -1., 0., 1., 0.], [3,3]))
 
real, dimension(3, 3), parameter, private rot_4y = transpose(reshape([ 0., 0., 1., 0., 1., 0., -1., 0., 0.], [3,3]))
 
real, dimension(3, 3), parameter, private rot_4z = transpose(reshape([ 0., -1., 0., 1., 0., 0., 0., 0., 1.], [3,3]))
 
real, dimension(3, 3), parameter, private rot_6x = transpose(reshape([ 1., 0., 0., 0., 1., -1., 0., 1., 0.], [3,3]))
 
real, dimension(3, 3), parameter, private rot_6y = transpose(reshape([ 0., 0., 1., 0., 1., 0., -1., 0., 1.], [3,3]))
 
real, dimension(3, 3), parameter, private rot_6z = transpose(reshape([ 1., -1., 0., 1., 0., 0., 0., 0., 1.], [3,3]))
 
real, dimension(3, 3), parameter, private rot_2bmc = transpose(reshape([-1., 0., 0., 0., 0., -1., 0., -1., 0.], [3,3]))
 
real, dimension(3, 3), parameter, private rot_2bpc = transpose(reshape([-1., 0., 0., 0., 0., 1., 0., 1., 0.], [3,3]))
 
real, dimension(3, 3), parameter, private rot_2amc = transpose(reshape([ 0., 0., -1., 0., -1., 0., -1., 0., 0.], [3,3]))
 
real, dimension(3, 3), parameter, private rot_2apc = transpose(reshape([ 0., 0., 1., 0., -1., 0., 1., 0., 0.], [3,3]))
 
real, dimension(3, 3), parameter, private rot_2amb = transpose(reshape([ 0., -1., 0., -1., 0., 0., 0., 0., -1.], [3,3]))
 
real, dimension(3, 3), parameter, private rot_2apb = transpose(reshape([ 0., 1., 0., 1., 0., 0., 0., 0., -1.], [3,3]))
 
real, dimension(3, 3), parameter, private rot_3abc = transpose(reshape([ 0., 0., 1., 1., 0., 0., 0., 1., 0.], [3,3]))
 

Detailed Description

Collects procedures for handling symmetries.

Author
Dmitrii Raenko
Date
14.08.2023
Note
Methods and parameters for parsing Hall symbols taken from International Tables for Crystallography, Vol. B, pp. 112-113
Todo:

Add point group irreps

Add space group irreps

Add automatic detection of space group from crystal data

Function/Subroutine Documentation

◆ deallocate_space_group()

subroutine symmetry_mod::deallocate_space_group ( class(*), intent(inout), pointer  pspgroup)
Here is the call graph for this function:

◆ deallocate_space_group_native()

subroutine symmetry_mod::deallocate_space_group_native ( type(space_group), intent(inout)  pspgroup)

◆ init_space_group_from_hall()

subroutine symmetry_mod::init_space_group_from_hall ( class(space_group), intent(inout)  sg,
character(len = *), intent(in)  symb 
)
Todo:
Add hm_symbols and ITFC number in init
Here is the call graph for this function:

◆ parse_brace_symop()

type(point) function symmetry_mod::parse_brace_symop ( character(len=*), intent(in)  inbraces,
integer, intent(out), optional  stat 
)

Returns a symmetry operation given by e.g. (x+1/2,x-y,z-1/2)

Here is the call graph for this function:

◆ parse_hall_rotation_symbol()

type(point) function symmetry_mod::parse_hall_rotation_symbol ( character(len = *), intent(in)  symb,
integer, intent(in)  num,
integer, intent(inout)  prev_rot,
integer, dimension(3), intent(inout)  prev_axis,
integer, intent(out), optional  stat 
)

Returns a space group generator based on the given Hall rotation symbol.

Parameters
symb[in] Rotation symbol
num[in] Number of the roation symbol in the Hall space group symbol
prev_rot[inout] Order of the previous rotation operation. Overwritten by the given symbol's rotation order
prev_axis[inout] Orientation of the previous rotation axis. Overwritten by the given symbol's rotation axis
stat[out,optional] Status of the parseing operation
Here is the call graph for this function:

◆ parse_symop_trans_shorthand()

type(point) function symmetry_mod::parse_symop_trans_shorthand ( character(len=*), intent(in)  inbraces,
integer, intent(out), optional  stat 
)

Parses shorthand symmmetry operation given only by translation e.g. (1,4,5)

Here is the call graph for this function:

◆ propagate_space_group_geners()

type(point_ptr) function, dimension(:), allocatable symmetry_mod::propagate_space_group_geners ( type(point_ptr), dimension(:), intent(in), allocatable  geners,
integer, intent(inout)  stat 
)

Finds all space group elements from the given set of generators.

Here is the call graph for this function:

◆ space_group_atom_orbit_representatives()

type(point_ptr) function, dimension(:), allocatable symmetry_mod::space_group_atom_orbit_representatives ( class(space_group), intent(in)  sp_group,
type(particle), intent(inout), pointer  pAtom 
)

Returns the subset of the given space group which is sufficient to decribe all symmetric positions of the atom in the unit cell.

◆ space_group_atom_stabilizer()

type(point_ptr) function, dimension(:), allocatable symmetry_mod::space_group_atom_stabilizer ( class(space_group), intent(in)  sp_group,
type(particle), intent(inout), pointer  pAtom 
)

Returns the subgroup of the given group which keeps the atomic position intact (up to translation).

◆ space_group_atom_stabilizer_indices()

integer function, dimension(:), allocatable symmetry_mod::space_group_atom_stabilizer_indices ( class(space_group), intent(in)  sp_group,
type(particle), intent(inout), pointer  pAtom 
)

Returns the subgroup (indices) of the given group which keeps the atomic position intact (up to translation).

Here is the call graph for this function:

◆ space_group_coset_reprarray()

integer function, dimension(size(cosets_ind,1)*size(cosets_ind,2)) symmetry_mod::space_group_coset_reprarray ( integer, dimension(:,:), intent(in)  cosets_ind)

◆ space_group_elec_group_orbit_representatives()

type(point_ptr) function, dimension(:), allocatable symmetry_mod::space_group_elec_group_orbit_representatives ( class(space_group), intent(in)  sp_group,
type(electronic_group), intent(in)  elec_group 
)

Returns the subset of the given space group which is sufficient to decribe all symmetric positions of the electronic group in the unit cell.

◆ space_group_elec_group_stabilizer()

type(point_ptr) function, dimension(:), allocatable symmetry_mod::space_group_elec_group_stabilizer ( class(space_group), intent(in)  sp_group,
type(electronic_group), intent(in)  elec_group,
integer, dimension(:,:), intent(out), optional, allocatable  atom_swaps 
)

Finds the subgroup of the given space group which keeps the elec_group geometry intact (up to translation)

Parameters
[out,optional]atom_swaps Gives the indices of atoms which transform into each other. atom_swaps(iat, isym) gives the atomsArray index of iat-th atom after transformation under isym-th group_symmetries transformation

◆ space_group_elec_group_stabilizer_indices()

integer function, dimension(:), allocatable symmetry_mod::space_group_elec_group_stabilizer_indices ( class(space_group), intent(in)  sp_group,
type(electronic_group), intent(in)  elec_group,
integer, dimension(:,:), intent(out), optional, allocatable  atom_swaps 
)

Finds the subgroup (indices) of the given space group which keeps the elec_group geometry intact (up to translation)

Parameters
[out,optional]atom_swaps Gives the indices of atoms which transform into each other. atom_swaps(iat, isym) gives the atomsArray index of iat-th atom after transformation under isym-th group_symmetries transformation
Here is the call graph for this function:

◆ space_group_elements_from_indices()

type(point_ptr) function, dimension(size(indices)) symmetry_mod::space_group_elements_from_indices ( class(space_group), intent(in)  sp_group,
integer, dimension(:), intent(in)  indices 
)

Returns an array of pointers to elements of the given space group given the indices in its sym_ops array.

◆ space_group_geners_from_hall()

type(point_ptr) function, dimension(:), allocatable symmetry_mod::space_group_geners_from_hall ( character(len=*), intent(in)  hall_symb,
integer, intent(out), optional  stat 
)

Parses given space group Hall symbol and returns the generators of the group defined by it.

Here is the call graph for this function:

◆ space_group_indices_from_elements()

integer function, dimension(size(elems)) symmetry_mod::space_group_indices_from_elements ( class(space_group), intent(in)  sp_group,
type(point_ptr), dimension(:), intent(in)  elems 
)

Returns an array of indices in the sym_ops array of the space group, corresponding to the given symmetry elements. The given elements must point to the same location in memory as the elements in the sym_ops array.

◆ space_group_left_coset_representatives_indices()

integer function, dimension(size(sp_group%sym_ops) / size(subgroup_inds)) symmetry_mod::space_group_left_coset_representatives_indices ( class(space_group), intent(in)  sp_group,
integer, dimension(:), intent(in)  subgroup_inds 
)

Given the indices of a subgroup of the given group, returns the set of (left) coset representatives for this subgroup. A coset representative is any element of the equivalence class corresponding to the coset.

◆ space_group_left_cosets_indices()

integer function, dimension(size(subgroup_inds),size(sp_group%sym_ops)/size(subgroup_inds)) symmetry_mod::space_group_left_cosets_indices ( class(space_group), intent(in)  sp_group,
integer, dimension(:), intent(in)  subgroup_inds 
)

Returns all left cosets for the given subgroup of the space group. First index enumarates the elements of a coset, second index corresponds to different cosets.

◆ space_group_set_cayley_and_inversion_tables()

subroutine symmetry_mod::space_group_set_cayley_and_inversion_tables ( class(space_group), intent(inout)  sp_group)

Sets the Cayley (multiplication) table and the inversion table for given space group.

Variable Documentation

◆ rot_1

real, dimension(3,3), parameter, private symmetry_mod::rot_1 = E3
private

◆ rot_2amb

real, dimension(3,3), parameter, private symmetry_mod::rot_2amb = transpose(reshape([ 0., -1., 0., -1., 0., 0., 0., 0., -1.], [3,3]))
private

◆ rot_2amc

real, dimension(3,3), parameter, private symmetry_mod::rot_2amc = transpose(reshape([ 0., 0., -1., 0., -1., 0., -1., 0., 0.], [3,3]))
private

◆ rot_2apb

real, dimension(3,3), parameter, private symmetry_mod::rot_2apb = transpose(reshape([ 0., 1., 0., 1., 0., 0., 0., 0., -1.], [3,3]))
private

◆ rot_2apc

real, dimension(3,3), parameter, private symmetry_mod::rot_2apc = transpose(reshape([ 0., 0., 1., 0., -1., 0., 1., 0., 0.], [3,3]))
private

◆ rot_2bmc

real, dimension(3,3), parameter, private symmetry_mod::rot_2bmc = transpose(reshape([-1., 0., 0., 0., 0., -1., 0., -1., 0.], [3,3]))
private

◆ rot_2bpc

real, dimension(3,3), parameter, private symmetry_mod::rot_2bpc = transpose(reshape([-1., 0., 0., 0., 0., 1., 0., 1., 0.], [3,3]))
private

◆ rot_2x

real, dimension(3,3), parameter, private symmetry_mod::rot_2x = transpose(reshape([ 1., 0., 0., 0., -1., 0., 0., 0., -1.], [3,3]))
private

◆ rot_2y

real, dimension(3,3), parameter, private symmetry_mod::rot_2y = transpose(reshape([-1., 0., 0., 0., 1., 0., 0., 0., -1.], [3,3]))
private

◆ rot_2z

real, dimension(3,3), parameter, private symmetry_mod::rot_2z = transpose(reshape([-1., 0., 0., 0., -1., 0., 0., 0., 1.], [3,3]))
private

◆ rot_3abc

real, dimension(3,3), parameter, private symmetry_mod::rot_3abc = transpose(reshape([ 0., 0., 1., 1., 0., 0., 0., 1., 0.], [3,3]))
private

◆ rot_3x

real, dimension(3,3), parameter, private symmetry_mod::rot_3x = transpose(reshape([ 1., 0., 0., 0., 0., -1., 0., 1., -1.], [3,3]))
private

◆ rot_3y

real, dimension(3,3), parameter, private symmetry_mod::rot_3y = transpose(reshape([-1., 0., 1., 0., 1., 0., -1., 0., 0.], [3,3]))
private

◆ rot_3z

real, dimension(3,3), parameter, private symmetry_mod::rot_3z = transpose(reshape([ 0., -1., 0., 1., -1., 0., 0., 0., 1.], [3,3]))
private

◆ rot_4x

real, dimension(3,3), parameter, private symmetry_mod::rot_4x = transpose(reshape([ 1., 0., 0., 0., 0., -1., 0., 1., 0.], [3,3]))
private

◆ rot_4y

real, dimension(3,3), parameter, private symmetry_mod::rot_4y = transpose(reshape([ 0., 0., 1., 0., 1., 0., -1., 0., 0.], [3,3]))
private

◆ rot_4z

real, dimension(3,3), parameter, private symmetry_mod::rot_4z = transpose(reshape([ 0., -1., 0., 1., 0., 0., 0., 0., 1.], [3,3]))
private

◆ rot_6x

real, dimension(3,3), parameter, private symmetry_mod::rot_6x = transpose(reshape([ 1., 0., 0., 0., 1., -1., 0., 1., 0.], [3,3]))
private

◆ rot_6y

real, dimension(3,3), parameter, private symmetry_mod::rot_6y = transpose(reshape([ 0., 0., 1., 0., 1., 0., -1., 0., 1.], [3,3]))
private

◆ rot_6z

real, dimension(3,3), parameter, private symmetry_mod::rot_6z = transpose(reshape([ 1., -1., 0., 1., 0., 0., 0., 0., 1.], [3,3]))
private

◆ tr_0

real, dimension(3), parameter, private symmetry_mod::tr_0 = [0., 0., 0. ]
private

◆ tr_a

real, dimension(3), parameter, private symmetry_mod::tr_a = [0.5, 0., 0. ]
private

◆ tr_b

real, dimension(3), parameter, private symmetry_mod::tr_b = [0., 0.5, 0. ]
private

◆ tr_c

real, dimension(3), parameter, private symmetry_mod::tr_c = [0., 0., 0.5 ]
private

◆ tr_d

real, dimension(3), parameter, private symmetry_mod::tr_d = [0.25, 0.25, 0.25]
private

◆ tr_n

real, dimension(3), parameter, private symmetry_mod::tr_n = [0.5, 0.5, 0.5 ]
private

◆ tr_u

real, dimension(3), parameter, private symmetry_mod::tr_u = [0.25, 0., 0. ]
private

◆ tr_v

real, dimension(3), parameter, private symmetry_mod::tr_v = [0., 0.25, 0. ]
private

◆ tr_w

real, dimension(3), parameter, private symmetry_mod::tr_w = [0., 0., 0.25]
private