GROMACS version: gromacs-2025.1.Install
GROMACS modification: Yes/No
Here post your question Dear GROMACS developers and community,
I am using Ewald3D-C for simulations of interfacial systems and would like to know whether the long-range correction term for Ewald3D-C includes a virial contribution.
I have searched through the following source files:
-
ewald/long_range_correction.cpp— theewald_LRcorrectionfunction computes forces and energies (Vcorr_q,dvdl), but does not take any virial tensor as an argument. -
mdlib/force.cpp— theewald_LRcorrectionfunction is called inCpuPpLongRangeNonbondeds::calculate, and I see thatewald_charge_correction(which does compute virial) is called separately, but no virial contribution fromewald_LRcorrectionis added toforceWithVirial. -
ewald/ewald.cpp— theewald_charge_correctionfunction includes virial contributions, but this appears to be for the net charge correction only, not for the Ewald3D-C dipole surface correction.
Based on my reading of the code, it appears that the Ewald3D-C dipole surface correction computes forces and energies but does not compute the corresponding virial contribution. Could you please confirm:
-
Is there a virial contribution from the Ewald3D-C correction that I have missed in another part of the code?
-
If not, is this omission intentional (e.g., because the virial contribution is negligible or not needed for certain applications), or is it a missing feature?
Thank you for your time and help.