I’m starting to practice with LAMMPS using the examples from the book “Computational Materials Science” by Gunn Lee. I am with an exercise in which a carbon nanotube is subjected to stress. When executing the script I get the following message:
ERROR: Incorrect args for pair coefficients (src/MANYBODY/pair_airebo.cpp:178)
Last command: pair_coeff * * CH.airebo C C
Which I am not seeing exactly what my error would be.
The script I am using is the following:
units metal
boundary f f p #PBC on z boundary only
#p: periodic, f:non-periodic & fixed, s:non-periodic & wrap
#wrap: face position always encompasses the atoms
atom_style atomic
#Structure
read_data r_d.data
mass 1 12.01
region top block INF INF INF INF 0 45 units box
#units box, 0 A to 45 A
region bottom block INF INF INF INF 116 161 units box
group g_cnt type 1
group g_top region top
group g_bottom region bottom
group g_boundary union g_top g_bottom
group g_body subtract all g_boundary
#Potential
pair_style airebo 2.5 1 0
pair_coeff * * CH.airebo C C
How many atom types has your system?
The number of mappings (the element symbols following the name of the potential file) has to be exactly the same as the number of atom types.
2 Likes
Thank you very much, now the error has been solved, since the book uses an old version of lammps these things usually happen to me.
Now, I have this error that has happened to me before and it is when using the following snippet
Calculation of stress
compute body_temp g_body temp
compute_modify body_temp dynamic yes
compute body_pe all pe/atom
compute body_st all stress/atom body_temp pair_bond
compute strAll all reduce sum c_body_st[3]
compute strC g_cnt reduce sum c_body_st[3]
#c_body_st[3]; compute body stress of zz in one column of array
variable szzC equals c_strC/(8.784count(g_cnt))(10^-4)
variable szz equals v_szzC
I have the following error and I think it is because the command is no longer used:
ERROR: Illegal compute stress/atom command (src/compute_stress_atom.cpp:101)
Last command: compute body_st all stress/atom body_temp pair_bond
Would you have any idea?
In this specific case the LAMMPS version doesn’t make a difference. The requirement to have the correct mapping has been in the code since the beginning.
Please post new errors as a new topic with a suitable new subject line. Please also have a look at the forum guidelines about how to properly quote from input files, so they are correctly typeset by the forum software. Just look at your message and you should see that it doesn’t render correctly.
1 Like