kpt_check.py can check a k-point mesh with a given kppvol.
This script supports POSCAR, CONTCAR, and init_struc_data.pkl.
pymatgen library is required.
After generating initial structures, you can try to see how much the value of kppvol should be.
Usage
python3 kpt_check.py -h
or if you put the script in your PATH, you can omit python3
kpt_check.py -h
usage: kpt_check.py [-h][-w][-n NSTRUC] infile kppvol
positional arguments:
infile input file: POSCAR, CONTCAR, or init_struc_data.pkl
kppvol kppvol
options:
-h, --help show this help message and exit
-w, --write write KPOINTS
-n NSTRUC, --nstruc NSTRUC
number of structure to check
Example
POSCAR with a Given kppvol
kpt_check.py POSCAR 100
a = 10.689217
b = 10.689217
c = 10.730846
Lattice vector
10.689217 0.000000 0.000000
0.000000 10.689217 0.000000
0.000000 0.000000 10.730846
kppvol: 100k-points: [2, 2, 2]
Write KPOINTS File
You can generate a KPOINTS file using -w option.
kpt_check.py -w POSCAR 100
$ cat KPOINTS
pymatgen 4.7.6+ generated KPOINTS with grid density =607 / atom
0Monkhorst
222
Check K-Point Meshes for init_struc_data.pkl
In checking k-point meshes for init_struc_data.pkl, first five structures are automatically checked in the default setting.
You can change the number of structures using -n option.