Comments (3)
Thanks for raising @DanielYang59, this can be improved and I will reply about proposed changes in #3534 . However, I want to make a note here for posterity. Typically a user should call process_entries
rather than get_adjustments
to apply corrections, e.g.:
from pymatgen.io.vasp import Vasprun
from pymatgen.entries.compatibility import MaterialsProjectCompatibility
vasprun1 = Vasprun("data/mp_1595_vasprun.xml")
entry1 = vasprun1.get_computed_entry(inc_structure=True)
compatibility = MaterialsProjectCompatibility()
compatibility.process_entries(entry1)
This allows the compatibility class to decide what to do with the entry in the event of a CompatibilityError
(which can be set via a kwarg to process_entries
def process_entries(
self,
entries: AnyComputedEntry | list[AnyComputedEntry],
clean: bool = True,
verbose: bool = False,
inplace: bool = True,
on_error: Literal["ignore", "warn", "raise"] = "ignore",
) -> list[AnyComputedEntry]:
"""Process a sequence of entries with the chosen Compatibility scheme.
Warning: This method changes entries in place! All changes can be undone and original entries
restored by setting entry.energy_adjustments = [].
Args:
entries (AnyComputedEntry | list[AnyComputedEntry]): A sequence of
Computed(Structure)Entry objects.
clean (bool): Whether to remove any previously-applied energy adjustments.
If True, all EnergyAdjustment are removed prior to processing the Entry.
Defaults to True.
verbose (bool): Whether to display progress bar for processing multiple entries.
Defaults to False.
inplace (bool): Whether to adjust input entries in place. Defaults to True.
on_error ('ignore' | 'warn' | 'raise'): What to do when get_adjustments(entry)
raises CompatibilityError. Defaults to 'ignore'.
Returns:
list[AnyComputedEntry]: Adjusted entries. Entries in the original list incompatible with
chosen correction scheme are excluded from the returned list.
"""
from pymatgen.
It appears to me that the get_correction
method under pymatgen.entries.compatibility
explicitly requires the run_type
to be in {"GGA", "GGA+U"}
, which in this case the run_type
is PBE
. However:
pymatgen/pymatgen/io/vasp/outputs.py
Lines 612 to 630 in 1dd74a8
I'm not quite familiar with the definations in Pymatgen but it seems PBE
should be a subset of GGA
? Is this a compatibility issue?
from pymatgen.
Also noticed the handling of non-GGA run_type
is inconsistent. In the get_correction
method of pymatgen.entries.compatibility
module there is a duplicate check of run_type
:
pymatgen/pymatgen/entries/compatibility.py
Lines 468 to 482 in 1dd74a8
from pymatgen.
Related Issues (20)
- ChemEnv unable to identify the environments of supercell HOT 7
- Atom labels in CIF file are silently rewritten by CifWriter HOT 6
- Collect possible issues might come with Python 3.12
- Incompatibility Issue with ALGO Parameter in Incar and Vasprun Classes
- Periodic boundary condition is not considered in the interpolator of VolumetricData HOT 1
- [Dev] `datetime.datetime.utcnow()` deprecated and replacement breaks `strptime`
- Read in POSCAR with `Structure.from_file` seems slow? HOT 3
- `get_points_in_sphere()` has inconsistent return types HOT 1
- Monthly issue metrics report
- StructureMatcher might be wrong when used to check if two structures are equal. HOT 3
- Error in CP2K output parser structure parsing
- Bug in `core.composition` comparison
- Argument `check_occu` is not working as intended (in `_get_structure` and `parse_structures`) HOT 15
- Check inputs provided to MPRester functions
- `.as_dict()` method on `VaspInput` causes an `AttributeError`
- A minor document error in `POTCAR Setup`.
- Incorrect letter cases for memory in `core.units`
- GaussianOutput.read_excitation_energies() method for obtaining TDDFT results ([(energie (eV), lambda (nm), oscillatory strength), ... ]) error
- Adapt LobsterSets to latest potcars
- Support parsing of NBANDS from a VASP OUTCAR file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pymatgen.