Skip to content

Exchange interactions for multi atom system #223

@SrimalR

Description

@SrimalR

Hi,

I have a two magnetic atom system with random atom distribution. I want to define J values for each interactions separately. That means I have J1, the nearest neighbor interaction of the system but I want to define J1 for J1_Co-Co,J1_Ni-Ni and J1_Co-Ni. But in my current code the code it self select all the J1 with the same distance as a same J1. IS there a way to do this. I want to include other Js as well. Here is the code I have now,

%section1
cnto = spinw;

%cotio3.genlattice('lat_const', [5.48460 5.48460 5.48460], 'angled', [55, 55, 55], 'sym', 'R -3');
cnto.genlattice('lat_const', [10.08996 10.08966 27.67994], 'angled', [90 90 120], 'sym', 'P 1');

cnto.addatom('r',[0.0 0.0 0.176],'label','Co','formfact','MCo+2','S',1/2,'color','blue')
cnto.addatom('r',[0.0 0.0 0.824],'label','Ni','formfact','MNi+2','S',1,'color','red')
cnto.addatom('r',[0.333333 0.166667 0.342667],'label','Co','formfact','MCo+2','S',1/2,'color','blue')
cnto.addatom('r',[0.333333 0.166667 0.990667],'label','Ni','formfact','MNi+2','S',1,'color','red')
cnto.addatom('r',[0.166667 0.333333 0.509333],'label','Co','formfact','MCo+2','S',1/2,'color','blue')
cnto.addatom('r',[0.166667 0.333333 0.157333],'label','Ni','formfact','MNi+2','S',1,'color','red')
cnto.addatom('r',[0.0 0.0 0.676],'label','Co','formfact','MCo+2','S',1/2,'color','blue')
cnto.addatom('r',[0.0 0.0 0.324],'label','Ni','formfact','MNi+2','S',1,'color','red')
cnto.addatom('r',[0.333333 0.166667 0.842667],'label','Co','formfact','MCo+2','S',1/2,'color','blue')
cnto.addatom('r',[0.333333 0.166667 0.490667],'label','Ni','formfact','MNi+2','S',1,'color','red')
cnto.addatom('r',[0.166667 0.333333 0.00933333],'label','Co','formfact','MCo+2','S',1/2,'color','blue')
cnto.addatom('r',[0.166667 0.333333 0.657333],'label','Ni','formfact','MNi+2','S',1,'color','red')
cnto.addatom('r',[0.0 0.5 0.176],'label','Co','formfact','MCo+2','S',1/2,'color','blue')
cnto.addatom('r',[0.0 0.5 0.824],'label','Ni','formfact','MNi+2','S',1,'color','red')
cnto.addatom('r',[0.5 0.5 0.176],'label','Co','formfact','MCo+2','S',1/2,'color','blue')
cnto.addatom('r',[0.5 0.5 0.824],'label','Ni','formfact','MNi+2','S',1,'color','red')
cnto.addatom('r',[0.5 0.0 0.176],'label','Co','formfact','MCo+2','S',1/2,'color','blue')
cnto.addatom('r',[0.5 0.0 0.824],'label','Ni','formfact','MNi+2','S',1,'color','red')
cnto.addatom('r',[0.333333 0.666667 0.342667],'label','Co','formfact','MCo+2','S',1/2,'color','blue')
cnto.addatom('r',[0.333333 0.666667 0.990667],'label','Ni','formfact','MNi+2','S',1,'color','red')
cnto.addatom('r',[0.833333 0.666667 0.342667],'label','Co','formfact','MCo+2','S',1/2,'color','blue')
cnto.addatom('r',[0.833333 0.666667 0.990667],'label','Ni','formfact','MNi+2','S',1,'color','red')
cnto.addatom('r',[0.833333 0.166667 0.342667],'label','Co','formfact','MCo+2','S',1/2,'color','blue')
cnto.addatom('r',[0.833333 0.166667 0.990667],'label','Ni','formfact','MNi+2','S',1,'color','red')
cnto.addatom('r',[0.166667 0.833333 0.509333],'label','Co','formfact','MCo+2','S',1/2,'color','blue')
cnto.addatom('r',[0.166667 0.833333 0.157333],'label','Ni','formfact','MNi+2','S',1,'color','red')
cnto.addatom('r',[0.666667 0.833333 0.509333],'label','Co','formfact','MCo+2','S',1/2,'color','blue')
cnto.addatom('r',[0.666667 0.833333 0.157333],'label','Ni','formfact','MNi+2','S',1,'color','red')
cnto.addatom('r',[0.666667 0.333333 0.509333],'label','Co','formfact','MCo+2','S',1/2,'color','blue')
cnto.addatom('r',[0.666667 0.333333 0.157333],'label','Ni','formfact','MNi+2','S',1,'color','red')
cnto.addatom('r',[0.0 0.5 0.676],'label','Co','formfact','MCo+2','S',1/2,'color','blue')
cnto.addatom('r',[0.0 0.5 0.324],'label','Ni','formfact','MNi+2','S',1,'color','red')
cnto.addatom('r',[0.5 0.5 0.676],'label','Co','formfact','MCo+2','S',1/2,'color','blue')
cnto.addatom('r',[0.5 0.5 0.324],'label','Ni','formfact','MNi+2','S',1,'color','red')
cnto.addatom('r',[0.5 0.0 0.676],'label','Co','formfact','MCo+2','S',1/2,'color','blue')
cnto.addatom('r',[0.5 0.0 0.324],'label','Ni','formfact','MNi+2','S',1,'color','red')
cnto.addatom('r',[0.333333 0.666667 0.842667],'label','Co','formfact','MCo+2','S',1/2,'color','blue')
cnto.addatom('r',[0.333333 0.666667 0.490667],'label','Ni','formfact','MNi+2','S',1,'color','red')
cnto.addatom('r',[0.833333 0.666667 0.842667],'label','Co','formfact','MCo+2','S',1/2,'color','blue')
cnto.addatom('r',[0.833333 0.666667 0.490667],'label','Ni','formfact','MNi+2','S',1,'color','red')
cnto.addatom('r',[0.833333 0.166667 0.842667],'label','Co','formfact','MCo+2','S',1/2,'color','blue')
cnto.addatom('r',[0.833333 0.166667 0.490667],'label','Ni','formfact','MNi+2','S',1,'color','red')
cnto.addatom('r',[0.166667 0.833333 0.00933333],'label','Co','formfact','MCo+2','S',1/2,'color','blue')
cnto.addatom('r',[0.166667 0.833333 0.657333],'label','Ni','formfact','MNi+2','S',1,'color','red')
cnto.addatom('r',[0.666667 0.833333 0.00933333],'label','Co','formfact','MCo+2','S',1/2,'color','blue')
cnto.addatom('r',[0.666667 0.833333 0.657333],'label','Ni','formfact','MNi+2','S',1,'color','red')
cnto.addatom('r',[0.666667 0.333333 0.00933333],'label','Co','formfact','MCo+2','S',1/2,'color','blue')
cnto.addatom('r',[0.666667 0.333333 0.657333],'label','Ni','formfact','MNi+2','S',1,'color','red')

