How to merge two data files with different force fields

Hello everyone,

I am trying to create a simulation box in LAMMPS by merging two data files (one polymer and other graphene). To do so, I first tried to create a simulation box and then use add append command to add the two data files to this box. However I am getting the following error. the protein has the PCFF force field and the graphene uses airebo force field. I would appreciate if anybody can help what is the problem with my code.

LAMMPS (29 Sep 2021 - Update 2)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
  using 1 OpenMP thread(s) per MPI task
units              real
dimension          3
boundary           p p p
atom_style         full
region box block 0 100 0 100 0 150
create_box          9  box    bond/types  7   angle/types   11    dihedral/types  12   extra/bond/per/atom  4   extra/angle/per/atom  6   extra/dihedral/per/atom 20    #for extra command you can use any value below 20
Created orthogonal box = (0.0000000 0.0000000 0.0000000) to (100.00000 100.00000 150.00000)
  1 by 2 by 2 MPI processor grid


# Pair_Coefficient ..............................................................................................................................................


pair_style    hybrid    lj/class2/coul/long 10 15   airebo 3.0 1 0  #lj/cut 10
pair_modify     tail yes
pair_coeff * *    airebo CH.airebo NULL NULL NULL NULL NULL NULL NULL NULL C

pair_coeff 1 9    lj/class2/coul/long  0.059468   3.7050
pair_coeff 2 9    lj/class2/coul/long  0.062580   3.3000
pair_coeff 3 9    lj/class2/coul/long  0.125370   3.4675
pair_coeff 4 9    lj/class2/coul/long  0.068189   3.7135
pair_coeff 5 9    lj/class2/coul/long  0.062685   3.4675
pair_coeff 6 9    lj/class2/coul/long  0.029178   2.2490
pair_coeff 7 9    lj/class2/coul/long  0.133956   3.5040
pair_coeff 8 9    lj/class2/coul/long  0.062685   3.4675

dielectric          1.0
bond_style          class2
angle_style         class2
dihedral_style      class2
improper_style      class2
read_data          polymer.data add append
Reading data file ...
  orthogonal box = (0.0000000 -1.1918775 0.0000000) to (100.00000 100.00000 150.00000)
  1 by 2 by 2 MPI processor grid
WARNING: Pair style in data file differs from currently defined pair style (src/read_data.cpp:589)
ERROR: Pair coeff for hybrid has invalid style: 0.054 (src/pair_hybrid.cpp:497)
Last command: read_data          polymer.data add append
--------------------------------------------------------------------------
Primary job  terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
mpirun detected that one or more processes exited with non-zero status, thus causing
the job to be terminated. The first process to do so was:

  Process name: [[2971,1],0]
  Exit code:    1


polymer.data (4.1 MB)
Input file:

echo               both
units              real
dimension          3
boundary           p p p
atom_style         full
region box block 0 100 0 100 0 150
create_box          9  box    bond/types  7   angle/types   11    dihedral/types  12   extra/bond/per/atom  4   extra/angle/per/atom  6   extra/dihedral/per/atom 20    #for extra command you can use any value below 20


# Pair_Coefficient ..............................................................................................................................................


pair_style    hybrid    lj/class2/coul/long 10 15   airebo 3.0 1 0  #lj/cut 10
pair_modify     tail yes
pair_coeff * *    airebo CH.airebo NULL NULL NULL NULL NULL NULL NULL NULL C

pair_coeff 1 9    lj/class2/coul/long  0.059468   3.7050
pair_coeff 2 9    lj/class2/coul/long  0.062580   3.3000
pair_coeff 3 9    lj/class2/coul/long  0.125370   3.4675
pair_coeff 4 9    lj/class2/coul/long  0.068189   3.7135
pair_coeff 5 9    lj/class2/coul/long  0.062685   3.4675
pair_coeff 6 9    lj/class2/coul/long  0.029178   2.2490
pair_coeff 7 9    lj/class2/coul/long  0.133956   3.5040
pair_coeff 8 9    lj/class2/coul/long  0.062685   3.4675

dielectric          1.0
bond_style          class2
angle_style         class2
dihedral_style      class2
improper_style      class2
read_data          polymer.data add append

read_data          GN.data add append   shift  90  90  130
info coeffs out log

dump 1             all xyz 1000 System.xyz
undump 1

To avoid the error, you have to remove the Pair Coeffs section from your first data file.

GN.data (73.9 KB)
System.in (1.8 KB)
polymer.data (4.1 MB)
Dear @akohlmey , thank you for your response. I did as you said. But I am getting the same error.

LAMMPS (29 Sep 2021 - Update 2)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
  using 1 OpenMP thread(s) per MPI task
units              real
dimension          3
boundary           p p p
atom_style         full
region box block 0 100 0 100 0 150
create_box          9  box    bond/types  7   angle/types   11    dihedral/types  12   extra/bond/per/atom  4   extra/angle/per/atom  6   extra/dihedral/per/atom 20    #for extra command you can use any value below 20
Created orthogonal box = (0.0000000 0.0000000 0.0000000) to (100.00000 100.00000 150.00000)
  1 by 2 by 2 MPI processor grid

