#include <ctype.h>
#include "sysstuff.h"
+#include "typedefs.h"
+#include "vmdio.h"
#include "string2.h"
#include "smalloc.h"
#include "pbc.h"
#include "confio.h"
#include "checkpoint.h"
#include "wgms.h"
-#include "vmdio.h"
#include <math.h>
/* defines for frame counter output */
for(i=0; i<nind; i++)
copy_rvec(fr->f[ind[i]],fout[i]);
}
+ /* no break */
case efXTC:
case efG87:
if (fr->bX) {
case efTRR:
if (vout) sfree(vout);
if (fout) sfree(fout);
+ /* no break */
case efXTC:
case efG87:
sfree(xout);
fr->bTime=TRUE;
fr->time=sh.t;
fr->bLambda = TRUE;
+ fr->bFepState = TRUE;
fr->lambda = sh.lambda;
fr->bBox = sh.box_size>0;
if (fr->flags & (TRX_READ_X | TRX_NEED_X)) {
return bRet;
}
-static void choose_ff(FILE *fp)
+static void choose_file_format(FILE *fp)
{
int i,m,c;
int rc;
initcount(status);
clear_mat(box);
- choose_ff(fp);
+ choose_file_format(fp);
for(m=0; (m<DIM); m++)
box[m][m]=status->BOX[m];
bRet = gro_next_x_or_v(gmx_fio_getfp(status->fio),fr);
break;
default:
-#ifdef GMX_DLOPEN
+#ifdef GMX_USE_PLUGINS
bRet = read_next_vmd_frame(dummy,fr);
#else
gmx_fatal(FARGS,"DEATH HORROR in read_next_frame ftp=%s,status=%s",
}
if (bRet) {
- bMissingData = ((fr->flags & TRX_NEED_X && !fr->bX) ||
- (fr->flags & TRX_NEED_V && !fr->bV) ||
- (fr->flags & TRX_NEED_F && !fr->bF));
+ bMissingData = (((fr->flags & TRX_NEED_X) && !fr->bX) ||
+ ((fr->flags & TRX_NEED_V) && !fr->bV) ||
+ ((fr->flags & TRX_NEED_F) && !fr->bF));
bSkip = FALSE;
if (!bMissingData) {
ct=check_times2(fr->time,fr->t0,fr->tpf,fr->tppf,fr->bDouble);
- if (ct == 0 || (fr->flags & TRX_DONT_SKIP && ct<0)) {
+ if (ct == 0 || ((fr->flags & TRX_DONT_SKIP) && ct<0)) {
printcount(status, oenv,fr->time,FALSE);
} else if (ct > 0)
bRet = FALSE;
bFirst = FALSE;
break;
default:
-#ifdef GMX_DLOPEN
+#ifdef GMX_USE_PLUGINS
fprintf(stderr,"The file format of %s is not a known trajectory format to GROMACS.\n"
"Please make sure that the file is a trajectory!\n"
"GROMACS will now assume it to be a trajectory and will try to open it using the VMD plug-ins.\n"
}
#else
gmx_fatal(FARGS,"Not supported in read_first_frame: %s. Please make sure that the file is a trajectory.\n"
- "GROMACS is not compiled with DLOPEN. Thus it cannot read non-GROMACS trajectory formats.\n"
- "Please compile with DLOPEN support if you want to read non-GROMACS trajectory formats.\n",fn);
+ "GROMACS is not compiled with plug-in support. Thus it cannot read non-GROMACS trajectory formats using the VMD plug-ins.\n"
+ "Please compile with plug-in support if you want to read non-GROMACS trajectory formats.\n",fn);
#endif
break;
}
clear_rvec(fr->v[i]);
}
-int read_first_v(const output_env_t oenv, t_trxstatus **status,const char *fn,
- real *t, rvec **v,matrix box)
-{
- t_trxframe fr;
-
- read_first_frame(oenv,status,fn,&fr,TRX_NEED_V);
- *t = fr.time;
- clear_v(&fr);
- *v = fr.v;
- copy_mat(fr.box,box);
-
- return fr.natoms;
-}
-
-gmx_bool read_next_v(const output_env_t oenv,t_trxstatus *status,real *t,
- int natoms,rvec v[], matrix box)
-{
- t_trxframe fr;
- gmx_bool bRet;
-
- clear_trxframe(&fr,TRUE);
- fr.flags = TRX_NEED_V;
- fr.natoms = natoms;
- fr.time = *t;
- fr.v = v;
- bRet = read_next_frame(oenv,status,&fr);
- *t = fr.time;
- clear_v(&fr);
- copy_mat(fr.box,box);
-
- return bRet;
-}