real gmx_unused lambda,
real gmx_unused* dvdlambda,
const t_mdatoms gmx_unused* md,
- t_fcdata* fcd,
+ t_fcdata gmx_unused* fcd,
+ t_disresdata gmx_unused* disresdata,
+ t_oriresdata* oriresdata,
int gmx_unused* global_atom_index)
{
- int ex, power, ki = CENTRAL;
- real r2, invr, invr2, fc, smooth_fc, dev, devins, pfac;
- rvec r, Sr, fij;
- real vtot;
- const t_oriresdata* od;
- gmx_bool bTAV;
+ int ex, power, ki = CENTRAL;
+ real r2, invr, invr2, fc, smooth_fc, dev, devins, pfac;
+ rvec r, Sr, fij;
+ real vtot;
+ gmx_bool bTAV;
vtot = 0;
- od = fcd->orires;
- if (od->fc != 0)
+ if (oriresdata->fc != 0)
{
- bTAV = (od->edt != 0);
+ bTAV = (oriresdata->edt != 0);
- smooth_fc = od->fc;
+ smooth_fc = oriresdata->fc;
if (bTAV)
{
/* Smoothly switch on the restraining when time averaging is used */
- smooth_fc *= (1.0 - od->exp_min_t_tau);
+ smooth_fc *= (1.0 - oriresdata->exp_min_t_tau);
}
for (int fa = 0; fa < nfa; fa += 3)
const int type = forceatoms[fa];
const int ai = forceatoms[fa + 1];
const int aj = forceatoms[fa + 2];
- const int restraintIndex = type - od->typeMin;
+ const int restraintIndex = type - oriresdata->typeMin;
if (pbc)
{
ki = pbc_dx_aiuc(pbc, x[ai], x[aj], r);
ex = ip[type].orires.ex;
power = ip[type].orires.power;
fc = smooth_fc * ip[type].orires.kfac;
- dev = od->otav[restraintIndex] - ip[type].orires.obs;
+ dev = oriresdata->otav[restraintIndex] - ip[type].orires.obs;
/* NOTE:
* there is no real potential when time averaging is applied
if (bTAV)
{
/* Calculate the force as the sqrt of tav times instantaneous */
- devins = od->oins[restraintIndex] - ip[type].orires.obs;
+ devins = oriresdata->oins[restraintIndex] - ip[type].orires.obs;
if (dev * devins <= 0)
{
dev = 0;
{
pfac *= invr;
}
- mvmul(od->S[ex], r, Sr);
+ mvmul(oriresdata->S[ex], r, Sr);
for (int i = 0; i < DIM; i++)
{
fij[i] = -pfac * dev * (4 * Sr[i] - 2 * (2 + power) * invr2 * iprod(Sr, r) * r[i]);