Skip to content

Commit 14a1788

Browse files
author
Aaron Kaplan
committed
set matpes flow default to align with paper default
1 parent 5d44907 commit 14a1788

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

src/atomate2/vasp/flows/matpes.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,7 @@ class MatPesStaticFlowMaker(Maker):
5858
copy_vasp_kwargs={"additional_vasp_files": ("WAVECAR",)}
5959
)
6060
)
61-
# optional 3rd PBE+U static in case structure contains elements with +U corrections
62-
static3: Maker | None = field(
63-
default_factory=lambda: MatPesGGAStaticMaker(
64-
name="MatPES GGA+U static",
65-
input_set_generator=MatPESStaticSet(
66-
user_incar_settings={"LDAU:": True}, # enable +U corrections
67-
),
68-
copy_vasp_kwargs={"additional_vasp_files": ("WAVECAR",)},
69-
)
70-
)
61+
static3: Maker | None = None
7162

7263
def __post_init__(self) -> None:
7364
"""Validate flow."""

tests/vasp/flows/test_matpes.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from pymatgen.core import Structure
77

88
from atomate2.vasp.flows.matpes import MatPesStaticFlowMaker
9+
from atomate2.vasp.jobs.matpes import MatPesGGAStaticMaker
910

1011

1112
def test_matpes_static_flow_maker(mock_vasp, clean_dir, vasp_test_dir):
@@ -59,7 +60,9 @@ def test_matpes_static_flow_maker(mock_vasp, clean_dir, vasp_test_dir):
5960
assert flow[0].name == "MatPES GGA static"
6061

6162
# Test setting two makers to None
62-
flow_maker = MatPesStaticFlowMaker(static1=None, static2=None)
63+
flow_maker = MatPesStaticFlowMaker(
64+
static1=None, static2=None, static3=MatPesGGAStaticMaker()
65+
)
6366
flow = flow_maker.make(si_struct)
6467
assert len(flow) == 0
6568

@@ -68,7 +71,9 @@ def test_matpes_static_flow_maker(mock_vasp, clean_dir, vasp_test_dir):
6871
MatPesStaticFlowMaker(static1=None, static2=None, static3=None)
6972

7073
# Test no static3 if structure requires no Hubbard U corrections
71-
flow_maker = MatPesStaticFlowMaker(static1=None, static2=None)
74+
flow_maker = MatPesStaticFlowMaker(
75+
static1=None, static2=None, static3=MatPesGGAStaticMaker()
76+
)
7277
flow = flow_maker.make(si_struct)
7378
assert len(flow) == 0
7479
assert flow.output == {}

0 commit comments

Comments
 (0)