# Masses

mass 1 12.01115
mass 2 18.9984
mass 3 15.9994
mass 4 32.064
mass 5 15.9994
mass 6 1.00797
mass 7 15.9994
mass 8 15.9994
mass 9 12.010700 # C

# Pair_Coefficient ..............................................................................................................................................


pair_style    hybrid    lj/class2/coul/long 10 15   airebo 3.0 1 0  #lj/cut 10
pair_modify     tail yes
pair_coeff * *    airebo CH.airebo NULL NULL NULL NULL NULL NULL NULL NULL C

pair_coeff 1 9    lj/class2/coul/long  0.059468   3.7050
pair_coeff 2 9    lj/class2/coul/long  0.062580   3.3000
pair_coeff 3 9    lj/class2/coul/long  0.125370   3.4675
pair_coeff 4 9    lj/class2/coul/long  0.068189   3.7135
pair_coeff 5 9    lj/class2/coul/long  0.062685   3.4675
pair_coeff 6 9    lj/class2/coul/long  0.029178   2.2490
pair_coeff 7 9    lj/class2/coul/long  0.133956   3.5040
pair_coeff 8 9    lj/class2/coul/long  0.062685   3.4675

#Pair Coeffs # lj/class2/coul/long

pair_coeff 1 1    lj/class2/coul/long  0.054 4.01
pair_coeff 2 2    lj/class2/coul/long  0.0598 3.2
pair_coeff 3 3    lj/class2/coul/long  0.24 3.535
pair_coeff 4 4    lj/class2/coul/long  0.071 4.027
pair_coeff 5 5    lj/class2/coul/long  0.06 3.535
pair_coeff 6 6    lj/class2/coul/long  0.013 1.098
pair_coeff 7 7    lj/class2/coul/long  0.274 3.608
pair_coeff 8 8    lj/class2/coul/long  0.06 3.535


dielectric          1.0
bond_style          class2
# class2

bond_coeff 1 1.53 299.67 -501.77 679.81
bond_coeff 2 1.39 403.032 0 0
bond_coeff 3 1.42 400.395 -835.195 1313.01
bond_coeff 4 1.77 257.332 0 0
bond_coeff 5 1.4308 743.76 0 0
bond_coeff 6 0.97 563.28 -1428.22 1902.12
bond_coeff 7 1.2074 847.44 0 0

angle_style         class2

#Angle Coeffs # class2

angle_coeff 1 109.2 68.3715 0 0
angle_coeff 2 112.67 39.516 -7.443 -9.5583
angle_coeff 3 109.103 71.97 0 0
angle_coeff 4 111.27 54.5381 -8.3642 -13.0838
angle_coeff 5 109.5 60 0 0
angle_coeff 6 104.5 35.7454 -10.0067 -6.2729
angle_coeff 7 109.5 60 0 0
angle_coeff 8 109.5 60 0 0
angle_coeff 9 109.5 50 0 0
angle_coeff 10 119.329 135 0 0
angle_coeff 11 103.7 49.84 -11.6 -8

#BondBond Coeffs

angle_coeff 1 bb 0 0 0
angle_coeff 2 bb 0 0 0
angle_coeff 3 bb 0 0 0
angle_coeff 4 bb 0 0 0
angle_coeff 5 bb 0 0 0
angle_coeff 6 bb 0 0 0
angle_coeff 7 bb 0 0 0
angle_coeff 8 bb 0 0 0
angle_coeff 9 bb 0 0 0
angle_coeff 10 bb 0 0 0
angle_coeff 11 bb 0 0 0

#BondAngle Coeffs

angle_coeff 1 ba 0 0 0 0
angle_coeff 2 ba 0 0 0 0
angle_coeff 3 ba 0 0 0 0
angle_coeff 4 ba 0 0 0 0
angle_coeff 5 ba 0 0 0 0
angle_coeff 6 ba 0 0 0 0
angle_coeff 7 ba 0 0 0 0
angle_coeff 8 ba 0 0 0 0
angle_coeff 9 ba 0 0 0 0
angle_coeff 10 ba 0 0 0 0
angle_coeff 11 ba 0 0 0 0

dihedral_style      class2

#Dihedral Coeffs # class2

dihedral_coeff 1 0 0 0 0 0.15 0
dihedral_coeff 2 0 0 0 0 -0.1 0
dihedral_coeff 3 0 0 0 0 0.158 0
dihedral_coeff 4 0 0 0.0514 0 -0.143 0
dihedral_coeff 5 0.7137 0 0.266 0 -0.2545 0
dihedral_coeff 6 -0.5203 0 -0.3028 0 -0.345 0
dihedral_coeff 7 0 0 0 0 0.13 0
dihedral_coeff 8 -0.182 0 -0.1084 0 -0.7047 0
dihedral_coeff 9 0 0 0 0 0.158 0
dihedral_coeff 10 0 0 0 0 0.158 0
dihedral_coeff 11 0 0 0 0 0.1367 0
dihedral_coeff 12 0 0 0 0 0.1367 0

