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

iFit/addcoupling

PURPOSE ^

assigns a predefined matrix as exchange coupling on selected bonds

SYNOPSIS ^

function addcoupling(obj, matrixLabel, couplingIdx, varargin)

DESCRIPTION ^

 assigns a predefined matrix as exchange coupling on selected bonds

 ADDCOUPLING(obj, matrixLabel, couplingIdx, {bondIdx})

 Input:

 obj           sw class object.
 matrixLabel   Label of the matrix, or the index.
 couplingIdx   Selects the interacting atom pairs through the coupling.idx
               number. The coupling.idx numbers are in increasing order
               according to the distances between magnetic atoms, for
               example all shortest interatom distances have idx=1, second
               shortest idx=2 and so on. couplingIdx can be vector to
               assign the matrix to multiple inequivalent magnetic atom
               distances.
 bondIdx       Selects the indices of bonds within coupling.idx to
               differentiate between equal length bonds. If bondIdx
               defined, couplingIdx has to be scalar. Optional. If the
               crystal symmetry is not P1, bondIdx is not allowed, since
               each equivalent coupling matrix will be calculated using
               the symmetry operators of the space group. Optional.

 Output:

 The function adds extra entries in the 'coupling.matrix' field of the obj
 sw object.

 Example:

 ...
 cryst.addmatrix('label','J1','value',0.123)
 cryst.gencoupling
 cryst.addcoupling('J1',1)

 This will add the 'J1' diagonal matrix to all second shortes bonds
 between magnetic atoms.

 See also SW, SW.GENCOUPLING, SW.ADDMATRIX.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Tue 27-Nov-2018 10:56:24 by m2html © 2005. iFit (c) E.Farhi/ILL EUPL 1.1