Warning of system not charge neutral with TIP4P potential

Hello,
I am using lj/cut/tip4p/long pair style. The data file with initial configuration has TIP4P2005 water (dummy atom not specified). I am getting the following warning, which implies that LAMMPS is not creating the dummy atom with the negative charge for the water model:

WARNING: System is not charge neutral, net charge = 111.28 (src/kspace.cpp:327)

The simulation box has only water. i would appreciate any help with this!

Below is my input script:
units real
dimension 3
boundary p p p
atom_style full

pair_style lj/cut/tip4p/long 1 2 1 1 0.1546 12 8.5

read_data waterphasedatafile.txt

pair_coeff 1 1 0.1852 3.1589
pair_coeff 1 2 0 0
pair_coeff 2 2 0 0

bond_style harmonic
bond_coeff 1 540.76499 0.9572
angle_style harmonic
angle_coeff 1 87.90879 107.4

group water type 1:100

kspace_style pppm/tip4p 1.0e-4

fix 1 water shake 0.0001 100 0 b 1 a 1

fix 2 all nvt temp 300.0 300.0 100.0

neigh_modify delay 0 every 1 check yes

timestep 2.0

thermo_style custom step temp press pe
thermo 100

dump 0 all custom 500 all.*.xyz id mol type x y z ix iy iz vx vy vz

run 2000
write_restart restart1.save

Below is the snapshot of part of the log file:
SLURM_NTASKS: 1
LAMMPS (23 Jun 2022)
using 1 OpenMP thread(s) per MPI task
using multi-threaded neighbor list subroutines
using multi-threaded neighbor list subroutines
Reading data file …
orthogonal box = (0 0 0) to (30 30 30)
1 by 1 by 1 MPI processor grid
reading atoms …
300 atoms
scanning bonds …
2 = max bonds/atom
scanning angles …
1 = max angles/atom
reading bonds …
200 bonds
reading angles …
100 angles
Finding 1-2 1-3 1-4 neighbors …
special bond factors lj: 0 0 0
special bond factors coul: 0 0 0
2 = max # of 1-2 neighbors
1 = max # of 1-3 neighbors
1 = max # of 1-4 neighbors
2 = max # of special neighbors
special bonds CPU = 0.001 seconds
read_data CPU = 0.008 seconds
300 atoms in group water
Finding SHAKE clusters …
0 = # of size 2 clusters
0 = # of size 3 clusters
0 = # of size 4 clusters
100 = # of frozen angles
find clusters CPU = 0.000 seconds
PPPM initialization …
extracting TIP4P info from pair style
WARNING: System is not charge neutral, net charge = 111.28 (src/kspace.cpp:327)
using 12-bit tables for long-range coulomb (src/kspace.cpp:342)
G vector (1/distance) = 0.20642969
grid = 10 10 10
stencil order = 5
estimated absolute RMS force accuracy = 0.021501536
estimated relative force accuracy = 6.4751236e-05
using double precision FFTW3
3d grid and FFT values/proc = 3375 1000

Below is the snapshot of my initial configuration file:
LAMMPS data file for Water

300 atoms
200 bonds
100 angles
0 dihedrals

2 atom types
1 bond types
1 angle types
0 dihedral types

0 30 xlo xhi
0 30 ylo yhi
0 30 zlo zhi

Masses

1 15.9994
2 1.008

Atoms

1 1 1 0 12.674 17.86 16.857
2 1 2 0.5564 12.372 17 17.146
3 1 2 0.5564 12.78 18.687 17.328
4 2 1 0 23.484 14.139 18.994
5 2 2 0.5564 23.124 14.491 19.807
6 2 2 0.5564 23.062 13.74 18.233
7 3 1 0 19.735 26.785 22.122
8 3 2 0.5564 20.681 26.797 22.261
9 3 2 0.5564 19.198 26.364 21.449
10 4 1 0 5.33 11.827 27.126
11 4 2 0.5564 5.135 10.943 26.819
12 4 2 0.5564 4.835 12.43 27.681
13 5 1 0 8.3 26.308 6.054
14 5 2 0.5564 8.122 27.241 5.94
15 5 2 0.5564 9.11 25.836 6.248

This dummy atom is NOT “created”. Effectively, the oxygen atom is used as a placeholder and temporary displaced coordinates computed within the TIP4P pair and kspace styles. Thus the negative charge needs to be applied to the oxygen atom. Please see: 8.4.4. TIP4P water model — LAMMPS documentation

Thanks Axel! I understand now.

Did you ever resolve the warning? I keep getting it even after following the documentation to the best of my ability. Unclear to me if the warning is expected is the tip4p pair style is working correctly or not

@alserrano The resolution of the issue should be obvious from the discussion above: In the data file the oxygen atoms were incorrectly assigned a charge of 0. The link to the TIP4P howto has the necessary explanations and examples for the two ways to model TIP4P in LAMMPS.

It is impossible for us to make an assessment of your situation (likely it is NOT the same) since you don’t share any details about the warning or your input.