diff --git a/patches/gromacs-4.6.7.diff/src/kernel/md.c b/patches/gromacs-4.6.7.diff/src/kernel/md.c index b4b8c51cd7c6d78a4d85414bb58f1cb0e2421c2b..9b0ad7aa836156dc8f1475e1db79ac94d57d003b 100644 --- a/patches/gromacs-4.6.7.diff/src/kernel/md.c +++ b/patches/gromacs-4.6.7.diff/src/kernel/md.c @@ -752,7 +752,10 @@ double do_md(FILE *fplog, t_commrec *cr, int nfile, const t_filenm fnm[], /* setting kbT is only implemented with api>1) */ real kbT=ir->opts.ref_t[0]*BOLTZ; if(pversion>1) plumed_cmd(plumedmain,"setKbT",&kbT); - + if(pversion>2){ + int res=1; + if( (Flags & MD_STARTFROMCPT) ) plumed_cmd(plumedmain,"setRestart",&res); + } if(cr->ms && cr->ms->nsim>1) { if(MASTER(cr)) plumed_cmd(plumedmain,"GREX setMPIIntercomm",&cr->ms->mpi_comm_masters); if(PAR(cr)){ diff --git a/patches/gromacs-5.0.diff/src/programs/mdrun/md.c b/patches/gromacs-5.0.diff/src/programs/mdrun/md.c index b34d23c71bfc23c109398ba6f49b8e0caa657b84..c881c0170f906b1e8399148f878b71eae5d7af8f 100644 --- a/patches/gromacs-5.0.diff/src/programs/mdrun/md.c +++ b/patches/gromacs-5.0.diff/src/programs/mdrun/md.c @@ -671,6 +671,10 @@ double do_md(FILE *fplog, t_commrec *cr, int nfile, const t_filenm fnm[], /* setting kbT is only implemented with api>1) */ real kbT=ir->opts.ref_t[0]*BOLTZ; if(pversion>1) plumed_cmd(plumedmain,"setKbT",&kbT); + if(pversion>2){ + int res=1; + if( (Flags & MD_STARTFROMCPT) ) plumed_cmd(plumedmain,"setRestart",&res); + } if(cr->ms && cr->ms->nsim>1) { if(MASTER(cr)) plumed_cmd(plumedmain,"GREX setMPIIntercomm",&cr->ms->mpi_comm_masters);