not reading dump files

Hello! I am trying to use the script to analyze the dump files from a neb calculation. I installed the python tools on my local computer without the entire lammps build. I’ve followed the instructions for setup, however when I run the following command:

/Users/willdesnoo/lammps_py_tools/ -o -r neb_dump.*

Where neb_dump.0, neb_dump.1 … neb_dump.7 are the dump files for each replica. I get the following output:

read 0 snapshots
0 snapshots selected out of 0
assigned columns: id type element x y z
Traceback (most recent call last):
File “/Users/willdesnoo/lammps_py_tools/”, line 67, in[-1])
IndexError: list index out of range

I’ve made sure to export the LAMMPS_PYTHON_TOOLS as instructed. I’ve also added a print statement to that confirms it is reading the dump files as a list. I’m running this on python2.7 (I assume this is the version to use based on syntax, but I could be wrong). I’m running the version LAMMPS (3 Mar 2020).

Is there something wrong with how I installed the python tools? Any and all suggestions would be appreciated!

More likely is that your dump files do not conform to the format expected.

The python code in question has not been changed since a long time ago.
It works with the bundled NEB examples and Python 2.7.
Porting to Python 3.x is ongoing and almost complete.

I have a similar problem. I’ve made sure that the file format is the same as the example, but this error message appears:
Traceback (most recent call last):
File “/home/jsrecio/Programas/lammps-29Sep2021/tools/python/”, line 61, in
neb = dump(file)
File “/home/jsrecio/Programas/lammps-29Sep2021/tools/python/pizza/”, line 233, in init
File “/home/jsrecio/Programas/lammps-29Sep2021/tools/python/pizza/”, line 263, in read_all
TypeError: sort() takes no positional arguments

This is definitely a “lack of python 3 support” type of error.
Right now you either must use python 2.7 or wait until the python 3 porting of the pizza python files is complete and released.


The answer can be found here:

Thank you very much. Anyway, in case anyone is interested, using the write_dump command at the end of your code + run 0, you can dump only the last time step of each replica. Then, in Ovito, it’s possible to render all the images together and create a gif.

1 Like