Dear Hank,
Thank you for your answer.
I tried the above commands for a system of 277 water molecules. My input thus contains the following lines:
fix 2 all mbx 1 277 h2o print/settings json "mbx.json" print/dipoles
variable dipx atom f_2[7]/0.2081943
variable dipy atom f_2[8]/0.2081943
variable dipz atom f_2[9]/0.2081943
variable dipnorm atom sqrt(f_3[7]*f_3[7]+f_3[8]*f_3[8]+f_3[9]*f_3[9])/0.2081943
dump 1 all custom ${dump_freq} dump.lammpstrj id mol type q x y z v_dipx v_dipy v_dipz
I have some more questions.
I see that only oxygen atoms have a nonzero dipole. Is that the total dipole associated with the water molecule (including both the contribution of point charges and induced dipoles)?
If so, the total dipole of the system would be just the sum of the dipoles of each oxygen atom in the simulation, right?
What are the units of the dipoles printed with the commands above?
Thanks again.
Best regards,
Paolo