* To help us fund GROMACS development, we humbly ask that you cite
* the research papers on the package. Check out http://www.gromacs.org.
*/
+#include "gmxpre.h"
+
#include "mdrun_main.h"
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#include <stdio.h>
+#include <string.h>
#include "gromacs/legacyheaders/checkpoint.h"
#include "gromacs/legacyheaders/copyrite.h"
-#include "gromacs/legacyheaders/gmx_fatal.h"
#include "gromacs/legacyheaders/macros.h"
#include "gromacs/legacyheaders/main.h"
#include "gromacs/legacyheaders/mdrun.h"
#include "gromacs/commandline/pargs.h"
#include "gromacs/fileio/filenm.h"
+#include "gromacs/utility/fatalerror.h"
+
+static bool is_multisim_option_set(int argc, const char *const argv[])
+{
+ for (int i = 0; i < argc; ++i)
+ {
+ if (strcmp(argv[i], "-multi") == 0 || strcmp(argv[i], "-multidir") == 0)
+ {
+ return true;
+ }
+ }
+ return false;
+}
int gmx_mdrun(int argc, char *argv[])
{
"The [TT]mdrun[tt] program reads the run input file ([TT]-s[tt])",
"and distributes the topology over ranks if needed.",
"[TT]mdrun[tt] produces at least four output files.",
- "A single log file ([TT]-g[tt]) is written, unless the option",
- "[TT]-seppot[tt] is used, in which case each rank writes a log file.",
+ "A single log file ([TT]-g[tt]) is written.",
"The trajectory file ([TT]-o[tt]), contains coordinates, velocities and",
"optionally forces.",
"The structure file ([TT]-c[tt]) contains the coordinates and",
};
t_commrec *cr;
t_filenm fnm[] = {
- { efTPX, NULL, NULL, ffREAD },
+ { efTPR, NULL, NULL, ffREAD },
{ efTRN, "-o", NULL, ffWRITE },
{ efCOMPRESSED, "-x", NULL, ffOPTWR },
{ efCPT, "-cpi", NULL, ffOPTRD },
gmx_bool bTestVerlet = FALSE;
gmx_bool bVerbose = FALSE;
gmx_bool bCompact = TRUE;
- gmx_bool bSepPot = FALSE;
gmx_bool bRerunVSite = FALSE;
gmx_bool bConfout = TRUE;
gmx_bool bReproducible = FALSE;
"Be loud and noisy" },
{ "-compact", FALSE, etBOOL, {&bCompact},
"Write a compact log file" },
- { "-seppot", FALSE, etBOOL, {&bSepPot},
- "Write separate V and dVdl terms for each interaction type and rank to the log file(s)" },
{ "-pforce", FALSE, etREAL, {&pforce},
"Print all forces larger than this (kJ/mol nm)" },
{ "-reprod", FALSE, etBOOL, {&bReproducible},
{ "-resethway", FALSE, etBOOL, {&bResetCountersHalfWay},
"HIDDENReset the cycle counters after half the number of steps or halfway [TT]-maxh[tt]" }
};
- unsigned long Flags, PCA_Flags;
+ unsigned long Flags;
ivec ddxyz;
int dd_node_order;
gmx_bool bAddPart;
int rc;
char **multidir = NULL;
-
cr = init_commrec();
- PCA_Flags = (PCA_CAN_SET_DEFFNM | (MASTER(cr) ? 0 : PCA_QUIET));
+ unsigned long PCA_Flags = PCA_CAN_SET_DEFFNM;
+ // With -multi or -multidir, the file names are going to get processed
+ // further (or the working directory changed), so we can't check for their
+ // existence during parsing. It isn't useful to do any completion based on
+ // file system contents, either.
+ if (is_multisim_option_set(argc, argv))
+ {
+ PCA_Flags |= PCA_DISABLE_INPUT_FILE_CHECKING;
+ }
/* Comment this in to do fexist calls only on master
* works not with rerun or tables at the moment
sim_part_fn = sim_part;
if (opt2bSet("-cpi", NFILE, fnm))
{
- if (bSepPot && bAppendFiles)
- {
- gmx_fatal(FARGS, "Output file appending is not supported with -seppot");
- }
-
bAppendFiles =
read_checkpoint_simulation_part(opt2fn_master("-cpi", NFILE,
fnm, cr),
}
Flags = opt2bSet("-rerun", NFILE, fnm) ? MD_RERUN : 0;
- Flags = Flags | (bSepPot ? MD_SEPPOT : 0);
Flags = Flags | (bDDBondCheck ? MD_DDBONDCHECK : 0);
Flags = Flags | (bDDBondComm ? MD_DDBONDCOMM : 0);
Flags = Flags | (bTunePME ? MD_TUNEPME : 0);
/* We postpone opening the log file if we are appending, so we can
first truncate the old log file and append to the correct position
there instead. */
- if ((MASTER(cr) || bSepPot) && !bAppendFiles)
+ if (MASTER(cr) && !bAppendFiles)
{
gmx_log_open(ftp2fn(efLOG, NFILE, fnm), cr,
- !bSepPot, Flags & MD_APPENDFILES, &fplog);
+ Flags & MD_APPENDFILES, &fplog);
please_cite(fplog, "Hess2008b");
please_cite(fplog, "Spoel2005a");
please_cite(fplog, "Lindahl2001a");
please_cite(fplog, "Berendsen95a");
}
- else if (!MASTER(cr) && bSepPot)
- {
- gmx_log_open(ftp2fn(efLOG, NFILE, fnm), cr, !bSepPot, Flags, &fplog);
- }
else
{
fplog = NULL;