TIP4p hydrogen has incorrect atom type during minimization

Greetings,

I have a system of tip4p water + uam methane molecules. This is a unit-cell for s1 methane motif. I create the initial simulation box using the replicate command.

Then I try to minimize the energy of the system but I face the error below:

ERROR on proc 5: TIP4P hydrogen has incorrect atom type (src/KSPACE/pair_lj_cut_tip4p_long.cpp:226)
Last command: minimize 1.0e-6 1.0e-8 1000000 4000000
ERROR on proc 6: TIP4P hydrogen has incorrect atom type (src/KSPACE/pair_lj_cut_tip4p_long.cpp:226)
Last command: minimize 1.0e-6 1.0e-8 1000000 4000000

As per checking the forcefield information, I am using the correct otype and htype as:

pair_style lj/cut/tip4p/long 2 3 1 1 0.1577 20.0

I changed the cut-off to a big number as you see above, but it did not change anything. Also neighboring list is updated at every time-step.

I am using the following version of lammps:

LAMMPS (23 Jun 2022)

Also, I use periodic boundary conditions but some of the atoms in the original s1 unit-cell fall outside the box. Could have this caused the issue?

Please post the data file for your initial small box (I’m assuming it doesn’t have too many atoms in it before it’s replicated).

No, with periodic boundaries atoms are wrapped back into the box.

The most likely reason is incorrect ordering of atoms. For TIP4P the water molecule atoms must be in the order O, H, H (as explained in the TIP4P pair style documentation).

re-ordering the atoms of the water molecules resolved the issue. Thanks very much, Axel.