[ase-users] Problem reading lammps dump files
Sebastian Echeverri
sebastianecheverrir at gmail.com
Fri Mar 12 12:51:34 CET 2021
Dear Ase Users,
I am trying to read a dump file from Lammps, you will find it attached
(dump.prd).
The commands that I am using are the following:
from ase.io import read
AtomsInTime = read(filename="dump.prd", format="lammps-dump-text")
And i am getting the error that you will find below.
Any ideas of what might be the problem?
Python 3.7.6
ase 3.21.1
Regards,
Sebastián
dump.prd
<https://drive.google.com/file/d/1EjlZmF59lD_jrTP0GtTUGyNMq8qcJuqL/view?usp=drive_web>
Traceback (most recent call last):
File "writeLammpsFilesASE.py", line 30, in <module>
AtomsInTime = read(filename="dump.prd", format="lammps-dump-text")
File
"/home/sebastian/.local/lib/python3.7/site-packages/ase/io/formats.py",
line 683, in read
parallel=parallel, **kwargs))
File
"/home/sebastian/.local/lib/python3.7/site-packages/ase/parallel.py", line
273, in new_generator
for result in generator(*args, **kwargs):
File
"/home/sebastian/.local/lib/python3.7/site-packages/ase/io/formats.py",
line 749, in _iread
for dct in io.read(fd, *args, **kwargs):
File
"/home/sebastian/.local/lib/python3.7/site-packages/ase/io/formats.py",
line 505, in wrap_read_function
for atoms in read(filename, index, **kwargs):
File
"/home/sebastian/.local/lib/python3.7/site-packages/ase/io/lammpsrun.py",
line 289, in read_lammps_dump_text
**kwargs
File
"/home/sebastian/.local/lib/python3.7/site-packages/ase/io/lammpsrun.py",
line 183, in lammps_data_to_ase_atoms
return out_atoms
UnboundLocalError: local variable 'out_atoms' referenced before assignment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20210312/5c8b670e/attachment-0001.htm>
More information about the ase-users
mailing list