Skip to content

Commit

Permalink
Clarify top level get_entries method (#848)
Browse files Browse the repository at this point in the history
* Clarify top level get_entries method

* Linting
  • Loading branch information
munrojm committed Sep 27, 2023
1 parent ff7f643 commit 83b27a0
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions mp_api/client/mprester.py
Expand Up @@ -658,10 +658,10 @@ def get_entries(
additional_criteria: dict = None,
) -> list[ComputedStructureEntry]:
"""Get a list of ComputedEntries or ComputedStructureEntries corresponding
to a chemical system or formula.
Note that by default this returns mixed GGA/GGA+U entries. For others,
pass GGA/GGA+U/R2SCAN, or R2SCAN as thermo_types in additional_criteria.
to a chemical system or formula. This returns entries for all thermo types
represented in the database. Each type corresponds to a different mixing scheme
(i.e. GGA/GGA+U, GGA/GGA+U/R2SCAN, R2SCAN). By default the thermo_type of the
entry is also returned.
Args:
chemsys_formula_mpids (str, List[str]): A chemical system, list of chemical systems
Expand Down Expand Up @@ -717,7 +717,11 @@ def get_entries(

entries = []

fields = ["entries"] if not property_data else ["entries"] + property_data
fields = (
["entries", "thermo_type"]
if not property_data
else ["entries", "thermo_type"] + property_data
)

if sort_by_e_above_hull:
docs = self.thermo.search(
Expand Down

0 comments on commit 83b27a0

Please sign in to comment.