ERROR: All pair coeffs are not set

I tried to do the stretching molecular dynamics simulation of CaCO3, but kept showing “ERROR: All pair coeffs are not set” in the potential function. Here are my.in and.data files and log files. I would like to ask what the problem should be?

in.08272.lmp (2.1 KB)
final2.data (3.1 MB)
log.lammps (4.0 KB)

We really should update the wording of that error to “Not all pair coeffs are set”.

I hope that’s (even) more self-explanatory.

This is indeed an issue that is faced by a lot of new users, and I can understand that there is something confusing: all self pair coeffs must be set, but not all cross-coeffs have to be set, as they are automatically calculated by LAMMPS. The error message could be:

Not all pair coeffs are set. Specify at least the self pair coeffs.

Thank you for your reminding. But I’ve set all the styles. So now I don’t quite understand the cause of this error.

No. All you provide in your input is:

pair_coeff 1 2 3943.5977 0.251571 0.0
pair_coeff 2 2 2879.1262 0.252525 0.0
pair_coeff 2 3 1.7411e13 0.03873 0.0

LAMMPS needs pair_coeff 1 1 and pair_coeff 3 3 to be specified.

How about something more detailed and issuing the “info coeffs” command before throwing the error to list which current settings where made?

The statement about “self” coefficients is tricky since this only applies to pair styles that do mixing and for most manybody potentials there must be only one pair_coeff * * statement.

1 Like

Please add the “info coeffs” command before your first run or minimize to get a list of which parameters have been set and which not.

Or even

ERROR: Not all pair coeffs were set. Add an “info coeffs” command before the first run, minimise, or write_data in your script for further information.

It is probably best to submit a feature request issue on github and collect and discuss ideas.

Or

A pair_coeff command for each distinct combination (pair) of atom types is not set.

:grinning: