esta.spaceGroup package
Contents
esta.spaceGroup package#
Submodules#
esta.spaceGroup.read_cif module#
- esta.spaceGroup.read_cif.cif(inputfile)#
read cif and generate all atoms through sym op. privided in the cif file as well as other atom and cell parameters to describe the xtal structure
esta.spaceGroup.transform module#
- class esta.spaceGroup.transform.Transform(cryst_obj)#
Bases:
object
- transfor class to
-create supercell from crystal lattice object -rotation/translation etc… -
- More transformations to
-unit cell/atomic positions/reciprocal lattice/kpoints to be added
author: sk email: sonukumar.physics@gmail.com
- get_grouped_xyz()#
xyz file with grouped atoms of same type
- get_neach_type(inp)#
get number of list entries of each type
list of strings of atomic labels
get integer number of list entries (atomic symbols) of each type
- get_sposcar()#
get poscar file with scaled dimensions: supercell of POSCAR file
- get_supercell(scale)#
create supercell by shifting ALL atoms in space with scaling
[scale1,scale2,scale3]
looping is performed along three directions of lv’s vectors
- loops are:
i = 0,1,2 … sclae1 j = 0,1,2 … scale2 k = 0,1,2 … scale3
total atoms in supercell = atoms in unit-cell * np.product([scale1,scale2,scale3])
- rot_trans(inp_mat, lcell=None, lposition=None, translation=None, rotation_matrix=None)#
given input matrix (may be cell matrix or position matrix in c order) and rotation matrix (optional; default is unit matrix), output respective new matrix
- Parameters
inp_mat (array; rank 3 or rank N (no. of atoms)) –
lcell (logical, indicates inp_mat is for cell) –
lposition (logical, indicates that inp_mat is for atomic points/positions) –
1 (translation; array/vecor; rank) –
0)) (optional (default is zero vector = (0 0) –
rotation_matrix (array of rank3, optional (default is unit matrix)) –
- Return type
inp_mat like
Note: following convention like spglib: https://spglib.github.io/spglib/definition.html
====> Basis vectors (a,b,c) or (a1, a2, a3)
In spglib, basis vectors are represented by three column vectors (in Cartesian coordinates. ) :
a=⎛⎝⎜ax ay az⎞⎠⎟, b=⎛⎝⎜bx by bz⎞⎠⎟, c=⎛⎝⎜cx cy cz⎞⎠⎟,
====> atomic point x are represented as three fractional values relative to basis vectors as follows,
x=⎛⎝⎜x1x2x3⎞⎠⎟
====> The transformation matrix P changes choice of basis vectors as follows
(a b c) = (as bs cs) P where (abc) and (as bs cs) are the basis vectors of an arbitrary system and of a starndardized system, respectively
The origin shift p gives the vector from the origin of the standardized system Os to the origin of the arbitrary system O p = O − Os
A change of basis is described by the combination of the transformation matrix and the origin shift denoted by (P,p) where first the transformation matrix is applied and then origin shift. The points in the standardized system xs and arbitrary system x are related by
xs = P x + p,
or equivalently,
x = P^-1 xs − P^-1 p
esta.spaceGroup.transform_adv module#
- class esta.spaceGroup.transform_adv.transform(cryst_obj)#
Bases:
object
- transfor class to
-create supercell from crystal lattice object -rotation/translation etc… -
- More transformations to
-unit cell/atomic positions/reciprocal lattice/kpoints to be added
author: sk email: sonukumar.physics@gmail.com
- get_grouped_xyz()#
xyz file with grouped atoms of same type
- get_neach_type(inp)#
get number of list entries of each type
list of strings of atomic labels
get integer number of list entries (atomic symbols) of each type
- get_sposcar()#
get poscar file with scaled dimensions: supercell of POSCAR file
- get_supercell(scale)#
create supercell by shifting ALL atoms in space with scaling
[scale1,scale2,scale3]
looping is performed along three directions of lv’s vectors
- loops are:
i = 0,1,2 … sclae1 j = 0,1,2 … scale2 k = 0,1,2 … scale3
total atoms in supercell = atoms in unit-cell * np.product([scale1,scale2,scale3])
- rot_trans(inp_mat, lcell=None, lposition=None, translation=None, rotation_matrix=None)#
given input matrix (may be cell matrix or position matrix in c order) and rotation matrix (optional; default is unit matrix), output respective new matrix
- Parameters
inp_mat (array; rank 3 or rank N (no. of atoms)) –
lcell (logical, indicates inp_mat is for cell) –
lposition (logical, indicates that inp_mat is for atomic points/positions) –
1 (translation; array/vecor; rank) –
0)) (optional (default is zero vector = (0 0) –
rotation_matrix (array of rank3, optional (default is unit matrix)) –
- Return type
inp_mat like
..note:
Note: following convention like spglib: https://spglib.github.io/spglib/definition.html
====> Basis vectors (a,b,c) or (a1, a2, a3)
In spglib, basis vectors are represented by three column vectors (in Cartesian coordinates. ) :
a=⎛⎝⎜ax ay az⎞⎠⎟, b=⎛⎝⎜bx by bz⎞⎠⎟, c=⎛⎝⎜cx cy cz⎞⎠⎟,
====> atomic point x are represented as three fractional values relative to basis vectors as follows,
x=⎛⎝⎜x1x2x3⎞⎠⎟
====> The transformation matrix P changes choice of basis vectors as follows
(a b c) = (as bs cs) P where (abc) and (as bs cs) are the basis vectors of an arbitrary system and of a starndardized system, respectively
The origin shift p gives the vector from the origin of the standardized system Os to the origin of the arbitrary system O p = O − Os
A change of basis is described by the combination of the transformation matrix and the origin shift denoted by (P,p) where first the transformation matrix is applied and then origin shift. The points in the standardized system xs and arbitrary system x are related by
xs = P x + p,
or equivalently,
x = P^-1 xs − P^-1 p