Skip to content
Snippets Groups Projects
Commit 4921dc18 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

bugfix for virial tally for improper style umbrella from Steven Vandenbrande (U Gent)

this closes #182
parent d133167b
No related branches found
No related tags found
No related merge requests found
......@@ -231,9 +231,26 @@ void ImproperUmbrella::compute(int eflag, int vflag)
f[i4][2] += f4[2]*a;
}
if (evflag)
if (evflag) {
// correct 4-body geometry for virial tally
vb1x = x[i1][0] - x[i2][0];
vb1y = x[i1][1] - x[i2][1];
vb1z = x[i1][2] - x[i2][2];
vb2x = x[i3][0] - x[i2][0];
vb2y = x[i3][1] - x[i2][1];
vb2z = x[i3][2] - x[i2][2];
vb3x = x[i4][0] - x[i3][0];
vb3y = x[i4][1] - x[i3][1];
vb3z = x[i4][2] - x[i3][2];
ev_tally(i1,i2,i3,i4,nlocal,newton_bond,eimproper,f1,f3,f4,
vb1x,vb1y,vb1z,vb2x,vb2y,vb2z,vb3x,vb3y,vb3z);
}
}
}
......
......@@ -254,8 +254,24 @@ void ImproperUmbrellaOMP::eval(int nfrom, int nto, ThrData * const thr)
f[i4].z += f4[2]*a;
}
if (EVFLAG)
if (EVFLAG) {
// get correct 4-body geometry for virial tally
vb1x = x[i1].x - x[i2].x;
vb1y = x[i1].y - x[i2].y;
vb1z = x[i1].z - x[i2].z;
vb2x = x[i3].x - x[i2].x;
vb2y = x[i3].y - x[i2].y;
vb2z = x[i3].z - x[i2].z;
vb3x = x[i4].x - x[i3].x;
vb3y = x[i4].y - x[i3].y;
vb3z = x[i4].z - x[i3].z;
ev_tally_thr(this,i1,i2,i3,i4,nlocal,NEWTON_BOND,eimproper,f1,f3,f4,
vb1x,vb1y,vb1z,vb2x,vb2y,vb2z,vb3x,vb3y,vb3z,thr);
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment