Before reporting this as a bug, I would like to understand whether this combination is currently supported by design.
I am using the latest LAMMPS (4Jul2026) together with the ELECTRODE package to simulate a constant-potential supercapacitor.
My system consists of:
Carbon electrodes
fix electrode/conp
kspace_style pppm/electrode
pair_style lj/cut/tip4p/long
TIP4P water
Na⁺ and ClO₄⁻ ions
The simulation aborts immediately with
ERROR: Fix electrode couldn’t find a Coulombic pair style
Before posting here, I searched the documentation, GitHub issues, and previous discussions on the Materials Science Community, but I could not find any discussion specifically about combining the ELECTRODE package with TIP4P water models.
I also spent some time inspecting the source code to better understand the issue. From what I observed:
pppm/tip4p contains the TIP4P-specific charge mapping required for the virtual M-site.
pppm/electrode implements the ElectrodeKSpace interface required by the ELECTRODE package.
However, I could not find a KSpace style that combines both capabilities.
This made me wonder whether this combination is currently unsupported, or whether I am simply missing the correct way to set it up.
So my questions are:
Is TIP4P currently supported together with fix electrode/conp?
If not, is this due to a fundamental algorithmic limitation, or is it simply an unimplemented feature?
Would a combined implementation (e.g. a TIP4P-aware pppm/electrode) be the intended direction for adding such support?
I would appreciate any clarification from the developers. If this functionality is simply not implemented yet, I would also be interested in contributing to such an implementation.
@kamalvand Since you mention this discussion from your GitHub pull request, I should add a comment here for the sake of completeness and for anybody reading this in the future.
As @srtee already pointed out the now closed first attempt. The conclusion is not that you cannot do simulations with TIP4P, you just cannot use the tip4p pair styles that provide a shortcut for simulating TIP4P. I quote:
In particular, it is ALREADY possible to simulate the CORRECT TIP4P model with ELECTRODE, namely by using explicit charge sites and fix rigid/small together with pair lj/*/coul/long.
Looks like the last reply got cut off but it’s hinting at the key distinction — sounds like pppm/tip4p just isnt available *for electrode specifically*, but that’s different from saying TIP4P modeling itself doesnt work with the package. If the third reply is saying you can still do proper TIP4P simulations by building it manually instead of using the shortcut pair styles, that’s actually pretty important for the OP to know before switching models entirely.
@afoster Nothing was cut off. This was merely referring to a pull request the OP had submitted to the LAMMPS github repo where @srtee had provided the comment that I quoted.
The situation is roughly like what you describe: the ELECTRODE package has its own version of PPPM and you must use it with its features. Since that PPPM implementation does not have the extended support for TIP4P water with the implicit charge site, some changes are needed to add that kind of support. It is not too difficult to do, but it has to be done correctly, cleanly, and consistently.
The OP doesn’t seem to be interested in using the explicit TIP4P model.
P.S.: here are the references to the withdrawn and the current pull request: