[lammps-users] ERROR: Pair_coeff command before pair_style is defined

Hello guys
I am trying to perform simple minimisation of C super cell, with the following input

units metal

dimension 3

atom_style atomic

pair_style none

boundary p p p

read_data c_56_cubic_lmp

newton on on

pair_style none

pair_coeff * * C.lcbop C C

min_style cg

Technically speaking, pair_style none is not a pair style but rather a command to delete a previously defined pair style or to skip the pairwise computation in a subset of a hybrid pair style.

Because - as it’s documentation says - it does not compute anything, you must not use a pair_coeff command with it. Hence the error. A pair_coeff command must always match the current pair style.

Dear Axel
thanks for your reply, following your advise I have deleted the pair_style command and using the pair_coeff without pair style and it’s still showing the same error,
“ERROR: Pair_coeff command before pair_style is defined (…/input.cpp:1710)”
I can’t understand from where it’s reading the pair_style for present case.
can you comment on this ?
please accept my best regards
Irslan Ullah

I guess you should delete the pair_coeff command and not the pair_style …

Στις Παρασκευή 20 Μαΐου 2022, ο χρήστης Arslan Ullah <[email protected]> έγραψε:

you are neither following my advice nor does what you do make any sense.