Slab correction doesn't work without an electrode
Hello,
In order to correctly compute the pressure tensor (to then evaluate the surface tension) surface tension of a 3D periodic system [vacuum / liquid / vacuum], I submit a simulation with the next settings
external_field type D
direction 0.0 0.0 0.0
amplitude 0.0
to have a slab correction taken into account. However, I am getting an error
MW_STDERR = 0 6 [error]...
cannot use external fields without charge neutrality
subroutine: read_system_parameters
file: configuration.f90
To temporarily fix it, I commented on the next lines in the configuration.f90 file of my MW version.
! External fields need charge neutrality
if ((system%field%field_type.eq.FIELD_TYPE_ELECTRIC .or. &
system%field%field_type.eq.FIELD_TYPE_DISPLACEMENT) .and. & .
not.system%electrode_charge_neutrality) then
call MW_errors_runtime_error("read_system_parameters", "configuration.f90", &
"cannot use external fields without charge neutrality")
end if
Could you please correctly implement the possibility of using the slab correction for systems without electrodes, please
Thank you,
Katya