Calculating magnetic moment and magnetic susceptibility

EasySpin can calculate magnetic moments and magnetic susceptibilities for arbitrary spin systems. Experimentally, these are obtained using a SQUID magnetometer. This user guide explains how to calculate these quantities.

The following topics are covered:

Running the calculation

To calculate magnetic moments and magnetic susceptibilities, you need to provide information on the sample (spin system) and the fields and temperatures used in the SQUID measurement. With these, you then call the function curry. Depending on what quantity you want to calculate, you ask for a different number of outputs from curry:

muz = curry(Sys,Exp);
[muz,chizz] = curry(Sys,Exp);


Sys contains the spin system, and Exp contains the experimental parameters. muz is the z component of the magnetic dipole moment, and chizz is the zz component of the magnetic susceptibility.

Additionally, you can provide a third input argument, Opt that contains some calculation options and allow to customize the output. For example,

muz = curry(Sys,Exp,Opt);

The spin system

To calculate magnetic moment and magnetic susceptibility, first of all you need to provide the system of spins and the parameters of the associated spin Hamiltonian as a spin system structure. Here is a simple example of two coupled spins-1/2 with isotropic g factors and strong exchange coupling:

Sys.S = [1/2 1/2];
Sys.g = [2 2];
Sys.J = -2*-10*29.98e3;   % MHz


Be mindful that EasySpin's isotropic electron-electron coupling term Sys.J uses the convention H = +J S1S2. Other conventions are often used in the literature. See here for details.

Also, EasySpin expects all couplings in units of MHz. Very often, exchange couplings are given in cm-1. To convert cm-1 to MHz use

J_cm = 5;              % value in cm^-1
J_MHz = J_cm*29.98e3;  % cm^-1 -> MHz conversion
Sys.J = J_MHz;         % for H = +J*S1*S2

Sys.J = 5 * 29.98e3;   % all in one line


You can also give antisymmetric and symmetric coupling terms, in Sys.dvec and Sys.eeD.

Often a term called temperature-independent paramagnetism (TIP or χTIP) is included to model the magnetic susceptibility. It is simply added to χzz.

TIP_cgs = 5e-4;             % value in cm^3 mol^-1
TIP_si = TIP_cgs*4*pi*1e-6; % unit conversion from CGS to SIunits
Sys.TIP = TIP_si;           % EasySpin expect TIP to be in SI units

Sys.TIP = 5e-4*4*pi*1e-6;   % all in one line


As with the rest of EasySpin, there is in principle no limit on the number of spins you can specify or on how they can be coupled. The only limit is the computer memory required to hold the spin Hamiltonian and operator matrices.

Experimental parameters

For SQUID magnetometry, you only need two basis experimental settings: the magnetic field values and the temperatures at which you measure the magnetic moment and the magnetic susceptibility.

Give the temperature in Exp.Temperature, in units of K. You can provide either a single temperature or an array of temperatures.

Exp.Temperature = 298;    % room temperature
Exp.Temperature = 4:300;  % large temperature range


For the magnetic field, use Exp.Field and provide the field values in units of mT. Again, you can give either a single value, or an array of values. If the experiment is run at zero magnetic field, you can omit Exp.Field.

Exp.Field = 3000;       % 3000 mT = 3 T
Exp.Field = 0:10:6000;  % 0 t 6T range


If you give a single value for both the temperature and the field, curry calculates single values for the outputs. If you provide a single value for one of the parameters and an array for the other, you get an array of results. For example, providing Exp.Field = 1000; and Exp.Temperature = 4:300 will yield curves as a function of temperature. Finally, if you provide arrays for both field and temperature, curry returns 2D arrays for the results.

Most SQUID measurement protocols do not use the same field and temperature steps for measurements of the magnetic moment and magnetic susceptibility. To simulate both in one call of curry, you can provide different field and temperature ranges for the two quantities.

Exp.chiTemperature = 4:300;    % large temperature range for magnetic susceptibilty
Exp.chiField = [0, 500];       % two fields for magnetic susceptibilty

Exp.mTemperature = [2,5,7,10]; % few temperatures for magnetic moment
Exp.mField = 0:10:6000;        % 0 t 6T range for magnetic moment


Very often magnetic susceptibility is understood to be in zero field. However, to measure the derivative of the magnetization with respect to the magnetic field (that is what the magnetic suceptibilty is) a magnetic field is needed. For various experimental reasons this field is often not infetisemal small but can be quite substantiual. Therefore, if larger fields are used it might be more correct to use the following:

m4chi =  curry(Sys,Exp,Opt);          % magnetic moment at the field used in the experiment
% divide magnetic moment by magnetic field and unit conversion
chisim_si = (4*pi*1e-6) *chisim_cgs ; % convert to SI units

Units and different representations of the susceptibility

