aiidateam / aiida-atomistic

AiiDA plugin which contains data and methods for atomistic simulations.
MIT License
1 stars 5 forks source link

`get_ase()` error #17

Open superstar54 opened 2 months ago

superstar54 commented 2 months ago
from aiida import orm, load_profile
load_profile()

from aiida_atomistic.data.structure import StructureData

properties_dict = {
    "cell":{"value":[[3.5, 0.0, 0.0], [0.0, 3.5, 0.0], [0.0, 0.0, 3.5]]},
    "pbc":{"value":[True,True,True]},
    "positions":{"value":[[0.0, 0.0, 0.0],[1.5, 1.5, 1.5]]},
    "charge": {"value": [1.0, 1.0]},
    "symbols":{"value":["Li","Li"]},
    }
structure = StructureData(properties = properties_dict)
structure.get_ase()

Raise error:

   1992         _kinds = self.kinds
   1993 

[~/miniconda3/envs/aiida/lib/python3.11/site-packages/aiida/orm/nodes/node.py](https://file+.vscode-resource.vscode-cdn.net/home/xing/tests/aiida/atomistic/~/miniconda3/envs/aiida/lib/python3.11/site-packages/aiida/orm/nodes/node.py) in __getattr__(self, name)
    720             return getattr(self.base.links, new_name)
    721 
--> 722         raise AttributeError(name)

AttributeError: cell

Should be related to #12 .

mikibonacci commented 2 months ago

Hi @superstar54 , yes indeed it is related to https://github.com/aiidateam/aiida-atomistic/issues/12. I have not yet adapted the method, it is still the old one which works with orm.StructureData