Calculation
- class emmet.core.vasp.calculation.Calculation(**data)
Bases:
CalculationBaseModelFull VASP calculation inputs and outputs.
- Parameters:
dir_name (str | None)
vasp_version (str | None)
has_vasp_completed (Annotated[TaskState | None, BeforeValidator(func=~emmet.core.vasp.calculation.<lambda>, json_schema_input_type=PydanticUndefined)])
input (CalculationInput | None)
output (CalculationOutput | None)
completed_at (str | None)
task_name (str | None)
output_file_paths (Annotated[dict[str, str] | None, BeforeValidator(func=~emmet.core.types.typing._dict_items_zipper, json_schema_input_type=PydanticUndefined)])
bader (BaderAnalysis | None)
ddec6 (Annotated[dict[str, Any] | None, BeforeValidator(func=~emmet.core.types.typing._deser_json_like, json_schema_input_type=PydanticUndefined), WrapSerializer(func=~emmet.core.types.typing._ser_json_like, return_type=PydanticUndefined, when_used=always)])
run_type (RunType | None)
task_type (TaskType | None)
calc_type (CalcType | None)
- classmethod from_vasp_files(dir_name, task_name, vasprun_file, outcar_file, contcar_file, volumetric_files=None, elph_poscars=None, oszicar_file=None, potcar_spec_file=None, parse_dos=False, parse_bandstructure=False, average_locpot=True, run_bader=False, run_ddec6=False, strip_bandstructure_projections=False, strip_dos_projections=False, store_volumetric_data=None, store_trajectory=StoreTrajectoryOption.NO, vasprun_kwargs=None, use_emmet_models=SETTINGS.USE_EMMET_MODELS)
Create a VASP calculation document from a directory and file paths.
- Return type:
tuple[Calculation,dict[VaspObject,ChgcarLike] |dict[VaspObject,VolumetricData]]- Parameters:
dir_name (Path | str)
task_name (str)
vasprun_file (Path | str)
outcar_file (Path | str)
contcar_file (Path | str)
volumetric_files (list[Path] | None)
elph_poscars (list[Path] | None)
oszicar_file (Path | str | None)
potcar_spec_file (Path | str | None)
parse_dos (str | bool)
parse_bandstructure (str | bool)
average_locpot (bool)
run_bader (bool)
run_ddec6 (bool | str)
strip_bandstructure_projections (bool)
strip_dos_projections (bool)
store_volumetric_data (tuple[str] | None)
store_trajectory (StoreTrajectoryOption | str)
vasprun_kwargs (dict | None)
use_emmet_models (bool)
Parameters
- dir_name
The directory containing the calculation outputs.
- task_name
The task name.
- vasprun_file
Path to the vasprun.xml file.
- outcar_file
Path to the OUTCAR file.
- contcar_file
Path to the CONTCAR file
- volumetric_files
Path to volumetric files.
- elph_poscars
Path to displaced electron-phonon coupling POSCAR files generated using
PHON_LMC = True- oszicar_file
Path to the OSZICAR file
- potcar_spec_filePath | str | None = None
Path to a POTCAR.spec file. Used in rehydration of a calculation from archived data, where the original POTCAR is not available.
- parse_dos
Whether to parse the DOS. Can be:
“auto”: Only parse DOS if there are no ionic steps (NSW = 0).
True: Always parse DOS.
False: Never parse DOS.
- parse_bandstructure
How to parse the bandstructure. Can be:
“auto”: Parse the bandstructure with projections for NSCF calculations and decide automatically if it’s line or uniform mode.
“line”: Parse the bandstructure as a line mode calculation with projections
True: Parse the bandstructure as a uniform calculation with projections .
False: Parse the band structure without projects and just store vbm, cbm, band_gap, is_metal and efermi rather than the full band structure object.
- average_locpot
Whether to store the average of the LOCPOT along the crystal axes.
- run_baderbool = False
Whether to run bader on the charge density.
- run_ddec6bool or str = False
Whether to run DDEC6 on the charge density. If a string, it’s interpreted as the path to the atomic densities directory. Can also be set via the DDEC6_ATOMIC_DENSITIES_DIR environment variable. The files are available at https://sourceforge.net/projects/ddec/files.
- strip_dos_projections
Whether to strip the element and site projections from the density of states. This can help reduce the size of DOS objects in systems with many atoms.
- strip_bandstructure_projections
Whether to strip the element and site projections from the band structure. This can help reduce the size of DOS objects in systems with many atoms.
- store_volumetric_data
Which volumetric files to store.
- store_trajectory
Whether to store the ionic steps in a pymatgen Trajectory object and the amount of data to store from the ionic_steps. Can be: - FULL: Store the Trajectory. All the properties from the ionic_steps
are stored in the frame_properties except for the Structure, to avoid redundancy.
PARTIAL: Store the Trajectory. All the properties from the ionic_steps are stored in the frame_properties except from Structure and ElectronicStep.
NO: Trajectory is not Stored.
If not NO, :obj:’.CalculationOutput.ionic_steps’ is set to None to reduce duplicating information.
- vasprun_kwargs
Additional keyword arguments that will be passed to the Vasprun init.
- use_emmet_modelsbool = True
Whether to store VASP objects as emmet-core models (True, default) or as pymatgen models (False)
Returns
- Calculation
A VASP calculation document.
- classmethod from_vasprun(path, task_name='Unknown vapsrun.xml', vasprun_kwargs=None)
Create a VASP calculation document from a directory and file paths.
- Return type:
Self- Parameters:
path (Path | str)
task_name (str)
vasprun_kwargs (dict | None)
Parameters
- path
Path to the vasprun.xml file.
- task_name
The task name.
- vasprun_kwargs
Additional keyword arguments that will be passed to the Vasprun init.
Returns
- Calculation
A VASP calculation document.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].