[gmx-developers] How to extract stored data in AnalysisData object?

Teemu Murtola teemu.murtola at gmail.com
Sun Oct 19 06:43:20 CEST 2014


Hi,

and sorry for a bit late reply.

On Sun, Oct 12, 2014 at 10:27 PM, Yunlong Liu <yliu120 at jh.edu> wrote:

> I would like to have access to the data stored in the AnalysisData object
> after running a single pass over all the frames in the trajectory. I don't
> know how to do it and where to find the stored data.
>

There are two alternatives:

   - If you really need random access to all the data after it has been
   produced, you can call requestStorage(-1) on the object, and the access the
   data using getDataFrame().
   - If you only need to process the data in a manner that can be done
   on-the-fly (e.g., accumulating them from each frame in some way), you can
   create a class that implements the AnalysisDataModuleSerial interface and
   use addModule() in the AnalysisData object to add your module to the
   processing chain of the data. The functions in your class will be called
   for each frame after the data has been entered. If your analysis needs
   access to earlier frames, you can also call requestStorage(N) to get access
   to N last frames within these callbacks.

Best regards,
Teemu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20141019/9b01b9ad/attachment.html>


More information about the gromacs.org_gmx-developers mailing list