Home > Applications > SpinW > m_files > @sw > basisvector.m

iFit/basisvector

PURPOSE ^

generates basis vectors of the crystal lattice

SYNOPSIS ^

function basisVector = basisvector(obj, varargin)

DESCRIPTION ^

 generates basis vectors of the crystal lattice

 basisVec = BASISVECTOR(obj, {norm})

 Input:

 obj       sw class object.
 norm      If true, the basis vectors are normalized to 1, otherwise the
           length is equal to the lattice constants. Defult is false.
           Optional.

 Output:

 basisVec  Stores the three basis vectors in columns, dimensions are 
           [3 3].

 The 3x3 basisVec matrix can be used also as a coordinate transformation
 matrix from the relative atomic position to positions in the xyz
 coordinate system in Angstrom units.

 Example:

 To change coordinate system:

 relative atomic positions --> xyz
   r_xyz = basisvector * [ra; rb; rc];

 reciprocal lattice units --> Angstrom^-1 (xyz coordinate system)
   Q_xyz =  [h k l] * 2*pi*inv(basisvector);

 See also SW, SW.ABC.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Mon 26-Nov-2018 15:08:42 by m2html © 2005. iFit (c) E.Farhi/ILL EUPL 1.1