Closed BaishunYang closed 3 months ago
It looks like your magnetic structure does not agree with your exchange parameters - you should add a call to optmagsteep
or optmagstr
after the call to genmagstr
or after where you write "Ground state energy before optimization" (you don't actually do an optimization - that's what optmagsteep
/ optmagstr
does).
Hello @mducle , Thank you for your reply. I tried to use the "optmagstr" tag these days. It works very well to solve my problem. Many thanks.
I am calculating the spin wave of one 2D magtnet, taking the first nearest to third nearest J1, J2, J3 and second nearest neighbor DM interaction into consideration (see the problem_temp.m file).
The input file is as follows:
%spin wave calculation using spinw software %% Lattice - Define the crystal structure - Part 1 % We create a lattice tri = spinw; tri.genlattice('lat_const', [3.709 3.709 25], 'angled', [90 90 90], 'spgr',129) %% Atoms - Define the crystal structure - Part 2
tri.addatom('r',[0.75 0.25 0.0],'S',1,'label','Fe');
%% Define the list of bonds based on length tri.gencoupling('maxDistance', 6) % list the 1st to 3rd neighbor bonds tri.table('bond', 1:3)
%% Define the Spin-Hamiltonian (Exchange Structure)
%J matrix, positive means AFM J1=[-11.144 -0.249 0.225; -0.261 -11.132 -0.121; 0.228 -0.133 -11.754]; J2=[9.143 -0.009 -15.209; 0.004 10.602 -0.001; 15.211 -0.002 9.279]; J3=[24.263 -0.146 1.096; -0.145 24.169 -1.109; -1.096 1.109 24.38]; % J1=-11.144 % J2=9.143 % J3=24.263
tri.addmatrix('label', 'J1', 'value', J1, 'color','r') tri.addmatrix('label', 'J2', 'value', J2, 'color','g') tri.addmatrix('label', 'J3', 'value', J3, 'color','b') % tri.addmatrix('label', 'SIA', 'value', diag([0 0 -0.1])) % tri.addmatrix('label', 'biquadratic', 'value', 10)
tri.addcoupling('mat','J1','bond',1); tri.addcoupling('mat','J2','bond',2); tri.addcoupling('mat','J3','bond',3); % tri.addaniso('SIA') % tri.addcoupling('mat', 'biquadratic', 'bond',1)
%% Define the Magnetic structure %generate the magnetic structure tri.genmagstr('mode', 'helical', 'k', [0.5 0 0], 'n', [1 0 0], 'S', [0; 1; 1]) tri.table('mag') plot(tri, 'range', [2 2 1], 'cellMode', 'inside', 'magColor', 'red')
%% The energy of the ground state per spin % The spinw.energy() function gives the ground state energy per spin, the value is dinamically calculated at every call. disp('Ground state energy before optimization:') tri.energy % assert(tri.energy == -1)
%% Calculate the spin-wave dispersion
Qlist = {[3/4 1/4 0] [1/2 1/2 0] [1/2 0 0] [3/4 1/4 0] [1 0 0] [1/2 0 0] 100}; Spectrum = tri.spinwave(Qlist,'hermit',false);
figure; % subplot(2,1,1) % % plot the spin wave sw_plotspec(Spectrum,'mode',1,'axLim',[0 400],'colorbar',false,... 'colormap',[0 0 0],'dashed',true) % % plot the neutron spin wave Spectrum = sw_neutron(Spectrum); Spectrum = sw_egrid(Spectrum,'Evect',linspace(0,400,1000), 'imagChk', true); sw_plotspec(Spectrum,'mode',3,'dashed',true,'dE',0.1) caxis([0 4])