Pair coeffs not set

Hello all,

I am trying to use a hybrid pair style for simulating a polymer with class 2 pair style and water with F3C model. I have a data file in which I mention the pair styles beside the atom ID in the Pair Coeffs section in the data file. I am pasting my script file and a section of the data file.

I get an error ERROR on proc 0: All pair coeffs are not set (…/pair_hybrid.cpp:573). This simulation runs when I don’t use hybrid pair style and I don’t mention the pair styles in the Pair Coeffs section of data file.

units real

atom_style full

boundary p p p

pair_style hybrid lj/class2/coul/long 8 8 lj/cut/coul/long 8 8

dielectric 1.0

bond_style class2

angle_style class2

dihedral_style class2

improper_style class2

kspace_style ewald 0.0001

read_data Poly.data

velocity all create 300.0 497 dist gaussian

neighbor 2.0 bin

neigh_modify every 1

thermo 100

thermo_style custom step temp epair emol etotal press vol density

timestep 1.0 # femtoseconds

restart 1000 rst.lambda0

saving trajectory

dump Datom all custom 500 dump.lambda0 id type xu yu zu ix iy iz

dump_modify Datom sort 1

#nvt long run

fix nvt1 all nvt temp 300 300 50

run 5

unfix nvt1

write_data data.lambda0

DATA FILE

LAMMPS data file. msi2lmp v3.9.7 / 24 Oct 2015 / CGCMM for PolyPFIA_OH

7434 atoms

6727 bonds

11200 angles

14637 dihedrals

0 impropers

12 atom types

10 bond types

19 angle types

19 dihedral types

0 improper types

2.271672537 48.610972537 xlo xhi

1.791784408 48.131084408 ylo yhi

-0.911659676 45.427640324 zlo zhi

Masses

1 12.011150 # c

2 15.999400 # oc

3 18.998400 # f

4 32.064000 # sf

5 14.006700 # n

6 32.064000 # s

7 15.999400 # o

8 15.999400 # o=

9 1.007970 # hw

10 15.999400 # o*

11 1.00797 #hw**

12 15.9994 #ow**

Pair Coeffs

1 lj/class2/coul/long 0.0540000000 4.0100000000 # c

2 lj/class2/coul/long 0.2400000000 3.5350000000 # oc

3 lj/class2/coul/long 0.0598000000 3.2000000000 # f

4 lj/class2/coul/long 0.2500000000 4.0270000000 # sf

5 lj/class2/coul/long 0.1060000000 4.0700000000 # n

6 lj/class2/coul/long 0.0710000000 4.0270000000 # s

7 lj/class2/coul/long 0.2400000000 3.5350000000 # o

8 lj/class2/coul/long 0.0600000000 3.5350000000 # o=

9 lj/cut/coul/long 0.01 0.8021 #hw

10 lj/cut/coul/long 0.1848 3.1668 #ow*

11 lj/cut/coul/long 0.01 0.8021 #hw**

12 lj/cut/coul/long 0.1848 3.1668 #ow**

Please help me solve this issue.

Thanks

Soumyadipta

PhD candidate

Hello all,

I am trying to use a hybrid pair style for simulating a polymer with class
2 pair style and water with F3C model. I have a data file in which I
mention the pair styles beside the atom ID in the *Pair Coeffs* section
in the data file. I am pasting my script file and a section of the data
file.

I get an error *ERROR on proc 0: All pair coeffs are not set
(../pair_hybrid.cpp:573). *This simulation runs when I don’t use hybrid
pair style and I don’t mention the pair styles in the Pair Coeffs section
of data file.

​yes. this is the expected behavior. please keep in mind, that the
PairCoeffs section in the data file only takes one atom type as the first
argument, which means it is dependent on determining the missing entries
for mixed pairs through mixing rules. however, you cannot mix coefficients
between different pair styles like lj/class2 and lj/cut. for starters,
which one of the two styles should be applied for this pair? so these need
to be provided explicitly. in fact, it is usually best you provide all
pairs of coefficients explicitly e.g. in a PairCoeffsIJ section or via
pair_coeff commands.

axel.

Hello,

Thank you for the reply ! How would you suggest to incorporate a standard water model like F3C with a polymer modeled using class 2 force field ?

The water model uses LJ 12-6 potential and the class 2 model uses LJ 9-6 potential. What mixing rule and what potential would you suggest for mixing LJ 9-6 polymer atoms and LJ 12-6 water atoms ?

Thanks
Soumyadipta

Hello,

Thank you for the reply ! How would you suggest to incorporate a standard
water model like F3C with a polymer modeled using class 2 force field ?

​you have to study the published literature. surely people have done
simulations with class2 and water. however, mixing different force fields
is always a difficult step. force fields are parameterized for specific
conditions and environments. changing part of it to a different model, that
has used a different parameterization strategy will result in inconsistent
interactions (e.g. the balance between partial charges and LJ interactions
would be chose differently in different force fields).​

The water model uses LJ 12-6 potential and the class 2 model uses LJ 9-6
potential. What mixing rule and what potential would you suggest for
mixing LJ 9-6 polymer atoms and LJ 12-6 water atoms ?

​it is not possible to apply a mixing rule between different potential
functions. i already told you.​ at any rate, your problem is not really a
LAMMPS problem but a principal and conceptual problem, so your solve this
accordingly and then start thinking about how to realize the solution in
LAMMPS. not the other way around. be grateful, that LAMMPS reminds you
through this technical error message, that you are trying to do something,
which would likely have resulted in bogus and unusable data.

​axel.​