pair_coeff 2 2 buck 859.628302608 0.4549590537 577.14252747 10
pair_coeff 2 1 buck 608.87742608 0.342567726 456.17353273 10
But I got this error:
ERROR: Incorrect args for pair coefficients (../pair_buck.cpp:212)
---------------------
I don't know, Where does this error come from?
1)
The name of the file "pair_buck.cpp" tells you which pair style has
the problem. It seems like LAMMPS does not like one of these lines:
pair_coeff 2 2 buck 859.628302608 0.4549590537 577.14252747 10
pair_coeff 2 1 buck 608.87742608 0.342567726 456.17353273 10
2) Check your "log.lammps" file.
Did LAMMPS stop when it encountered one of these two lines? If so, which one?
Incidentally, there are some examples for how to use the "pair_coeff"
command for the "buck" pair style here:
http://lammps.sandia.gov/doc/pair_buck.html
(However I don't think this is your problem...)
3) Here is the problem:
pair_coeff 2 1 buck 608.87742608 0.342567726 456.17353273 10
I think LAMMPS pair commands fail unless the second atom type is as
large as the first. So, in your case change "2 1" to "1 2". In other
words, use:
pair_coeff 1 2 buck 608.87742608 0.342567726 456.17353273 10
3) For future reference, it is always helpful to open the file
mentioned in the error message.
In your case, open the "pair_buck.cpp" file (in the "src" directory)
using a text editor, and go to line 212.
int count = 0;
for (int i = ilo; i <= ihi; i++) {
for (int j = MAX(jlo,i); j <= jhi; j++) {
a[i][j] = a_one;
rho[i][j] = rho_one;
c[i][j] = c_one;
cut[i][j] = cut_one;
setflag[i][j] = 1;
count++;
}
}
if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients");
So the problem has to do with the boundaries (ilo, ihi, jlo, jhi).
Again, this makes me think the problem is because you use "2 1"
instead of "1 2".
So try the suggestion above (using "1 2" instead of "2 1") and see if
that fixes the problem.
it is in the documentation:
http://lammps.sandia.gov/doc/pair_coeff.html
look closer!
axel
Axel is right, the documentation does say:
"Note that only type pairs with I <= J are considered"
But I admit, this is a pet peeve of mine. I think the I<=J
requirement causes unnecessary confusion to new users. (I've been
hoping Steve would change this policy.)
Cheers
Andrew