cnto.gencoupling('maxDistance', 8, 'forceNoSym',true);
plot(cnto, 'range',[1 1 1])

bonds = cnto.table('bond', 1:cnto.nbond);
%%

%section2

atomtable=cnto.table('atom');
disp(atomtable);

J1 = -16.80; J1Z= -0.0;
% J2 = 0.00; J2Z= 0.00;
% J3 = 0.00; J3Z= 0.00;
% J4= 0.00; J4Z= 0.00;
% J5= 0.00; J5Z= 0.00;
% J6= 0.00; J6Z= 0.00;

cnto.addmatrix('value',[J1 0 0; 0 J1 0; 0 0 J1Z],'label','J1','color','red')
% cnto.addmatrix('value',[J2 0 0; 0 J2 0; 0 0 J2Z],'label','J2','color','purple')
% cnto.addmatrix('value',[J3 0 0; 0 J3 0; 0 0 J3Z],'label','J3','color','green')
% cnto.addmatrix('value',[J4 0 0; 0 J4 0; 0 0 J4Z],'label','J4','color','blue')
% cnto.addmatrix('value',[J5 0 0; 0 J5 0; 0 0 J5Z],'label','J5','color','yellow')
% cnto.addmatrix('value',[J6 0 0; 0 J6 0; 0 0 J6Z],'label','J6','color','orange')

cnto.addcoupling('mat','J1','bond',1)
% cnto.addcoupling('mat','J2','bond',2)
% cnto.addcoupling('mat','J3','bond',3)
% cnto.addcoupling('mat','J4','bond',4)
% cnto.addcoupling('mat','J5','bond',5)
% cnto.addcoupling('mat','J6','bond',6)

%disp('Bonds:')
cnto.table('bond',[])

par_ms.mode = 'helical';
par_ms.S = [-1 -1 +1 +1 -1 -1 +1 +1 -1 -1 +1 +1 -1 -1 -1 -1 -1 -1 +1 +1 +1 +1 +1 +1 -1 -1 -1 -1 -1 -1 +1 +1 +1 +1 +1 +1 -1 -1 +1 -1 -1 -1 +1 +1 +1 +1 +1 +1; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ;0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]; %moment direction
par_ms.nExt = [1 1 1]; %Size of the magnetic supercell in multiples of the crystallographic cell
par_ms.k = [0 0 1]; %propagation vector
par_ms.n = [0 0 1]; %vector that defines the normal of the rotation of the spin spiral

cnto.genmagstr(par_ms);

plot(cnto, 'range', [1 1 1])

%%

%section3

allQPts = {{[0.5 0.5 0], [0.5 0.5 1.5],[0 0 1.5],[0 0 4.5], [0 0 3], [0.5 0.5 3],[0 1 1.5],[1 1 1.5],[2/3 2/3 1.5],200}};

for i = 1:1
Qcorner = allQPts{i};
sqSpec = CoTiO3.spinwave(Qcorner, 'hermit', false);
sqSpec = sw_neutron(sqSpec);
sqSpec = sw_egrid(sqSpec, 'Evect', linspace(0,15,1000),'imagChk',false);
figure
sw_plotspec(sqSpec, 'mode', 3, 'dashed', true, 'dE', 0.25);

end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions