[lammps-users] work done by an external electric field

Hi Steve,

When we use the command of fix efield in simulations, can we get the work which is done by an applied electric field. For example, when we apply an external electric field along the axial direction of a carbon tube immersed into a water reservoir, water molecules will move through this tube. The calculation is based on the NVT system. Is the variation of the total energy of system is the work done by the electric field? if not, can you suggest me how to get it? Thanks.

Path Zhu

In NVT, the thermostat is also adding/subtracting energy to
the system, so you'd have to account for that. The fix nvt
command stores that energy delta. If you want work
due to a static Efield on an atom, it would just be
F times displacement (in the direction of the field) ? So
that could be computed via compute displace/atom
for each atom.

Steve