Error in stable version of LAMMPS

Hi!

I believe there is a bug in the current stable branch of the LAMMPS code on github. I am trying to install the reaxff and qeq packages and when I run “make serial”, I run into the following error:

../fix_qeq_reax.cpp:25:10: fatal error: pair_reaxc.h: No such file or directory
   25 | #include "pair_reaxc.h"
      |          ^~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:109: fix_qeq_reax.o] Error 1

Indeed I cannot find a pair_reaxc.h file in the src directory. I believe this error might have occurred when the ReaxFF package was renamed from USER-REAXC to REAXFF. Please let me know if I am doing anything wrong.

I also tried installing the release branch to just test if that installation will run smoothly and then, I run into a different error again with pair_reaxff.cpp:

../pair_reaxff.cpp: In member function 'virtual void LAMMPS_NS::PairReaxFF::init_style()':
../pair_reaxff.cpp:339:29: error: 'class LAMMPS_NS::Modify' has no member named 'find_fix_by_style'; did you mean 'get_fix_by_style'?
  339 |   bool have_qeq = ((modify->find_fix_by_style("^qeq/reax") != -1)
      |                             ^~~~~~~~~~~~~~~~~
      |                             get_fix_by_style
../pair_reaxff.cpp:340:32: error: 'class LAMMPS_NS::Modify' has no member named 'find_fix_by_style'; did you mean 'get_fix_by_style'?
  340 |                    || (modify->find_fix_by_style("^qeq/shielded") != -1));
      |                                ^~~~~~~~~~~~~~~~~
      |                                get_fix_by_style
make[1]: *** [Makefile:114: pair_reaxff.o] Error 1

Any suggestions on how to get around these problems would be very appreciated. I am using gcc/11.2.0 as my compiler on a cluster computer.

Thanks,
Filip

I also tried going to an older version of the compiler (gcc/10.3.0), which didn’t resolve the problem.

There should be no file fix_qeq_reax.cpp in the stable branch. This is probably a stray file from a previous package installation. You can delete it (and the corresponding header file). Are you accessing LAMMPS via a git checkout. Normally, these kind of files should be deleted with:

make purge

But it looks like the file with list of those files is missing the entry for fix_qeq_reax.cpp/h and is only listing the corresponding OPENMP and KOKKOS versions.

The second issue seems to be of a similar kind. Did you do a make package-update? Those calls where changed in the core and the related packages last October.

Thanks Axel. I did access LAMMPS via git checkout and I had run make purge and make package-update before trying to build it. It appears that those commands had missed this file. Following your suggestion, I manually removed fix_qeq_reax.cpp/.h with “rm”; after which “make serial” ran smoothly.

Thanks again.

Thanks for confirming. This should be updated in a pending pull request now. We’re thinking to publish a third update to the stable release later this week.