TIP4P hydrogen has incorrect atom type

Dear Lammps experts,

When trying to equilibrate a mixed tip4p/2005 water and SO2 system, I got the error:
ERROR on proc 0: TIP4P hydrogen has incorrect atom type (…/pair_lj_cut_tip4p_long.cpp:224)

While this looks like an obvious mistake in data file, I could not identify it. I tried to print the jtype, type[jH1], type[jH2] before the error occurs. It shows that jtype and type[jH1] is H, and type[jH2] is O. I cannot understand why.

Attached is my input and data files. I am using version 1Feb14. Can you provide some ideas on this? Thanks!

Sli

tips.lamdat (484 KB)

in.lam (1.71 KB)

pair_style hybrid lj/cut/coul/long 12.0 11.0 lj/cut/tip4p/long 2 2 1 1 0.1546 12.0 11.0

lj/cut/tip4p/long gives wrong O atom id.

Dear Lammps experts,

When trying to equilibrate a mixed tip4p/2005 water and SO2 system, I got
the error:
ERROR on proc 0: TIP4P hydrogen has incorrect atom type
(../pair_lj_cut_tip4p_long.cpp:224)

While this looks like an obvious mistake in data file, I could not identify
it. I tried to print the jtype, type[jH1], type[jH2] before the error
occurs. It shows that jtype and type[jH1] is H, and type[jH2] is O. I cannot
understand why.

just look at the documentation more carefully.

it says:

lj/cut/tip4p/long args = otype htype btype atype qdist cutoff (cutoff2)

and you have:

lj/cut/tip4p/long 2 2 1 1 0.1546 12.0 11.0

so you have otype=2 htype=2 btype=1 atype=1. so you assign O and H to
the same type. that is definitely wrong and *very* obvious.

furthermore, there is no reason to use a hybrid pair style for this
kind of system. lj/cut/tip4p/long acts as lj/cut/coul/long for all
types that are not flagged as otype or htype.

axel.

Thanks.
After change to lj/cut/tip4p/long 3 2 2 2, it’s working now.

Thanks for the advice, Axel.

I did not realize that lj/cut/tip4p/long can be used for non-tip4p molecules.

Shuai