*/
#include "gmxpre.h"
-#include "config.h"
-
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
-#include "gromacs/legacyheaders/macros.h"
-#include "gromacs/legacyheaders/txtdump.h"
-#include "gromacs/legacyheaders/names.h"
-#include "gromacs/legacyheaders/txtdump.h"
-#include "gromacs/legacyheaders/checkpoint.h"
-#include "gromacs/topology/mtop_util.h"
-#include "gromacs/fileio/xtcio.h"
-#include "gromacs/fileio/enxio.h"
-#include "gromacs/fileio/gmxfio.h"
-#include "gromacs/fileio/tpxio.h"
-#include "gromacs/fileio/trnio.h"
-#include "gromacs/utility/futil.h"
-#include "gromacs/fileio/tngio.h"
-#include "gromacs/fileio/tngio_for_tools.h"
+#include "config.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "gromacs/commandline/pargs.h"
+#include "gromacs/fileio/enxio.h"
+#include "gromacs/fileio/gmxfio.h"
#include "gromacs/fileio/mtxio.h"
+#include "gromacs/fileio/tngio.h"
+#include "gromacs/fileio/tngio_for_tools.h"
+#include "gromacs/fileio/tpxio.h"
+#include "gromacs/fileio/trnio.h"
+#include "gromacs/fileio/xtcio.h"
#include "gromacs/gmxpreprocess/gmxcpp.h"
+#include "gromacs/legacyheaders/checkpoint.h"
+#include "gromacs/legacyheaders/macros.h"
+#include "gromacs/legacyheaders/names.h"
+#include "gromacs/legacyheaders/txtdump.h"
#include "gromacs/linearalgebra/sparsematrix.h"
+#include "gromacs/topology/mtop_util.h"
#include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/futil.h"
#include "gromacs/utility/smalloc.h"
static void list_tpx(const char *fn, gmx_bool bShowNumbers, const char *mdpfn,
void list_trx(const char *fn)
{
- int ftp;
-
- ftp = fn2ftp(fn);
- if (ftp == efXTC)
- {
- list_xtc(fn);
- }
- else if ((ftp == efTRR) || (ftp == efTRJ))
- {
- list_trn(fn);
- }
- else if (ftp == efTNG)
- {
- list_tng(fn);
- }
- else
+ switch (fn2ftp(fn))
{
- fprintf(stderr, "File %s is of an unsupported type. Try using the command\n 'less %s'\n",
- fn, fn);
+ case efXTC:
+ list_xtc(fn);
+ break;
+ case efTRR:
+ list_trn(fn);
+ break;
+ case efTNG:
+ list_tng(fn);
+ break;
+ default:
+ fprintf(stderr, "File %s is of an unsupported type. Try using the command\n 'less %s'\n",
+ fn, fn);
}
}
int gmx_dump(int argc, char *argv[])
{
const char *desc[] = {
- "[THISMODULE] 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])",
+ "[THISMODULE] reads a run input file ([TT].tpr[tt]),",
+ "a trajectory ([TT].trr[tt]/[TT].xtc[tt]/[TT]/tng[tt]), an energy",
+ "file ([TT].edr[tt]) or a checkpoint file ([TT].cpt[tt])",
"and prints that to standard output in a readable format.",
"This program is essential for checking your run input file in case of",
"problems.[PAR]",
"Position restraint output from -sys -s is broken"
};
t_filenm fnm[] = {
- { efTPX, "-s", NULL, ffOPTRD },
+ { efTPR, "-s", NULL, ffOPTRD },
{ efTRX, "-f", NULL, ffOPTRD },
{ efEDR, "-e", NULL, ffOPTRD },
{ efCPT, NULL, NULL, ffOPTRD },
}
- if (ftp2bSet(efTPX, NFILE, fnm))
+ if (ftp2bSet(efTPR, NFILE, fnm))
{
- list_tpx(ftp2fn(efTPX, NFILE, fnm), bShowNumbers,
+ list_tpx(ftp2fn(efTPR, NFILE, fnm), bShowNumbers,
ftp2fn_null(efMDP, NFILE, fnm), bSysTop);
}
else if (ftp2bSet(efTRX, NFILE, fnm))