QijingZheng / VaspBandUnfolding

A collection of python scripts that deal with VASP outpts, e.g. WAVECAR, POTCAR etc.
198 stars 89 forks source link

How can I obtain the inverse participation ratio (IPR) value from the WAVECAR of vasp? #15

Open wxsongsh opened 3 years ago

wxsongsh commented 3 years ago

Dear Prof. Zheng,

I want to use this code to get the IPR from the WAVECAR. What python script can I use?

I read the vaspwfc.py. I use the following script to obtain the ipr.npy file.

#!/usr/bin/env python

import numpy as np
from vaspwfc import vaspwfc

xx = vaspwfc('./WAVECAR')
ipr = xx.inverse_participation_ratio()
a=np.load('ipr.npy')
a.shape      !a is a (1, 1, 672, 3) 4-D array.

What is the meaning of the 4-D array, particularly the last dimension? (nspin, NKPTS, NBANDS, ???)

I want to plot the "energy(x) vs IPR(y)" curlve. How can I deal with the data in ipr.npy?

Thanks!