*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
"Fit molecule to ref structure in the structure file" },
{ "-ndec", FALSE, etINT,
{ &ndec },
- "Precision for .xtc and .gro writing in number of "
- "decimal places" },
+ "Number of decimal places to write to .xtc output" },
{ "-vel", FALSE, etBOOL,
{ &bVels }, "Read and write velocities if possible" },
{ "-force", FALSE, etBOOL,
gmx_rmpbc_t gpbc = nullptr;
gmx_bool bRmPBC, bPBCWhole, bPBCcomRes, bPBCcomMol, bPBCcomAtom, bPBC, bNoJump, bCluster;
gmx_bool bCopy, bDoIt, bIndex, bTDump, bSetTime, bTPS = FALSE, bDTset = FALSE;
- gmx_bool bExec, bTimeStep = FALSE, bDumpFrame = FALSE, bSetPrec, bNeedPrec;
+ gmx_bool bExec, bTimeStep = FALSE, bDumpFrame = FALSE, bSetXtcPrec, bNeedPrec;
gmx_bool bHaveFirstFrame, bHaveNextFrame, bSetBox, bSetUR, bSplit = FALSE;
gmx_bool bSubTraj = FALSE, bDropUnder = FALSE, bDropOver = FALSE, bTrans = FALSE;
gmx_bool bWriteFrame, bSplitHere;
else
{
/* mark active cmdline options */
- bSetBox = opt2parg_bSet("-box", NPA, pa);
- bSetTime = opt2parg_bSet("-t0", NPA, pa);
- bSetPrec = opt2parg_bSet("-ndec", NPA, pa);
- bSetUR = opt2parg_bSet("-ur", NPA, pa);
- bExec = opt2parg_bSet("-exec", NPA, pa);
- bTimeStep = opt2parg_bSet("-timestep", NPA, pa);
- bTDump = opt2parg_bSet("-dump", NPA, pa);
- bDropUnder = opt2parg_bSet("-dropunder", NPA, pa);
- bDropOver = opt2parg_bSet("-dropover", NPA, pa);
- bTrans = opt2parg_bSet("-trans", NPA, pa);
- bSplit = (split_t != 0);
+ bSetBox = opt2parg_bSet("-box", NPA, pa);
+ bSetTime = opt2parg_bSet("-t0", NPA, pa);
+ bSetXtcPrec = opt2parg_bSet("-ndec", NPA, pa);
+ bSetUR = opt2parg_bSet("-ur", NPA, pa);
+ bExec = opt2parg_bSet("-exec", NPA, pa);
+ bTimeStep = opt2parg_bSet("-timestep", NPA, pa);
+ bTDump = opt2parg_bSet("-dump", NPA, pa);
+ bDropUnder = opt2parg_bSet("-dropunder", NPA, pa);
+ bDropOver = opt2parg_bSet("-dropover", NPA, pa);
+ bTrans = opt2parg_bSet("-trans", NPA, pa);
+ bSplit = (split_t != 0);
/* parse enum options */
fit_enum = nenum(fit);
"results!");
}
- /* ndec is in nr of decimal places, prec is a multiplication factor: */
+ /* ndec for XTC writing is in nr of decimal places, prec is a multiplication factor: */
prec = 1;
for (i = 0; i < ndec; i++)
{
out_file = opt2fn("-o", NFILE, fnm);
int ftp = fn2ftp(out_file);
fprintf(stderr, "Will write %s: %s\n", ftp2ext(ftp), ftp2desc(ftp));
- bNeedPrec = (ftp == efXTC || ftp == efGRO);
+ bNeedPrec = (ftp == efXTC);
int ftpin = fn2ftp(in_file);
if (bVels)
{
}
if (bNeedPrec)
{
- if (bSetPrec || !fr.bPrec)
+ if (bSetXtcPrec || !fr.bPrec)
{
fprintf(stderr, "\nSetting output precision to %g (nm)\n", 1/prec);
}
frout.bV = (frout.bV && bVels);
frout.bF = (frout.bF && bForce);
frout.natoms = nout;
- if (bNeedPrec && (bSetPrec || !fr.bPrec))
+ if (bNeedPrec && (bSetXtcPrec || !fr.bPrec))
{
frout.bPrec = TRUE;
frout.prec = prec;