Energy minimization with nstcalcenergy=-1, foreign lambda values
and no separate dhdl.xvg output file called malloc with negative count.
Fixes #962
Change-Id: I3d6b636ddba80fc2ae400590c48642c217325293
md->dhc=NULL;
if (ir->separate_dhdl_file == sepdhdlfileNO )
{
- int i;
- snew(md->dhc, 1);
+ /* Currently dh histograms are only written with dynamics */
+ if (EI_DYNAMICS(ir->eI))
+ {
+ snew(md->dhc, 1);
- mde_delta_h_coll_init(md->dhc, ir);
+ mde_delta_h_coll_init(md->dhc, ir);
+ }
md->fp_dhdl = NULL;
}
else