lammps ERROR: Increase MAXSPECBOND in reaxc_defs.h when using fix reax/c/species/kk

Dear Lammps Experts,

Hope this letter can find you a nice time,

This is an user of the latest lammps reax/c kokkos.

I am stuck in the following error when I add the fix all reax/c/species/kk to the input script.

ERROR: Increase MAXSPECBOND in reaxc_defs.h”

Part of my setting is as follows:

pair_style reax/c/kk lmp_control safezone 4.0

pair_coeff * * ffield.reax Ni Cr Fe H O

fix QEQ all qeq/reax/kk 1 0.0 10.0 1.0e-6 reax/c

fix_modify QEQ energy yes

neighbor 2.5 bin

neigh_modify every 10 delay 0 check yes once no cluster no exclude none page 100000 one 2000 binsize 0.0

fix NVT1 all nvt temp 600 600 100 drag 0.2

fix SP all reax/c/species/kk 1 1 10 SCCspecies.out element Ni Cr Fe H O

Could you please give me some advice which will be highly appreciated!

Thanks in advance,

Best regards,

Xiaolong Liu

This means you need to increase MAXSPECBOND in reaxc_defs.h and recompile. This usually happens when you have an extremely reactive system, whether it is physical or not. If you changed force field parameters in the ReaxFF force field file you may see this happening.

My advice is: do not change any force field parameters unless careful parameterization has been performed.


Dear Dr. Shan,

Thanks very much for your continuous help. I am deeply touched by your kind help!

According to your advice, I built a new lmp_ubuntu executable and tried the reax/c/kk.

Background information:

Lammps version: 31Mar17;

My PC configuration: Intel Core i5 CPU 760 2.80GHz * 4, no GPU and KNL;

Makefile.ubuntu: KOKKOS_DEVICES=OpenMP;

Running command: mpirun -np 4 -k on -sf kk -in

All the simulation showed: WARNING: Fixes cannot send data in Kokkos communication, switching to classic communication (…/comm_kokkos.cpp:382) (Will this influence my simulation?)

No change in the force field parameterization.

Problem description:

Problem-1: ERROR: Cannot yet use minimize with Kokkos (…/minimize.cpp:57)” (input script-1 and log.lammps-1 attached)

However, I again got the error: “ERROR: Cannot yet use minimize with Kokkos (…/minimize.cpp:57)”

(Your last advice: Minimization is supported in Kokkos mode.)

I attached the log.lammps1 and in.put1, is there anything wrong with my or the running command?

Problem-2: wrong output of atoms amount by fix reax/c/species command (input script-2 and log.lammps-2 and species.out-2 attached)

(Note: the only difference between script-1 and script-2 is the deactivation of minimize command in input script-2)

I firstly test my lmp_ubuntu by reax/c/kk on the examples/reax/FC with running command: mpirun -np 4 -k on -sf kk -in in.FC. The fix reax/c/species worked well. Both the log.lammps and fix reax/c/species output the same amount of atom, namely C8640F8640 which is the same as that the data in the data.FC file.

However, when I tried on my model, I again got a wrong output as follows:

Problem description:

by: set region box type/fraction 1 0.8 12963 type/fraction 2 0.2 23486

(Note: Fe80Cr20, Fe atom as arom type 1, Cr atom as atom type 2)

log.lammps output: set region box type/fraction 1 0.8 12963 type/fraction 2 0.2 23486 # Fe80Cr20

4770 settings made for type/fraction

1190 settings made for type/fraction

by: fix SP all reax/c/species/kk 1 1 5 SCCspecies.out element Fe Cr H O

fix reax/c/species output:

Timestep No_Moles No_Specs Fe3808Cr2147 H2O O2

10 393 3 1 382 10

Timestep No_Moles No_Specs Fe3808Cr2147 H2O O2

20 393 3 1 382 10

Is that because of my too-bad initial configuration or anything wrong with the set command or pair reax/c/kk command

or my missing more setting for kokkos versioned reax/c?

Any more advices will be highly appreciated!!!

Thanks again!

Best regards,


in.put1 (3.02 KB)

in.put2 (3.02 KB)

log.lammps1 (4.98 KB)

log.lammps2 (20.1 KB)

species.out2 (1.96 KB)

produced without minimization.jpg

Minimization is not (yet) supported with Kokkos. The error message is pretty self-explanatory.