dump to vtk conversion problem (Pizza.py)

Hello,

I have been using the LAMMPS-9 Dec 2014 version for all my simulations up until now.

I want to use Paraview as my main visualization tool, thus I have been trying to convert
the dump files to .vtk format. Following are the sequence of commands I have been trying after
executing "python -i ~/pizza/src/pizza.py" in the directory that contains the dump files

d=dump("mydumpfile")
v=vtk(d)
v.one()

I get the following error, which I do not understand

Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/home/venkat/pizza/src/vtk.py", line 57, in one
     time,box,atoms,bonds,tris,lines = self.data.viz(which)
   File "/home/venkat/pizza/src/dump.py", line 1014, in viz
     type = self.names[self.atype]
KeyError: 'type'

when I try v.single(1,"tmp.single")

Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/home/venkat/pizza/src/vtk.py", line 121, in single
     which = self.data.findtime(time)
   File "/home/venkat/pizza/src/dump.py", line 1078, in findtime
     raise StandardError, "no step d exists&quot; n
StandardError: no step 1 exists

Can someone please help me understanding why this is not working?

Thank you very much
Venkat

Hello,

I have been using the LAMMPS-9 Dec 2014 version for all my simulations
up until now.

I want to use Paraview as my main visualization tool, thus I have been
trying to convert
the dump files to .vtk format. Following are the sequence of commands I
have been trying after
executing "python -i ~/pizza/src/pizza.py" in the directory that
contains the dump files

d=dump("mydumpfile")
v=vtk(d)
v.one()

I get the following error, which I do not understand

Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/home/venkat/pizza/src/vtk.py", line 57, in one
     time,box,atoms,bonds,tris,lines = self.data.viz(which)
   File "/home/venkat/pizza/src/dump.py", line 1014, in viz
     type = self.names[self.atype]
KeyError: 'type'

when I try v.single(1,"tmp.single")

Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/home/venkat/pizza/src/vtk.py", line 121, in single
     which = self.data.findtime(time)
   File "/home/venkat/pizza/src/dump.py", line 1078, in findtime
     raise StandardError, "no step d exists&quot; n
StandardError: no step 1 exists

Can someone please help me understanding why this is not working?

it looks as if in both cases you are requesting Pizza.py to do
something for which you do not provide the required data.
just look at the error messages. in the first case, it appears as if
your dump file does not contain the required "type" entry.
and in the second case, you seem to be requesting to read a timestep
number that does not exist in your dump file.
please re-read the documentation again and pay attention to these two
specific details.

axel.

Normally the Pizza dump.py shoudl be able

to label all the dump columns using info

in the current LAMMPS formatting for the dump files.

If you are using the dump.py from LAMMPS tools/python/pizza,

then it is older than the one currently in Pizza.py itself, and

that might be why the dump command is complaining.

I will update that in the next LAMMPS patch. However,

you should be able to use the dump.map() method to

label the columns themselves.

If you did not dump a “type” column in your dump file,

then that is the issue and cannot be fixed. I.e. you need

to re-dump your data with that attribute.

Steve