Illegal pair_style command

Dear LAMMPS community,
I’m currently using the 29Sept2021 version of LAMMPS to model wetting of different substrates with water at the tip4p/ice level. For the substrates I’m using harmonic potentials for bonds and angles while the non bonded parameters are described using a lj/long/coul/long pair style. Water molecules are described via the TIP4P model with pppm/tip4p for the long-range coulombic forces. Unfortunately I’m getting Illegal pair_style command as error message. I am now wondering if the 2 pair style are compatible with each other, I’m aware that coupling anything with TIP4P is not trivial due to the presence of the charge on the dummy atom and the long range solver but this set up does not seem to be too much complicated. Does anybody have an advice on that? I’m posting below the relevant part of the input:

units real
atom_style full
boundary p p p
read_data S+w_02

#------Define the interaction Parameters--------#
bond_style harmonic
angle_style harmonic
dihedral_style harmonic
improper_style harmonic

#------Groups------------------------------#
group oxsi type 1
group si type 2
group bulk type 1 2
group oxh type 3
group h type 4
group silanol type 3 4
group slab type 1 2 3 4
group hy type 5
group ox type 6
group water type 5 6
#-----------Define charges-----------------#
set type 1 charge -0.55
set type 2 charge 1.1
set type 3 charge -0.675
set type 4 charge 0.4
set type 5 charge 0.5897
set type 6 charge -1.1794

neighbor 2.0 bin
neigh_modify every 10
timestep 1
variable T equal 100
#########################################################

FF SETTINGS

#########################################################
pair_style hybrid lj/long/coul/long 8.5 lj/long/tip4p/long 6 5 4 6 0.1577 8.5
pair_modify tail yes
kspace_style pppm/tip4p 1.0e-4
#################SLAB##################
pair_coeff 1 1 lj/long/coul/long 0.04 3.6 #O(si)-O(si)
pair_coeff 1 2 lj/long/coul/long 0.06 3.888
pair_coeff 1 3 lj/long/coul/long 0.08 3.6
pair_coeff 1 4 lj/long/coul/long 0.0265 1.988
pair_coeff 2 2 lj/long/coul/long 0.08 4.2
pair_coeff 2 3 lj/long/coul/long 0.1 3.888
pair_coeff 2 4 lj/long/coul/long 0.0465 2.147
pair_coeff 3 3 lj/long/coul/long 0.12 3.6
pair_coeff 3 4 lj/long/coul/long 0.0665 1.988
pair_coeff 4 4 lj/long/coul/long 0.013 1.098
################WATER#############
############hydrogen_water########
pair_coeff 5 5 lj/cut/tip4p/cut 0.0 0.0
pair_coeff 5 1 lj/long/coul/long 0.0 0.0
pair_coeff 5 2 lj/long/coul/long 0.0 0.0
pair_coeff 5 3 lj/long/coul/long 0.0 0.0
pair_coeff 5 4 lj/long/coul/long 0.0 0.0
pair_coeff 5 6 lj/cut/tip4p/long 0.0 0.0
#############oxygen_water########
pair_coeff 6 6 lj/cut/tip4p/cut 0.21084 3.1668
pair_coeff 6 4 lj/long/coul/long 0.11192 1.8647
pair_coeff 6 3 lj/long/coul/long 0.16542 3.3764
pair_coeff 6 2 lj/long/coul/long 0.14542 3.6469
pair_coeff 6 1 lj/long/coul/long 0.12542 3.3764

bond_coeff 1 285.0 1.68 #Si-O
bond_coeff 2 285.0 1.68 #Si-O(silanol)
bond_coeff 3 495.0 0.945 #O-H
bond_coeff 4 450 0.9572 #H20

angle_coeff 1 100.0 149.0 #Si-O-Si
angle_coeff 2 100.0 109.5 #O-Si-O
angle_coeff 3 100.0 109.5
angle_coeff 4 100.0 109.5
angle_coeff 5 50.0 115.0
angle_coeff 6 55 104.52 #H20

dihedral_coeff * 0.0 1 0
improper_coeff * 0.0 0
#############################################################

settings

#############################################################

velocity all create $T 12345 rot yes mom yes dist gaussian
velocity si set 0.0 0.0 0.0
fix freeze si setforce 0.0 0.0 0.0
fix fixtip4p water shake 1e-6 200 0 b 4 a 6

This input deck is littered with inconsistencies and syntax errors related to pair style and coeffs. Too many too list and explain them all.

But most importantly, there is no need for a hybrid pair style. Just use pair style lj/cut/tip4p/long for everything. Then all your inconsistencies would be much easier to resolve if they are nor eliminated right away. Please pay better attention to the respective pages in the manual, too.

Dear Axel, thanks a lot for your prompt reply.
Why is there no need for a hybrid pair style? Isn’t the lj/cut/tip4p/long specifically written to model the M point in the water structure? I wonder how would that behave when dealing with a silica surface, that’s why the idea of having a separate (hybrid) pair style.
I’ve tried to use lj/cut/tip4p/long for everything as you suggested but I’m now getting Incorrect args for pair coefficients when it comes to the interaction of the H(water) atoms with the surface.
I’m using the manual as my personal bible but I personally find that information for the TIP4P model could be more extensive. Thanks for your cooperation.

The opposite is true. The in the “tip4p” styles, the M site is treated special only for water molecules as indicated by the atom types for oxygen and hydrogen (and the requirement of being ordered, O, H, H in the sequence of atoms IDs). All other atoms use their respective atom positions without shifting. But if you have interactions between the water and non-water, you need to put the charge in the M position as well, right? But with a hybrid style you do not do that and thus your results will be worse than without.

Likely for a good reason, but since I cannot read minds (neither those of people nor those of people) I currently cannot tell you which it is.

This is likely because you are expecting more of a tutorial than a manual. I always remind people to recall that an owner’s manual of a car does not teach you how to drive. The same applies to a manual for a simulation software. The LAMMPS manual is quite detailed and exhaustive. Up to the point where its readability suffers from too much details and information. By the very nature of the matter, this requires an approach where you have to create the equivalent of a tutorial yourself.

Many beginners make the mistake of trying too hard to create the inputs for their full simulation setup straight away. It is much easier - and in the long run also much more efficient - build them in stages and use for each feature you need first some minimal test inputs (with just a few atoms) where you can quickly try out and understand a feature and also verify (by hand!) that the computations you expect are happening.

LAMMPS has many features for introspection and to extract and output details of the computed data as a whole, on a per atom and per interaction basis. You can take advantage of those to verify that features are working as you expect or - if needed - adjust your expectations to what it is a feature does.
With such tests it is far easier to debug and understand errors, since there are less options for mistakes and you gain (deserved!) confidence in your own skills. With too complex inputs you are often in a situation where you cannot tell, what the root cause of an error message is, and even if you resolve all error messages, you may still have an incorrect input that can produce incorrect results in sometimes subtle ways without you noticing, because you have nothing to compare to and no experience in how to detect such deviations.