Calculates magnetometry data: magnetic moment, static magnetic susceptibility.

muz = curry(...);
[muz,chizz] = curry(...);

See also the user guide on how to use curry.


curry calculates the magnetic moment and the molar static magnetic susceptibility for given fields and temperatures.


There are up to three possible output arguments. If no output argument is requested, curry plots the calculated curves.

muz contains the values of the longitudinal magnetic moment, i.e. along the direction of the applied magnetic field (zL), for the fields and temperatures requested.

The units are either Bohr magnetons μB if the value is understood as single-molecule magnetic moment μz, or NAμB if the value is understood as molar magnetic moment μm,z. NA is the Avogadro constant. For example, muz = 0.53 means the single-molecule magnetic moment μz is 0.53 μB and the molar magnetic moment μm,z is 0.53 NAμB. To convert the molar magnetic moment to SI units (J T-1 mol-1), use

muz_SI = muz*avogadro*bmagn;   % unit conversion from NA*muB to J T^-1 mol^-1
chizz contains the molar static magnetic susceptibility. This is not the full 3x3 susceptibility tensor χm, but its component along the applied magnetic field direction zL χm,zz. The values are in SI units (m3 mol-1). To convert chizz from SI units to CGS units (cm3 mol-1), use
chizz_cgs = chizz_SI/(4*pi*1e-6);   % unit conversion from SI to CGS units
Input: Spin system

There are three inputs to the function, the last one is optional.

Sys is a spin system structure containing the spin quantum numbers of and the spin Hamiltonian parameters.

Input: Experimental parameters

Exp contains experimental parameters such as the magnetic field range and temperature. Compared to EasySpin's EPR simulation functions, curry needs only very few parameters.

This gives the temperature, or list of temperatures, for which magnetization data should be calculated, in kelvin. For example, Exp.Temperature = 298 corresponds to room temperature, and Exp.Temperature = 4:300 specifies a temperature range. If an array of values is given, data are calculated for each temperature in the array.

Populations are computed for all energy levels assuming thermal (Boltzmann) equilibrium and are included in the calculation of the magnetic moment and the magnetic susceptibility.

Temperature has to be provided.

Field gives the magnetic field strength, in mT, for which magnetization data should be calculated. If an array of values is given, data are calculated for each field value in the array.

If Field is missing, EasySpin assumes that no field is applied.

curry not only supports powder samples, but also single crystals. The following fields are needed for single-crystal calculations:

An Nx3 or Nx2 array that specifies single-crystal orientations for which the magnetic moment and the susceptibility should be computed. Each row of CrystalOrientation contains the three Euler rotation angles that transform the crystal frame (C) to the lab frame (L). If only two Euler angles are given, the third is set to zero. If CrystalOrientation is empty or not specified, the full powder is computed.
Exp.CrystalOrientation = [0 0 0];              % single crystal, crystal z axis aligned with B0
Exp.CrystalOrientation = [0 pi/2 0];           % single crystal, crystal z axis perpendicular to B0
Exp.CrystalOrientation = [0 0 0; 0 pi/2 0];    % two crystals
Exp.CrystalOrientation = [];                   % powder
Specifies the symmetry of the crystal. You can give either the number of the space group (between 1 and 230), the symbol of the space group (such as 'P212121' or 'Ia-3d'), or the symbol for the point subgroup of the space group (in either Schönflies or Hermann-Mauguin notation, such as 'D2h' or 'mmm').
Exp.CrystalSymmetry = 11;       % space group number (between 1 and 230)
Exp.CrystalSymmetry = 'P21/c';  % space group symbol
Exp.CrystalSymmetry = 'C2h';    % point group, Schönflies notation
Exp.CrystalSymmetry = '2/m';    % point group, Hermann-Mauguin notation

When CrystalSymmetry is given, all symmetry-related sites in the crystal are generated and included in the calculation. If CrystalSymmetry is not given, space group 1 (P1, point group C1, one site per unit cell) is assumed.

The three Euler angles, in radians, for the transformation of the crystal frame to the molecular frame. Use this field when specifying a crystal containing spin systems that are tilted with respect to the crystal frame. E.g. Param.MolFrame=[0,pi/4,0] tilts the x and z axis of the spin system's molecular frame (xM, zM), relative to the crystal frame (xC,yC,zC).

Input: Calculation options

The structure Opt collects computational parameters. Opt need not be specified, in which case default values for all fields are used. The field names and their possible values are as follows.

Determines how much information is printed to the command window. If Opt.Verbosity=0, curry is silent. 1 logs relevant information, 2 gives more details.
Determines the number of orientations (knots) in a powder for which moment and susceptibility are calculated. nKnots gives the number of orientations between θ=0° and θ=90° for which data are calculated. Common values for N1 are between 10 (10° increments) and 91 (1° increments). The larger the anisotropy of the spin Hamiltonian, the higher N1 must be to yield accurate values.
Opt.nKnots = 91;       % 1° increments
Opt.nKnots = 31;       % 3° increments

curry calculates the magnetic moment as follows: For each of the given values of the applied magnetic field, the spin Hamiltonian matrix is set up and diagonalized to obtain all eigenvalues and eigenstate vectors. Then, the operator matrix for the projection of the magnetic dipole moment onto the field axis (zL, z axis in the laboratory frame) is set up. Next, its expectation value for each eigenstate is calculated. Lastly, these expectation values are summed using thermal Boltzmann population factors corresponding to the given temperature as weights.

To obtain the zz-component of the magnetic susceptibility tensor, the numerical derivative of the zL-component of the magnetic moment with respect to the applied magnetic field along zL is calculated.

See also