Fix gmx nmr -viol option
authorEliane Briand <eliane.briand@mpibpc.mpg.de>
Mon, 31 May 2021 14:46:31 +0000 (16:46 +0200)
committerPaul Bauer <paul.bauer.q@gmail.com>
Tue, 1 Jun 2021 09:04:23 +0000 (09:04 +0000)
Ref #4060

src/gromacs/gmxana/gmx_nmr.cpp

index 3b742e9110dca1ebd144912e1d903672069122f8..a776dfcffa5fba8205170ed0ed2ac4686e122fed 100644 (file)
@@ -468,6 +468,11 @@ int gmx_nmr(int argc, char* argv[])
     }
     nset = 0;
 
+    if (bDisRe && (bORIRE || bOTEN))
+    {
+        gmx_fatal(FARGS, "Cannot do sum of violation (-viol) and other analysis in a single call.");
+    }
+
     fp = open_enx(ftp2fn(efEDR, NFILE, fnm), "r");
     do_enxnms(fp, &nre, &enm);
     free_enxnms(nre, enm);
@@ -623,7 +628,7 @@ int gmx_nmr(int argc, char* argv[])
         }
         nbounds = get_bounds(&bounds, &index, &pair, &npairs, top->idef);
         snew(violaver, npairs);
-        out_disre = xvgropen(opt2fn("-o", NFILE, fnm), "Sum of Violations", "Time (ps)", "nm", oenv);
+        out_disre = xvgropen(opt2fn("-viol", NFILE, fnm), "Sum of Violations", "Time (ps)", "nm", oenv);
         xvgr_legend(out_disre, 2, drleg, oenv);
         if (bDRAll)
         {