From: Erik Lindahl Date: Fri, 20 Jun 2014 15:23:06 +0000 (+0200) Subject: Always set b-state posres, even if identical to a-state X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=0e80bfd460b0faa686b3723e36852cbde0f859d0;p=alexxy%2Fgromacs.git Always set b-state posres, even if identical to a-state Previously we did not read the b-state position restraint file (option -rb) if the name was identical to the a-state, which caused the position restraints to be zero. Rather than trying to be smart, we now always read it. Fixes #1399. Change-Id: I13d93ab667734f022e48143e4cd0672b7f303e1c --- diff --git a/src/gromacs/gmxpreprocess/grompp.c b/src/gromacs/gmxpreprocess/grompp.c index fc7b2c5555..4c1e6d888b 100644 --- a/src/gromacs/gmxpreprocess/grompp.c +++ b/src/gromacs/gmxpreprocess/grompp.c @@ -949,10 +949,10 @@ static void gen_posres(gmx_mtop_t *mtop, t_molinfo *mi, int i, j; read_posres (mtop, mi, FALSE, fnA, rc_scaling, ePBC, com, wi); - if (strcmp(fnA, fnB) != 0) - { - read_posres(mtop, mi, TRUE, fnB, rc_scaling, ePBC, comB, wi); - } + /* It is safer to simply read the b-state posres rather than trying + * to be smart and copy the positions. + */ + read_posres(mtop, mi, TRUE, fnB, rc_scaling, ePBC, comB, wi); } static void set_wall_atomtype(gpp_atomtype_t at, t_gromppopts *opts,