Open ghost opened 7 years ago
Dear Eugene,
There is a way to do it, but since I had to fix a small problem the solution works only on the latest version (c8a252c):
Find the bond where you want to assign the D-vector:
spinw.table
command and find the (idx
,subidx
) numbers of the desired bondspinw.plot
command and find same indices by clicking on the desired bond (the idx
and subidx
numbers will appear in the tooltip text) for this to work you have to assign a dummy matrix on the desired bonds otherwise spinw.plot
won't show any bondgenerate the symmetry operators using the new spinw.symop
command:
op = model.symop;
find the index of the symmetry operator that belongs to your desired bond defined by the (idx
,subidx
) numbers and save it into R matrix (dimensions 3x3):
bIdx = find(model.coupling.idx==idx);
bIdx = bIdx(subidx);
R = op.bond(:,:,bIdx);
inverse transform your exchange matrix with the selected bond symmetry operator:
Jp = inv(R)*J*inv(R)';
save the transformed matrix value into the spinw object and assign it to the desired bond
model.addmatrix('label','myMatrix','value',Jp)
model.addcoupling('mat','myMatrix','bond',idx)
The inverse transformation takes care that the bond (idx,subidx) will have the exchange matrix identical to J. Let me know if you have further questions or something is unclear and you need an example script!
A complete example
We generate a DM interaction on a system with P4 symmetry (see Tutorial 32). To plot the structure we assign the D-vector to bond idx
=2 (by default subidx
=1):
cryst=spinw;
cryst.genlattice('sym','P 4','lat_const',[8 8 6])
cryst.addatom('r',[1/4 1/4 0],'S',1);
cryst.gencoupling;
cryst.addmatrix('label','D','value',[0 -1 0])
cryst.addcoupling('mat','D','bond',2)
plot(cryst,'range',[1 1 1/2])
Now we assign the same D-vector to the same set of bonds but to subidx
=3:
op = cryst.symop;
idx = 2;
subidx = 3;
bIdx = find(cryst.coupling.idx==idx);
bIdx = bIdx(subidx);
R = op.bond(:,:,bIdx);
DM = cryst.matrix.mat;
DMp = inv(R)*DM*inv(R)';
cryst.matrix.mat = DMp;
plot(cryst,'range',[1 1 1/2])
You should see that the bond (idx=2,subidx=3) have the same D-vector as on the previous plot at bond (idx
=2, subidx
=1).
Thanks! It works!
Dear Sandor,
In order to specify DM interaction one needs to provide D-vector and a bond index. SpinW spreads it out on all equivalent bonds taking into account symmetry of the crystal. In general, the D-vector will be pointed in the different directions on the different equivalent bonds.
My problem is that I know a D-vector only for a bond between particular pair of atoms.
Is there any way to define D-vector not for a bond index but for a bond between particular pair of atoms and then spread it out using crystal symmetry?