MDAnalysis.analysis.dielectric should give the dielectric of the system.
Actual behavior
Given make_whole=True, it can't handle the 0 mass virtual sites as discuessed in #3168
Given make_whole=False, it still can't work well, as the dummy site are not included in the same fragment as the O and H atoms as there's no bond defiend between the dummy site and other atoms in the water model, resulting in non-neutral total charge of the fragments. And mdanalysis just thinks they are free charges. This is related to #1954
My current way to solve this is to make a fake .tpr file that contains a bond between the virtual site and the oxygen.
Code to reproduce the behavior
import MDAnalysis as mda
from MDAnalysis.analysis import dielectric
u = mda.Universe('md.tpr', 'md.xtc')
diel = dielectric.DielectricConstant(u.atoms, temperature=298, make_whole=False, start=5000)
diel.run()
Expected behavior
MDAnalysis.analysis.dielectric
should give the dielectric of the system.Actual behavior
make_whole=True
, it can't handle the 0 mass virtual sites as discuessed in #3168make_whole=False
, it still can't work well, as the dummy site are not included in the same fragment as the O and H atoms as there's no bond defiend between the dummy site and other atoms in the water model, resulting in non-neutral total charge of the fragments. And mdanalysis just thinks they are free charges. This is related to #1954My current way to solve this is to make a fake .tpr file that contains a bond between the virtual site and the oxygen.
Code to reproduce the behavior
Current version of MDAnalysis
python -V
)? 3.9