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

iFit/addg

PURPOSE ^

assigns g-tensor to magnetic ions

SYNOPSIS ^

function addg(obj, matrixIdx, varargin)

DESCRIPTION ^

 assigns g-tensor to magnetic ions

 ADDG(obj, matrixIdx, {atomTypeIdx}, {atomIdx})

 Input:

 matrixIdx     Either an integer, that selects the matrix
               obj.matrix.mat(:,:,matrixIdx), or a string identical to one
               of the previously defined matrix labels, stored in
               obj.matrix.label. Maximum value is nJ.
 atomTypeIdx   String or cell of strings that select magnetic atoms by
               their label. Also can be a vector that contains integers,
               the index of the magnetic atoms in obj.unit_cell, with all
               symmetry equivalent atoms. Maximum value is nAtom, if
               undefined g-tensor is assigned to all magnetic atoms.
               Optional.
  atomIdx      A vector that contains indices selecting some of the
               symmetry equivalent atoms. Maximum value is the number of
               symmetry equivalent atoms generated. If crystal symmetry is
               not 0, atomIdx is not allowed, since the g-tensor for
               equivalent atoms will be calculated using the symmetry
               operators of the space group. Optional.

 Output:

 The function adds extra entries in the 'single_ion.g' field of the obj sw
 object.

 Example:

 ...
 cryst.addmatrix('label','g1','value',diag([1.8 1.8 2.1]))
 cryst.gencoupling
 cryst.addg('g1')

 This will add the 'g1' diagonal matrix to all magnetic atoms as
 anisotropic g-tensor.

 See also SW, SW.ADDCOUPLING, SW.ADDANISO, SW.ADDMATRIX.

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