Skip to content

Commit 9e28c72

Browse files
committed
DEFAULT_THERMOTYPE_CRITERIA
1 parent 6d6e970 commit 9e28c72

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mp_api/client/mprester.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969

7070
_EMMET_SETTINGS = EmmetSettings()
7171
_MAPI_SETTINGS = MAPIClientSettings()
72+
DEFAULT_THERMOTYPE_CRITERIA = {"thermo_types": ["GGA_GGA+U"]}
7273

7374

7475
class MPRester:
@@ -880,7 +881,7 @@ def get_pourbaix_entries(
880881
ion_ref_entries = (
881882
self.get_entries_in_chemsys(
882883
list([str(e) for e in ion_ref_elts] + ["O", "H"]),
883-
additional_criteria={"thermo_types": thermo_types}
884+
additional_criteria={"thermo_types": thermo_types},
884885
# use_gibbs=use_gibbs
885886
)
886887
+ user_entries
@@ -1148,7 +1149,7 @@ def get_entries_in_chemsys(
11481149
inc_structure: bool | None = None,
11491150
property_data: list[str] | None = None,
11501151
conventional_unit_cell: bool = False,
1151-
additional_criteria=None,
1152+
additional_criteria: dict = DEFAULT_THERMOTYPE_CRITERIA,
11521153
):
11531154
"""Helper method to get a list of ComputedEntries in a chemical system.
11541155
For example, elements = ["Li", "Fe", "O"] will return a list of all
@@ -1212,8 +1213,7 @@ def get_entries_in_chemsys(
12121213
inc_structure=inc_structure,
12131214
property_data=property_data,
12141215
conventional_unit_cell=conventional_unit_cell,
1215-
additional_criteria=additional_criteria
1216-
or {"thermo_types": ["GGA_GGA+U"]},
1216+
additional_criteria=additional_criteria or DEFAULT_THERMOTYPE_CRITERIA,
12171217
)
12181218
)
12191219

0 commit comments

Comments
 (0)