mxene.prepare package¶
Submodules¶
mxene.prepare.conf_files module¶
This file is used to generated vasp input file (INCAR, run script) Custom modifications are recommended.
- mxene.prepare.conf_files.cmd_sys(cmds)¶
- mxene.prepare.conf_files.write_batch()¶
mxene.prepare.pre_kpoints module¶
mxene.prepare.pre_potcar module¶
############## Usage 1 ###################
sym_potcar_map = check_potcar(potpath=r”POT-database”) potcar = get_potcar(poscar, sym_potcar_map=sym_potcar_map)
############## Usage 2 (Avoid repeated calls) ###################
sym_potcar_map = check_potcar(potpath=r”POT-database”)
@functools.lru_cache(200) def get_potcar_lru(sym):
return Potcar(sym, sym_potcar_map=sym_potcar_map)
potcar = get_potcar_lru(tuple(poscar.site_symbols))
- mxene.prepare.pre_potcar.check_potcar(potpath)¶
Check and get the potcar file. The potcar file name should start from element such as ‘Ag-POSCAR’,’Ag’,’Ag_sl’.
- mxene.prepare.pre_potcar.get_potcar(poscar: Union[Poscar, Structure], sym_potcar_map: dict)¶
Read from sym_potcar_map according poscar message.
mxene.prepare.vaspinput module¶
- class mxene.prepare.vaspinput.MXVaspInput(incar, kpoints, poscar, potcar, optional_files=None, **kwargs)¶
Bases:
VaspInputClass to contain a set of vasp input objects corresponding to a run.
- Parameters:
incar – Incar object.
kpoints – Kpoints object.
poscar – Poscar object.
potcar – Potcar object.
optional_files – Other input files supplied as a dict of { filename: object}. The object should follow standard pymatgen conventions in implementing as_dict() and from_dict method.
- static from_directory(input_dir, optional_files=None, structure_file='CONTCAR')¶
Read in a set of VASP input from a directory. Note that only the standard INCAR, POSCAR, POTCAR and KPOINTS files are read unless optional_filenames is specified.
- Parameters:
input_dir (str) – Directory to read VASP input from.
optional_files (dict) – Optional files to read in as well as a dict of {filename: Object type}. Object type must have a static method from_file.
- write_input(output_dir='auto', make_dir_if_not_present=True)¶
Write VASP inputs to a directory.
- Parameters:
output_dir (str) – Directory to write to. Defaults to current directory (“.”).
make_dir_if_not_present (bool) – Create the directory if not present. Defaults to True.