[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ESPResSo] Extracting Values of Quantities Calculated during Simulat

From: Kai Grass
Subject: Re: [ESPResSo] Extracting Values of Quantities Calculated during Simulation
Date: Mon, 19 Nov 2007 12:57:07 +0100

Dear Lorenzo,

one way to do, what you want, is to load your configurations as you wrote, and then use the 

analyze append

command for each timestep to store the current particle coordinates within Espresso. When all configurations are loaded (and appended), you can use

analyze config

to get a tcl list of order Mx3N (where M is the number of configurations that you stored). This list can be analyzed on the tcl level by writing a user-defined function (tcl command proc) to obtain properties that are not hard-coded into Espresso.

Likewise, if you only have one stored configuration,

analyze config

will return you a 3N list, that you can save to a file in any format you need for an external program.

I hope that helps,

Am 19.11.2007 um 12:44 schrieb Lorenzo Isella:

Dear All,
I have a couple of questions about how to save and manipulate the
output of a simulation with Espresso.
Despite the manual, I have not been able to do what I have in mind.
Apologies if it was already clear enough there, but I have been stuck
for quite a while.
1) Say that you saved the configuration of your system in a blockfile
using a command like:

set f [open "config_$i" "w"]
blockfile $f write tclvariable {box_l density}
blockfile $f write variable box_l
blockfile $f write particles {pos}
close $f

for i labeling the time during your simulation.
Then you read the corresponding blockfile using:
set f [open "config_$j" "r"]
while { [blockfile $f read auto] != "eof" } {}
close $f

After reading the blockfile, I can use e.g. Espresso builtin functions
to get a radius of gyration using one of its ready-to-use statistical
Now,  what if you want to calculate some statistics about the position
of your particles along the x axis?
In other words, how do you access that info which is not a hard-coded
function in Espresso?
2)It is similar to the previous question: what if I just want to save
the particle positions (x,y,z) as a N by 3 plain matrix to read it and
post-process it with other tools which do not like the blockfile

In general, as you can see, I have troubles in accessing "directly"
some of the quantities which are internally calculated by Espresso.
Many thanks


ESPResSo mailing list

Dipl. Phys. Kai Grass
Frankfurt Institute for Advanced Studies (FIAS)
Room 2|403
Ruth-Moufang-Strasse 1
60438 Frankfurt am Main

phone: +49 69 798 47533
fax:   +49 69 798 47611

reply via email to

[Prev in Thread] Current Thread [Next in Thread]