Error: incorrect arg for pair coefficients (src/REAXFF/pair_reaxff.cpp:280) using ReaxFF?

Dear LAMMPS users,

I build 2 copper slabs sorrunded by oxygen described here:

I try to run the following file:

units real
atom_style charge
dimension 3
boundary p p p
 
# Read data file
read_data final_configuration_middle.data

# Create molecules
molecule 1 oxygen_single.lmpdat

region slab3 block -20 -8 -20 -8 7.5 9 units box
region slab4 block -20 -8 -20 -8 -13.5 -12 units box

create_atoms 1 random 200 1024 slab3 overlap 3.5
create_atoms 1 random 200 1024 slab4 overlap 3.5

# Define interactions
pair_style reaxff lmp_control
pair_coeff * * ffield.reax.cuo Cu O

# Charge equilibration for ReaxFF
fix 1 all qeq/reax 1 0.0 10.0 1e-6 param.qeq

# Minimize the structure using conjugate gradient method
min_style cg
minimize 1e-4 1e-6 1000 10000

# Define the simulation settings
timestep 0.001
thermo 100

# Apply Nosé-Hoover thermostat for NVT ensemble to equilibrate at 300K
fix 1 all nvt temp 300.0 300.0 50

# Run the equilibration
run 10000
 
# Output final configuration
write_data final_full_structure.data

I get the error: Error: incorrect arg for pair coefficients (src/REAXFF/pair_reaxff.cpp:280)
The force field contains characters Cu and O.
What did I do wrong? Should I modify the ID in molecule command for 2 or how could I distinguish copper and oxygen IDs?

Thank you for your help!
Patrik

It depends, how many atom types you have in final_configuration_middle.data?

Note that the molecule command does not create any molecule, it only defines a molecule template, see this page. Another strange thing with your input is the use of a timestep of 1 attosecond.

1 Like

In the final_configuration_middle.data I have only the 2 copper slabs (previously I relaxed its structure).

The body of the file contains Masses and Atoms sections. Should I add the mass of oxygen to the Masses or how should I modify the file to be correct?

Why could the small timestep be problem?

That was not my question, I was asking about the number of atom types in your simulation.

If you don’t know what atom types means to LAMMPS, I think that you should take a step back and follow tutorials and classes for beginners. If you don’t, you will keep facing similar issues that are easy to solve when you know the basics of LAMMPS.

1 Like

Dear Simon Gravelle,

Sorry for the not accurate answer!
I used only one atom type (for copper).
Should I distinguish the oxygen, that will be connected to the copper, and the other oxygen, that is connected to another oxygen atom as well?

I am not sure how that would work with a reaxff system, because an oxygen initially connected to a copper can end up connected to another oxygen atom (at least that’s what I assume from your question). If your force field appropriately describes the situation that you are simulating (which is a big if), then the changes in property of oxygen atoms based on their local environment should be automatic.

And how many atom type does the pair_coeff command uses? If you don’t know the answer, you can take a look here, particularly this example:

As an example, say your LAMMPS simulation has 4 atom types and the elements are ordered as C, H, O, N in the ffield file. If you want the LAMMPS atom type 1 and 2 to be C, type 3 to be N, and type 4 to be H, you would use the following pair_coeff command:

pair_coeff * * ffield.reax C C N H