Example #1
0
/* Apply forces in a mass weighted fashion */
static void apply_forces(t_pull * pull, t_mdatoms * md, rvec *f)
{
    int                 c;
    const t_pull_coord *pcrd;

    for (c = 0; c < pull->ncoord; c++)
    {
        pcrd = &pull->coord[c];

        if (PULL_CYL(pull))
        {
            apply_forces_grp(&pull->dyna[c], md, pcrd->f, -1, f);
        }
        else
        {
            if (pull->group[pcrd->group[0]].nat > 0)
            {
                apply_forces_grp(&pull->group[pcrd->group[0]], md, pcrd->f, -1, f);
            }
        }
        apply_forces_grp(&pull->group[pcrd->group[1]], md, pcrd->f, 1, f);
    }
}
Example #2
0
/* Apply forces in a mass weighted fashion */
static void apply_forces(t_pull * pull, t_mdatoms * md, gmx_ga2la_t ga2la,
                         rvec *f)
{
    int i;
    t_pullgrp *pgrp;
    
    for(i=1; i<pull->ngrp+1; i++)
    {
        pgrp = &(pull->grp[i]);
        apply_forces_grp(pgrp,md,ga2la,pgrp->f,1,f);
        if (pull->grp[0].nat)
        {
            if (PULL_CYL(pull))
            {
                apply_forces_grp(&(pull->dyna[i]),md,ga2la,pgrp->f,-1,f);
            }
            else
            {
                apply_forces_grp(&(pull->grp[0]),md,ga2la,pgrp->f,-1,f);
            }
        }
    }
}