Skip to content

Commit

Permalink
Exclude dimension attributes from properties
Browse files Browse the repository at this point in the history
During creation of the DLite structure.
  • Loading branch information
CasperWA committed Oct 23, 2023
1 parent 93245a8 commit 4fbc7ba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion oteapi_optimade/dlite/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,16 @@ def get(

# Attributes
new_structure_attributes.update(
structure.attributes.dict(exclude={"species", "assemblies"})
structure.attributes.dict(
exclude={"species", "assemblies", "nelements", "nsites"}
)
)
for key in list(new_structure_attributes):
if key.startswith("_"):
new_structure_attributes.pop(key)

# Structure features values are Enum values, so we need to convert them to
# their string (true) values
new_structure_attributes["structure_features"] = [
_.value for _ in new_structure_attributes["structure_features"]
]
Expand Down

0 comments on commit 4fbc7ba

Please sign in to comment.