ERROR: Incorrect args for pair coefficients (../pair.cpp:805) for hybrid pair style

Hello everyone, I have been getting the error ‘ERROR: Incorrect args for pair coefficients (…/pair.cpp:805)’. I am using LAMMPS (29 Sep 2021 - Update 2) and part of my script and error can be found below. I have read other messages with the same errors, however when I checked the documentation and the args for pair_coeff, but I could not find the problem. I would appreciate it if I could get your help understanding the problem.
Part of the script;
units metal
atom_style full
pair_style hybrid buck/coul/long 5.5 10.0 sw
pair_coeff * * sw PO.sw P O O
pair_coeff * * sw PO.sw O P P
pair_coeff 1 1 buck/coul/long 1844 0.3436 192.58 # O-O
pair_coeff 1 2 buck/coul/long 27722 0.1819 86.860 # O-P


LAMMPS (29 Sep 2021 - Update 2)
Reading data file …
orthogonal box = (-0.012501000 0.0015000000 -0.021000000) to (28.657499 28.671500 28.649000)
2 by 2 by 2 MPI processor grid
reading atoms …
1700 atoms
Finding 1-2 1-3 1-4 neighbors …
special bond factors lj: 0 0 0
special bond factors coul: 0 0 0
0 = max # of 1-2 neighbors
0 = max # of 1-3 neighbors
0 = max # of 1-4 neighbors
1 = max # of special neighbors
special bonds CPU = 0.001 seconds
read_data CPU = 0.011 seconds
ERROR: Incorrect args for pair coefficients (…/pair.cpp:805)
Last command: pair_coeff * * sw PO.sw P O O

The problem is the same as with the others: the number of atom types is different from the number of element to type mappings

But before that, you have to explain what kind of model you have and what you want to achieve because your input also looks very wrong on multiple levels even without the “simple to fix” error.

1 Like

First of all thank you for your quick reply!

I am trying to create a P4O10 glass model using Buckingham and sw (for three-body interactions) potentials . I created a basic data file (from .pdb files using Pacmol and VMD topotools) of a box of 1700 atoms of P and O. When I only use buck potential I did get some results, however I cannot add the sw potential.

Thank you for your time.

That would be wrong.

You have to either use sw or use buckingham. You cannot use both. You need to use potentials exactly the way they are parameterized and on systems they were parameterized for.