We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
from pyiron_atomistics import Project pr = Project('MWE') with open(pr.path + 'some.xyz', 'w') as f: f.write(4*"1\n\nH 0 0 0\n") print(len(pr.create.structure.ase.read(pr.path+'some.xyz'))) pr.create.structure.ase.read(pr.path+'some.xyz', index=':')
prints 1 and raises
1
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[14], line 2 1 print(len(pr.create.structure.ase.read(pr.path+'some.xyz'))) ----> 2 pr.create.structure.ase.read(pr.path+'some.xyz', index=':') File /cmmc/ptmp/pyironhb/mambaforge/envs/pyiron_mpie_cmti_2024-11-11/lib/python3.11/site-packages/pyiron_atomistics/atomistics/structure/factories/ase.py:57, in _ase_wraps.<locals>.decorator.<locals>.wrapper(*args, **kwargs) 54 @wraps(ase_func) 55 def wrapper(*args, **kwargs): 56 state.publications.add(publication_ase()) ---> 57 return func(*args, **kwargs) File /cmmc/ptmp/pyironhb/mambaforge/envs/pyiron_mpie_cmti_2024-11-11/lib/python3.11/site-packages/pyiron_atomistics/atomistics/structure/factories/ase.py:84, in AseFactory.read(self, *args, **kwargs) 82 @_ase_wraps(ase_read) 83 def read(self, *args, **kwargs): ---> 84 return ase_to_pyiron(ase_read(*args, **kwargs)) File /cmmc/ptmp/pyironhb/mambaforge/envs/pyiron_mpie_cmti_2024-11-11/lib/python3.11/site-packages/pyiron_atomistics/atomistics/structure/atoms.py:3048, in ase_to_pyiron(ase_obj) 3037 def ase_to_pyiron(ase_obj): 3038 """ 3039 Convert an ase.atoms.Atoms structure object to its equivalent pyiron structure 3040 (...) 3046 3047 """ -> 3048 element_list = ase_obj.get_chemical_symbols() 3049 cell = ase_obj.cell 3050 positions = ase_obj.get_positions() AttributeError: 'list' object has no attribute 'get_chemical_symbols'
Since the ase.io.read with index=":" returns a list of ase.Atoms objects. We would need to overlaod ase_to_pyiron to accept a list of ase_obj.
ase.io.read
index=":"
list
ase.Atoms
ase_to_pyiron
ase_obj
The text was updated successfully, but these errors were encountered:
No branches or pull requests
prints
1
and raisesSince the
ase.io.read
withindex=":"
returns alist
ofase.Atoms
objects. We would need to overlaodase_to_pyiron
to accept a list ofase_obj
.The text was updated successfully, but these errors were encountered: