Syntax
obj = spinw
obj = spinw(obj)
obj = spinw(source)
obj = spinw(figure_handle)
Description
obj = spinw
constructs an empty spinw class object.
obj = spinw(obj)
constructs a spinw class object from the
parameters defined in obj
. If obj
is spinw class, it only checks
the integrity of its internal data structure. If obj
is struct
type, it creates new spinw object and checks data integrity.
obj = spinw(source)
construct new spinw class object, where
source
is either a file path pointing to a local cif
or fst
file or a link to an online file.
obj = spinw(figure_handle)
copy the spinw object stored in a
previous structural 3D plot figure, referenced by figure_handle
.
The data structure within the spinw object can be accessed by using
spinw.struct method. All fields of the struct type data behind the
spinw object are accessible through the main field names of the obj
object. For example the lattice parameters can be accessed using:
abc = obj.unit_cell.lat_const
spinw is a handle class, which means that only the handle of the
object is copied in an assinment command swobj1 = swobj2
. To create
a copy (clone) of an spinw object use:
swobj1 = swobj2.copy
Properties
The data within the spinw
object is organized into a tree structure
with the main groups and the type of data they store are the
following:
- spinw.lattice unit cell parameters
- spinw.unit_cell atoms in the crystallographic unit cell
- spinw.twin crystal twin parameters
- spinw.matrix 3x3 matrices for using them in the Hailtonian
- spinw.single_ion single ion terms of the Hamiltonian
- spinw.coupling list of bonds
- spinw.mag_str magnetic structure
- spinw.unit physical units for the Hamiltonian
- spinw.cache temporary values
Methods
Methods are the different commands that require a spinw
object as a
first input, thus they can be called as method1(obj,...)
,
alternatively the equivalent command is obj.method1(...)
. The list
of public methods is below.
Lattice operations
- spinw.genlattice generates crystal lattice
- spinw.basisvector generates lattice vectors
- spinw.rl generates reciprocal lattice vectors
- spinw.nosym reduces symmetry to P0
- spinw.newcell transforms lattice
- spinw.addatom adds new atom
- spinw.unitcell returns unit cell data
- spinw.abc returns lattice parameters and angles
- spinw.atom generates symmetry equivalent atomic positions
- spinw.matom generates magnetic lattice
- spinw.natom number of symmetry unrelated atoms
- spinw.formula returns basic physical properties
- spinw.disp prints information
- spinw.symmetry returns whether symmetry is defined
Plotting
- spinw.plot plots 3D model
Crystallographic twin operations
- spinw.addtwin adds crystallographic twins
- spinw.twinq calculates equivalent Q point in twins
- spinw.notwin removes all twins
Magnetic structure operations
- spinw.genmagstr generates magnetic structure
- spinw.magstr returns single-k magnetic structure representation
- spinw.magtable creates tabulated list of all magnetic moments stored in obj
- spinw.nmagext number of magnetic sites
- spinw.optmagstr general magnetic structure optimizer
- spinw.optmagk determines the magnetic propagation vector
- spinw.optmagsteep quench optimization of magnetic structure
- spinw.anneal performs simulated annealing of spins
- spinw.annealloop parameter sweep for simulated annealing
- spinw.structfact calculates magnetic and nuclear structure factor
Matrix operations
- spinw.addmatrix adds new 3x3 matrix
- spinw.getmatrix determines the symmetry allowed tensor elements
- spinw.setmatrix sets exchange tensor values
Spin Hamiltonian generations
- spinw.quickham quickly generate magnetic Hamiltonian
- spinw.gencoupling generates bond list
- spinw.addcoupling assigns an exchange matrix to a bond
- spinw.addaniso assigns anisotropy to magnetic sites
- spinw.addg assigns g-tensor to magnetic atoms
- spinw.field get/set magnetic field value
- spinw.temperature get/set temperature
- spinw.intmatrix generates interaction matrix
- spinw.symop generates the bond symmetry operators
- spinw.setunit sets the physical units
Solvers
- spinw.spinwave calculates spin correlation function using linear spin wave theory
- spinw.powspec calculates powder averaged spin wave spectra
- spinw.energy calculates the ground state energy
- spinw.moment calculates quantum correction on ordered moment
- spinw.spinwavesym calculates symbolic spin wave dispersion
- spinw.symbolic switches between symbolic/numeric mode
- spinw.fourier calculates the Fourier transformation of the Hamiltonian
- spinw.fouriersym calculates the Fourier transformation of the symbolic Hamiltonian
Fitting spin wave spectrum
- spinw.fitspec fits experimental spin wave data
- spinw.matparser parses parameter vector into matrices
- spinw.horace spin wave calculator with interface to Horace
Miscellaneous
- spinw.copy clones spinw object
- spinw.export export data into file
- spinw.table outputs easy to read tables of internal data
- spinw.validate validates spinw object properties
- spinw.version returns the version of SpinW
- spinw.struct converts properties into struct
- spinw.clearcache clears the cache
- spinw.spinw Operators and special characters.
See also
spinw.copy, spinw.struct, Comparing handle and value classes