EasySpin can calculate magnetic moments and magnetic susceptibilities for arbitrary spin systems. Experimentally, these are typically obtained using a SQUID magnetometer. This user guide explains how to calculate these quantities.
The following topics are covered:
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 measurement. With these, you then call the function curry. By default, it returns one or two outputs, but this can be customized:
muBM = curry(Sys,Exp); [muBM,chimol] = curry(Sys,Exp);
Sys contains the spin system, and Exp contains the experimental parameters. muBM is the z component of the magnetic dipole moment in units of Bohr magnetons, and chimol is the zz component of the molar magnetic susceptibility. z indicates the direction along the external magnetic field.
Additionally, you can provide a third input argument, Opt, that is a structure containing calculation options such as which output to provide and with system of units (SI or CGS) to use. For example,
Opt.Units = 'CGS'; % use CGS-emu units Opt.Output = 'chimol'; % calculate molar magnetic susceptibility chimol = curry(Sys,Exp,Opt);
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 +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, for details see the page on spin system structures.
Often a term called temperature-independent paramagnetism (TIP or χTIP) is included to model the magnetic susceptibility. It is simply added to χzz.
TIP_CGSemu = 5e-4; % value in cm^3 mol^-1 TIP_SI = TIP_CGSemu*4*pi*1e-6; % conversion from CGS-emu to SI units 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.
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 to 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 this, call curry twice:
% calculate magnetic moment for a few temperature over full field range Exp.Temperature = [2,5,7,10]; % few temperatures (K) Exp.Field = 0:10:6000; % full field range (mT) Opt.Output = 'muBM'; muBM = curry(Sys,Exp,Opt) % calculate magnetic susceptibility for a few temperature over full field range Exp.Temperature = 4:300; % large temperature range (K) Exp.Field = [0, 500]; % two field values (mT) Opt.Output = 'chimol'; chimol = curry(Sys,Exp,Opt)
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 infinitesimally small but can be quite substantial. 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_cgs = m4chi*avogadro*bmagn*1e2./repmat(Exp.Field(:),1,numel(Exp.Temperature)); chisim_si = (4*pi*1e-6) *chisim_cgs ; % convert to SI units
curry can calculate a variety of quantities related to magnetic susceptility and magnetic moment. Use Opt.Output to determine what curry should calculate. One or more keywords are possible. A few examples are
Opt.Output = 'muBM'; % single-center magnetic moment in units of Bohr magnetons Opt.Output = 'chimol'; % molar magnetic susceptibility Opt.Output = 'chimolT'; % molar magnetic susceptibility times temperature Opt.Output = 'muBM chimolT'; % calculate both quantities
The number of output arguments of currymust 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 = 'chimol muBM'; % reverse order to the default [chizz1,muz1] = curry(Sys,Exp,Opt); % Opt.Output is given, output in reverse order to the default [muz2,chizz2] = curry(Sys,Exp); % Opt.Output is omitted, Output in default order
Several ways to represent the magnetic suscpetibilty are used. Beside χzz (where often the index is omitted), the product of temperature and susceptibilty χ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 their 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.
Note that curry does not calculate volume or mass magnetic susceptibilities.
In magnetometry, there are two systems of units in use, the modern SI system and the old CGS-emu system. curry can return results in either of the two. By default, the SI system is used. Specify the system of units directly in the options field Opt.Units.
Opt.Units = 'SI'; % use SI units out = curry(Sys,Exp,Opt); Opt.Units = 'CGS'; % use CGS-emu units out = curry(Sys,Exp,Opt);
The SI unit for the magnetic moment is J T-1, whereas its CGS-emu unit is erg G-1.
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 = muzBM*bmagn; % molecular magnetic moment, natural units -> SI units muzmol_SI = muz_SI*avogadro % molecular magnetic moment -> molar magnetic moment
The single-particle (single-molecule, atomic) magnetic susceptibility has the SI unit m3 mol-1 and the CGS-emu unit cm3 mol-1. The molar magnetic susceptibility has the SI unit m3 mol-1 and the CGS-emu unit cm3 mol-1. To convert these susceptibilities between SI and CGS-emu, use
chi_SI = chi_CGS*(4*pi*1e-6); % conversion from CGS-emu to SI units chimol_SI = chimol_CGS*(4*pi*1e-6); % conversion from CGS-emu to SI units chi_CGS = chi_SI/(4*pi*1e-6); % conversion from SI to CGS-emu units chimol_CGS = chimol_SI/(4*pi*1e-6); % conversion from SI to CGS-emu units
curry can also calculate magnetic moment and molar magnetic susceptibility of single crystals. For this, 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 aligned 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
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.GridSize. The higher the number, the more orientations are included.
Opt.GridSize = 10; % 10° increments Opt.GridSize = 19; % 5° increments Opt.GridSize = 31; % 3° increments Opt.GridSize = 91; % 1° increments
A sufficient number of orientations is necessary to obtain correct data. If you are not sure whether you have enough orientations, increase Opt.GridSize 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. curry detects this situation automatically.
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; % Det 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.