aiidateam / aiida-atomistic

AiiDA plugin which contains data and methods for atomistic simulations.
https://aiidateam.github.io/aiida-atomistic/
MIT License
2 stars 7 forks source link

Remove `ase`/`pymatgen`/... inputs from constructor in favor of `from_` `classmethod`s #10

Open mbercx opened 4 months ago

mbercx commented 4 months ago

Currently the constructor of the StructureData still has e.g. the ase input to initialize an instance from an ASE Atoms object:

https://github.com/aiidateam/aiida-atomistic/blob/1af101e382920ab0489bb3f00ac416e5bf330b70/src/aiida_atomistic/data/structure/__init__.py#L717-L727

I would instead want to see a from_ase() class method, e.g.:

from ase.build import bulk

bulk_si = bulk('Si', cubic=True)

structure_data = StructureData.from_ase(bulk_si)
mikibonacci commented 4 months ago

Hi @mbercx , I will work on this :rocket: today