We now issue a fatal error if the user asks for velocities or
forces to be written to as output from g_traj when the input
XTC file does not contain these quantities.
Fixes #1298.
Change-Id: I45a12fb1e5db5b2b2e1b072444e5430373fbaaa3
read_first_frame(oenv, &status, ftp2fn(efTRX, NFILE, fnm), &fr, flags);
+
+ if ((bOV || bOF) && fn2ftp(ftp2fn(efTRX, NFILE, fnm)) == efXTC)
+ {
+ gmx_fatal(FARGS, "Cannot extract velocities or forces since your input XTC file does not contain them.");
+ }
+
if (bCV || bCF)
{
snew(sumx, fr.natoms);