Re: [AMBER] cpptraj : gzip or bzip2 netcdf trajectory files not recognized

From: Marion, Antoine <>
Date: Wed, 17 Jun 2015 20:03:52 +0000

Hi Gérald,

I did the same tests as you did and got similar results for the files size.
A compressed ascii file is smaller than the corresponding netcdf one.

However, I agree with Prof. Case about the efficiency of post-processing netcdf files.

Here are some timings for 200 frames of a ~160000 atoms system with PBC.

For a series of distances and rmsd analysis using cpptraj :
- ascii :TIME: Total execution time: 16.3310 seconds.
- ascii.gz : TIME: Total execution time: 21.6712 seconds.
- netcdf : TIME: Total execution time: 2.4660 seconds.

The difference is also quite striking when loading a trajectory into a visualization program.
Using vmd :

-- ascii
>> time vmd -parm7 md.prmtop -crdbox md.crd << eof

real 0m34.124s
user 0m33.038s
sys 0m0.732s

-- netcdf
>> time vmd -parm7 md.prmtop -netcdf << eof

real 0m2.132s
user 0m1.657s
sys 0m0.369s

Also to run the trajectory itself, it feels like it is faster to write netcdf files.
I cannot give you the exact timings since the two simulations ran on different machines and with different output setting for the velocities, but it seems so.
Anyone else did such a comparison ?

Best wishes,

From: David A Case <>
Sent: Wednesday, June 17, 2015 9:27 PM
To: AMBER Mailing List
Subject: Re: [AMBER] cpptraj : gzip or bzip2 netcdf trajectory files not recognized

On Wed, Jun 17, 2015, Gerald Monard wrote:

> What's the advantage, except size, of using the NetCDF format?

Loading netcdf files into cpptraj can be *much* faster than uncompressing
an ASCII file, then converting those to the internal representation.

Second, code can skip frames efficiently, rather than having to read the
intervening frames.

Third, values are stored in floating point format, so you avoid the dreaded
problem of finding '****' in the 5075'th frame.

Fourth, you can skip corrupted frames (which *do* happen occasionally) much
more robustly with netcdf than with ASCII.


AMBER mailing list

AMBER mailing list
Received on Wed Jun 17 2015 - 13:30:03 PDT
Custom Search