I tried to run LAMMPS on Linux.
Cmd: lmp_mpi -in input.dat
it was aborted with the error: " pair_style lj/class2/coul/cut 9.5
ERROR: Unknown pair style lj/class2/coul/cut (../force.cpp:246)".
I have attached test file and new pair_style file at this email.
I really appreciate your patience and advice.
input.dat (5.06 KB)
parameters.dat (931 Bytes)
structure.dat (20.5 KB)
pair_lj_class2_coul_cut.cpp (14.5 KB)
pair_lj_class2_coul_cut.h (2.08 KB)
a) there is no need to write a pair style lj/class2/coul/cut, since there is one already contained in LAMMPS as part of the CLASS2 package
b) the pair style sources you were attaching are incorrect. you will easily see the mistakes when comparing your file with the sources included in LAMMPS.
c) when LAMMPS complains about an unknown XXX style, then this usually means that either you have misspelled it, or that your executable has been compiled without it.
d) if you add source code to LAMMPS or enable additional LAMMPS packages, you need to recompile and make certain, that you use the new executable, and not the old one.
e) you must be using a rather old LAMMPS version, in the same situation you would get a different message with a current version of LAMMPS, which would be more instructive:
ERROR: Unrecognized pair style ‘lj/class2/coul/cut’ is part of the CLASS2 package which is not enabled in this LAMMPS binary. (src/force.cpp:285)
Last command: pair_style lj/class2/coul/cut 9.5