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

From: Marion, Antoine <antoine.marion.tum.de>
Date: Wed, 17 Jun 2015 16:37:41 +0000

Hi,

Thanks a lot for your answers.

> Le 17 juin 2015 à 16:26, Daniel Roe <daniel.r.roe.gmail.com> a écrit :
>
> 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). "

Sorry, I missed that line in the manual ...
>
> (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.

It makes sense now. Thanks for the explanations.
>
> -Dan
>
> PS - Out of curiosity, just how much do your NetCDF files compress as a
> percentage of the original file size?

Well, I just checked this after posting the question and I actually don't really need to compress. But it comes from an old habit when dealing with ASCII files.
The compression gains 10% compared to the initial file. Not so much but still something. Of soured nothing to do with the compression of a text file.

Thanks again!

Best wishes,

Antoine
>
>
>>
>> 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
>
>
>
> --
> -------------------------
> Daniel R. Roe, PhD
> Department of Medicinal Chemistry
> University of Utah
> 30 South 2000 East, Room 307
> Salt Lake City, UT 84112-5820
> http://home.chpc.utah.edu/~cheatham/
> (801) 587-9652
> (801) 585-6208 (Fax)
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Wed Jun 17 2015 - 10:00:02 PDT
Custom Search