Hello, I receive this error message:
ERROR: Number of element to type mappings does not match number of atom types (src/pair.cpp:821)
Last command: pair_coeff 2 1 sw GaO.sw.txt
I tried to solve this error message unsuccessfully. In fact, I am unsure why it appears, because here is a small portion of my code:
pair_style hybrid lj/cut 10.0 sw
pair_coeff 3 1 lj/cut 0.0100564285 3.492
pair_coeff 2 1 sw GaO.sw.txt
pair_coeff 2 3 sw GaN.sw.txt
I don’t receive this message for the first pair_coeff, if I switch the last and second pair_coeff, I receive the error message for pair_coeff 2 3 sw GaN.sw.txt instead, so I guess there is a problem in the way that I wrote my code for sw potential, however, from what I saw in the LAMMPS manual, it seems fine ? (I have the latest version of LAMMPS)
No it is not. You have to read the documentation for pair style sw more carefully. There are multiple issues here.
a) the type with the smaller number should be listed first
b) pair style sw always must have element-to-type mappings following the potential file in the pair_coeff
c) pair style sw only allows using non-wildcard pair_coeff assignments, when the threebody interactions are switched off.
d) your pair_coeff list is incomplete: where are pair coeffs for 1 1, 2 2, and 3 3?
e) If the GaO and GaN parameters are regular Stillinger-Weber potentials, you must not try to mix them this way to get parameters for a GaNO system. This is incorrect and will lead to bogus results. You need to have just one potential file for “complete” systems. To contain errors, those also must be properly separated. This issue has been explained many, many times and there are significant warnings against it with explanations in the documentation.
Thank you for the feedback !