You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And the fact the entire structure data is now captured by the properties, after #10 the constructor would effectively only have the properties input. This immediately made me think of just having a JSON serializing method (to_json, from_json, or similar). But then I thought about @sphuber's AEP (aiidateam/AEP#40) - which I still have to read 🙈 - and if we shouldn't be thinking about how to integrate the new StructureData with the concepts there.
I'll have to read up some more before having a solid opinion on what to do, but I already wanted to raise the issue.
The text was updated successfully, but these errors were encountered:
I think what you are proposing would be automatically supported with aiidateam/aiida-core#6255
It would allow defining a schema for the StructureData class through a pydantic model:
classStructureDataclassModel(Data.Model):
pbc: list[bool] =MetadataField(description='Periodicity along each cell axis')
cell: list[list[float]] =MetadataField(description='The cell parameters')
positions: list[list[float|int]] =MetadataField(description='The atomic positions')
symbols: list[str]=MetadataField(description='The atomic symbol labels')
You would then be able to create an instance from JSON serialized data as follows:
Looking at the example on how to create a
StructureData
instance:And the fact the entire structure data is now captured by the properties, after #10 the constructor would effectively only have the
properties
input. This immediately made me think of just having a JSON serializing method (to_json
,from_json
, or similar). But then I thought about @sphuber's AEP (aiidateam/AEP#40) - which I still have to read 🙈 - and if we shouldn't be thinking about how to integrate the newStructureData
with the concepts there.I'll have to read up some more before having a solid opinion on what to do, but I already wanted to raise the issue.
The text was updated successfully, but these errors were encountered: