set_pbc(&pbc, ir->ePBC, box);
dvdl = 0;
enerd->term[F_COM_PULL] +=
- pull_potential(ir->pull, mdatoms, &pbc,
+ pull_potential(ir->pull_work, mdatoms, &pbc,
cr, t, lambda[efptRESTRAINT], x, f, vir_force, &dvdl);
enerd->dvdl_lin[efptRESTRAINT] += dvdl;
wallcycle_stop(wcycle, ewcPULLPOT);
clear_rvec(fr->vir_diag_posres);
}
- if (inputrec->bPull && inputrec->pull->bConstraint)
+ if (inputrec->bPull && pull_have_constraint(inputrec->pull_work))
{
- clear_pull_forces(inputrec->pull);
+ clear_pull_forces(inputrec->pull_work);
}
/* We calculate the non-bonded forces, when done on the CPU, here.
}
}
- if (inputrec->bPull && inputrec->pull->bPotential)
+ if (inputrec->bPull && pull_have_potential(inputrec->pull_work))
{
/* Since the COM pulling is always done mass-weighted, no forces are
* applied to vsites and this call can be done after vsite spreading.
clear_rvec(fr->vir_diag_posres);
}
- if (inputrec->bPull && inputrec->pull->bConstraint)
+ if (inputrec->bPull && pull_have_constraint(inputrec->pull_work))
{
- clear_pull_forces(inputrec->pull);
+ clear_pull_forces(inputrec->pull_work);
}
/* update QMMMrec, if necessary */
}
}
- if (inputrec->bPull && inputrec->pull->bPotential)
+ if (inputrec->bPull && pull_have_potential(inputrec->pull_work))
{
pull_potential_wrapper(cr, inputrec, box, x,
f, vir_force, mdatoms, enerd, lambda, t,