Change name of gmxdump to dump and gmxcheck to check
authorDavid van der Spoel <spoel@xray.bmc.uu.se>
Sat, 28 Sep 2013 20:13:41 +0000 (22:13 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Mon, 30 Sep 2013 17:30:13 +0000 (19:30 +0200)
In order not to have to type
gmx gmxdump
gmx gmcheck
the second gmx was removed from the command name.
Added check in cmdlinemodulemanager.cpp for binaries starting with gmx.
Change-Id: I7db4faf8ae57688388b1e5263a7117c2bdb570c8

src/gromacs/commandline/cmdlinemodulemanager.cpp
src/programs/gmx/gmxcheck.c
src/programs/gmx/gmxdump.c
src/programs/gmx/legacymodules.cpp

index 00e27f7d60e95b40234f5b28e360ce3635c38268..9bd8c3b57f3ff09289cbb0ff6e334474188b382a 100644 (file)
@@ -662,6 +662,10 @@ CommandLineModuleManager::Impl::findModuleFromBinaryName(
     {
         binaryName.erase(0, 2);
     }
     {
         binaryName.erase(0, 2);
     }
+    if (binaryName.compare(0, 3, "gmx") == 0)
+    {
+        binaryName.erase(0, 3);
+    }
     return findModuleByName(binaryName);
 }
 
     return findModuleByName(binaryName);
 }
 
index 0f7cc45f13eb6bb2b935fa3e8702c4d862c2435a..1850a042a56d5c768baf1975dd7edb5c48b4e5d0 100644 (file)
@@ -9,7 +9,7 @@
  *                        VERSION 3.2.0
  * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  *                        VERSION 3.2.0
  * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
+ * Copyright (c) 2001-2013, The GROMACS development team,
  * check out http://www.gromacs.org for more information.
 
  * This program is free software; you can redistribute it and/or
  * check out http://www.gromacs.org for more information.
 
  * This program is free software; you can redistribute it and/or
@@ -712,7 +712,7 @@ void chk_enx(const char *fn)
 int gmx_gmxcheck(int argc, char *argv[])
 {
     const char     *desc[] = {
 int gmx_gmxcheck(int argc, char *argv[])
 {
     const char     *desc[] = {
-        "[TT]gmxcheck[tt] reads a trajectory ([TT].trj[tt], [TT].trr[tt] or ",
+        "[TT]gmx check[tt] reads a trajectory ([TT].trj[tt], [TT].trr[tt] or ",
         "[TT].xtc[tt]), an energy file ([TT].ene[tt] or [TT].edr[tt])",
         "or an index file ([TT].ndx[tt])",
         "and prints out useful information about them.[PAR]",
         "[TT].xtc[tt]), an energy file ([TT].ene[tt] or [TT].edr[tt])",
         "or an index file ([TT].ndx[tt])",
         "and prints out useful information about them.[PAR]",
@@ -728,7 +728,7 @@ int gmx_gmxcheck(int argc, char *argv[])
         "the program will check whether the bond lengths defined in the tpr",
         "file are indeed correct in the trajectory. If not you may have",
         "non-matching files due to e.g. deshuffling or due to problems with",
         "the program will check whether the bond lengths defined in the tpr",
         "file are indeed correct in the trajectory. If not you may have",
         "non-matching files due to e.g. deshuffling or due to problems with",
-        "virtual sites. With these flags, [TT]gmxcheck[tt] provides a quick check for such problems.[PAR]",
+        "virtual sites. With these flags, [TT]gmx check[tt] provides a quick check for such problems.[PAR]",
         "The program can compare two run input ([TT].tpr[tt], [TT].tpb[tt] or",
         "[TT].tpa[tt]) files",
         "when both [TT]-s1[tt] and [TT]-s2[tt] are supplied.",
         "The program can compare two run input ([TT].tpr[tt], [TT].tpb[tt] or",
         "[TT].tpa[tt]) files",
         "when both [TT]-s1[tt] and [TT]-s2[tt] are supplied.",
index 676faa120f00b55a7692e6e0dd34ff8bb78bd94d..05f7fba03797aa65cba5d5b312d25a98d8a98e85 100644 (file)
@@ -9,7 +9,7 @@
  *                        VERSION 3.2.0
  * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  *                        VERSION 3.2.0
  * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
+ * Copyright (c) 2001-2013, The GROMACS development team,
  * check out http://www.gromacs.org for more information.
 
  * This program is free software; you can redistribute it and/or
  * check out http://www.gromacs.org for more information.
 
  * This program is free software; you can redistribute it and/or
@@ -356,7 +356,7 @@ void list_ene(const char *fn)
     real           rav, minthird;
     char           buf[22];
 
     real           rav, minthird;
     char           buf[22];
 
-    printf("gmxdump: %s\n", fn);
+    printf("gmx dump: %s\n", fn);
     in = open_enx(fn, "r");
     do_enxnms(in, &nre, &enm);
     assert(enm);
     in = open_enx(fn, "r");
     do_enxnms(in, &nre, &enm);
     assert(enm);
@@ -522,7 +522,7 @@ static void list_mtx(const char *fn)
 int gmx_gmxdump(int argc, char *argv[])
 {
     const char *desc[] = {
 int gmx_gmxdump(int argc, char *argv[])
 {
     const char *desc[] = {
-        "[TT]gmxdump[tt] reads a run input file ([TT].tpa[tt]/[TT].tpr[tt]/[TT].tpb[tt]),",
+        "[TT]gmx dump[tt] reads a run input file ([TT].tpa[tt]/[TT].tpr[tt]/[TT].tpb[tt]),",
         "a trajectory ([TT].trj[tt]/[TT].trr[tt]/[TT].xtc[tt]), an energy",
         "file ([TT].ene[tt]/[TT].edr[tt]), or a checkpoint file ([TT].cpt[tt])",
         "and prints that to standard output in a readable format.",
         "a trajectory ([TT].trj[tt]/[TT].trr[tt]/[TT].xtc[tt]), an energy",
         "file ([TT].ene[tt]/[TT].edr[tt]), or a checkpoint file ([TT].cpt[tt])",
         "and prints that to standard output in a readable format.",
index 068ad43ea229499fb024c03a5b5dcdef96749489..9e8ddc0165485a495a94534ded3ace0b7f19b985 100644 (file)
@@ -146,9 +146,9 @@ void registerObsoleteTool(gmx::CommandLineModuleManager *manager,
 void registerLegacyModules(gmx::CommandLineModuleManager *manager)
 {
     // Modules from this directory (were in src/kernel/).
 void registerLegacyModules(gmx::CommandLineModuleManager *manager)
 {
     // Modules from this directory (were in src/kernel/).
-    registerModule(manager, &gmx_gmxcheck, "gmxcheck",
+    registerModule(manager, &gmx_gmxcheck, "check",
                    "Check and compare files");
                    "Check and compare files");
-    registerModule(manager, &gmx_gmxdump, "gmxdump",
+    registerModule(manager, &gmx_gmxdump, "dump",
                    "Make binary files human readable");
     registerModule(manager, &gmx_grompp, "grompp",
                    "Make a run input file");
                    "Make binary files human readable");
     registerModule(manager, &gmx_grompp, "grompp",
                    "Make a run input file");