pymatgen
pymatgen copied to clipboard
[WIP] Change MP input sets
Follow-up to #3322.
- Change
LMAXMIXto 6 for all MP input sets - Change
LREALtoFalsefor MPRelaxSet and MPScanRelaxSet - add logic to set
EDIFF = min(1e-4, NSITES * EDIFF_PER_ATOM)as per @esoteric-ephemera
TODO:
- add logic for setting
ISMEAR,SIGMA, andKPOINTS/KSPACINGbased on bandgap. Are we considering changing from KPOINTS to KSPACING like in the r2SCANRelaxSet? - Add a
bandgap.setterlike in https://github.com/materialsproject/pymatgen/blob/15dc77da508c6824a2e7cc41e983f797c64815c4/pymatgen/io/vasp/sets.py#L397 This would enable bandgap to be set later in the same way as Structures (UPDATE: @utf said to leave this detail out of this PR, as he will address it in a future PR.)
@janosh @munrojm @esoteric-ephemera
What should the new logic be for setting ISMEAR/SIGMA/KPOINTS? @esoteric-ephemera
Maybe something like this?
if self.bandgap == None:
self._config_dict["INCAR"].update({"ISMEAR": 0, "SIGMA": 0.05})
self._config_dict["KPOINTS"]["reciprocal_density"] = 200 #kpoint density for metals (higher)
elif self.bandgap < 1e-4:
self._config_dict["INCAR"].update({"ISMEAR": 1, "SIGMA": 0.2})
self._config_dict["KPOINTS"]["reciprocal_density"] = 200 #kpoint density for metals (higher)
else:
self._config_dict["INCAR"].update({"ISMEAR": 0, "SIGMA": 0.05})
self._config_dict["KPOINTS"]["reciprocal_density"] = 64 #kpoint density for nonmetals (lower)
Do we want to change the input sets in place or create new versions? I think new versions are better.
Just change the existing sets.
I agree w/ changing existing sets. Otherwise we would have >10 different versions of MPRelaxSet
We also have 377 versions of pymatgen.