casm.vasp.Relax
- class casm.vasp.Relax(calcdir=None, settings=None)[source]
The Relax class contains functions for setting up, executing, and parsing a VASP relaxation.
The relaxation is initialized in a directory containing VASP input files, called ‘calcdir’. It then creates the following directory structure: …/calcdir/
run.0/ run.1/ … run.final/
‘run.i’ directories are only created when ready. ‘run.final’ is a final constant volume run {“ISIF”:2, “ISMEAR”:-5, “NSW”:0, “IBRION”:-1}.
- Contains:
self.calcdir (…/relax) self.rundir (list of …/relax/run.i) self.finaldir (…/relax/run.final) self.subdir (adds to path of run.i for subdirectory runs)
Construct a VASP relaxation job object.
- Args:
relaxdir: path to vasp relaxation directory settings: dictionary-like object containing settings, or if None, it reads
the json file: …/calcdir/relax.json
- possible settings keys are:
- used by casm.vasp.run() function:
“ncpus”: number of ncpus to run mpi on “npar” or “ncore”: number of ways to parallelize “kpar”: number of ways to parallelize k-points “vasp_cmd”: (default, see casm.vasp.run) shell command to execute vasp, or None to use default mpirun “strict_kpoint”: force strict copying of KPOINTS file, otherwise kpoints are scaled based on supercell size
- used by not_converging():
“run_limit”: (default 10) maximum number of runs to allow before setting status to “not_converging”
- __init__(calcdir=None, settings=None)[source]
Construct a VASP relaxation job object.
- Args:
relaxdir: path to vasp relaxation directory settings: dictionary-like object containing settings, or if None, it reads
the json file: …/calcdir/relax.json
- possible settings keys are:
- used by casm.vasp.run() function:
“ncpus”: number of ncpus to run mpi on “npar” or “ncore”: number of ways to parallelize “kpar”: number of ways to parallelize k-points “vasp_cmd”: (default, see casm.vasp.run) shell command to execute vasp, or None to use default mpirun “strict_kpoint”: force strict copying of KPOINTS file, otherwise kpoints are scaled based on supercell size
- used by not_converging():
“run_limit”: (default 10) maximum number of runs to allow before setting status to “not_converging”
Methods
__init__
([calcdir, settings])Construct a VASP relaxation job object.
add_errdir
()Move run.i to run.i_err.j directory
add_rundir
()Make a new run.i directory
complete
()Check if the VASP relaxation is complete.
converged
()Check if configuration is relaxed.
not_converging
()Check if configuration is not converging.
run
()Perform a series of vasp jobs to relax a structure.
setup
(initdir, settings)mv all files and directories (besides initdir) into initdir
status
()Determine the status of a vasp relaxation series of runs.
update_errdir
()Find all .../config/vasp/relax/run.i_err.j directories, store paths in self.errdir list
update_rundir
()Find all .../config/vasp/relax/run.i directories, store paths in self.rundir list