}
/* Copy the input trxframe struct to the output trxframe struct */
frout = fr;
+ frout.bV &= bVels;
+ frout.bF &= bForce;
frout.natoms = nout;
if (bNeedPrec && (bSetPrec || !fr.bPrec)) {
frout.bPrec = TRUE;
}
if (bCopy) {
frout.x = xmem;
- if (bVels) {
+ if (frout.bV) {
frout.v = vmem;
}
- if (bForce) {
+ if (frout.bF) {
frout.f = fmem;
}
for(i=0; i<nout; i++) {
copy_rvec(fr.x[index[i]],frout.x[i]);
- if (bVels && fr.bV) {
+ if (frout.bV) {
copy_rvec(fr.v[index[i]],frout.v[i]);
}
- if (bForce && fr.bF) {
+ if (frout.bF) {
copy_rvec(fr.f[index[i]],frout.f[i]);
}
}
switch(ftp) {
case efGRO:
write_hconf_p(out,title,&useatoms,prec2ndec(frout.prec),
- frout.x,fr.bV?frout.v:NULL,frout.box);
+ frout.x,frout.bV?frout.v:NULL,frout.box);
break;
case efPDB:
fprintf(out,"REMARK GENERATED BY TRJCONV\n");