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
>
--
-------------------------
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
Received on Wed Jun 17 2015 - 07:30:05 PDT