From 3ec882b8ec644943b15455e5e803a3a009cd686d Mon Sep 17 00:00:00 2001 From: David van der Spoel Date: Wed, 1 May 2013 15:08:29 +0200 Subject: [PATCH] Fixes #1194 error reading 4.5.5 tpr files with dihres Somehow the tpx_version produced by 4.5.5 was higher (73) than expected, making the the tpx reading incorrectly assuming this was using the new file format. Now set to the version before the first official 4.6 tpx format, 82 to match the tpr files in the regression tests. Duh! Change-Id: I40d8ffa0d350cf3b690f8dfb071fc191f027d02f --- src/gmxlib/tpxio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gmxlib/tpxio.c b/src/gmxlib/tpxio.c index f79118c66e..62d77c1744 100644 --- a/src/gmxlib/tpxio.c +++ b/src/gmxlib/tpxio.c @@ -1787,7 +1787,7 @@ void do_iparams(t_fileio *fio, t_functype ftype, t_iparams *iparams, gmx_fio_do_real(fio, iparams->orires.kfac); break; case F_DIHRES: - if (file_version < 72) + if (file_version < 82) { gmx_fio_do_int(fio, idum); gmx_fio_do_int(fio, idum); @@ -1795,7 +1795,7 @@ void do_iparams(t_fileio *fio, t_functype ftype, t_iparams *iparams, gmx_fio_do_real(fio, iparams->dihres.phiA); gmx_fio_do_real(fio, iparams->dihres.dphiA); gmx_fio_do_real(fio, iparams->dihres.kfacA); - if (file_version >= 72) + if (file_version >= 82) { gmx_fio_do_real(fio, iparams->dihres.phiB); gmx_fio_do_real(fio, iparams->dihres.dphiB); -- 2.22.0