R = genlattice(___)
genlattice(obj,Name,Value) generates all necessary parameters to define
a lattice including space group symmetry and store the result it in the
R = genlattice(___) also returns the rotation matrix that
rotates the inpub basis vectors to the internal coordinate system.
Alternatively the lattice parameters can be given directly when the
spinw object is created using the
spinw(inpStr) command, where struct
contains the fields with initial parameters, e.g.:
inpStr.lattice.lat_const = [3 3 4];
crystal.genlattice('lat_const',[3 3 4],'angled',[90 90 120],'spgr','P 6') crystal.genlattice('lat_const',[3 3 4],'angled',[90 90 120],'spgr',168) crystal.genlattice('lat_const',[3 3 4],'angled',[90 90 120],'spgr','-y,x-y,z; -x,-y,z','label','R -3 m')
The three lines are equivalent, both will create hexagonal lattice, with space group.
- spinw object.
[α, β, γ]angles in °, dimensions are .
[α, β, γ]angles in radian, dimensions are .
[a, b, c]lattice parameters in units defined in spinw.unit (with Å being the default), dimensions are .
- Defines the space group. Can have the following values:
- space group label string, name of the space group, can be any label defined in the symmetry.dat file.
- space group index line number in the symmetry.dat file.
- space group operators matrix with dimensions .
The symmetry.dat file stores definition of the 230 space groups in standard settings as it is in the International Tables of Crystallography. Additional lines can be added to the symmetry.dat file using the swsym.add function which later can be used in the
spgroption is 0, no symmetry will be used. The spinw.gencoupling function will determine the equivalent bonds based on bond length.
- Optional label for the space group if the generators are given in the
- Basis vectors given in a matrix with dimensions of , where each column defines a basis vector.
- Origin for the space group operators, default value is
[0 0 0].
- Permutation of the abc axes of the space group operators.
- Gives the number of formula units in the unit cell. It is used to normalize cross section in absolute units. Default value is 0, when cross section is normalized per unit cell.
- Rotation matrix that brings the input basis vector to the SpinW
BVspinw = R*BV
The result of the
spinw.genlattice function is that
will be changed based on the input, the lattice parameters are stored
directly and the optional space group string is converted into space
group operator matrices.