pymatgen icon indicating copy to clipboard operation
pymatgen copied to clipboard

[WIP] Change MP input sets

Open matthewkuner opened this issue 2 years ago • 5 comments

Follow-up to #3322.

  • Change LMAXMIX to 6 for all MP input sets
  • Change LREAL to False for 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, and KPOINTS/KSPACING based on bandgap. Are we considering changing from KPOINTS to KSPACING like in the r2SCANRelaxSet?
  • Add a bandgap.setter like 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

matthewkuner avatar Oct 12 '23 20:10 matthewkuner

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)

matthewkuner avatar Oct 12 '23 20:10 matthewkuner

Do we want to change the input sets in place or create new versions? I think new versions are better.

janosh avatar Oct 12 '23 21:10 janosh

Just change the existing sets.

shyuep avatar Oct 12 '23 21:10 shyuep

I agree w/ changing existing sets. Otherwise we would have >10 different versions of MPRelaxSet

matthewkuner avatar Oct 12 '23 21:10 matthewkuner

We also have 377 versions of pymatgen.

janosh avatar Oct 12 '23 21:10 janosh