Errors about kspace_style and bond atom missing

Dear Community.

Could you please help me look at the problems I am currently facing?
My system is to simulate the pyrolysis of organic matter at high temperature under Reax.ff, specifically pyrolytic glucose (model is 500 glucose molecules). However, two unresolvable errors were encountered.

  • When I run ‘kspace_style’, the error is’ KSpace style is incompatible with Pair style '.
  • When I annotated it, there was another error involving Bond atoms missing.

The following is my in file, I used material studios software for my modeling. I checked the paircoeff in the data file, still no solution to error.
Could you give me some suggestions on how to revise it? Thank you very much for every suggestion.

This is my first time Posting, sorry for some syntax issues and formatting issues

Best regards,

Ripples916

units real

dimension 3

boundary p p p

atom_style full

neighbor 2.0 bin

neigh_modify every 1 delay 0 check no

pair_style lj/class2/coul/long 10

bond_style class2

angle_style class2

dihedral_style class2

improper_style class2

#kspace_style pppm 1.0e-4

read_data PTT500pcff2.data

pair_style reaxff lmp_control

pair_coeff * * ffield.reax.cho H C O

timestep 0.1

velocity all create 1000.0 4928459 rot yes dist gaussian

thermo 100

thermo_style custom step temp pe ke

thermo_modify flush yes

dump 1 all custom 1000 dump-eq.dsw id type q x y z

dump_modify 1 sort id

dump 2 all xyz 1000 dump-eq.xyz

dump_modify 2 sort id

fix 1 all nve

fix 2 all temp/berendsen 1000.0 1000.0 50.0

fix 3 all qeq/reaxff 1 0.0 10.0 1.0e-6 reaxff

fix 4 all reaxff/species 1 1 1000 species-eq.txt element O C H

fix 5 all reaxff/bonds 100 bonds.reaxff

undump 1

undump 2

unfix 1

unfix 2

#unfix 3

unfix 4

unfix 5

#######################################

reset_timestep 0

timestep 0.25

dump 1 all custom 4000 dump.dsw id type x y z #

dump_modify 1 sort id

dump 2 all xyz 4000 dump.xyz

dump_modify 2 sort id

fix 1 all nve

fix 2 all temp/berendsen 2000.0 2000.0 50.0

fix 3 all qeq/reaxff 1 0.0 10.0 1.0e-6 reaxff

fix 4 all reaxff/species 1 1 1000 species-eq.txt element O C H

fix 5 all reaxff/bonds 100 bonds.reaxff

run 10000

PS:

  • In order to better describe my problem, the fourth change provides information about Kspace_style, marked with a red box.
  • As for the problem of bond atom missing, according to my current understanding, I only know that it is related to the atom of material studio file exceeding the border, but I do not know how to solve it specifically, so the ovito model diagram is attached.

If you want to use ReaxFF as a pair style, you must not use a kspace style, since ReaxFF already includes an approximation for it (Wolf summation).

Similarly, ReaxFF includes a dynamic determination of bond, angle, and dihedral interaction (and a couple more) where the topology of those interactions are determined from the bond order within the ReaxFF pair style. Thus it is an error to have explicit interactions for those, like your input file has. Consequently, it is also incorrect to have those defined in the data file, and all the “Coeff” sections will need to be removed as well. This should take care of the “Bond atom missing” issue which likely results from the double counting of those bonded interactions.

Finally, are you sure that the ReaxFF parameter file is suitable for your case? The corresponding ReaxFF parameter file bundled in LAMMPS corresponds to this article which looks at small molecules in the gas phase. Is this what you are studying?

Thanks for your response, Alex!I have benefited a lot from your advice.
Unfortunately, my data file itself doesn’t seem to define any style. When I try to comment it to remove the style, lammps will report an error, such as: ‘Must define pair_style before Pair Coeffs’,’ Must define bond_style before Bond Coeffs’, etc. (Figure 1, Figure 2). My data file was modeled by using material studio software through msi2lmp program. (See Figure 3 for specific data files)
Your comments on the ‘ffield.reax.cho’ document have struck me. I immediately went to check the two files, as you said, one is a small gas phase molecule, the other is a solid molecule. What a subtle and fatal mistake it is. I will search the reaxff file of solid organic matter, thanks again for your suggestion!


Figure 1

Figure 2

Figure 3

That tool creates data files for “conventional” force fields. As I already mentioned in my previous response, you must remove all sections with “Coeffs” and “Bonds”, “Angles”, “Dihedrals” and similar from the data file. These describe explicit bond topologies which are incorrect to use in ReaxFF studies for the reasons I have already given. You should have a closer look at the publications that describe how ReaxFF works and previous discussions on the subject in the forum archive.

A simple way to process the data file accordingly would be with VMD and its topotools plugin.
On the VMD console you can type:

package require topotools
topo readlammpsdata PTT500pcff2.data
topo writelammpsdata PTT500reaxff.data charge

This would write out a data file for atom style charge, which does not support any bonded interactions but is fully compatible with ReaxFF.

According to your very professional advice, the problem that had been bothering me for many days was finally solved. Thank you for your willingness to provide detailed solutions despite your busy schedule, and please forgive me for my shallow knowledge of reaxff force field.
In view of the selection of reaxff force field, I found that glucose is a small organic molecule with a melting point of 419K and a boiling point of 800K, and my job was to heat from 1000K to 2000K. So, with my current knowledge, what I do is probably work with small molecules in the gas phase.
How lucky I was to get your instruction, I have been able to successfully run this project, but still have some small problems such as extremely long running time. Probably because I don’t know how to adjust the number of threads I use, making my 12-core, 16-thread laptop a waste of performance.
Figure 1 shows some of the data I’ve excerpted, which ran for about half an hour. The LAMMPS version I installed is LAMMPs-64th-latest.exe. Do I need to download the MPI version again if I want to increase the speed?
After I’ve done this, I’ll look for operations that can convert a file generated by material studio directly into a data file that reaxff’s force field can use.
Thanks again for your help! This is really important to me!

You can use the OPENMP package for multi-thread paralellization (which is supported by the reaxff pair style, i.e. there is a reaxff/omp version). 7.4.4. OPENMP package — LAMMPS documentation

But installing the MPI version may give you a somewhat better performance, since the MPI parallelization is available for “everything” in LAMMPS (multi-thread and GPU goes on top of that). Mind you, that version also requires the installation of the MS-MPI package from Microsoft.

Generally speaking, because of its complexity with determining and using the bond order to determine the bonded interactions as well as using charge equilibration the reaxff pair style is much slower than conventional force fields. So you probably want to look for accessing some HPC cluster where you can run your calculations much faster with proper parallelization (if necessary, even with a combination of MPI and OpenMP for maximum speedup).

There is some general information about how to run LAMMP in parallel and how to optimize its settings for performance, but the general instructions for how to run in parallel and how to measure and compare the performance and how to determine where and how to run in the most effective way is far beyond the scope of the LAMMPS documentation and this forum. You need to talk to some local folks how have experience in this (it does not need to be with LAMMPS) and can train you accordingly.

Update:
There is a performance comparison of different pair styles on the LAMMPS homepage done over 10 years ago: LAMMPS Benchmarks
According to this list, ReaxFF is about 10 times slower than a CHARMM force field model with long-range Coulomb.

Dear akohlmey
Thank you very much for your help, the error written in the post has been solved under your suggestions and can run. At present, the main errors are in the installation of the MSMPI version of Lammps and the understanding of openmp. In order to enable other people seeking help to search for targeted problems more directly, I will write a new post.
Thanks again for your help!