Fixes #1194 error reading 4.5.5 tpr files with dihres
authorDavid van der Spoel <spoel@xray.bmc.uu.se>
Wed, 1 May 2013 13:08:29 +0000 (15:08 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Thu, 30 May 2013 08:18:31 +0000 (10:18 +0200)
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

index f79118c66e87bd97bcf0a533c210607b2b08686e..62d77c1744b6137a45ecb44a7f81b93cfc06a87a 100644 (file)
@@ -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);