Remove unnecessary extensions in t_filenm defaults
authorTeemu Murtola <teemu.murtola@gmail.com>
Sun, 27 Jul 2014 04:31:56 +0000 (07:31 +0300)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Mon, 8 Sep 2014 03:12:30 +0000 (05:12 +0200)
Several tools had an extension specified for the default file name in
t_filenm, but that extension matched either the only accepted extension
for the file type, or to the default extension for that type.

To keep the code more uniform, remove those unnecessary declarations.
This leaves <10 instances where t_filenm specifies a non-default
extension for the default file name (which doesn't currently work).
Probably some of those could also be removed, but at least a few are
justified, so a subsequent commit will add support for that.

Change-Id: I28053b6b407783b515144aad5351f27bbc2b6ba7

src/gromacs/gmxana/gmx_cluster.c
src/gromacs/gmxana/gmx_confrms.c
src/gromacs/gmxana/gmx_current.c
src/gromacs/gmxana/gmx_enemat.c
src/gromacs/gmxana/gmx_sorient.c
src/gromacs/gmxana/gmx_spol.c
src/gromacs/gmxana/gmx_traj.c

index 4632a5900a16af9f55df30f1ec785ccb4d42c584..d1984d58e5cb74aa4061a1c44bffb48c77691ad9 100644 (file)
@@ -1517,7 +1517,7 @@ int gmx_cluster(int argc, char *argv[])
         { efXVG, "-sz",   "clust-size", ffOPTWR},
         { efXPM, "-tr",   "clust-trans", ffOPTWR},
         { efXVG, "-ntr",  "clust-trans", ffOPTWR},
-        { efXVG, "-clid", "clust-id.xvg", ffOPTWR},
+        { efXVG, "-clid", "clust-id",   ffOPTWR},
         { efTRX, "-cl",   "clusters.pdb", ffOPTWR }
     };
 #define NFILE asize(fnm)
index c0876922bb6b95515d97297d485497ede9c1e284..8923544657bdfe61c10c9b314b994aa1706af9d6 100644 (file)
@@ -516,9 +516,9 @@ int gmx_confrms(int argc, char *argv[])
         { efTPS, "-f1",  "conf1.gro", ffREAD  },
         { efSTX, "-f2",  "conf2",     ffREAD  },
         { efSTO, "-o",   "fit.pdb",   ffWRITE },
-        { efNDX, "-n1", "fit1.ndx",  ffOPTRD },
-        { efNDX, "-n2", "fit2.ndx",  ffOPTRD },
-        { efNDX, "-no", "match.ndx", ffOPTWR }
+        { efNDX, "-n1",  "fit1",      ffOPTRD },
+        { efNDX, "-n2",  "fit2",      ffOPTRD },
+        { efNDX, "-no",  "match",     ffOPTWR }
     };
 #define NFILE asize(fnm)
 
index 1f41368c1af5e7e0671eb067184f1c4cd7d653c1..42d316bb2ea8ed651c38839b21963bd0dba403b5 100644 (file)
@@ -858,12 +858,12 @@ int gmx_current(int argc, char *argv[])
         { efTPS,  NULL,  NULL, ffREAD }, /* this is for the topology */
         { efNDX, NULL, NULL, ffOPTRD },
         { efTRX, "-f", NULL, ffREAD },   /* and this for the trajectory */
-        { efXVG, "-o", "current.xvg", ffWRITE },
-        { efXVG, "-caf", "caf.xvg", ffOPTWR },
-        { efXVG, "-dsp", "dsp.xvg", ffWRITE },
-        { efXVG, "-md", "md.xvg", ffWRITE },
-        { efXVG, "-mj", "mj.xvg", ffWRITE},
-        { efXVG, "-mc", "mc.xvg", ffOPTWR }
+        { efXVG, "-o",   "current", ffWRITE },
+        { efXVG, "-caf", "caf",     ffOPTWR },
+        { efXVG, "-dsp", "dsp",     ffWRITE },
+        { efXVG, "-md",  "md",      ffWRITE },
+        { efXVG, "-mj",  "mj",      ffWRITE },
+        { efXVG, "-mc",  "mc",      ffOPTWR }
     };
 
 #define NFILE asize(fnm)
