Skip to content

Commit

Permalink
Add back symprec kwarg to MP and MatPES set generators (#947)
Browse files Browse the repository at this point in the history
* add back symprec kwarg to MP and MatPES set generators

* bump matgl==1.1.3

https://github.com/materialsvirtuallab/matgl/releases/tag/v1.1.3

* trigger CI
  • Loading branch information
janosh committed Aug 7, 2024
1 parent 8d57884 commit f5ab8cc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/atomate2/vasp/sets/matpes.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@ class MatPesGGAStaticSetGenerator(MatPESStaticSet):
xc_functional: Literal["R2SCAN", "PBE", "PBE+U"] = "PBE"
auto_ismear: bool = False
auto_kspacing: bool = False
symprec: float | None = None

def __post_init__(self) -> None:
"""Raise deprecation warning and validate."""
if self.symprec is not None:
self.sym_prec = self.symprec
super().__post_init__()


Expand All @@ -42,9 +45,12 @@ class MatPesMetaGGAStaticSetGenerator(MatPESStaticSet):
xc_functional: Literal["R2SCAN", "PBE", "PBE+U"] = "R2SCAN"
auto_ismear: bool = False
auto_kspacing: bool = False
symprec: float | None = None

def __post_init__(self) -> None:
"""Raise deprecation warning and validate."""
if self.symprec is not None:
self.sym_prec = self.symprec
super().__post_init__()

@property
Expand Down
12 changes: 12 additions & 0 deletions src/atomate2/vasp/sets/mp.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,12 @@ class MPGGARelaxSetGenerator(MPRelaxSet):
bandgap_tol: float = None
force_gamma: bool = True
auto_metal_kpoints: bool = True
symprec: float | None = None

def __post_init__(self) -> None:
"""Raise deprecation warning and validate."""
if self.symprec is not None:
self.sym_prec = self.symprec
super().__post_init__()


Expand All @@ -57,9 +60,12 @@ class MPGGAStaticSetGenerator(MPStaticSet):
inherit_incar: bool | None = False
force_gamma: bool = True
auto_metal_kpoints: bool = True
symprec: float | None = None

def __post_init__(self) -> None:
"""Raise deprecation warning and validate."""
if self.symprec is not None:
self.sym_prec = self.symprec
super().__post_init__()


Expand All @@ -72,9 +78,12 @@ class MPMetaGGAStaticSetGenerator(MPScanStaticSet):
auto_kspacing: bool = True
bandgap_tol: float = 1e-4
inherit_incar: bool | None = False
symprec: float | None = None

def __post_init__(self) -> None:
"""Raise deprecation warning and validate."""
if self.symprec is not None:
self.sym_prec = self.symprec
super().__post_init__()

@property
Expand Down Expand Up @@ -114,9 +123,12 @@ class MPMetaGGARelaxSetGenerator(MPScanRelaxSet):
auto_ismear: bool = False
auto_kspacing: bool = True
inherit_incar: bool | None = False
symprec: float | None = None

def __post_init__(self) -> None:
"""Raise deprecation warning and validate."""
if self.symprec is not None:
self.sym_prec = self.symprec
super().__post_init__()

@property
Expand Down

0 comments on commit f5ab8cc

Please sign in to comment.