- moldyn->gvir.xx+=moldyn->atom[i].r.x*moldyn->atom[i].f.x;
- moldyn->gvir.yy+=moldyn->atom[i].r.y*moldyn->atom[i].f.y;
- moldyn->gvir.zz+=moldyn->atom[i].r.z*moldyn->atom[i].f.z;
- moldyn->gvir.xy+=moldyn->atom[i].r.y*moldyn->atom[i].f.x;
- moldyn->gvir.xz+=moldyn->atom[i].r.z*moldyn->atom[i].f.x;
- moldyn->gvir.yz+=moldyn->atom[i].r.z*moldyn->atom[i].f.y;
+ /* calculate global virial */
+ moldyn->gvir.xx+=itom[i].r.x*itom[i].f.x;
+ moldyn->gvir.yy+=itom[i].r.y*itom[i].f.y;
+ moldyn->gvir.zz+=itom[i].r.z*itom[i].f.z;
+ moldyn->gvir.xy+=itom[i].r.y*itom[i].f.x;
+ moldyn->gvir.xz+=itom[i].r.z*itom[i].f.x;
+ moldyn->gvir.yz+=itom[i].r.z*itom[i].f.y;
+
+ /* check forces regarding the given timestep */
+ if(v3_norm(&(itom[i].f))>\
+ 0.1*moldyn->nnd*itom[i].mass/moldyn->tau_square)
+ printf("[moldyn] WARNING: pfc (high force: atom %d)\n",
+ i);