<p dir="ltr">Hi,</p>
<p dir="ltr">On Nov 13, 2014 9:51 AM, &quot;Alexey Shvetsov&quot; &lt;<a href="mailto:alexxy@omrb.pnpi.spb.ru">alexxy@omrb.pnpi.spb.ru</a>&gt; wrote:<br>
&gt; Personaly i thougth about option 2 (store intermediate data). However in some cases it will lead to very large memory footprint.</p>
<p dir="ltr">Sure, but since you haven&#39;t told us anything about what you want to do, it&#39;s impossible to say whether that applies to your case. And there certainly are cases where this is possible.</p>
<p dir="ltr">&gt; Example when you need to rewind and reread trajectory already present in gromacs tools (e.g. g_covar it computes average structure and after that computes displacements over average possitions).</p>
<p dir="ltr">That is a particularly bad example, because<br>
1) it is possible to compute the average and covariance in a single pass, so my approach 1 results in much more effective analysis, and<br>
2) even if it weren&#39;t, there would be essentially no overhead to write two different tools, one to compute the average, and another one that takes the average structure as input and computes the covariance.</p>
<p dir="ltr">&gt; Btw is it possible to call AnalyzeFrame recursively from C++?</p>
<p dir="ltr">That depends fully on what you put into that function... The framework itself surely doesn&#39;t call it recursively, but if you don&#39;t use any constructs that expects the guarantees that the framework provides and your recursion breaks, why not?</p>
<p dir="ltr">&gt; Using python wrapper is a good idea, however it currenlty in early stage (e.g no selections).</p>
<p dir="ltr">If you followed my recommendation, you wouldn&#39;t need selection support to implement my suggestion 4 (as long as you wrote your core tool in C++, and only the glue with Python). But if you don&#39;t even want to explore this approach for the bindings, there&#39;s not much I can do...</p>
<p dir="ltr">Best regards,<br>
Teemu</p>