[lammps-users] failed to read reaxff potential file via liblammps.a

Hi, lammps-users

I am a postdoc in sustech university, China. Recently, I have tried to use liblammps.a (lammps-14Dec2021) with LAMMPS C LIBRARY API via EON (LAMMPS Potential — EON: Long Timescale Dynamics (henkelmanlab.org)).

I have tried test lammps eam potential, and it is good to run well in EON.

Unluckly, when I tried REAXFF potential, some questions occurred.

  1. I have tried about 5 reaxff potential file from previous papers, like: am0c17536_si_002.txt, langmuir2013.O3_Ti9.txt and jpca2013.O3_Ti9.txt.
  2. All these file can works very well with the example lammps scripts in lammps/example/reaxff.
  3. The file am0c17536_si_002.txt can not be read in EON via LAMMPS C LIBRARY API by function lammps_file(LAMMPSObj, “in.lammps”), where file in.lammps mainly included the pair_style command:

print “finished: initialize” file out.eonlammps

pair_style reaxff NULL #control.reax_c.rdx
print “defined: pair_style reaxff” append out.eonlammps
#pair_coeff * * ffield.reax C # H O N
pair_coeff * * am0c17536_si_002.txt C # H O N
print “finished: read pot.file” append out.eonlammps
fix 2 all qeq/reaxff 1 0.0 10.0 1.0e-6 reaxff
print “defined: fix settings of qeq/reaxff” append out.eonlammps

the out.eonlammps file only contained:
finished: initialize
defined: pair_style reaxff

  1. If the file am0c17536_si_002.txt replaced by ffield.reax in lammps/example/reaxff, all works well.

Briefly, if running lammps/example/reaxff by lmp_serial command, all reaxff potenital files in previous papers can works well.
Unfortunnately, when running lammps C library API function lammps_file(LAMMPSObj, “in.lammps”), some reaxff potential files may not be read well.

I would like to know how to do well.

Best wishes!

I doubt that this is due to the use of the potential file. There is NO difference in how LAMMPS input is processed from the LAMMPS executable or when called through the library interface. In fact, the same functions are called internally.

But without some captured error messages, there is nothing that can be done from remote.
Perhaps the EON developers can provide you with assistance, how to obtain more information.

Ultimately, if there is an error reading file formats, you should be able to reproduce it with a standalone binary.
Since this is not the case, the logical conclusion is, that the parsing of the file must work in both cases, and thus the stalling of the execution must have a different reason.