CalculationInput
- class emmet.core.vasp.calculation.CalculationInput(**data)
Bases:
CalculationBaseModelDocument defining VASP calculation inputs.
Note that the following fields were formerly top-level fields on InputDoc, but are now properties of CalculationInput:
pseudo_potentials (Potcar) : summary of the POTCARs used in the calculation xc_override (str) : the exchange-correlation functional used if not
the one specified by POTCAR
is_lasph (bool) : how the calculation set LASPH (aspherical corrections) magnetic_moments (list of floats) : on-site magnetic moments
- Parameters:
incar (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)])
kpoints (Annotated[KpointsTypeVar, BeforeValidator(func=~emmet.core.types.pymatgen_types.kpoints_adapter.kpoints_deserializer, json_schema_input_type=PydanticUndefined), WrapSerializer(func=~emmet.core.types.pymatgen_types.kpoints_adapter.kpoints_serializer, return_type=dict[str, Any], when_used=always)] | None)
nkpoints (int | None)
potcar_spec (list[PotcarSpec] | None)
potcar (list[str] | None)
potcar_type (list[str] | None)
parameters (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)])
lattice_rec (Annotated[LatticeTypeVar, BeforeValidator(func=~emmet.core.types.pymatgen_types.lattice_adapter.<lambda>, json_schema_input_type=PydanticUndefined), WrapSerializer(func=~emmet.core.types.pymatgen_types.lattice_adapter.<lambda>, return_type=~emmet.core.types.pymatgen_types.lattice_adapter.MSONableTypedLatticeDict, when_used=always)] | None)
structure (Annotated[StructureTypeVar, BeforeValidator(func=~emmet.core.types.pymatgen_types.structure_adapter.pop_empty_structure_keys, json_schema_input_type=PydanticUndefined), WrapSerializer(func=~emmet.core.types.pymatgen_types.structure_adapter.<lambda>, return_type=~emmet.core.types.pymatgen_types.structure_adapter.TypedStructureDict, when_used=always)] | None)
is_hubbard (bool)
hubbards (Annotated[dict[str, float] | None, BeforeValidator(func=~emmet.core.types.typing._dict_items_zipper, json_schema_input_type=PydanticUndefined)])
- classmethod clean_inputs(config)
Ensure whitespace in parameters and Kpoints are serialized.
- Return type:
Any- Parameters:
config (Any)
NOTE:
A change in VASP introduced whitespace into some parameters, for example <i type=”string” name=”GGA “>PE</I> was observed in VASP 6.4.3. This will lead to an incorrect return value from RunType. This validator will ensure that any already-parsed documents are fixed.
- model_post_init(context, /)
Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.
- Return type:
None- Parameters:
context (Any)
- property poscar: Poscar | None
Return pymatgen object representing the POSCAR file.
- property is_lasph: bool | None
Report if the calculation was run with aspherical corrections.
If self.parameters is populated, returns the value of LASPH from vasprun.xml, or its default value if not set (False).
If self.parameters isn’t populated (vasprun.xml wasn’t parsed), returns None.
- property xc_override: str | None
Report the exchange-correlation functional used.
- property magnetic_moments: list[float] | None
Report initial magnetic moments assigned to each atom.
- classmethod from_vasprun(vasprun, potcar_spec=None)
Create a VASP input document from a Vasprun object.
- Return type:
Self- Parameters:
vasprun (Vasprun)
potcar_spec (list[PotcarSpec] | None)
Parameters
- vasprun
A vasprun object.
- potcar_speclist of dict
If specified, the POTCAR spec to override that of vasprun.xml
Returns
- CalculationInput
The input document.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].