curry returns the calculated magnetic moments in what might be called "natural units". The numerical value returned by curry can be taken either as the molecular magnetic moment μz (magnetic moment per molecule) in units of Bohr magnetons (μB), or as the molar magnetic moment μmol,z (magnetic moment per mole) in "molar Bohr magnetons" (NAμB). These two are numerically identical. For example, muz = 0.53 means the molecular magnetic moment μz is 0.53 μB and the molar magnetic moment μmol,z is 0.53 NAμB.

The SI units for these two magnetic moment quantities are J T-1 and J T-1 mol-1. To convert from the natural units to the SI units, use EasySpin's functions for the Avogadro number (avogadro) and the Bohr magneton (bmagn):

muz_SI = muz*bmagn;              % molecular magnetic moment, natural units to SI units
muzmol_SI = muz*avogadro*bmagn;  % molar magnetic moment, natural units to SI units


The molar magnetic susceptibility χzz is returned in SI units of m3 mol-1. Often, the susceptibility is given in the old CGS units of cm3 mol-1. To convert the SI susceptibility to the corresponding CGS quantity, use

chizz_cgs = chizz_SI/(4*pi*1e-6);     % unit conversion from SI to CGS units


Several ways to represent the magnetic suscpetibilty are used. Beside χzz (where often the index is ommited), the product of temperature and suscpetibilty χzzT and the inverse of the susceptibilty 1/χzz are common. Also the effective magnetic moment μeff is used. All of them contain the same information, however theire appearance is quite different. A free paramagnet is described by χzz = C/T with Curie constant C and temperature T. Hence, χzz approaches C at low temperatures and tend towards zero at high temperatures. In contrast 1/χzz decrease linearly with decreasing temperature. χzzT is simply a constant line at C. In the section Least-squares fitting we will discuss implications of that.

Single crystals

curry can also calculate magnetic moment and molar magnetic susceptibility of single crystals. For this, you need to provide three things: (a) the orientation of the crystal in the spectrometer in Exp.CrystalOrientation, (b) the space group of the crystal in Exp.CrystalSymmetry, and (c) the orientation of the molecular frame relative to the crystal frame in Exp.MolFrame. You can omit the latter two, in which case the space group is assumed to be P1, and the molecular frame is assumed to be aligne with the crystal frame.

For more information on the various frames and how to specify the relative orientations, see here.

Here are some examples on how to use this.

Exp.CrystalSymmetry = 'P212121';        % space group symbol

Exp.CrystalOrientation = [0 0 0];       % magnetic field along crystal z axis
Exp.CrystalOrientation = [0 pi/2 0];    % magnetic field along crystal x axis
Exp.CrystalOrientation = [pi/2 pi/2 0]; % magnetic field along crystal y axis

Calculation options

Without information about a crystal (Exp.CrystalOrientation, Exp.CrystalSymmetry), curry assumes the sample is a powder and performs a powder average. The powder average involves evaluating many orientations of the paramagnetic center with respect to the magnetic field, and then averaging them. To adjust the number of orientations included in the powder average, use Opt.nKnots. The higher the number, the more orientations are included.

Opt.nKnots = 10;   % 10° increments
Opt.nKnots = 19;   % 5° increments
Opt.nKnots = 31;   % 3° increments


A sufficient number of orientations is necessary to obtain correct data. If you are not sure whether you have enough orientations, increase Opt.nKnots until the calculated data do not change any more.

Of course, if the spin Hamiltonian is isotropic, you do not have to run a powder average.

In the section Units and different representations of the susceptibility it was found that several representations for magnetometry data and simulation exists. You can get all of them, or only those which are wanted, from curry:

Opt.Output = 'MvsBSI ChiSI ChiTSI 1overChiSI MuEffSI MvsBCGS ChiCGS ChiTCGS 1overChiCGS MuEffCGS';
[MvsBSI, ChiSI, ChiTSI, OneOverChiSI, MuEffSI, MvsBCGS, ChiCGS, ChiTCGS, OneOverChiCGS, MuEffCGS] = curry(Sys,Exp,Opt);


Note, that the number of output arguments must match the number of keywords in Output. The quantity of the first keyword will be in the first output and so on. Be careful:

Opt.Output = 'ChiSI MvsBCGS';       % reverse order to the default
[chizz1,muz1] = curry(Sys,Exp,Opt); % Opt.Output is given, output in reverse orde to the default
[muz2,chizz2] = curry(Sys,Exp);     % Opt.Output is omitted, Output in default order


Adding the keyword 'OneColoumn' to Output will reduce the output to a one-coloumn array. This is especially useful for least-squares fitting.

Sys = struct('S',1,'D',5000);
Exp = struct('Temperature', [5,10], 'Field', [100,200,300]);
Opt.Output = 'MvsB OneColoumn ChiTCGS';
y = curry(Sys,Exp,Opt);

