Pymatgen-io-validation is a Python library, currently at version 0.1.2, that extends the pymatgen framework to provide comprehensive I/O validation for electronic structure calculations. It primarily focuses on ensuring VASP calculations are compliant with the stringent standards required for integration with the Materials Project database. The library helps identify discrepancies between a calculation and a provided input set, flags known bugs related to parameter combinations, and performs other critical checks. Its release cadence typically involves minor updates to address dependencies and improve validation logic.
pip install pymatgen-io-validationVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to instantiate `VaspValidator` from a VASP calculation directory and check its validity, reasons for invalidation, and any warnings. The `from_directory` class method automatically parses the necessary VASP input and output files to perform the checks. The `valid`, `reasons`, and `warnings` attributes of the returned `validation_doc` object provide a comprehensive report.
Consult the Materials Project documentation or the pymatgen-io-validation source code (especially the Rationale section in the GitHub README) for detailed parameter requirements. Ensure your VASP input files align with these standards to pass validation.
Ensure your VASP executable version is compatible with the Materials Project standards. Update VASP to a supported version if necessary (e.g., 5.4.4 or above 6.0.0).
Review and reduce the SIGMA parameter in your VASP INCAR file to a more appropriate value. Version 0.0.3 improved the detection logic for this specific issue.
If encountering import errors with related `pymatgen` components, ensure your `pymatgen` installation is recent (>=2022.0.3) and update import statements to explicitly reference subpackages (e.g., `from pymatgen.io.vasp import Poscar` instead of `from pymatgen import Poscar` if such a pattern was ever used).
Modify your INCAR file to include `ADDGRID = False`. This parameter can affect forces, and MP calculations require it to be false for compatibility.
Adjust the `ISIF` parameter in your INCAR file to `-1` (no relaxation), `1` (cell shape and volume fixed), or `2` (cell shape fixed, volume allowed to change).
Install the package using pip: `pip install pymatgen-io-validation`. Ensure your Python environment is active if using a virtual environment.