#AngleAngleTorsion Coeffs

dihedral_coeff 1 aat 0 0 0
dihedral_coeff 2 aat 0 0 0
dihedral_coeff 3 aat 0 0 0
dihedral_coeff 4 aat 0 0 0
dihedral_coeff 5 aat 0 0 0
dihedral_coeff 6 aat 0 0 0
dihedral_coeff 7 aat 0 0 0
dihedral_coeff 8 aat 0 0 0
dihedral_coeff 9 aat 0 0 0
dihedral_coeff 10 aat 0 0 0
dihedral_coeff 11 aat 0 0 0
dihedral_coeff 12 aat 0 0 0

#EndBondTorsion Coeffs

dihedral_coeff 1 ebt 0 0 0 0 0 0 0 0
dihedral_coeff 2 ebt 0 0 0 0 0 0 0 0
dihedral_coeff 3 ebt 0 0 0 0 0 0 0 0
dihedral_coeff 4 ebt 0 0 0 0 0 0 0 0
dihedral_coeff 5 ebt 0 0 0 0 0 0 0 0
dihedral_coeff 6 ebt 0 0 0 0 0 0 0 0
dihedral_coeff 7 ebt 0 0 0 0 0 0 0 0
dihedral_coeff 8 ebt 0 0 0 0 0 0 0 0
dihedral_coeff 9 ebt 0 0 0 0 0 0 0 0
dihedral_coeff 10 ebt 0 0 0 0 0 0 0 0
dihedral_coeff 11 ebt 0 0 0 0 0 0 0 0
dihedral_coeff 12 ebt 0 0 0 0 0 0 0 0

#MiddleBondTorsion Coeffs

dihedral_coeff 1 mbt 0 0 0 0
dihedral_coeff 2 mbt 0 0 0 0
dihedral_coeff 3 mbt 0 0 0 0
dihedral_coeff 4 mbt 0 0 0 0
dihedral_coeff 5 mbt 0 0 0 0
dihedral_coeff 6 mbt 0 0 0 0
dihedral_coeff 7 mbt 0 0 0 0
dihedral_coeff 8 mbt 0 0 0 0
dihedral_coeff 9 mbt 0 0 0 0
dihedral_coeff 10 mbt 0 0 0 0
dihedral_coeff 11 mbt 0 0 0 0
dihedral_coeff 12 mbt 0 0 0 0

#BondBond13 Coeffs

dihedral_coeff 1 bb13 0 0 0
dihedral_coeff 2 bb13 0 0 0
dihedral_coeff 3 bb13 0 0 0
dihedral_coeff 4 bb13 0 0 0
dihedral_coeff 5 bb13 0 0 0
dihedral_coeff 6 bb13 0 0 0
dihedral_coeff 7 bb13 0 0 0
dihedral_coeff 8 bb13 0 0 0
dihedral_coeff 9 bb13 0 0 0
dihedral_coeff 10 bb13 0 0 0
dihedral_coeff 11 bb13 0 0 0
dihedral_coeff 12 bb13 0 0 0

#AngleTorsion Coeffs

dihedral_coeff 1 at 0 0 0 0 0 0 0 0
dihedral_coeff 2 at 0 0 0 0 0 0 0 0
dihedral_coeff 3 at 0 0 0 0 0 0 0 0
dihedral_coeff 4 at 0 0 0 0 0 0 0 0
dihedral_coeff 5 at 0 0 0 0 0 0 0 0
dihedral_coeff 6 at 0 0 0 0 0 0 0 0
dihedral_coeff 7 at 0 0 0 0 0 0 0 0
dihedral_coeff 8 at 0 0 0 0 0 0 0 0
dihedral_coeff 9 at 0 0 0 0 0 0 0 0
dihedral_coeff 10 at 0 0 0 0 0 0 0 0
dihedral_coeff 11 at 0 0 0 0 0 0 0 0
dihedral_coeff 12 at 0 0 0 0 0 0 0 0

improper_style      class2
read_data          Nafion_3landa.data add append
Reading data file ...
  orthogonal box = (0.0000000 -1.1918775 0.0000000) to (100.00000 100.00000 150.00000)
  1 by 2 by 2 MPI processor grid
WARNING: Pair style in data file differs from currently defined pair style (src/read_data.cpp:589)
ERROR: Pair coeff for hybrid has invalid style: 0.054 (src/pair_hybrid.cpp:497)
Last command: read_data          Nafion_3landa.data add append
--------------------------------------------------------------------------
Primary job  terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
mpirun detected that one or more processes exited with non-zero status, thus causing
the job to be terminated. The first process to do so was:

  Process name: [[33342,1],0]
  Exit code:    1

The data file you uploaded here is unchanged and still contains the Pair Coeffs section. No surprise you are getting the same error.