[Top][All Lists]

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

Re: [ESPResSo-devel] Doubt in an analysis TCL script provided with Espre

From: prateeksha s
Subject: Re: [ESPResSo-devel] Doubt in an analysis TCL script provided with Espresso
Date: Tue, 22 Jan 2008 00:37:55 +0530

Ah, yes. I realised that. What I wanted to know was the structure of rawmodes. Dr. Axel Arnold has explained it:

rawmodes is not a simply array, but has the form "{Modes} {2d-array of complex
values}", where each complex number is itself a two-element array, therefore
the second element is 3d. Therefore, [lindex [lindex $rawmodes 1 $i $j] 0] is
the real part of mode i,j, and  [lindex [lindex $rawmodes 1 $i $j] 1] the
imaginary part. So, the first 1 after rawmodes selects the 2d-array instead
of the "Modes" string, and the last 0/1 the real/imaginary part."


On Jan 21, 2008 8:00 PM, Tristan Bereau <address@hidden> wrote:
If you need more information on these modes:
- the 'modes.c' file has a 'modes2d' routine which computes the FFTs
of the height of the bilayer for each grid cell.
- the 'statistics.c' file parses these results in the 'parse_modes2d'
routine, converting the fourier modes to TCL.


2008/1/21 prateeksha s <address@hidden>:
> Hi,
> I am developing using Espresso code, and I'm converting the fluctuations.tcl
> script, found in packages/mbtools/analysis/, to C. I encountered this piece
> of TCL which I do not understand, hence, I'm unable to translate it to C.
> The difficult-to-understand code is in italics :
> set re [expr [lindex [lindex $rawmodes 1 $i $j] 0]*$norm]
> set im [expr [lindex [lindex $rawmodes 1 $i $j] 1]*$norm]
>  rawmodes is a 2D array( or is it? ) so trying rawmodes[1][i][j][0] just
> doesn't make sense.
> Can somebody please clarify.
> Thanks and regards,
> Prateeksha
> _______________________________________________
> ESPResSo-devel mailing list
> address@hidden

reply via email to

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