index 8abd1f3abca42a9e0cbb575ef058381e18908e14..bae15a8ae00c89d21593a43d1c3f53683ccde442 100644 (file)
@@ -172,9 +172,9 @@ int gmx_enemat(int argc, char *argv[])
 
     t_filenm       fnm[] = {
         { efEDR, "-f", NULL, ffOPTRD },
-        { efDAT, "-groups", "groups.dat", ffREAD },
-        { efDAT, "-eref",   "eref.dat", ffOPTRD },
-        { efXPM, "-emat",   "emat", ffWRITE },
+        { efDAT, "-groups", "groups", ffREAD },
+        { efDAT, "-eref",   "eref",   ffOPTRD },
+        { efXPM, "-emat",   "emat",   ffWRITE },
         { efXVG, "-etot",   "energy", ffWRITE }
     };
 #define NFILE asize(fnm)
index 5a66da9cfaf1988e68fbc1395f22b551c4d38c97..5c3781322839f1d5103d5cffd907d6c0f5812851 100644 (file)
@@ -185,11 +185,11 @@ int gmx_sorient(int argc, char *argv[])
         { efTRX, NULL,  NULL,  ffREAD },
         { efTPS, NULL,  NULL,  ffREAD },
         { efNDX, NULL,  NULL,  ffOPTRD },
-        { efXVG, NULL,  "sori.xvg",  ffWRITE },
-        { efXVG, "-no", "snor.xvg",  ffWRITE },
-        { efXVG, "-ro", "sord.xvg",  ffWRITE },
-        { efXVG, "-co", "scum.xvg",  ffWRITE },
-        { efXVG, "-rc", "scount.xvg",  ffWRITE }
+        { efXVG, NULL,  "sori",   ffWRITE },
+        { efXVG, "-no", "snor",   ffWRITE },
+        { efXVG, "-ro", "sord",   ffWRITE },
+        { efXVG, "-co", "scum",   ffWRITE },
+        { efXVG, "-rc", "scount", ffWRITE }
     };
 #define NFILE asize(fnm)
 
index 9642214a431afe5adfd3ef175f9c4b9dc071a401..af6ed8cc0db273b79d5497b6a71ffc12c619b11f 100644 (file)
@@ -207,7 +207,7 @@ int gmx_spol(int argc, char *argv[])
         { efTRX, NULL,  NULL,  ffREAD },
         { efTPX, NULL,  NULL,  ffREAD },
         { efNDX, NULL,  NULL,  ffOPTRD },
-        { efXVG, NULL,  "scdist.xvg",  ffWRITE }
+        { efXVG, NULL,  "scdist",  ffWRITE }
     };
 #define NFILE asize(fnm)
 
index 2c208073554cd5e4bb70de2c0d96edf32edf0078..86e9a006f96516cb03acb568e7403b8468ae6207 100644 (file)
@@ -685,19 +685,19 @@ int gmx_traj(int argc, char *argv[])
         { efTRX, "-f", NULL, ffREAD },
         { efTPS, NULL, NULL, ffREAD },
         { efNDX, NULL, NULL, ffOPTRD },
-        { efXVG, "-ox", "coord.xvg", ffOPTWR },
-        { efTRX, "-oxt", "coord.xtc", ffOPTWR },
-        { efXVG, "-ov", "veloc.xvg", ffOPTWR },
-        { efXVG, "-of", "force.xvg", ffOPTWR },
-        { efXVG, "-ob", "box.xvg",   ffOPTWR },
-        { efXVG, "-ot", "temp.xvg",  ffOPTWR },
-        { efXVG, "-ekt", "ektrans.xvg", ffOPTWR },
-        { efXVG, "-ekr", "ekrot.xvg", ffOPTWR },
-        { efXVG, "-vd", "veldist.xvg", ffOPTWR },
-        { efPDB, "-cv", "veloc.pdb", ffOPTWR },
-        { efPDB, "-cf", "force.pdb", ffOPTWR },
-        { efXVG, "-av", "all_veloc.xvg", ffOPTWR },
-        { efXVG, "-af", "all_force.xvg", ffOPTWR }
+        { efXVG, "-ox",  "coord",     ffOPTWR },
+        { efTRX, "-oxt", "coord",     ffOPTWR },
+        { efXVG, "-ov",  "veloc",     ffOPTWR },
+        { efXVG, "-of",  "force",     ffOPTWR },
+        { efXVG, "-ob",  "box",       ffOPTWR },
+        { efXVG, "-ot",  "temp",      ffOPTWR },
+        { efXVG, "-ekt", "ektrans",   ffOPTWR },
+        { efXVG, "-ekr", "ekrot",     ffOPTWR },
+        { efXVG, "-vd",  "veldist",   ffOPTWR },
+        { efPDB, "-cv",  "veloc",     ffOPTWR },
+        { efPDB, "-cf",  "force",     ffOPTWR },
+        { efXVG, "-av",  "all_veloc", ffOPTWR },
+        { efXVG, "-af",  "all_force", ffOPTWR }
     };
 #define NFILE asize(fnm)