AMBER Archive (2004)

Subject: RE: AMBER: compressed files

From: Ross Walker (ross_at_rosswalker.co.uk)
Date: Wed Sep 22 2004 - 12:20:18 CDT


Dear Jessica,

> I would like to analyse many trajectories
> in compressed format (*.gz), I have the analysing
> tools in Fortran, and I think there is a way
> to read the gzipped files in Fortran
> (somehow without directly unzipping them in advance !!!!).
> If this was the case could someone help me, please ??
> I thank you in advance.

You can do this in 'c' via the use 'gunzip -c' within your program.
Essentially you can make gunzip stream to standard out which your program
can then capture on standard in or alternatively you can capture this in a
array defined by a pointer. For an example see lines 590 - 606 of io.c in
amber8/src/ptraj/.

All the best
Ross

/\
\/
|\oss Walker

| Department of Molecular Biology TPC15 |
| The Scripps Research Institute |
| Tel:- +1 858 784 8889 | EMail:- ross_at_rosswalker.co.uk |
| http://www.rosswalker.co.uk/ | PGP Key available on request |
 

-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber_at_scripps.edu
To unsubscribe, send "unsubscribe amber" to majordomo_at_scripps.edu