Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting a DM vector between particular pair of atoms #28

Open
ghost opened this issue Feb 13, 2017 · 3 comments
Open

Setting a DM vector between particular pair of atoms #28

ghost opened this issue Feb 13, 2017 · 3 comments

Comments

@ghost
Copy link

ghost commented Feb 13, 2017

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?

@tsdev
Copy link
Owner

tsdev commented Feb 14, 2017

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):

  1. Find the bond where you want to assign the D-vector:
  • use spinw.table command and find the (idx,subidx) numbers of the desired bond
  • use the spinw.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 bond
  1. generate the symmetry operators using the new spinw.symop command:
    op = model.symop;

  2. 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);

  3. inverse transform your exchange matrix with the selected bond symmetry operator:
    Jp = inv(R)*J*inv(R)';

  4. 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!

@tsdev
Copy link
Owner

tsdev commented Feb 14, 2017

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).

@ghost
Copy link
Author

ghost commented Feb 15, 2017

Thanks! It works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant