generates lattice vectors
Syntax
basisVec = basisvector(obj, {norm})
Description
basisVec = basisvector(obj, {norm})
returns the lattice vectors of the
unit cell in a matrix, with the , and vectors
stored in columns. The vectors are normalized to the lattice parameters
by default.
Examples
The basisVec
matrix can be used to change coordinate system, converting
between positions expressed in lattice units to positions expressed in
Å, using r_lu
for lattice unit coordinates and r_xyz
for
Å units (both stored in a column vector) the conversions are the
following:
r_xyz = basisVec * r_lu
or
r_lu = inv(basisVec)*r_xyz
It is also possible to convert between momentum vector in reciprocal lattice units (rlu) into Å units. Assuming that momentum vectors are row vectors:
Q_xyz = Q_rlu * 2*pi*inv(basisVec)
or
Q_rlu = 1/(2*pi)*Q_xyz*basisVect
Input Arguments
obj
- spinw object.
norm
- If
true
, the basis vectors are normalized to 1, otherwise the length of the basis vectors are equal to the lattice constants. Default isfalse
.
Output Arguments
basisVec
- Stores the three lattice vectors in columns, dimensions are .