Skip to content

Commit f5ab8cc

Browse files
authored
Add back symprec kwarg to MP and MatPES set generators (#947)
* 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
1 parent 8d57884 commit f5ab8cc

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/atomate2/vasp/sets/matpes.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,12 @@ class MatPesGGAStaticSetGenerator(MatPESStaticSet):
2424
xc_functional: Literal["R2SCAN", "PBE", "PBE+U"] = "PBE"
2525
auto_ismear: bool = False
2626
auto_kspacing: bool = False
27+
symprec: float | None = None
2728

2829
def __post_init__(self) -> None:
2930
"""Raise deprecation warning and validate."""
31+
if self.symprec is not None:
32+
self.sym_prec = self.symprec
3033
super().__post_init__()
3134

3235

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

4650
def __post_init__(self) -> None:
4751
"""Raise deprecation warning and validate."""
52+
if self.symprec is not None:
53+
self.sym_prec = self.symprec
4854
super().__post_init__()
4955

5056
@property

src/atomate2/vasp/sets/mp.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,12 @@ class MPGGARelaxSetGenerator(MPRelaxSet):
4040
bandgap_tol: float = None
4141
force_gamma: bool = True
4242
auto_metal_kpoints: bool = True
43+
symprec: float | None = None
4344

4445
def __post_init__(self) -> None:
4546
"""Raise deprecation warning and validate."""
47+
if self.symprec is not None:
48+
self.sym_prec = self.symprec
4649
super().__post_init__()
4750

4851

@@ -57,9 +60,12 @@ class MPGGAStaticSetGenerator(MPStaticSet):
5760
inherit_incar: bool | None = False
5861
force_gamma: bool = True
5962
auto_metal_kpoints: bool = True
63+
symprec: float | None = None
6064

6165
def __post_init__(self) -> None:
6266
"""Raise deprecation warning and validate."""
67+
if self.symprec is not None:
68+
self.sym_prec = self.symprec
6369
super().__post_init__()
6470

6571

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

7683
def __post_init__(self) -> None:
7784
"""Raise deprecation warning and validate."""
85+
if self.symprec is not None:
86+
self.sym_prec = self.symprec
7887
super().__post_init__()
7988

8089
@property
@@ -114,9 +123,12 @@ class MPMetaGGARelaxSetGenerator(MPScanRelaxSet):
114123
auto_ismear: bool = False
115124
auto_kspacing: bool = True
116125
inherit_incar: bool | None = False
126+
symprec: float | None = None
117127

118128
def __post_init__(self) -> None:
119129
"""Raise deprecation warning and validate."""
130+
if self.symprec is not None:
131+
self.sym_prec = self.symprec
120132
super().__post_init__()
121133

122134
@property

0 commit comments

Comments
 (0)