int NATOMS;
double DT,BOX[3];
gmx_bool bReadBox;
+ char *persistent_line; /* Persistent line for reading g96 trajectories */
};
static void initcount(t_trxstatus *status)
status->xframe=NULL;
status->fio=NULL;
status->__frame=-1;
+ status->persistent_line=NULL;
}
/* Checkpoint files can not contain mulitple frames */
break;
case efG96:
- gmx_fatal(FARGS,
- "Reading trajectories in .g96 format is broken. Please use\n"
- "a different file format.");
- read_g96_conf(gmx_fio_getfp(status->fio),NULL,fr);
+ read_g96_conf(gmx_fio_getfp(status->fio),NULL,fr,
+ status->persistent_line);
bRet = (fr->natoms > 0);
break;
case efG87:
break;
case efG96:
/* Can not rewind a compressed file, so open it twice */
- read_g96_conf(gmx_fio_getfp(fio),fn,fr);
+ if (!(*status)->persistent_line)
+ {
+ /* allocate the persistent line */
+ snew((*status)->persistent_line, STRLEN+1);
+ }
+ read_g96_conf(gmx_fio_getfp(fio),fn,fr, (*status)->persistent_line);
gmx_fio_close(fio);
clear_trxframe(fr,FALSE);
if (flags & (TRX_READ_X | TRX_NEED_X))