Skip to content

Commit 83b27a0

Browse files
author
Jason Munro
authored
Clarify top level get_entries method (#848)
* Clarify top level get_entries method * Linting
1 parent ff7f643 commit 83b27a0

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

mp_api/client/mprester.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -658,10 +658,10 @@ def get_entries(
658658
additional_criteria: dict = None,
659659
) -> list[ComputedStructureEntry]:
660660
"""Get a list of ComputedEntries or ComputedStructureEntries corresponding
661-
to a chemical system or formula.
662-
663-
Note that by default this returns mixed GGA/GGA+U entries. For others,
664-
pass GGA/GGA+U/R2SCAN, or R2SCAN as thermo_types in additional_criteria.
661+
to a chemical system or formula. This returns entries for all thermo types
662+
represented in the database. Each type corresponds to a different mixing scheme
663+
(i.e. GGA/GGA+U, GGA/GGA+U/R2SCAN, R2SCAN). By default the thermo_type of the
664+
entry is also returned.
665665
666666
Args:
667667
chemsys_formula_mpids (str, List[str]): A chemical system, list of chemical systems
@@ -717,7 +717,11 @@ def get_entries(
717717

718718
entries = []
719719

720-
fields = ["entries"] if not property_data else ["entries"] + property_data
720+
fields = (
721+
["entries", "thermo_type"]
722+
if not property_data
723+
else ["entries", "thermo_type"] + property_data
724+
)
721725

722726
if sort_by_e_above_hull:
723727
docs = self.thermo.search(

0 commit comments

Comments
 (0)