Salt dipoles (Mg-SO4) from XTC format shows zero for free ions

GROMACS version: 2022
GROMACS modification: No

I am trying to get the polarization of a water+ MgSo4 solution. I was getting the dipoles of water and dipoles of MgSO4 separately. I later realized that gmx-dipoles is getting dipoles for Mg2+ as zero. Is there any strategy can be taken to get the total dipoles of the MgSO4 salt from their positions in XTC format. I have been able to save velocities in TRR format and trying to get the ionic current from velocity*charge, but the TRR format trajectory is 2.5 times larger and very slow to analyze. I really appreciate any comments.


It is not possible to compute a sensible dipole of a group of molecules with net charge in a periodic system.