* 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 "trxio.h"
+#include "gmxpre.h"
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "trxio.h"
#include <assert.h>
#include <math.h>
-#include "sysstuff.h"
-#include "typedefs.h"
+#include "gromacs/fileio/confio.h"
+#include "gromacs/fileio/gmxfio.h"
+#include "gromacs/fileio/pdbio.h"
+#include "gromacs/fileio/timecontrol.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/trx.h"
+#include "gromacs/fileio/xdrf.h"
+#include "gromacs/fileio/xtcio.h"
+#include "gromacs/legacyheaders/checkpoint.h"
+#include "gromacs/legacyheaders/names.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/topology/atoms.h"
+#include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/futil.h"
+#include "gromacs/utility/smalloc.h"
+
+#include "config.h"
+
#ifdef GMX_USE_PLUGINS
-#include "vmdio.h"
+#include "gromacs/fileio/vmdio.h"
#endif
-#include "smalloc.h"
-#include "pbc.h"
-#include "gmxfio.h"
-#include "trxio.h"
-#include "tpxio.h"
-#include "trnio.h"
-#include "tngio.h"
-#include "tngio_for_tools.h"
-#include "names.h"
-#include "vec.h"
-#include "futil.h"
-#include "xtcio.h"
-#include "pdbio.h"
-#include "confio.h"
-#include "checkpoint.h"
-#include "xdrf.h"
-
-#include "gromacs/fileio/timecontrol.h"
/* defines for frame counter output */
#define SKIP1 10
fr->bDouble = FALSE;
fr->natoms = -1;
fr->t0 = 0;
+ fr->tf = 0;
fr->tpf = 0;
fr->tppf = 0;
fr->title = NULL;
switch (ftp)
{
- case efTRJ:
case efTRR:
case efTNG:
break;
switch (ftp)
{
- case efTRJ:
case efTRR:
case efTNG:
if (fr->bV)
case efXTC:
write_xtc(status->fio, nind, fr->step, fr->time, fr->box, xout, prec);
break;
- case efTRJ:
case efTRR:
fwrite_trn(status->fio, nframes_read(status),
fr->time, fr->step, fr->box, nind, xout, vout, fout);
switch (ftp)
{
- case efTRN:
- case efTRJ:
case efTRR:
case efTNG:
if (vout)
switch (gmx_fio_getftp(status->fio))
{
- case efTRJ:
case efTRR:
break;
default:
case efXTC:
write_xtc(status->fio, fr->natoms, fr->step, fr->time, fr->box, fr->x, prec);
break;
- case efTRJ:
case efTRR:
fwrite_trn(status->fio, fr->step, fr->time, fr->lambda, fr->box, fr->natoms,
fr->bX ? fr->x : NULL, fr->bV ? fr->v : NULL, fr->bF ? fr->f : NULL);
int ftp;
bRet = FALSE;
- pt = fr->time;
+ pt = fr->tf;
do
{
clear_trxframe(fr, FALSE);
fr->tppf = fr->tpf;
- fr->tpf = fr->time;
+ fr->tpf = fr->tf;
if (status->tng)
{
}
switch (ftp)
{
- case efTRJ:
case efTRR:
bRet = gmx_next_frame(status, fr);
break;
/* DvdS 2005-05-31: this has been fixed along with the increased
* accuracy of the control over -b and -e options.
*/
- if (bTimeSet(TBEGIN) && (fr->time < rTimeValue(TBEGIN)))
+ if (bTimeSet(TBEGIN) && (fr->tf < rTimeValue(TBEGIN)))
{
if (xtc_seek_time(status->fio, rTimeValue(TBEGIN), fr->natoms, TRUE))
{
gmx_fio_getname(status->fio));
#endif
}
+ fr->tf = fr->time;
if (bRet)
{
}
switch (ftp)
{
- case efTRJ:
case efTRR:
break;
case efCPT:
#endif
break;
}
+ fr->tf = fr->time;
/* Return FALSE if we read a frame that's past the set ending time. */
if (!bFirst && (!(fr->flags & TRX_DONT_SKIP) && check_times(fr->time) > 0))