i-pi-dev_archive icon indicating copy to clipboard operation
i-pi-dev_archive copied to clipboard

Add support for .gro format

Open OndrejMarsalek opened this issue 10 years ago • 4 comments

The Gromacs text format for trajectories is almost as simple as XYZ but has the additional advantage of containing the box. The specification is here:

http://manual.gromacs.org/online/gro.html

OndrejMarsalek avatar Mar 04 '14 05:03 OndrejMarsalek

Sounds great. Would you want to take care of this? With @joshmore we had also thought to reorder the trajectory i/o subroutines by putting them all in a single file. Seems like a nice idea to get gradually into the codebase.

ceriottm avatar Mar 04 '14 09:03 ceriottm

Yes, I will do this, though I might want to start with something else.

Looking at the code now, I think some more general work on it might be useful. In particular, I would like to have separate functions to write one frame of each format and the rest of the code as general as possible.

OndrejMarsalek avatar Mar 04 '14 16:03 OndrejMarsalek

I agree. It would be nice to have a common function that writes out and reads in, with an argument that specifies which format to use. Ideally, one could optionally use some library, say openbabel. I am however a bit reluctant to introduce dependencies from external libraries (see how Josh has implemented the use of FFTW for the NM transformation, that uses the more efficient PyFFTW only if it is present, but falls back on numpy otherwise).

ceriottm avatar Mar 04 '14 17:03 ceriottm

I will start by splitting the code into general and format-specific parts. I think having our own I/O functions is certainly preferred to an external library, unless we have a good reason for it. Perhaps having it as an optional thing is a future possibility, but not really a priority.

OndrejMarsalek avatar Mar 06 '14 01:03 OndrejMarsalek