From d797d8b86091e7dd0adc600cfeb0e7b0474f8d58 Mon Sep 17 00:00:00 2001 From: esoteric-ephemera Date: Mon, 8 Jul 2024 17:16:15 -0700 Subject: [PATCH 01/18] add new MP24 input sets --- src/pymatgen/io/vasp/MP24RelaxSet.yaml | 129 ++++++++++++++++++++ src/pymatgen/io/vasp/sets.py | 156 ++++++++++++++++++++++++- 2 files changed, 281 insertions(+), 4 deletions(-) create mode 100644 src/pymatgen/io/vasp/MP24RelaxSet.yaml diff --git a/src/pymatgen/io/vasp/MP24RelaxSet.yaml b/src/pymatgen/io/vasp/MP24RelaxSet.yaml new file mode 100644 index 00000000000..97287100a3f --- /dev/null +++ b/src/pymatgen/io/vasp/MP24RelaxSet.yaml @@ -0,0 +1,129 @@ +# Default VASP settings for calculations in the Materials Project +# using the Regularized-Restored Strongly Constrained and Appropriately +# Normed functional (r2SCAN). +PARENT: VASPIncarBase +INCAR: + ALGO: Normal + EDIFF: 1.e-05 + EDIFFG: -0.02 + ENAUG: 1360 + ENCUT: 680 + IBRION: 2 + ISIF: 3 + ISMEAR: 0 # included to have some reasonable default + ISPIN: 2 + KSPACING: 0.22 # included to have some reasonable default + LAECHG: True + LASPH: True + LCHARG: True + LELF: False # LELF = True restricts calculation to KPAR = 1 + LMAXMIX: 6 # per benchmark + LMIXTAU: True + LORBIT: 11 + LREAL: False # per benchmark + LVTOT: True + LWAVE: False + METAGGA: R2SCAN + NELM: 200 + NSW: 99 + PREC: Accurate + SIGMA: 0.05 # included to have some reasonable default +POTCAR_FUNCTIONAL: PBE_64 +POTCAR: + Ac: Ac + Ag: Ag + Al: Al + Am: Am + Ar: Ar + As: As + At: At + Au: Au + B: B + Ba: Ba_sv_GW + Be: Be_sv + Bi: Bi + Br: Br + C: C + Ca: Ca_sv + Cd: Cd + Ce: Ce + Cf: Cf + Cl: Cl + Cm: Cm + Co: Co + Cr: Cr_pv + Cs: Cs_sv + Cu: Cu_pv + Dy: Dy_h + Er: Er_h + Eu: Eu + F: F + Fe: Fe_pv + Fr: Fr_sv + Ga: Ga_d + Gd: Gd + Ge: Ge_d + H: H + He: He + Hf: Hf_pv + Hg: Hg + Ho: Ho_h + I: I + In: In_d + Ir: Ir + K: K_sv + Kr: Kr + La: La + Li: Li_sv + Lu: Lu_3 + Mg: Mg_pv + Mn: Mn_pv + Mo: Mo_pv + N: N + Na: Na_pv + Nb: Nb_pv + Nd: Nd_h + Ne: Ne + Ni: Ni_pv + Np: Np + O: O + Os: Os_pv + P: P + Pa: Pa + Pb: Pb_d + Pd: Pd + Pm: Pm_h + Po: Po_d + Pr: Pr_h + Pt: Pt + Pu: Pu + Ra: Ra_sv + Rb: Rb_sv + Re: Re_pv + Rh: Rh_pv + Rn: Rn + Ru: Ru_pv + S: S + Sb: Sb + Sc: Sc_sv + Se: Se + Si: Si + Sm: Sm_h + Sn: Sn_d + Sr: Sr_sv + Ta: Ta_pv + Tb: Tb_h + Tc: Tc_pv + Te: Te + Th: Th + Ti: Ti_pv + Tl: Tl_d + Tm: Tm_h + U: U + V: V_pv + W: W_sv + Xe: Xe_GW + Y: Y_sv + Yb: Yb_h + Zn: Zn + Zr: Zr_sv diff --git a/src/pymatgen/io/vasp/sets.py b/src/pymatgen/io/vasp/sets.py index 5bc09f6d46b..8cc820a340d 100644 --- a/src/pymatgen/io/vasp/sets.py +++ b/src/pymatgen/io/vasp/sets.py @@ -45,6 +45,7 @@ from monty.dev import deprecated from monty.json import MSONable from monty.serialization import loadfn + from pymatgen.analysis.structure_matcher import StructureMatcher from pymatgen.core import Element, PeriodicSite, SiteCollection, Species, Structure from pymatgen.io.core import InputGenerator @@ -58,9 +59,10 @@ if TYPE_CHECKING: from typing import Callable, Literal, Union - from pymatgen.util.typing import PathLike, Tuple3Ints, Vector3D from typing_extensions import Self + from pymatgen.util.typing import PathLike, Tuple3Ints, Vector3D + UserPotcarFunctional = Union[ Literal["PBE", "PBE_52", "PBE_54", "LDA", "LDA_52", "LDA_54", "PW91", "LDA_US", "PW91_US"], None ] @@ -69,7 +71,10 @@ def _load_yaml_config(fname): - config = loadfn(f"{MODULE_DIR}/{fname}.yaml") + fname = f"{MODULE_DIR}/{fname}" + if not fname.endswith(".yaml"): + fname += ".yaml" + config = loadfn(fname) if "PARENT" in config: parent_config = _load_yaml_config(config["PARENT"]) for k, v in parent_config.items(): @@ -587,7 +592,11 @@ def incar(self) -> Incar: elif key == "KSPACING" and self.auto_kspacing: # Default to metal if no prev calc available bandgap = 0 if self.bandgap is None else self.bandgap - incar[key] = auto_kspacing(bandgap, self.bandgap_tol) + if new_kspacing := getattr(self, "kspacing_update", None): + # allow custom KSPACING update + incar[key] = new_kspacing + else: + incar[key] = auto_kspacing(bandgap, self.bandgap_tol) else: incar[key] = setting @@ -1247,7 +1256,7 @@ class MPRelaxSet(VaspInputSet): @due.dcite( Doi("10.1021/acs.jpclett.0c02405"), - description="AccurAccurate and Numerically Efficient r2SCAN Meta-Generalized Gradient Approximation", + description="Accurate and Numerically Efficient r2SCAN Meta-Generalized Gradient Approximation", ) @due.dcite( Doi("10.1103/PhysRevLett.115.036402"), @@ -1325,6 +1334,104 @@ def __post_init__(self) -> None: self._config_dict["INCAR"].pop(k, None) +@dataclass +class MP24RelaxSet(VaspInputSet): + """ + Materials Project relax set after a 2023-2024 benchmarking effort. + + By default, this uses r2SCAN as the xc functional. + """ + + xc_functional: Literal["R2SCAN", "PBE", "PBESOL"] = "R2SCAN" + dispersion: Literal["rVV10", "D4"] | None = None + CONFIG = _load_yaml_config("MP24RelaxSet") + auto_ismear: bool = True + + def __post_init__(self) -> None: + super().__post_init__() + + to_func = { + "R2SCAN": "R2SCAN", + "PBE": "PE", + "PBESOL": "PS", + } + + xc_func = self.xc_functional.upper() + config_updates = {} + if xc_func == "R2SCAN": + config_updates = {"METAGGA": to_func[xc_func], "GGA": None} + elif xc_func in ["PBE", "PBESOL"]: + config_updates = {"METAGGA": None, "GGA": to_func[xc_func]} + else: + raise ValueError(f"Unknown XC functional {self.xc_functional}!") + + if self.dispersion == "rVV10": + if xc_func == "R2SCAN": + config_updates = {"BPARAM": 11.95, "CPARAM": 0.0093} + else: + raise ValueError("Use of rVV10 with functionals other than r2 / SCAN is not currently supported.") + + elif self.dispersion == "D4": + d4_pars = { + "R2SCAN": { + "S6": 1.0, + "S8": 0.60187490, + "A1": 0.51559235, + "A2": 5.77342911, + }, + "PBE": { + "S6": 1.0, + "S8": 0.95948085, + "A1": 0.38574991, + "A2": 4.80688534, + }, + "PBESOL": { + "S6": 1.0, + "S8": 1.71885698, + "A1": 0.47901421, + "A2": 5.96771589, + }, + } + config_updates = {f"VDW_{k}": v for k, v in d4_pars[xc_func].items()} + + if len(config_updates) > 0: + self._config_dict["INCAR"].update(config_updates) + + @staticmethod + def _sigmoid_interp( + bg, min_dk: float = 0.22, max_dk: float = 0.5, shape: float = 0.43, center: float = 4.15, fac: float = 12.0 + ): + delta = shape * (bg - center) + sigmoid = delta / (1.0 + delta**fac) ** (1.0 / fac) + return 0.5 * (min_dk + max_dk + (max_dk - min_dk) * sigmoid) + + def _multi_sigmoid_interp( + self, + bandgap: float, + dks: tuple[float, ...] = (0.22, 0.44, 0.5), + shape: tuple[float, ...] = (1.1, 2.5), + center: tuple[float, ...] = (2.35, 6.1), + fac: tuple[float, ...] = (8, 8), + bg_cut: tuple[float, ...] = (4.5,), + ): + for icut, cutpt in enumerate(bg_cut): + min_bd = self.bandgap_tol if (icut == 0) else cutpt + if min_bd <= bandgap < cutpt: + return self._sigmoid_interp( + bandgap, + min_dk=dks[icut], + max_dk=dks[icut + 1], + shape=shape[icut], + center=center[icut], + fac=fac[icut], + ) + return None + + @property + def kspacing_update(self): + return self._multi_sigmoid_interp(self.bandgap) + + @dataclass class MPMetalRelaxSet(VaspInputSet): """ @@ -1518,6 +1625,7 @@ class MPScanStaticSet(MPScanRelaxSet): def incar_updates(self) -> dict[str, Any]: """Updates to the INCAR config for this calculation type.""" updates: dict[str, Any] = { + "ALGO": "Fast", "LREAL": False, "NSW": 0, "LORBIT": 11, @@ -1537,6 +1645,46 @@ def incar_updates(self) -> dict[str, Any]: return updates +@dataclass +class MP24StaticSet(MP24RelaxSet): + """Create input files for a static calculation using MP24 parameters + + Args: + structure (Structure): Structure from previous run. + bandgap (float): Bandgap of the structure in eV. The bandgap is used to + compute the appropriate k-point density and determine the smearing settings. + lepsilon (bool): Whether to add static dielectric calculation + lcalcpol (bool): Whether to turn on evaluation of the Berry phase approximations + for electronic polarization. + **kwargs: Keywords supported by MP24RelaxSet. + """ + + lepsilon: bool = False + lcalcpol: bool = False + inherit_incar: bool = True + auto_kspacing: bool = True + + @property + def incar_updates(self) -> dict[str, Any]: + """Updates to the INCAR config for this calculation type.""" + updates: dict[str, Any] = { + "NSW": 0, + "LORBIT": 11, + "ISMEAR": -5, + } + + if self.lepsilon: + # LPEAD=T: numerical evaluation of overlap integral prevents + # LRF_COMMUTATOR errors and can lead to better expt. agreement + # but produces slightly different results + updates |= {"IBRION": 8, "LEPSILON": True, "LPEAD": True, "NSW": 1, "NPAR": None} + + if self.lcalcpol: + updates["LCALCPOL"] = True + + return updates + + @dataclass class MPHSEBSSet(VaspInputSet): """Implementation of a VaspInputSet for HSE band structure computations. From 3722874d518d006ebb7262e2049bf8cce800f881 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 10 Jul 2024 16:55:03 +0000 Subject: [PATCH 02/18] pre-commit auto-fixes --- src/pymatgen/io/vasp/sets.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pymatgen/io/vasp/sets.py b/src/pymatgen/io/vasp/sets.py index 8cc820a340d..b2a12e3a1b9 100644 --- a/src/pymatgen/io/vasp/sets.py +++ b/src/pymatgen/io/vasp/sets.py @@ -45,7 +45,6 @@ from monty.dev import deprecated from monty.json import MSONable from monty.serialization import loadfn - from pymatgen.analysis.structure_matcher import StructureMatcher from pymatgen.core import Element, PeriodicSite, SiteCollection, Species, Structure from pymatgen.io.core import InputGenerator @@ -59,9 +58,8 @@ if TYPE_CHECKING: from typing import Callable, Literal, Union - from typing_extensions import Self - from pymatgen.util.typing import PathLike, Tuple3Ints, Vector3D + from typing_extensions import Self UserPotcarFunctional = Union[ Literal["PBE", "PBE_52", "PBE_54", "LDA", "LDA_52", "LDA_54", "PW91", "LDA_US", "PW91_US"], None From 38a33485674b9ddc3e4c6f3bbf94126f697e64bd Mon Sep 17 00:00:00 2001 From: esoteric-ephemera Date: Wed, 10 Jul 2024 09:59:17 -0700 Subject: [PATCH 03/18] typing for config updates --- src/pymatgen/io/vasp/sets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pymatgen/io/vasp/sets.py b/src/pymatgen/io/vasp/sets.py index b2a12e3a1b9..8546068c085 100644 --- a/src/pymatgen/io/vasp/sets.py +++ b/src/pymatgen/io/vasp/sets.py @@ -1355,7 +1355,7 @@ def __post_init__(self) -> None: } xc_func = self.xc_functional.upper() - config_updates = {} + config_updates : dict[str,Any] = {} if xc_func == "R2SCAN": config_updates = {"METAGGA": to_func[xc_func], "GGA": None} elif xc_func in ["PBE", "PBESOL"]: From e40c1292a905e794a772057feb4d81a1fc11b17d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 10 Jul 2024 17:01:02 +0000 Subject: [PATCH 04/18] pre-commit auto-fixes --- src/pymatgen/io/vasp/sets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pymatgen/io/vasp/sets.py b/src/pymatgen/io/vasp/sets.py index 8546068c085..c77b7d22c30 100644 --- a/src/pymatgen/io/vasp/sets.py +++ b/src/pymatgen/io/vasp/sets.py @@ -1355,7 +1355,7 @@ def __post_init__(self) -> None: } xc_func = self.xc_functional.upper() - config_updates : dict[str,Any] = {} + config_updates: dict[str, Any] = {} if xc_func == "R2SCAN": config_updates = {"METAGGA": to_func[xc_func], "GGA": None} elif xc_func in ["PBE", "PBESOL"]: From 3e1daaef3cb1325968ca5ca3b5775591afd3889d Mon Sep 17 00:00:00 2001 From: esoteric-ephemera Date: Wed, 10 Jul 2024 10:10:38 -0700 Subject: [PATCH 05/18] skip json in codespell check --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 62f08e3e08f..812c96db7f7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -32,6 +32,7 @@ repos: - id: codespell stages: [ commit, commit-msg ] exclude_types: [ html ] + args: [--skip="*.json"] additional_dependencies: [ tomli ] # needed to read pyproject.toml below py3.11 - repo: https://github.com/MarcoGorelli/cython-lint From be33d5479630d5e6153c65145b1f3d3cc147e5a7 Mon Sep 17 00:00:00 2001 From: esoteric-ephemera Date: Wed, 10 Jul 2024 10:51:46 -0700 Subject: [PATCH 06/18] still trying to skip codespell json checks --- .pre-commit-config.yaml | 1 - pyproject.toml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 812c96db7f7..62f08e3e08f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -32,7 +32,6 @@ repos: - id: codespell stages: [ commit, commit-msg ] exclude_types: [ html ] - args: [--skip="*.json"] additional_dependencies: [ tomli ] # needed to read pyproject.toml below py3.11 - repo: https://github.com/MarcoGorelli/cython-lint diff --git a/pyproject.toml b/pyproject.toml index 4801a5537f6..c45e9a250d9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -301,7 +301,7 @@ titel,alls,ans,nd,mater,nwo,te,hart,ontop,ist,ot,fo,nax,coo, coul,ser,leary,thre,fase,rute,reson,titels,ges,scalr,strat, struc,hda,nin,ons,pres,kno,loos,lamda,lew,atomate,nempty """ -skip = "pymatgen/analysis/aflow_prototypes.json" +skip = "src/pymatgen/analysis/aflow_prototypes.json" check-filenames = true [tool.pyright] From 2e93006637656da89fa36ffbf9c1ddc2384831b8 Mon Sep 17 00:00:00 2001 From: esoteric-ephemera Date: Thu, 18 Jul 2024 09:33:15 -0700 Subject: [PATCH 07/18] update base PBE 64 pseudopotentials, add hash for MP24 sets to sets --- src/pymatgen/io/vasp/MP24RelaxSet.yaml | 101 +------------------------ src/pymatgen/io/vasp/PBE64Base.yaml | 24 +++--- tests/io/vasp/test_sets.py | 3 +- 3 files changed, 15 insertions(+), 113 deletions(-) diff --git a/src/pymatgen/io/vasp/MP24RelaxSet.yaml b/src/pymatgen/io/vasp/MP24RelaxSet.yaml index 97287100a3f..833268370bf 100644 --- a/src/pymatgen/io/vasp/MP24RelaxSet.yaml +++ b/src/pymatgen/io/vasp/MP24RelaxSet.yaml @@ -1,7 +1,7 @@ # Default VASP settings for calculations in the Materials Project # using the Regularized-Restored Strongly Constrained and Appropriately # Normed functional (r2SCAN). -PARENT: VASPIncarBase +PARENT: PBE64Base INCAR: ALGO: Normal EDIFF: 1.e-05 @@ -28,102 +28,3 @@ INCAR: NSW: 99 PREC: Accurate SIGMA: 0.05 # included to have some reasonable default -POTCAR_FUNCTIONAL: PBE_64 -POTCAR: - Ac: Ac - Ag: Ag - Al: Al - Am: Am - Ar: Ar - As: As - At: At - Au: Au - B: B - Ba: Ba_sv_GW - Be: Be_sv - Bi: Bi - Br: Br - C: C - Ca: Ca_sv - Cd: Cd - Ce: Ce - Cf: Cf - Cl: Cl - Cm: Cm - Co: Co - Cr: Cr_pv - Cs: Cs_sv - Cu: Cu_pv - Dy: Dy_h - Er: Er_h - Eu: Eu - F: F - Fe: Fe_pv - Fr: Fr_sv - Ga: Ga_d - Gd: Gd - Ge: Ge_d - H: H - He: He - Hf: Hf_pv - Hg: Hg - Ho: Ho_h - I: I - In: In_d - Ir: Ir - K: K_sv - Kr: Kr - La: La - Li: Li_sv - Lu: Lu_3 - Mg: Mg_pv - Mn: Mn_pv - Mo: Mo_pv - N: N - Na: Na_pv - Nb: Nb_pv - Nd: Nd_h - Ne: Ne - Ni: Ni_pv - Np: Np - O: O - Os: Os_pv - P: P - Pa: Pa - Pb: Pb_d - Pd: Pd - Pm: Pm_h - Po: Po_d - Pr: Pr_h - Pt: Pt - Pu: Pu - Ra: Ra_sv - Rb: Rb_sv - Re: Re_pv - Rh: Rh_pv - Rn: Rn - Ru: Ru_pv - S: S - Sb: Sb - Sc: Sc_sv - Se: Se - Si: Si - Sm: Sm_h - Sn: Sn_d - Sr: Sr_sv - Ta: Ta_pv - Tb: Tb_h - Tc: Tc_pv - Te: Te - Th: Th - Ti: Ti_pv - Tl: Tl_d - Tm: Tm_h - U: U - V: V_pv - W: W_sv - Xe: Xe_GW - Y: Y_sv - Yb: Yb_h - Zn: Zn - Zr: Zr_sv diff --git a/src/pymatgen/io/vasp/PBE64Base.yaml b/src/pymatgen/io/vasp/PBE64Base.yaml index af0236253ed..358944a2b26 100644 --- a/src/pymatgen/io/vasp/PBE64Base.yaml +++ b/src/pymatgen/io/vasp/PBE64Base.yaml @@ -11,7 +11,7 @@ POTCAR: At: At Au: Au B: B - Ba: Ba_sv + Ba: Ba_sv_GW Be: Be_sv Bi: Bi Br: Br @@ -26,8 +26,8 @@ POTCAR: Cr: Cr_pv Cs: Cs_sv Cu: Cu_pv - Dy: Dy_3 - Er: Er_3 + Dy: Dy_h + Er: Er_h Eu: Eu F: F Fe: Fe_pv @@ -39,7 +39,7 @@ POTCAR: He: He Hf: Hf_pv Hg: Hg - Ho: Ho_3 + Ho: Ho_h I: I In: In_d Ir: Ir @@ -54,7 +54,7 @@ POTCAR: N: N Na: Na_pv Nb: Nb_pv - Nd: Nd_3 + Nd: Nd_h Ne: Ne Ni: Ni_pv Np: Np @@ -64,9 +64,9 @@ POTCAR: Pa: Pa Pb: Pb_d Pd: Pd - Pm: Pm_3 + Pm: Pm_h Po: Po_d - Pr: Pr_3 + Pr: Pr_h Pt: Pt Pu: Pu Ra: Ra_sv @@ -80,22 +80,22 @@ POTCAR: Sc: Sc_sv Se: Se Si: Si - Sm: Sm_3 + Sm: Sm_h Sn: Sn_d Sr: Sr_sv Ta: Ta_pv - Tb: Tb_3 + Tb: Tb_h Tc: Tc_pv Te: Te Th: Th Ti: Ti_pv Tl: Tl_d - Tm: Tm_3 + Tm: Tm_h U: U V: V_pv W: W_sv - Xe: Xe + Xe: Xe_GW Y: Y_sv - Yb: Yb_3 + Yb: Yb_h Zn: Zn Zr: Zr_sv diff --git a/tests/io/vasp/test_sets.py b/tests/io/vasp/test_sets.py index 354acd70b46..ee2bff75814 100644 --- a/tests/io/vasp/test_sets.py +++ b/tests/io/vasp/test_sets.py @@ -111,6 +111,7 @@ def test_sets_changed(self): known_hashes = { "MatPESStaticSet.yaml": "8edecff2bbd1932c53159f56a8e6340e900aaa2f", "MITRelaxSet.yaml": "1a0970f8cad9417ec810f7ab349dc854eaa67010", + "MP24RelaxSet.yaml": "66a8cf8be2174fe82c101e189c1ac157dd6cc2c7", "MPAbsorptionSet.yaml": "5931e1cb3cf8ba809b3d4f4a5960d728c682adf1", "MPHSERelaxSet.yaml": "0d0d96a620461071cfd416ec9d5d6a8d2dfd0855", "MPRelaxSet.yaml": "f2949cdc5dc8cd0bee6d39a5df0d6a6b7c144821", @@ -118,7 +119,7 @@ def test_sets_changed(self): "MVLGWSet.yaml": "104ae93c3b3be19a13b0ee46ebdd0f40ceb96597", "MVLRelax52Set.yaml": "4cfc6b1bd0548e45da3bde4a9c65b3249da13ecd", "PBE54Base.yaml": "ec317781a7f344beb54c17a228db790c0eb49282", - "PBE64Base.yaml": "480c41c2448cb25706181de268090618e282b264", + "PBE64Base.yaml": "0b6e1eb9d848c7264ba6a2347ce6e921f85522e3", "VASPIncarBase.yaml": "19762515f8deefb970f2968fca48a0d67f7964d4", "vdW_parameters.yaml": "04bb09bb563d159565bcceac6a11e8bdf0152b79", } From 9c43a70112cd11a48b824cf04078fce06efae0cf Mon Sep 17 00:00:00 2001 From: esoteric-ephemera Date: Thu, 18 Jul 2024 09:59:40 -0700 Subject: [PATCH 08/18] fix matpes set to remove the GGA tag for r2SCAN runs --- src/pymatgen/io/vasp/sets.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pymatgen/io/vasp/sets.py b/src/pymatgen/io/vasp/sets.py index c77b7d22c30..381e0fe1d5f 100644 --- a/src/pymatgen/io/vasp/sets.py +++ b/src/pymatgen/io/vasp/sets.py @@ -1593,7 +1593,8 @@ def __post_init__(self) -> None: ) if self.xc_functional.upper() == "R2SCAN": - self._config_dict["INCAR"].update({"METAGGA": "R2SCAN", "ALGO": "ALL", "GGA": None}) + self._config_dict["INCAR"].update({"METAGGA": "R2SCAN", "ALGO": "ALL"}) + self._config_dict["INCAR"].pop("GGA", None) if self.xc_functional.upper().endswith("+U"): self._config_dict["INCAR"]["LDAU"] = True From bcd6765d95abb389897f1e4c8d80aace785a9a1d Mon Sep 17 00:00:00 2001 From: esoteric-ephemera Date: Wed, 2 Oct 2024 14:56:20 -0700 Subject: [PATCH 09/18] slight tweak --- src/pymatgen/io/vasp/sets.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/pymatgen/io/vasp/sets.py b/src/pymatgen/io/vasp/sets.py index 5a54a5ca7dc..a5de1db2781 100644 --- a/src/pymatgen/io/vasp/sets.py +++ b/src/pymatgen/io/vasp/sets.py @@ -1353,38 +1353,40 @@ class MP24RelaxSet(VaspInputSet): By default, this uses r2SCAN as the xc functional. """ - xc_functional: Literal["R2SCAN", "PBE", "PBESOL"] = "R2SCAN" + xc_functional: Literal["r2SCAN", "PBE", "PBEsol"] = "r2SCAN" dispersion: Literal["rVV10", "D4"] | None = None CONFIG = _load_yaml_config("MP24RelaxSet") auto_ismear: bool = True + auto_kspacing : bool = True + inherit_incar : bool = False def __post_init__(self) -> None: super().__post_init__() to_func = { - "R2SCAN": "R2SCAN", + "r2SCAN": "R2SCAN", "PBE": "PE", - "PBESOL": "PS", + "PBEsol": "PS", } xc_func = self.xc_functional.upper() config_updates: dict[str, Any] = {} - if xc_func == "R2SCAN": + if xc_func == "r2SCAN": config_updates = {"METAGGA": to_func[xc_func], "GGA": None} - elif xc_func in ["PBE", "PBESOL"]: + elif xc_func in ["PBE", "PBEsol"]: config_updates = {"METAGGA": None, "GGA": to_func[xc_func]} else: raise ValueError(f"Unknown XC functional {self.xc_functional}!") if self.dispersion == "rVV10": - if xc_func == "R2SCAN": + if xc_func == "r2SCAN": config_updates = {"BPARAM": 11.95, "CPARAM": 0.0093} else: raise ValueError("Use of rVV10 with functionals other than r2 / SCAN is not currently supported.") elif self.dispersion == "D4": d4_pars = { - "R2SCAN": { + "r2SCAN": { "S6": 1.0, "S8": 0.60187490, "A1": 0.51559235, @@ -1396,7 +1398,7 @@ def __post_init__(self) -> None: "A1": 0.38574991, "A2": 4.80688534, }, - "PBESOL": { + "PBEsol": { "S6": 1.0, "S8": 1.71885698, "A1": 0.47901421, @@ -1693,7 +1695,7 @@ class MP24StaticSet(MP24RelaxSet): lepsilon: bool = False lcalcpol: bool = False - inherit_incar: bool = True + inherit_incar: bool = False auto_kspacing: bool = True @property From 643517afa9952ac24a7f9b251fd8cb3056fa99ab Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 2 Oct 2024 22:17:31 +0000 Subject: [PATCH 10/18] pre-commit auto-fixes --- src/pymatgen/io/vasp/sets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pymatgen/io/vasp/sets.py b/src/pymatgen/io/vasp/sets.py index a5de1db2781..a8847383bdd 100644 --- a/src/pymatgen/io/vasp/sets.py +++ b/src/pymatgen/io/vasp/sets.py @@ -1357,8 +1357,8 @@ class MP24RelaxSet(VaspInputSet): dispersion: Literal["rVV10", "D4"] | None = None CONFIG = _load_yaml_config("MP24RelaxSet") auto_ismear: bool = True - auto_kspacing : bool = True - inherit_incar : bool = False + auto_kspacing: bool = True + inherit_incar: bool = False def __post_init__(self) -> None: super().__post_init__() From e3f00d4a32498310eb7ae4afd5af26be2fc2f3b7 Mon Sep 17 00:00:00 2001 From: esoteric-ephemera Date: Wed, 2 Oct 2024 15:41:39 -0700 Subject: [PATCH 11/18] fixes --- src/pymatgen/io/vasp/sets.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/pymatgen/io/vasp/sets.py b/src/pymatgen/io/vasp/sets.py index a8847383bdd..d36521b9043 100644 --- a/src/pymatgen/io/vasp/sets.py +++ b/src/pymatgen/io/vasp/sets.py @@ -1369,17 +1369,18 @@ def __post_init__(self) -> None: "PBEsol": "PS", } - xc_func = self.xc_functional.upper() config_updates: dict[str, Any] = {} - if xc_func == "r2SCAN": - config_updates = {"METAGGA": to_func[xc_func], "GGA": None} - elif xc_func in ["PBE", "PBEsol"]: - config_updates = {"METAGGA": None, "GGA": to_func[xc_func]} + if self.xc_functional == "r2SCAN": + config_updates = {"METAGGA": to_func[self.xc_functional]} + self._config_dict["INCAR"].pop("GGA",None) + elif self.xc_functional in ["PBE", "PBEsol"]: + config_updates = {"GGA": to_func[self.xc_functional]} + self._config_dict["INCAR"].pop("METAGGA",None) else: raise ValueError(f"Unknown XC functional {self.xc_functional}!") if self.dispersion == "rVV10": - if xc_func == "r2SCAN": + if self.xc_functional == "r2SCAN": config_updates = {"BPARAM": 11.95, "CPARAM": 0.0093} else: raise ValueError("Use of rVV10 with functionals other than r2 / SCAN is not currently supported.") @@ -1405,7 +1406,7 @@ def __post_init__(self) -> None: "A2": 5.96771589, }, } - config_updates = {f"VDW_{k}": v for k, v in d4_pars[xc_func].items()} + config_updates = {f"VDW_{k}": v for k, v in d4_pars[self.xc_functional].items()} if len(config_updates) > 0: self._config_dict["INCAR"].update(config_updates) @@ -1442,6 +1443,8 @@ def _multi_sigmoid_interp( @property def kspacing_update(self): + if self.bandgap is None: + return 0.22 return self._multi_sigmoid_interp(self.bandgap) From 59c7c02566cee641396f3db7b120648da090ff48 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 18:34:56 +0000 Subject: [PATCH 12/18] pre-commit auto-fixes --- src/pymatgen/io/vasp/sets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pymatgen/io/vasp/sets.py b/src/pymatgen/io/vasp/sets.py index d36521b9043..f24fa414916 100644 --- a/src/pymatgen/io/vasp/sets.py +++ b/src/pymatgen/io/vasp/sets.py @@ -1372,10 +1372,10 @@ def __post_init__(self) -> None: config_updates: dict[str, Any] = {} if self.xc_functional == "r2SCAN": config_updates = {"METAGGA": to_func[self.xc_functional]} - self._config_dict["INCAR"].pop("GGA",None) + self._config_dict["INCAR"].pop("GGA", None) elif self.xc_functional in ["PBE", "PBEsol"]: config_updates = {"GGA": to_func[self.xc_functional]} - self._config_dict["INCAR"].pop("METAGGA",None) + self._config_dict["INCAR"].pop("METAGGA", None) else: raise ValueError(f"Unknown XC functional {self.xc_functional}!") From bba9998b2a3b2c643fcdc1d827975747d3cca679 Mon Sep 17 00:00:00 2001 From: esoteric-ephemera Date: Wed, 9 Oct 2024 13:50:35 -0700 Subject: [PATCH 13/18] disable auto_ismear --- src/pymatgen/io/vasp/sets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pymatgen/io/vasp/sets.py b/src/pymatgen/io/vasp/sets.py index f24fa414916..681a067ad71 100644 --- a/src/pymatgen/io/vasp/sets.py +++ b/src/pymatgen/io/vasp/sets.py @@ -1356,7 +1356,7 @@ class MP24RelaxSet(VaspInputSet): xc_functional: Literal["r2SCAN", "PBE", "PBEsol"] = "r2SCAN" dispersion: Literal["rVV10", "D4"] | None = None CONFIG = _load_yaml_config("MP24RelaxSet") - auto_ismear: bool = True + auto_ismear: bool = False auto_kspacing: bool = True inherit_incar: bool = False From 8fe04a5d6a17903c24338ef967cf445bb4233fc2 Mon Sep 17 00:00:00 2001 From: esoteric-ephemera Date: Wed, 8 Jan 2025 15:44:36 -0800 Subject: [PATCH 14/18] fix bandap --> kspacing --- src/pymatgen/io/vasp/sets.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/pymatgen/io/vasp/sets.py b/src/pymatgen/io/vasp/sets.py index c931a15dc37..04960a7f6e2 100644 --- a/src/pymatgen/io/vasp/sets.py +++ b/src/pymatgen/io/vasp/sets.py @@ -1465,9 +1465,15 @@ def _multi_sigmoid_interp( fac: tuple[float, ...] = (8, 8), bg_cut: tuple[float, ...] = (4.5,), ): - for icut, cutpt in enumerate(bg_cut): - min_bd = self.bandgap_tol if (icut == 0) else cutpt - if min_bd <= bandgap < cutpt: + + if bandgap < self.bandgap_tol: + return dks[0] + + min_bds = [self.bandgap_tol, *bg_cut] + max_bds = [*bg_cut, np.inf] + + for icut, min_bd in enumerate(min_bds): + if min_bd <= bandgap < max_bds[icut]: return self._sigmoid_interp( bandgap, min_dk=dks[icut], @@ -1476,6 +1482,7 @@ def _multi_sigmoid_interp( center=center[icut], fac=fac[icut], ) + return None @property From 1bddca8d5d044466e078eafd5cbe05a4afe787f2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 8 Jan 2025 23:45:16 +0000 Subject: [PATCH 15/18] pre-commit auto-fixes --- src/pymatgen/io/vasp/sets.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pymatgen/io/vasp/sets.py b/src/pymatgen/io/vasp/sets.py index 04960a7f6e2..6d206781f4f 100644 --- a/src/pymatgen/io/vasp/sets.py +++ b/src/pymatgen/io/vasp/sets.py @@ -1465,10 +1465,9 @@ def _multi_sigmoid_interp( fac: tuple[float, ...] = (8, 8), bg_cut: tuple[float, ...] = (4.5,), ): - if bandgap < self.bandgap_tol: return dks[0] - + min_bds = [self.bandgap_tol, *bg_cut] max_bds = [*bg_cut, np.inf] @@ -1482,7 +1481,7 @@ def _multi_sigmoid_interp( center=center[icut], fac=fac[icut], ) - + return None @property From de0f541366ed6b9f7c9e66313e415a383f0544d9 Mon Sep 17 00:00:00 2001 From: esoteric-ephemera Date: Wed, 8 Jan 2025 16:04:33 -0800 Subject: [PATCH 16/18] Add GGA_COMPAT False tag --- src/pymatgen/io/vasp/MP24RelaxSet.yaml | 1 + tests/io/vasp/test_sets.py | 30 +++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/pymatgen/io/vasp/MP24RelaxSet.yaml b/src/pymatgen/io/vasp/MP24RelaxSet.yaml index 833268370bf..72de8bef925 100644 --- a/src/pymatgen/io/vasp/MP24RelaxSet.yaml +++ b/src/pymatgen/io/vasp/MP24RelaxSet.yaml @@ -8,6 +8,7 @@ INCAR: EDIFFG: -0.02 ENAUG: 1360 ENCUT: 680 + GGA_COMPAT: False IBRION: 2 ISIF: 3 ISMEAR: 0 # included to have some reasonable default diff --git a/tests/io/vasp/test_sets.py b/tests/io/vasp/test_sets.py index 1709a827611..7b06acb6ef4 100644 --- a/tests/io/vasp/test_sets.py +++ b/tests/io/vasp/test_sets.py @@ -29,6 +29,8 @@ MITMDSet, MITNEBSet, MITRelaxSet, + MP24RelaxSet, + MP24StaticSet, MPAbsorptionSet, MPHSEBSSet, MPHSERelaxSet, @@ -123,7 +125,7 @@ def test_sets_changed(self): "MatPESStaticSet.yaml": "4ec60ad4bbbb9a756f1b3fea8ca4eab8fc767d8f6a67332e7af3908c910fd7c5", "MPAbsorptionSet.yaml": "e49cd0ab87864f1c244e9b5ceb4703243116ec1fbb8958a374ddff07f7a5625c", "PBE54Base.yaml": "cdffe123eca8b19354554b60a7f8de9b8776caac9e1da2bd2a0516b7bfac8634", - "MP24RelaxSet.yaml": "62035d9a270504f852f59c886165da5f5fa35a59f4c309695aac7120ad7a18ac", + "MP24RelaxSet.yaml": "35a5d4456f01d644cf41218725c5e0896c59e1658045ecd1544579cbb1ed7b85", } for input_set, hash_str in hashes.items(): @@ -2286,3 +2288,29 @@ def test_dict_set_alias(): ): DictSet() assert isinstance(DictSet(), VaspInputSet) + + +class TestMP24Sets(PymatgenTest): + @classmethod + def setUpClass(cls): + cls.relax_set = MP24RelaxSet + cls.static_set = MP24StaticSet + + filepath = f"{VASP_IN_DIR}/POSCAR" + cls.structure = Structure.from_file(filepath) + + def test_kspacing(self): + bandgaps = [0.0, 0.1, 0.5, 1.0, 2.0, 3, 5, 10, 1e4] + expected_kspacing = [ + 0.22, + 0.22000976174867864, + 0.2200466614246148, + 0.22056799311325073, + 0.2876525546497567, + 0.40800309817134106, + 0.44000114629141485, + 0.4999999999540808, + 0.5, + ] + for i, bandgap in enumerate(bandgaps): + assert self.relax_set()._multi_sigmoid_interp(bandgap) == approx(expected_kspacing[i]) From 97edf5674d38cbfa3dd4dd87d4da0ae767698b27 Mon Sep 17 00:00:00 2001 From: esoteric-ephemera Date: Wed, 8 Jan 2025 16:44:06 -0800 Subject: [PATCH 17/18] Add full test, clean up vdw stuff (prev unused) --- src/pymatgen/io/vasp/sets.py | 14 ++++--- tests/io/vasp/test_sets.py | 79 +++++++++++++++++++++++++++++++++--- 2 files changed, 82 insertions(+), 11 deletions(-) diff --git a/src/pymatgen/io/vasp/sets.py b/src/pymatgen/io/vasp/sets.py index 6d206781f4f..a6fe66f6ec8 100644 --- a/src/pymatgen/io/vasp/sets.py +++ b/src/pymatgen/io/vasp/sets.py @@ -1408,19 +1408,21 @@ def __post_init__(self) -> None: config_updates: dict[str, Any] = {} if self.xc_functional == "r2SCAN": - config_updates = {"METAGGA": to_func[self.xc_functional]} + config_updates |= {"METAGGA": to_func[self.xc_functional]} self._config_dict["INCAR"].pop("GGA", None) elif self.xc_functional in ["PBE", "PBEsol"]: - config_updates = {"GGA": to_func[self.xc_functional]} + config_updates |= {"GGA": to_func[self.xc_functional]} self._config_dict["INCAR"].pop("METAGGA", None) else: raise ValueError(f"Unknown XC functional {self.xc_functional}!") if self.dispersion == "rVV10": if self.xc_functional == "r2SCAN": - config_updates = {"BPARAM": 11.95, "CPARAM": 0.0093} + config_updates |= {"BPARAM": 11.95, "CPARAM": 0.0093, "LUSE_VDW": True} else: - raise ValueError("Use of rVV10 with functionals other than r2 / SCAN is not currently supported.") + raise ValueError( + "Use of rVV10 with functionals other than r2 / SCAN is not currently supported in VASP." + ) elif self.dispersion == "D4": d4_pars = { @@ -1443,7 +1445,7 @@ def __post_init__(self) -> None: "A2": 5.96771589, }, } - config_updates = {f"VDW_{k}": v for k, v in d4_pars[self.xc_functional].items()} + config_updates |= {"IVDW": 13, **{f"VDW_{k}": v for k, v in d4_pars[self.xc_functional].items()}} if len(config_updates) > 0: self._config_dict["INCAR"].update(config_updates) @@ -1746,7 +1748,7 @@ def incar_updates(self) -> dict[str, Any]: @dataclass class MP24StaticSet(MP24RelaxSet): - """Create input files for a static calculation using MP24 parameters + """Create input files for a static calculation using MP24 parameters. Args: structure (Structure): Structure from previous run. diff --git a/tests/io/vasp/test_sets.py b/tests/io/vasp/test_sets.py index 7b06acb6ef4..cef111d7d7e 100644 --- a/tests/io/vasp/test_sets.py +++ b/tests/io/vasp/test_sets.py @@ -2291,13 +2291,18 @@ def test_dict_set_alias(): class TestMP24Sets(PymatgenTest): - @classmethod - def setUpClass(cls): - cls.relax_set = MP24RelaxSet - cls.static_set = MP24StaticSet + def setUp(self): + self.relax_set = MP24RelaxSet + self.static_set = MP24StaticSet filepath = f"{VASP_IN_DIR}/POSCAR" - cls.structure = Structure.from_file(filepath) + self.structure = Structure.from_file(filepath) + + @staticmethod + def matches_ref(test_val, ref_val) -> bool: + if isinstance(ref_val, float): + return test_val == approx(ref_val) + return test_val == ref_val def test_kspacing(self): bandgaps = [0.0, 0.1, 0.5, 1.0, 2.0, 3, 5, 10, 1e4] @@ -2314,3 +2319,67 @@ def test_kspacing(self): ] for i, bandgap in enumerate(bandgaps): assert self.relax_set()._multi_sigmoid_interp(bandgap) == approx(expected_kspacing[i]) + + def test_default(self): + vis = self.relax_set(structure=self.structure) + expected_incar_relax = { + "ALGO": "Normal", + "EDIFF": 1.0e-05, + "EDIFFG": -0.02, + "ENAUG": 1360, + "ENCUT": 680, + "GGA_COMPAT": False, + "KSPACING": 0.22, + "ISMEAR": 0, + "SIGMA": 0.05, + "METAGGA": "R2scan", + "LMAXMIX": 6, + "LREAL": False, + } + + assert all(self.matches_ref(vis.incar[k], v) for k, v in expected_incar_relax.items()) + + assert self.relax_set(self.structure, xc_functional="r2SCAN")._config_dict == vis._config_dict + assert vis.inherit_incar is False + assert vis.dispersion is None + assert vis.potcar_functional == "PBE_64" + assert vis.potcar_symbols == ["Fe_pv", "P", "O"] + assert vis.kpoints is None + + vis = self.static_set(structure=self.structure, dispersion="rVV10") + + expected_incar_static = { + "ISMEAR": -5, + "NSW": 0, + "LORBIT": 11, + "METAGGA": "R2scan", + "LUSE_VDW": True, + "BPARAM": 11.95, + "CPARAM": 0.0093, + } + + assert all(self.matches_ref(vis.incar[k], v) for k, v in expected_incar_static.items()) + assert ( + self.static_set(self.structure, xc_functional="r2SCAN", dispersion="rVV10")._config_dict == vis._config_dict + ) + + def test_non_default_xc_func(self): + for xc_functional, vasp_name in {"PBE": "Pe", "PBEsol": "Ps"}.items(): + vis = self.relax_set(structure=self.structure, xc_functional=xc_functional) + assert vis.incar.get("METAGGA") is None + assert vis.incar["GGA"] == vasp_name + + vis = self.static_set(structure=self.structure, xc_functional=xc_functional, dispersion="D4") + assert vis.incar.get("METAGGA") is None + print(self.relax_set(structure=self.structure, xc_functional=xc_functional).incar) + assert vis.incar["GGA"] == vasp_name + assert all( + isinstance(vis.incar[k], float | int) + for k in ( + "IVDW", + "VDW_A1", + "VDW_A2", + "VDW_S6", + "VDW_S8", + ) + ) From b26cc619f1377a1c2b52268a28510fe1915ef425 Mon Sep 17 00:00:00 2001 From: esoteric-ephemera Date: Wed, 8 Jan 2025 17:00:12 -0800 Subject: [PATCH 18/18] Add citation info --- src/pymatgen/io/vasp/sets.py | 37 +++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/src/pymatgen/io/vasp/sets.py b/src/pymatgen/io/vasp/sets.py index a6fe66f6ec8..d23a861ca38 100644 --- a/src/pymatgen/io/vasp/sets.py +++ b/src/pymatgen/io/vasp/sets.py @@ -1359,7 +1359,7 @@ class MPScanRelaxSet(VaspInputSet): James W. Furness, Aaron D. Kaplan, Jinliang Ning, John P. Perdew, and Jianwei Sun. Accurate and Numerically Efficient r2SCAN Meta-Generalized Gradient Approximation. - The Journal of Physical Chemistry Letters 0, 11 DOI: 10.1021/acs.jpclett.0c02405 + The Journal of Physical Chemistry Letters 11, 8208-8215 (2022) DOI: 10.1021/acs.jpclett.0c02405 """ bandgap: float | None = None @@ -1388,6 +1388,38 @@ class MP24RelaxSet(VaspInputSet): Materials Project relax set after a 2023-2024 benchmarking effort. By default, this uses r2SCAN as the xc functional. + For discussion around this benchmarking effort, see: + https://github.com/materialsproject/foundation/pull/26 + + Citation info: + - r2SCAN: + James W. Furness, Aaron D. Kaplan, Jinliang Ning, John P. Perdew, and Jianwei Sun. + Accurate and Numerically Efficient r2SCAN Meta-Generalized Gradient Approximation. + J. Phys. Chem. Lett. 11, 8208-8215 (2022) DOI: 10.1021/acs.jpclett.0c02405 + - r2SCAN-rVV10: + Jinliang Ning, Manish Kothakonda, James W. Furness, Aaron D. Kaplan, Sebastian Ehlert, + Jan Gerit Brandenburg, John P. Perdew, and Jianwei Sun. + Workhorse minimally empirical dispersion-corrected density functional with tests for + weakly bound systems: r2SCAN+rVV10. + Phys. Rev. B 106, 075422 (2022) DOI: 10.1103/PhysRevB.106.075422 + - r2SCAN-D4: + Sebastian Ehlert, Uwe Huniar, Jinliang Ning, James W. Furness, Jianwei Sun, + Aaron D. Kaplan, John P. Perdew, and Jan Gerit Brandenburg. + r2SCAN-D4: Dispersion corrected meta-generalized gradient approximation for general chemical applications. + J. Chem. Phys. 154, 061101 (2021) DOI: 10.1063/5.0041008 + - PBE: + John P. Perdew, Kieron Burke, and Matthias Ernzerhof, + Generalized Gradient Approximation Made Simple, + Phys. Rev. Lett. 77, 3865 (1996) DOI: 10.1103/PhysRevLett.77.3865 + - PBEsol: + John P. Perdew, Adrienn Ruzsinszky, Gábor I. Csonka, Oleg A. Vydrov, + Gustavo E. Scuseria, Lucian A. Constantin, Xiaolan Zhou, and Kieron Burke. + Restoring the Density-Gradient Expansion for Exchange in Solids and Surfaces. + Phys. Rev. Lett. 100, 136406 (2009) DOI: 10.1103/PhysRevLett.100.136406 + - PBE-D4 and PBEsol-D4: + Eike Caldeweyher,Jan-Michael Mewes, Sebastian Ehlert, and Stefan Grimme. + Extension and evaluation of the D4 London-dispersion model for periodic systems. + Phys. Chem. Chem. Phys. 22, 8499-8512 (2020) DOI: 10.1039/D0CP00502A """ xc_functional: Literal["r2SCAN", "PBE", "PBEsol"] = "r2SCAN" @@ -1750,6 +1782,9 @@ def incar_updates(self) -> dict[str, Any]: class MP24StaticSet(MP24RelaxSet): """Create input files for a static calculation using MP24 parameters. + For class information, refer to `MP24RelaxSet`. + If you use this set, please consider citing the appropriate papers in `MP24RelaxSet`. + Args: structure (Structure): Structure from previous run. bandgap (float): Bandgap of the structure in eV. The bandgap is used to