Merge branch 'release-2019' into master
[alexxy/gromacs.git] / src / gromacs / gmxana / gmx_wham.cpp
index 5624c0ddb7788cbc39af7fd4c8ee45b9bb1a329c..92c0a0fd20d991350dc74a3470e32ce1539e48e7 100644 (file)
@@ -63,7 +63,7 @@
 #include "gromacs/math/vec.h"
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
-#include "gromacs/mdtypes/pull-params.h"
+#include "gromacs/mdtypes/pull_params.h"
 #include "gromacs/mdtypes/state.h"
 #include "gromacs/pulling/pull.h"
 #include "gromacs/random/tabulatednormaldistribution.h"
@@ -1232,8 +1232,6 @@ static void getRandomIntArray(int nPull, int blockLength, int* randomArray, gmx:
         }
         randomArray[ipull] = ipullRandom;
     }
-    /*for (ipull=0; ipull<nPull; ipull++)
-       printf("%d ",randomArray[ipull]); printf("\n"); */
 }
 
 /*! \brief Set pull group information of a synthetic histogram
@@ -1641,7 +1639,6 @@ static void do_bootstrapping(const char *fnres, const char* fnprof, const char *
     switch (opt->bsMethod)
     {
         case bsMethod_hist:
-            snew(randomArray, nAllPull);
             printf("\n\nWhen computing statistical errors by bootstrapping entire histograms:\n");
             please_cite(stdout, "Hub2006");
             break;
@@ -1674,6 +1671,7 @@ static void do_bootstrapping(const char *fnres, const char* fnprof, const char *
         {
             case bsMethod_hist:
                 /* bootstrap complete histograms from given histograms */
+                srenew(randomArray, nAllPull);
                 getRandomIntArray(nAllPull, opt->histBootStrapBlockLength, randomArray, &opt->rng);
                 for (i = 0; i < nAllPull; i++)
                 {