Issue with manyGran() method

Submitted by ervinodh1126 on Tue, 06/28/2011 - 18:48

I am trying to covert a dump file to vtk format. No issue with the first two steps.

1. d = dump("dump.filename")
2. v = vtk(d)
3. v.manyGran()
When I execute the third step i get the below error message.

Traceback (most recent call last):
File "", line 1, in ?
File "/home/s02/s1061629/pizza-16Mar09/src/vtk.py", line 124, in manyGran
particleGran(file,atoms,names,len(self.data.snaps[0].atoms[0]))
File "/home/s02/s1061629/pizza-16Mar09/src/vtk.py", line 321, in particleGran
print >>f,atom[18]
IndexError: index out of bounds

Can anyone please help me on how to fix this error

Vinodh

ckloss's picture

ckloss | Wed, 06/29/2011 - 08:55

you are most probably not using one of the dump custom commands as advised in the readme_granular file, or the first dump snapshot is empty

Christoph

venes520 | Sat, 02/11/2012 - 14:03

Hey Vinodh,

I got the same error too,

Traceback (most recent call last):
File "", line 1, in
File "/home/kloss/LAMMPS/pizza-8Dec09/src/vtk.py", line 194, in manyGran
particleGran(file,atoms,names,len(self.data.snaps[0].atoms[0]))
File "/home/kloss/LAMMPS/pizza-8Dec09/src/vtk.py", line 325, in particleGran
print >>f,atom[3],atom[4],atom[5] #write x,y,z [atom[0]=id, atom[1]=type]
IndexError: index out of bounds

Have you solved it? any thoughts?

Thanks!
Anson Liang

Cheers
Anson Liang