Commit
0336ab2d only fixed part of the vsiten issue in the Verlet
buffer calculation code. Parameters were read from incorrect memory
locations, which could lead to a segmentation fault or incorrect
masses for vsiten particles. It unlikely that this affected results.
Part of #1579.
Change-Id: I76cdb94e34194d2f6d49d98a49486ce1df76d91a
for (i = 0; i < il->nr; i += 1+NRAL(ft))
{
const t_iparams *ip;
- real cam[5], inv_mass, m_aj;
- int a1, j, aj, coeff;
+ real cam[5], inv_mass, coeff, m_aj;
+ int a1, j, aj;
ip = &ffparams->iparams[il->iatoms[i]];
case F_VSITEN:
/* Exact */
inv_mass = 0;
- for (j = 0; j < 3*ip->vsiten.n; j += 3)
+ for (j = 0; j < 3*ffparams->iparams[il->iatoms[i]].vsiten.n; j += 3)
{
aj = il->iatoms[i+j+2];
- coeff = ip[il->iatoms[i+j]].vsiten.a;
+ coeff = ffparams->iparams[il->iatoms[i+j]].vsiten.a;
if (moltype->atoms.atom[aj].ptype == eptVSite)
{
m_aj = vsite_m[aj];