[lammps-users] virial calculation in tip4p.cpp

Hi guys,

Rescently, I am reading the lammps codes for tip4p:

PairLJCutCoulLongTIP4P::PairLJCutCoulLongTIP4P(LAMMPS *lmp) :
single_enable = 0;
// TIP4P cannot compute virial as F dot r
// due to find_M() finding bonded H atoms which are not near O atom
no_virial_compute = 1;

Can anyone tell me why we cannot calculate the virial as F dot r,if F is the force right on the oxygen or hydrogen atoms ?

Any help would be greatly appreciated.

Because the 3 atoms force is give to are not close
to each other in some cases - they could be on different
sides of the periodic box. In that case sum of F dot r
is not correct. There's no easy way to find the correct
ghost image of an atom to find the one that is close
to the other 2.