Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add external database IDs to summary #544

Merged
merged 2 commits into from
Sep 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion emmet-core/emmet/core/summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,12 @@ class SummaryDoc(PropertyDoc):
True, description="Whether the material is theoretical.", source="provenance"
)

# External Database IDs

database_IDs: bool = Field(
None, description="External database IDs for this material.", source="provenance"
)

@classmethod
def from_docs(cls, material_id: MPID, **docs: Dict[str, Dict]):
"""Converts a bunch of summary docs into a SummaryDoc"""
Expand Down Expand Up @@ -513,7 +519,7 @@ def from_docs(cls, material_id: MPID, **docs: Dict[str, Dict]):
"has_reconstructed",
],
HasProps.oxi_states.value: ["possible_species"],
HasProps.provenance.value: ["theoretical"],
HasProps.provenance.value: ["theoretical", "database_IDs"],
HasProps.charge_density.value: [],
HasProps.eos.value: [],
HasProps.phonon.value: [],
Expand Down
2 changes: 1 addition & 1 deletion emmet-core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"pydantic==1.10.2",
"pybtex~=0.24",
"typing-extensions>=3.7,<5.0",
"spglib<3.0.0",
"spglib<2.0.0",
],
extras_require={
"all": [
Expand Down