[gmx-developers] Errors in tng_io reading box vectors

Magnus Lundborg magnus.lundborg at scilifelab.se
Thu Jun 9 09:09:50 CEST 2016

Hi Peter,

In the tng_example.tng file there is only one box shape, stored outside 
the trajectory and thus valid for all of it (unless there is box shape 
data in specific frames overriding it). That's the reason why there is 
only one frame. But as you say the API does not handle this well, since 
you have specified that you wanted the data over a certain number of 
frames, and should thereby presume that the returned data is of the 
specified size (n_frames/stride_length).

I will have to look into how deal with this without breaking anything 
(including API function signatures).

Best Regards,


On 2016-06-02 19:11, Peter Kenneth Eastman wrote:
> Hi Magnus,
>> So e.g. if you read 100 frames of data with a stride_length 100 the length of the returned array will only be 1*n_values_per_frame.
> The file in question has a stride_length of 1, so that isn't the problem here.  This is just the tng_example.tng file from Gromacs, if you want to reproduce it yourself.  Just call tng_data_vector_interval_get() on it requesting the box shape for a range of frames.
> Peter

More information about the gromacs.org_gmx-developers mailing list