Hi Daniel,
A good point is raised here.
I've made a small test, but from experience it's the same for bigger
systems: I run a molecular dynamics and saved the same number of steps
(ntwx) with ioutfm = 0 or ioutfm = 1, then I compressed the files. The
results are the following:
-rw-r--r-- 1 gmonard users 6777381 Jun 17 19:52 tmp.crd-ioutfm0
-rw-r--r-- 1 gmonard users 2527101 Jun 17 19:53 tmp.crd-ioutfm0.gz
-rw-r--r-- 1 gmonard users 3348408 Jun 17 19:51 tmp.crd-ioutfm1
-rw-r--r-- 1 gmonard users 3004141 Jun 17 19:53 tmp.crd-ioutfm1.gz
This means that indeed using ioutfm=1 gives a lower file size than
ioutfm=0, but the compression of the ASCII file yields the smallest file
size... which can be directly used by trajin.
Does this mean that, if size matters, it's better to use ioutfm=0?
What's the advantage, except size, of using the NetCDF format?
Gerald
On 06/17/2015 04:24 PM, Daniel Roe wrote:
> Hi,
>
> On Wed, Jun 17, 2015 at 7:37 AM, Marion, Antoine <antoine.marion.tum.de>
> wrote:
>
>>
>> I am experiencing an issue while trying to read gzipped netcdf
>> trajectories in cpptraj.
>>
>
> From the first page (517) of the CPPTRAJ manual section:
>
> "3. Almost any file read or written by cpptraj can be compressed (with the
> exception of binary trajectories like NetCDF/DCD/TRX). "
>
> (Note this is actually not completely correct since compressed DCD and TRR
> files can be read just fine.)
>
> The issue with a compressed NetCDF file is that the NetCDF API doesn't
> support opening a stream (from e.g. Zlib), only an actual file. Since a
> compressed NetCDF file does not look like a NetCDF file to the API, it has
> no idea what to do with it. So as you have found you have to decompress a
> compressed NetCDF file before it can be read.
>
> -Dan
>
> PS - Out of curiosity, just how much do your NetCDF files compress as a
> percentage of the original file size?
>
>
>>
>> Here is the error that I get:
>> ------------
>> CPPTRAJ: Trajectory Analysis. V15.00
>> ___ ___ ___ ___
>> | \/ | \/ | \/ |
>> _|_/\_|_/\_|_/\_|_
>>
>> | Date/time: 06/17/15 15:10:01
>> | Available memory: 113198 MB
>>
>> INPUT: Reading Input from STDIN
>> [parm md.prmtop]
>> Reading 'md.prmtop' as Amber Topology
>> [trajin md.crd.gz]
>> Error: Could not determine trajectory md.crd.gz format.
>> Error: Could not set up input trajectory 'md.crd.gz'.
>> 1 errors encountered reading input.
>> TIME: Total execution time: 0.4719 seconds.
>>
>> ------------
>>
>>
>> Notice that if I gunzip the trajectory prior to the analysis, cpptraj
>> reads it properly.
>>
>> I also tried to compress the trajectory using bzip2. The result is the
>> same as using gzip.
>>
>> I do not think that it depends on this simulation, since I get the same
>> result with other systems.
>>
>> Changing the file extension from ".crd.gz" to ".nc.gz" (as suggested in
>> the manual) does not make the trick either.
>>
>> I finally tried to specify the format in the trajin command as "trajin
>> md.crd.gz netcdf", but I am not sure if this keyword is used at all.
>>
>>
>> Does anyone have an idea if this is a bug (or unsupported feature) or a
>> problem coming from my files ?
>>
>>
>> Thanks in advance.
>>
>>
>> Best regards,
>>
>>
>> Antoine
>>
>>
>> ________________________________
>> -- Dr. Antoine MARION
>> Postdoctoral Research Scientist
>>
>> Department of Life Sciences
>> Theoretical Chemical Biology and Protein Modelling Group
>> Technische Universität München
>> Emil-Erlenmeyer-Forum 8
>> D-85354 Freising-Weihenstephan
>> Germany
>>
>> Phone: +49 (0)8161 71-2271
>>
>>
>>
>>
>>
>> ?
>>
>> _______________________________________________
>> AMBER mailing list
>> AMBER.ambermd.org
>> http://lists.ambermd.org/mailman/listinfo/amber
>>
>
>
>
--
____________________________________________________________________________
Prof. Gerald MONARD
SRSMC, Université de Lorraine, CNRS
Boulevard des Aiguillettes B.P. 70239
F-54506 Vandoeuvre-les-Nancy, FRANCE
e-mail : Gerald.Monard.univ-lorraine.fr
tel. : +33 (0)383.684.381
fax : +33 (0)383.684.371
web : http://www.monard.info
____________________________________________________________________________
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Wed Jun 17 2015 - 11:30:02 PDT