The output y will have 6 entries:

 [MvsB(B = 100 mT, T = 5 K), MvsB(B = 200 mT, T = 5 K), MvsB(B = 300 mT, T = 5 K),MvsB(B = 100 mT, T = 10 K), MvsB(B = 200 mT, T = 10 K), MvsB(B = 300 mT, T = 10 K), ChiTCGS(B = 100 mT, T = 5 K), ChiTCGS(B = 200 mT, T = 5 K), ChiTCGS(B = 300 mT, T = 5 K), ChiTCGS(B = 100 mT, T = 10 K), ChiTCGS(B = 200 mT, T = 10 K), ChiTCGS(B = 300 mT, T = 10 K)]

The order of MvsB and ChiTCGS is given by the order in Output.

Least-squares fitting

You can use EasySpin's least-squares fitting tool esfit to fit magnetometry data using curry.

In almost all cases magnetometry data is given in absolute units, therefore it is definetly NOT recommended to scale data before least-square fitting. Use FitOpt.Scaling = 'none';.

However, the order and nature of curry's output arguments is different from the main EasySpin simulation functions pepper, garlic, chili, etc. By default, esfit is set up for these latter functions. To make esfit work for curry, you need to provide information about the type of output arguments via the fitting option FitOpt.OutArg.

FitOpt.OutArg should be an array of two numbers, for example FitOpt.OutArg = [3 2]. The first number indicates how many output arguments esfit should ask for when calling the simulation function. The second number indicates which output argument to use for fitting. So, FitOpt.OutArg = [3 2] indicates to call the simulation function with three outputs, and then use the second to fit to the data.

For curry, you need to use the following settings, depending on what you want to fit. For fitting the magnetic moment, have curry be called only with one output and use it:

FitOpt.OutArg = [1 1];   % to fit the magnetic moment muz (first output)


The magnetic susceptibility χzz is the second output argument of curry. To fit it, have curry be called with 2 outputs and use the second:

FitOpt.OutArg = [2 2];   % to fit the magnetic susceptibility chizz (second output)


Alternatively, you define the output in Opt.Output according to which quantity should be fitted.

Opt.Output = 'MvsB';   % to fit the magnetic moment muz
Opt.Output = 'Chi';    % to fit the magnetic susceptibility chizz


For most spin systems it is not recommended to fit χzz. Instead χzzT (or μeff) should be used, especially when g factors should be obtained. This can be easily visualized by converting poor fits to χzzT (or μeff) to χzz and compare it to the data or you run the following example:

Sys1 = struct('S', 2, 'g', [2.1 1.9], 'D',clight*1e-4); % spin 2 with D of 1 cm-1 and axial g
Sys2 = struct('S', 2, 'g', 1.9, 'D',clight*1e-4);       % spin 2 with D of 1 cm-1 and isotropic g

Exp.Temperature =1:300;
Opt.Output = 'ChiTCGs ChiCGS';
[chizzT1,chizz1] = curry(Sys1,Exp,Opt);
[chizzT2,chizz2] = curry(Sys2,Exp,Opt);

subplot(2,1,1)
plot(Exp.Temperature,[chizzT1;chizzT2])
title('\chi T');
subplot(2,1,2)
plot(Exp.Temperature,[chizz1;chizz2])
title('\chi');


To increase the reliability of the least-square fitting it is often a good idea to fit both the magnetic moment and the magnetic susceptibility simultaneously. Let's say you have measured χzzT at fields of 100 and 500 mT and at temperatures from 2 to 300 K, where 0.5 K steps where used between 2 and 20 K and 5 K steps above. Magnetic moment was measured at 3 temperatures of 2, 5, and 10 K and fields from 0 to 7 T in 100 mT steps. ChiTData should be a 2 x 93 matrix and MvsBData a 71 x 3 matrix. After you defined, as usual your spin system in Sys and the parameters to vary in Vary, the following will allow to fit both quantities together:

% combine all data in 1-row array
fitdata = [ChiTData(:); MvsBData(:)];

% Temperatures and field for magnetic susceptibilty:
Exp.chiTemperature =[2:0.5:20 25:5:300];
Exp.chiField =[100,500];

% Temperatures and field for magnetic moment
Exp.mTemperature =[2,5,10];
Exp.mField =0:100:7000;

% set output to ChiT and MvsB in 1-coloumn array
Opt.Output = 'ChiTCGs MvsB OneColoumn';

% no scaling! Assuming correct diamagnetic corrections and
% sample weight measure the absolute value contain valuable information!
FitOpt.Scaling = 'none';

% Let's go and hope for the best!
esfit('curry',fitdata,Sys,Vary,Exp,Opt,FitOpt);


For more details on least-squares fitting, see the corresponding user guide and the reference page on esfit. We also put up an example for fitting magnetometry data.