ERROR: Expected integer parameter

in.input.sh (1.5 KB)
Pt.lammps.eam (71.3 KB)
Pt001.lmp (4.8 MB)

Hi Axel,

Could you please help me how to resolve this issue?

ERROR: Expected integer parameter instead of ‘0.0104’ in input script or data file (src/pair_hybrid.cpp:501)
Last command: pair_coeff 34 34 lj/cut 0.0104 3.4

Thanks!

You should always report your LAMMPS version when reporting an error. This error does not exist in the latest version of pair_hybrid.cpp (LAMMPS version 22Dec2022). Have you tried testing with an updated version of LAMMPS?

Hi Michael,

I am using LAMMPS (23 Jun 2022).

I am not sure if I properly implement the syntax or not.

Regards,

Reza.

Can you share your log file? As I said, there is no such error listed in that file, so you must be running a different version.

You could also check to see if all the characters (including digits and decimals) are ASCII characters and not more obscure unicode ones.

@Michael_Jacobs You are looking in wrong place. This is an error message from the utils::inumeric() function, and you will find it in the utils.cpp file.

Please see: 4.14. Utility functions — LAMMPS documentation

You don’t.

It would be correct, if you do not (needlessly I might add) list the lj/cut pair style twice in the pair_style hybrid command. There is no reason for it since lj/cut is a pairwise additive potential.

But because you do list lj/cut twice, your pair_coeff statements are incorrect and the LAMMPS error message is correct. Without the missing extra (integer) number, LAMMPS cannot know to which of the two lj/cut styles the pair_coeff statement needs to be mapped to. This is documented behavior.