Basic functions in mcuΒΆ

You can use the code by either writing a simple python script.

$ python mymcu.py

or work interactively in python environment (I prefer this way):

$ python

Compute bandgap and Fermi level:

mcu.VASP works with vasprun.xml and OUTCAR (optional). OUTCAR is only used in case Fermi level cannot be read from vasprun.xml

1
2
3
4
import mcu
mymcu = mcu.VASP()    # Define an mcu object
mymcu.get_bandgap()   # Get the bandgap
mymcu.efermi          # Get Fermi level

WAVEDER and WAVEDERF file can be read from mcu

1
2
3
import mcu
cder, nodesn_i_dielectric_function, wplasmon = mcu.read_WAVEDER(waveder = 'WAVEDER')
cder = mcu.read_WAVEDERF(wavederf = 'WAVEDERF')

Generate k-mesh list from a k-path

Providing a high symmetric k-point coordinates and labels (can be get from BCS), mcu can generate KPOINTS file following a k-path. This k-mesh is used to compute band structure in the unconventional way (e.g. hydrib functional). You need to copy the k-mesh (for SCF) from IBZKPT file to the KPOINTS file generated by mcu.

1
2
3
4
5
6
7
8
9
import mcu
kpath ='''
Y 0.5 0.0 0.0
G 0.0 0.0 0.0
X 0.0 0.5 0.0
R 0.5 0.5 0.0
Y-G-R-X-G
'''
kmesh = mcu.make_KPOINTS(kpath, npoint=10)