2015-11-20 18:54:51 +01:00
|
|
|
r"""
|
|
|
|
vasp.main
|
|
|
|
=========
|
2015-02-20 20:00:50 +01:00
|
|
|
|
2015-11-20 18:54:51 +01:00
|
|
|
Main script of PLOVasp.
|
|
|
|
|
|
|
|
Runs routines in proper order to generate and store PLOs.
|
|
|
|
|
|
|
|
Usage: python main.py <conf-file> [<path-to-vasp-calcultaion>]
|
|
|
|
"""
|
2015-02-20 20:00:50 +01:00
|
|
|
import sys
|
|
|
|
import vaspio
|
|
|
|
from inpconf import ConfigParameters
|
2015-03-01 11:30:24 +01:00
|
|
|
from elstruct import ElectronicStructure
|
2015-08-24 19:34:48 +02:00
|
|
|
from plotools import generate_plo, output_as_text
|
2015-02-20 20:00:50 +01:00
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
narg = len(sys.argv)
|
|
|
|
if narg < 2:
|
|
|
|
raise SystemExit(" Usage: python main.py <conf-file> [<path-to-vasp-calcultaion>]")
|
|
|
|
else:
|
|
|
|
filename = sys.argv[1]
|
|
|
|
if narg > 2:
|
|
|
|
vasp_dir = sys.argv[2]
|
|
|
|
if vasp_dir[-1] != '/':
|
|
|
|
vasp_dir += '/'
|
|
|
|
else:
|
|
|
|
vasp_dir = './'
|
|
|
|
|
2015-11-20 18:54:51 +01:00
|
|
|
# Prepare input-file parameters
|
2015-03-01 11:30:24 +01:00
|
|
|
pars = ConfigParameters(filename, verbosity=0)
|
|
|
|
pars.parse_input()
|
2015-11-20 18:54:51 +01:00
|
|
|
|
|
|
|
# Read VASP data
|
2015-02-20 20:00:50 +01:00
|
|
|
vasp_data = vaspio.VaspData(vasp_dir)
|
2015-03-01 11:30:24 +01:00
|
|
|
el_struct = ElectronicStructure(vasp_data)
|
2015-10-16 16:27:49 +02:00
|
|
|
el_struct.debug_density_matrix()
|
2015-11-20 18:54:51 +01:00
|
|
|
|
|
|
|
# Generate and store PLOs
|
2015-08-24 19:34:48 +02:00
|
|
|
pshells, pgroups = generate_plo(pars, el_struct)
|
2015-08-13 12:29:41 +02:00
|
|
|
output_as_text(pars, el_struct, pshells, pgroups)
|