Create txt files from Pizza.py

JF's picture
Submitted by JF on Thu, 01/13/2011 - 18:16

Hello everyone,

As it is my first question of the year 2011, I take this opportunity to wish all LIGGGHTS' users a Happy New Year.

About my question, I would like to know if it exists a Pizza's function to export the data from the custom dump to txt files ?

Each line of txt file will be the numerical data dumped for one atom. I need these txt files to perform posttreatment with Matlab.

Regards
JF

JF's picture

JF | Fri, 01/14/2011 - 09:24

Hi Christoph,

Thank you for your suggestion and the link. It is exactly what I need.
However, I have just a small problem with the flags (head,app) of the function d.write().

I perform this sequence:

d=dump("dump.mysimulation")
d.write("simulation",0,0)
d.scatter("results")

but I have this error for the function write()

File "", line 1, in
TypeError: write() takes exactly 2 arguments (4 given)

I become crazy with Python, I gave only 2 arguments.
Please, Can a Python expert help me ?

I use the last Pizza version (17 August 2010).

Regards
JF

ckloss's picture

ckloss | Fri, 01/14/2011 - 09:30

Sorry, my fault. Please have a look at your LOCAL pizza.py documentation, the web reference differs here because this version is newer.

Christoph

JF's picture

JF | Fri, 01/14/2011 - 10:01

Thanks for the information, I downloaded the last pizza.py version (24 November 2010) on the website, because only this version has these interesting flags in the function write().

It works well.
JF