Pass on default value of radstep in make_edi
authorCarsten Kutzner <ckutzne@gwdg.de>
Fri, 20 Dec 2013 11:02:19 +0000 (12:02 +0100)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Thu, 26 Dec 2013 09:59:02 +0000 (10:59 +0100)
This is a bugfix for make_edi when -radfix is chosen. Problem was:
if the user did not specify -radstep, then the default value of 0
was not written to the sam.edi output file. Now it is. Also
renamed "radfix" variable to "radstep" because that better reflects
what it is.

Change-Id: I0cc6ee84d42b18ee0ea6b045cdfb0c1d55d51b9f

src/tools/gmx_make_edi.c

index dc45d44530f0c423a4acc7107e6776b300f9d6be..69c39dbe0266f9b900c38bc299684e22591f9716 100644 (file)
@@ -686,7 +686,7 @@ int gmx_make_edi(int argc, char *argv[])
     static const char* evStepOptions[evStepNr] = {"-linstep", "-accdir", "-not_used", "-radstep"};
     static const char* ConstForceStr;
     static real      * evStepList[evStepNr];
-    static real        radfix   = 0.0;
+    static real        radstep  = 0.0;
     static real        deltaF0  = 150;
     static real        deltaF   = 0;
     static real        tau      = .1;
@@ -722,7 +722,7 @@ int gmx_make_edi(int argc, char *argv[])
           "Stepsizes (nm/step) for fixed increment linear sampling (put in quotes! \"1.0 2.3 5.1 -3.1\")"},
         { "-accdir", FALSE, etSTR, {&evParams[1]},
           "Directions for acceptance linear sampling - only sign counts! (put in quotes! \"-1 +1 -1.1\")"},
-        { "-radstep", FALSE, etREAL, {&radfix},
+        { "-radstep", FALSE, etREAL, {&radstep},
           "Stepsize (nm/step) for fixed increment radius expansion"},
         { "-maxedsteps", FALSE, etINT, {&edi_params.maxedsteps},
           "Maximum number of steps per cycle" },
@@ -826,12 +826,12 @@ int gmx_make_edi(int argc, char *argv[])
                     }
                 }
             }
-            else if (ev_class == evRADFIX && opt2parg_bSet(evStepOptions[ev_class], NPA, pa))
+            else if (ev_class == evRADFIX)
             {
                 snew(evStepList[ev_class], nvecs);
                 for (i = 0; i < nvecs; i++)
                 {
-                    evStepList[ev_class][i] = radfix;
+                    evStepList[ev_class][i] = radstep;
                 }
             }
             else if (ev_class == evFLOOD)