How to read wavefunction from WAVRCAR using python directly
Moderators: Global Moderator, Moderator
-
- Newbie
- Posts: 3
- Joined: Sun May 23, 2021 12:15 pm
How to read wavefunction from WAVRCAR using python directly
Background: I want to calculate Bott index, which is a topological invariant constructed by wavefunction in real space. After consulting Google, others prefer to mapping the VASP model to a tight binding model in order to use wannier function. As we know, we can get Z2 number(another topological invariant) with the method of wannier charge center.
Question: However, is there any better option rather than mapping to tight binding model? According the formula of bott index(Ref: PhysRevB 98.125130), wavefunction in real space totally decides the bott index. So can we extract wavefunction from VASP directly? For example, with python script. Since WAVECAR is a binary file, I have no idea to deal with it.
Question: However, is there any better option rather than mapping to tight binding model? According the formula of bott index(Ref: PhysRevB 98.125130), wavefunction in real space totally decides the bott index. So can we extract wavefunction from VASP directly? For example, with python script. Since WAVECAR is a binary file, I have no idea to deal with it.
-
- Global Moderator
- Posts: 506
- Joined: Mon Nov 04, 2019 12:41 pm
- Contact:
Re: How to read wavefunction from WAVRCAR using python directly
I believe you can find the answer to this question on some previous posts in the forum:
forum/viewtopic.php?t=7384
In particular, here you find some documentation of an external code that reads the WAVECAR
http://www.andrew.cmu.edu/user/feenstra/wavetrans/
Here are a couple of other external tools that read the VASP WAVECAR file:
https://github.com/band-unfolding/bandup (Fortran)
https://github.com/QijingZheng/VaspBandUnfolding (python)
Mind that these packages are not officially supported by us.
Another alternative would be perhaps to read the UNK file produced for wannier90
wiki/index.php/LWRITE_UNK
forum/viewtopic.php?t=7384
In particular, here you find some documentation of an external code that reads the WAVECAR
http://www.andrew.cmu.edu/user/feenstra/wavetrans/
Here are a couple of other external tools that read the VASP WAVECAR file:
https://github.com/band-unfolding/bandup (Fortran)
https://github.com/QijingZheng/VaspBandUnfolding (python)
Mind that these packages are not officially supported by us.
Another alternative would be perhaps to read the UNK file produced for wannier90
wiki/index.php/LWRITE_UNK
- shaldar
- Newbie
- Posts: 7
- Joined: Tue Oct 20, 2009 5:08 am
- License Nr.: 20-0458
- Location: Kiel, Germany
Re: How to read wavefunction from WAVRCAR using python directly
Maybe you can also look into the routines of irrep https://github.com/stepan-tsirkin/irrep. This can be used to read the wave functions stored by ab-initio codes
-
- Newbie
- Posts: 3
- Joined: Sun May 23, 2021 12:15 pm
Re: How to read wavefunction from WAVRCAR using python directly
Thanks a lot for your help. I had checked the python package listed above. It seems that they can only give electron distribution or electron location function which can be read easily by vesta. However, for calculating the topological number, I need know exactly form of wavefunction, which means, I need a n*1 array under plane wave basis.henrique_miranda wrote: ↑Tue Jun 29, 2021 8:12 pm I believe you can find the answer to this question on some previous posts in the forum:
forum/viewtopic.php?t=7384
In particular, here you find some documentation of an external code that reads the WAVECAR
http://www.andrew.cmu.edu/user/feenstra/wavetrans/
Here are a couple of other external tools that read the VASP WAVECAR file:
https://github.com/band-unfolding/bandup (Fortran)
https://github.com/QijingZheng/VaspBandUnfolding (python)
Mind that these packages are not officially supported by us.
Another alternative would be perhaps to read the UNK file produced for wannier90
wiki/index.php/LWRITE_UNK
-
- Global Moderator
- Posts: 506
- Joined: Mon Nov 04, 2019 12:41 pm
- Contact:
Re: How to read wavefunction from WAVRCAR using python directly
It looked to me like this class is reading the WAVECAR file
https://github.com/QijingZheng/VaspBand ... wfc.py#L61
but maybe I misunderstood it.
If this is not what you need then I would suggest you try reading the information in the UNK files.
https://github.com/QijingZheng/VaspBand ... wfc.py#L61
but maybe I misunderstood it.
If this is not what you need then I would suggest you try reading the information in the UNK files.
-
- Newbie
- Posts: 3
- Joined: Sun May 23, 2021 12:15 pm
Re: How to read wavefunction from WAVRCAR using python directly
Also thanks for your help. Although Irrep cannot solve my problem directly, I also can use it to find irrepresentation of hamiltonian, which is very helpful for building the k dot p model.shaldar wrote: ↑Tue Jun 29, 2021 8:25 pm Maybe you can also look into the routines of irrep https://github.com/stepan-tsirkin/irrep. This can be used to read the wave functions stored by ab-initio codes