/Wannier_Hamiltonian_symmetrization

Restore the symmetry of Wannier Hamiltonian generated by Wannier90

Primary LanguagePython

New feature: if you put an empty file "write_symmop.flag" in the symmetrization folder,
then representation matrices of all the space group operations in the wannier basis
will be generated. This would be helful to write down Mirror matrix to calculation, e.g.
mirror Chern number.

Copyright: Changming Yue, Institute of Physics, Chinese Academy of Sciences.
Email:     yuechangming8@gmail.com

This code is also a toolkit integrated to WannierTools
https://github.com/quanshengwu/wannier_tools/


A tool for symmetrization of non-magnetic wannier90_hr.dat. 

Generally there are some violations to symmetry of wannier Hamiltonian due to 
numerical errors, bad disentanglements, asymmetry of Wigner-Sceitz cell. The tool 
can find and add all missing hopping blocks (atom-to-atom). We use "spglib" to find
the space group symmetry and use symbolic python tool "sympy" to calculate all the 
rotation matrix of s, p, d, f or t2g orbitals under rotations. Finally, the space-
Group symmetry is restored by forcing symmetrization{Eq.(5) in arxiv:1805.12148)}.

!!!
HOWEVER, my tool only works well when your Hamiltonian respects the symmetry 
to 80% degree, maybe. If not the case, the results will give you a wrong dispersion.
!!!

Thanks to the constructive discussions with Xi Dai, Yilin Wang, Qiunan Xu, Yufeng Xu, 
Zhida Song and Quansheng Wu.

Feature:
1, Support orbitals are s, p, d, f and t2g, arranged as in the manual of wannier90. 

2, Given poscar.in we can get the corresponding space group and all its operations.

3, Retore Hermitian and time-reversal symmetry(we suppose it).

4, Restore all space group symmetries (non-magnetic) one Hamiltonian should have 
    within about 1.0E-10 precsion.

-------------------------------------------------------------------------------------
The dependencies of my codes are shown in INSTALL file. You have to do that first
before running the examples and your own cases.
-------------------------------------------------------------------------------------

Examples:
./eg_spinfull_TaAs: symmetrization of spinfull TaAs

To Run your own case:
Copy wannier90_hr.dat to your new directory. Copy wann.in poscar.in and locaxis.in from eg_*/ also
to your new directory. Change wann.in and locaxis.in according to the comments given in these
two input files and wannier90.win/wout. Prepare poscar.in according to the comments and POSCAR. 

Finally, you run related symmetry python routines according to own situation(soc or no soc). Please
carefully read the readme files in these two examples. You will know how to run soon. 


############################ Be ALERT when setting wann.in ########################################
For now my program only supports the case when orbitals of the same atoms are put together instead of
putting speperately in projections. For examples, projections as the following are not supported: 

atom1:  s p 
atom2:  p d
atom1:  d f 
atom2:  s
...

The supported one looks like
atom1:  d f                (wann.in)
atom1:  s p              (atom 1 d f s p)
atom2:  p d              (atom 2 p d s)
atom2:  s

To check what the actual sequence of wannier orbitals, you can set iprint=3 in your wannier90.win and
(backup your wannier90.wout first) run "/your_wannier90_bin/wannier90.x wannier90" for seconds after 
your wannier projection is finished. You can see in new generated "wannier90.wout" there is a block as
"
                                -----------
                                PROJECTIONS
                                -----------
  
 +----------------------------------------------------------------------------+
 |     Frac. Coord.   l mr  r        z-axis               x-axis          Z/a |
 +----------------------------------------------------------------------------+
...
...

"
, together with your the wannier spread in the backuped wannier90.wout you can get the actual orbitals sequence
in your wannier90_hr.dat.

You can adjust the orbitals sequence of wannier90_hr.dat to the form in which my program supports first
and then do the symmetrization.

Enjoy!

if you do maximum localization, please make sure your orbitals still resemble the symmetry of corresponding
atomic orbitals' symmtry.