Hello.
I would like to calculate magnetization with CURRY for various orientations of the magnetic field.
From the documentation, I guess I need to use Exp.SampleFrame command.
So I generated simple loop for three different Euler angles
Code: Select all
Temp=2; %K
Field=500; %mT
npoints=10; %number of point for PI section
delta=pi/(npoints);
count=0;
%alfa
for i = 0:2*npoints
alfa=i*delta;
%beta
for j = 0:npoints
beta=j*delta;
%gama
for k = 0:2*npoints
gama=k*delta;
count=count+1;
mag=simulate(x0,alfa,beta,gama,Temp,Field);
f_alfa(count)=alfa;
f_beta(count)=beta;
f_gama(count)=gama;
Magnetization(count)=mag;
end
end
end
where the function "simulate" calculates the magnetization for given angles:
Code: Select all
Exp.MolFrame = [0 0 0];
Exp.CrystalSymmetry = 'P1'; % crystal space group
Exp.SampleFrame = [gama beta alfa];
simspc = curry(FitSys,Exp,Opt);
However, I do not know how to properly transfer Euler angles to information about X,Y,Z coordinates. So I do not know for which orientation of the magnetic field the curry calculates magnetization. So in other words I would like to calculate (Bx,By,Bz).
Any help is truly welcomed
Radovan