mailhexu / TB2J

a python package for computing magnetic interaction parameters
BSD 2-Clause "Simplified" License
67 stars 29 forks source link

Merge algorithm for non-collinear systems #49

Closed antelmor closed 4 months ago

antelmor commented 5 months ago

Consider the anisotropic exchange tensor $J_{ij}$ describing the interaction between two magnetic sites with local magnetic moments $\mathbf{m}_i$ and $\mathbf{m}_j$. Let $\hat{\mathbf{u}}_{ij}$ be a unit vector that is normal to both $\mathbf{m}_i$ and $\mathbf{m}_j$. Then, we can only obtain the projection $\hat{\mathbf{u}}^T J_{ij} \hat{\mathbf{u}}$ with a single TB2J calculation. The latter can be written as

$\hat{\mathbf{u}}^T J_{ij} \hat{\mathbf{u}} = \hat{J}_{ij}^{xx} u_x^2 + \hat{J}_{ij}^{yy} u_y^2 + \hat{J}_{ij}^{zz} u_z^2 + 2\hat{J}_{ij}^{xy} u_x u_y + 2\hat{J}_{ij}^{yz} u_y u_z + 2\hat{J}_{ij}^{zx} u_z u_x$,

where we considered $J_{ij}$ to be symmetric.

If we perform six calculations such that $\hat{\mathbf{u}}_{ij}$ lies along six different directions, then we obtain six linear equations which can be solved for the six independent unknown components of $J_{ij}$.

When $\mathbf{m}_i$ and $\mathbf{m}_j$ are parallel to each other, then we can use the components of $J_{ij}$ along the plane orthogonal to both $\mathbf{m}_i$ and $\mathbf{m}_j$ . Thus, with six different calculations, we could obtain more than six equations for the six components of $J_{ij}$ . In this case, we can obtain the tensor components by a least squares method.

mailhexu commented 5 months ago

Hello Andres,
@antelmor Thank you!

antelmor commented 5 months ago

Hello @mailhexu.

mailhexu commented 5 months ago

Hello Andres, Thanks! Don't worry about the Wannier-TB2J calculation for the non-collinear cases. For now I will add that the Wannier-TB2J interface is dis-encouraged in the documentation if the spin is not almost collinear. I will check again and merge when the documentation is ready. Best regard, HeXu

antelmor commented 5 months ago

Hello @mailhexu.

I have modified the script to rotate the structures; it can now generate the structures required for a noncollinear system. Moreover, I have created an additional script for the TB2J-SIESTA calculations, where you can globally rotate the magnetic moments contained in the density matrix file of an SIESTA calculation. This is helpful when a user wants to rotate the spins instead of the structure. Finally, I have updated the rotate_and_merge.rst file with the required documentation for all the scripts.

Best, Andres.

mailhexu commented 4 months ago

Thanks!