pizza.py dump problem

Submitted by jeff788 on Thu, 05/13/2010 - 22:13

I am new to Liggghts and am trying to convert a dump file to vtk format. I'm using the following dump line

dump dmp all custom 1000 dump.pour id type x y z radius

When I try to convert the data to vtk format using pizza.py (the one from this website) I get the following error with the dump command:

d = dump("dump.pour")
reading dump file...
0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 11000 12000 13000 14000 15000 16000 17000 18000 19000 20000
read 21 snapshots
21 snapshots selected out of 21
assigned columns:
Traceback (most recent call last):
File "", line 1, in
File "/home/jeffb/build/liggghts_1p0p1/tools/pizza-8Dec09/src/dump.py", line 219, in __init__
self.read_all()
File "/home/jeffb/build/liggghts_1p0p1/tools/pizza-8Dec09/src/dump.py", line 265, in read_all
print "assigned columns:",self.names2str()
File "/home/jeffb/build/liggghts_1p0p1/tools/pizza-8Dec09/src/dump.py", line 581, in names2str
ncol = len(self.snaps[0].atoms[0])
TypeError: 'NoneType' object is unsubscriptable
>

I tried doing the same thing on one of the examples and it worked fine. What could be causing this?

Thanks,

Jeff

raguelmoon's picture

raguelmoon | Fri, 05/14/2010 - 07:47

Dear Jeff,
You must save your dump file with following coding in your input script:

dump 1 all custom 50 dump.file id type type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius

After that you use pizza tools and convert into vtk format like:
d=dump("dump.file")
v=vtk(d)
v.manyGran()
Now you can visualize your simulation in paraview...
Cheers
Ram

Ram

raguelmoon's picture

raguelmoon | Fri, 05/14/2010 - 08:13

hay!
Did you put this command before dumping the file...
...
#insert the first particles so that dump is not empty, otherwise pizza would not run....
run 1
dump . .
..
..
Cheers,
Ram

Ram

ckloss's picture

ckloss | Fri, 05/14/2010 - 08:19

Hi,

Ram is right. That's probably what is missing
If at the first time-step the dump file is empty, pizza fails because the first time-step is used to assign columns

Christoph

Silias | Wed, 05/04/2011 - 15:55

dump 1 all custom 50 dump.file id type type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius

Hi Ram,

why is there always (like in all the liggghts-examples) two times "type"?

Furthermore, I have a similar question.
I get an error from pizza, after I started the following skript:
d=dump("post/dump*")
v=vtk(d)
v.manyGran("post/vtk_*")

This is the error:
200 snapshots selected out of 200
assigned columns: id type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius
index out of bounds
IndexError'> with value: index out of bounds
error on line 3 of file ./skript
error on line 194 of file /usr/local/liggghts/gran_pizza-17Aug10/src/vtk.py
error on line 339 of file /usr/local/liggghts/gran_pizza-17Aug10/src/vtk.py

What's the problem?
Thanks for any help!

Cheers,
Silias

Silias | Wed, 05/04/2011 - 16:47

Ok,
I have resolved the problem myself.
I forgot the "ix iy iz"-part in my dump-command in my input script.