[gmx-users] How to recover a corrupted .edr file

Christopher Neale chris.neale at alum.utoronto.ca
Thu Oct 5 07:38:21 CEST 2017


Dear users:


I recently experienced some corruption in a .xtc and a .edr file. Recovering the .xtc was pretty easy, I use gmx trjconv -b and -e to get the part before the corruption and the part after the corruption, which was itself a small chunk. This presumably works because trjconv actually skips to the -b time without reading through to get there.


However, gmx eneconv seems to start reading always form the start of the .edr file. This is fine for a normal file, where it reads the initial frames through until the -b time and then starts writing to the output file. However, with a corrupted file, it causes problems because it hangs up on the corruption. To put it more planly, gmx trjconv fails with a corrupted .xtc but can recover a readable part beyond the corruption with a -b value just beyond the end of the corruption; this is not possible with my usage of gmx eneconv. I'm hoping that there is some alternative.


Below is what I get with gmx eneconv from version 5.1.2. I als tried 2016.2 and got the same result. You can see that it lists the start time as "0" ps even though I sent it -b 379000. This is not a bug, since I tested with a non-corrupted file and gmx eneconv will respect the -b flag in what it writes out. It's just that eneconv can not seem to skip right to the -b point whereas trjconv can.


GROMACS:      gmx eneconv, VERSION 5.1.2
Executable:   /scratch/cneale/exe/GROMACS/exec/gromacs-5.1.2/serial/bin/gmx
Data prefix:  /scratch/cneale/exe/GROMACS/exec/gromacs-5.1.2/serial
Command line:
  gmx eneconv -f 120LPL/DOPC_DPPC_chol_1_1_1_310K/MD.edr -b 379000 -o 120LPL/DOPC_DPPC_chol_1_1_1_310K/MD_post_379000ps.edr

Opened 120LPL/DOPC_DPPC_chol_1_1_1_310K/MD.edr as single precision energy file
^MReading energy frame      0 time    0.000         ^MReading energy frame      1 time    2.000
Sorting disabled.

Summary of files and start times used:

          File                Start time
-----------------------------------------
120LPL/DOPC_DPPC_chol_1_1_1_310K/MD.edr        0.000

Opened 120LPL/DOPC_DPPC_chol_1_1_1_310K/MD.edr as single precision energy file
...

########

Thank you,
Chris.


More information about the gromacs.org_gmx-users mailing list