Hi,<div><br></div><div>You don&#39;t need to do any of this manually. You can use AnalysisDataPlotModule to create the output, which will write the output on-the-fly, without extra memory requirements. Similarly, you can compute the average and std.dev. using an AnalysisDataAverage module without coding any of that explicitly. Both of these also make them <span></span>work with the future plans for parallelization without any changes. Can&#39;t say much more without seeing the rest of the code, but hopefully this helps.</div>
<div><br></div><div>Best regards,</div>Teemu<br><div><br>torstai, 28. maaliskuuta 2013 David van der Spoel  kirjoitti:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I&#39;m working my way through the documentation trying to find out some stuff needed to finish my new analysis tool, to compute the free volume in a box. Most of it works, but when trying to get a time series I am apparently missing something.<br>

<br>
My final writing routine looks like:<br>
<br>
Freevolume::writeOutput()<br>
{<br>
    AnalysisDataFrameRef ref;<br>
    FILE   *fp;<br>
    int    i;<br>
    double faver  = fractot_/nframes_;<br>
    double fsigma = sqrt(frac2tot_/nframes_-faver*<u></u>faver);<br>
    printf(&quot;Free volume %.2f +/- %.2f %%\n&quot;,100*faver,100*fsigma);<br>
    printf(&quot;Number of frames %d\n&quot;,data_.frameCount());<br>
    fp = fopen(&quot;koko.xvg&quot;,&quot;w&quot;);<br>
    for(i=0; (i&lt;data_.frameCount()); i++)<br>
    {<br>
        ref = data_.getDataFrame(i);<br>
        fprintf(fp,&quot;%g  %g\n&quot;,ref.x(),ref.y(0));<br>
    }<br>
    fclose(fp);<br>
}<br>
<br>
however, despite frameCount() yielding 101 frames, getDataFrame() fails with an API error. I suspect that either I have selected the wrong data type for storing the numbers (<u></u>AnalysisDataFrameAverageModule<u></u>) or I have to call a routine to actually get storage for frames (bool gmx::AbstractAnalysisData::<u></u>requestStorage)<br>

<br>
Any clues?<br>
-- <br>
David van der Spoel, Ph.D., Professor of Biology<br>
Dept. of Cell &amp; Molec. Biol., Uppsala University.<br>
Box 596, 75124 Uppsala, Sweden. Phone:  +46184714205.<br>
<a>spoel@xray.bmc.uu.se</a>    <a href="http://folding.bmc.uu.se" target="_blank">http://folding.bmc.uu.se</a><br>
-- <br>
gmx-developers mailing list<br>
<a>gmx-developers@gromacs.org</a><br>
<a href="http://lists.gromacs.org/mailman/listinfo/gmx-developers" target="_blank">http://lists.gromacs.org/<u></u>mailman/listinfo/gmx-<u></u>developers</a><br>
Please don&#39;t post (un)subscribe requests to the list. Use the www interface or send it to <a>gmx-developers-request@gromacs.org</a>.<br>
</blockquote></div><br><br>-- <br>Teemu Murtola<br>&lt;<a href="mailto:teemu.murtola@iki.fi" target="_blank">teemu.murtola@iki.fi</a>&gt;<br>+358 50 362 6829<br>