From 7ae88d1f89778338696597cbe4414ac1f1bf12e8 Mon Sep 17 00:00:00 2001 From: David van der Spoel Date: Sat, 28 Sep 2013 22:13:41 +0200 Subject: [PATCH] Change name of gmxdump to dump and gmxcheck to check 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 | 4 ++++ src/programs/gmx/gmxcheck.c | 6 +++--- src/programs/gmx/gmxdump.c | 6 +++--- src/programs/gmx/legacymodules.cpp | 4 ++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/gromacs/commandline/cmdlinemodulemanager.cpp b/src/gromacs/commandline/cmdlinemodulemanager.cpp index 00e27f7d60..9bd8c3b57f 100644 --- a/src/gromacs/commandline/cmdlinemodulemanager.cpp +++ b/src/gromacs/commandline/cmdlinemodulemanager.cpp @@ -662,6 +662,10 @@ CommandLineModuleManager::Impl::findModuleFromBinaryName( { binaryName.erase(0, 2); } + if (binaryName.compare(0, 3, "gmx") == 0) + { + binaryName.erase(0, 3); + } return findModuleByName(binaryName); } diff --git a/src/programs/gmx/gmxcheck.c b/src/programs/gmx/gmxcheck.c index 0f7cc45f13..1850a042a5 100644 --- a/src/programs/gmx/gmxcheck.c +++ b/src/programs/gmx/gmxcheck.c @@ -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. - * 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 @@ -712,7 +712,7 @@ void chk_enx(const char *fn) 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]", @@ -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", - "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.", diff --git a/src/programs/gmx/gmxdump.c b/src/programs/gmx/gmxdump.c index 676faa120f..05f7fba037 100644 --- a/src/programs/gmx/gmxdump.c +++ b/src/programs/gmx/gmxdump.c @@ -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. - * 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 @@ -356,7 +356,7 @@ void list_ene(const char *fn) 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); @@ -522,7 +522,7 @@ static void list_mtx(const char *fn) 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.", diff --git a/src/programs/gmx/legacymodules.cpp b/src/programs/gmx/legacymodules.cpp index 068ad43ea2..9e8ddc0165 100644 --- a/src/programs/gmx/legacymodules.cpp +++ b/src/programs/gmx/legacymodules.cpp @@ -146,9 +146,9 @@ void registerObsoleteTool(gmx::CommandLineModuleManager *manager, 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"); - 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"); -- 2.22.0