Could the "compute heat/flux" command be used to calculate the heat flux through a group of water molecules

Han Hu, you asked about obtaining per-atom stress/energy from the PPPM
kspace method:

"The electric field and forces are obtained by interpolating from grid to
atoms. Could the similar method be used to interpolate the potential and
virial stress from the grid back to the atoms?"

I have some beta code that does exact this--i.e. it obtains per-atom
stress and energy for the PPPM kspace method in LAMMPS. Perhaps you
could easily modify it for tip4p. I will send you a copy.

Stan

Just released Stan's code as a 14Feb12 patch.

This adds per-atom energy and virial tallying to
both the PPPM and Ewald methods, something
that has been a long-standing request by many
LAMMPS users, e.g. those who want to
do heat-flux and thermal conductivity calculations
in materials with charges.

Many thanks to Stan for figuring out how to do this
via extra FFTs for PPPM, and to Stan
and German Samolyuk (originally) for adding
this to Ewald as well.

Steve