[lammps-users] the results of fix reax/c/bonds are inconstent with fix reax/c/species

Hi lammps users,

I’m trying to simulate a reactive hydrocarbon system at high temperature, I use the command:

fix spec all reax/c/species 1 1 1000 spec_C3flame.out
fix bond all reax/c/bonds 1000 bond_C3flame.reaxc

to obtain the bond order and the species information. I think we can derive all species from bond order, is that right? However, I find the species derived from the bond order file are different from the species file. For example, the species file of timestep 777000 are:

Timestep No_Moles No_Specs C15H9 C4H3 C18H10 CH3 CO C5H3 H2 C16H9 C2H C47H24 C2H2O C45H15 C24H14 C8H3 C2 H2O C6H4 C29H14 C20H10 C72H37O C28H12 CH4 C18H11 C73H35 C67H31O C18H9 C24H9 C17H10 CH2O C40H18 C55H26 C20H12 C27H9 C2H2 C4H2 C2H4 C22H11 C5H4 C22H12 C25H13 H C24H12 C4H4 C2H3 C4H5

777000 119 45 1 2 6 2 7 1 44 1 3 1 1 1 1 1 3 9 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 3 2 1 1 1 3 1 1 1

As seen in attachment (“part_of_species.out”), the number of molecules is 119. However, from the bond order information, the number of molecules is 111, as seen in attachment (“part_of bond”). By the way, the number of H radicals is 1 in the “part_of_species.out”, but we cannot find any atom with “nb” is 0 in the “part_of_bond”. So, I believe species information from the “reax/c/species” and “fix reax/c/bonds”, but I cannot understand the reason, can anyone help me? Thanks.

Any help is appreciated, and thank you in advance.

Jiang Xiao

part_of_species.out (465 Bytes)

part_of_bond (157 KB)

Hi lammps users,

The problem I find that “the results of fix reax/c/bonds are inconsistent with fix reax/c/species” is just a mistake of myself, becuase the “part_of_bond” is the wrong file. After I update the correct bond order file (see in attachment), the results of fix reax/c/bonds are consistent with fix reax/c/species. The number of molecule in “part_of_species.out” is equal the that in part_of bond. (both of 119 molecules)

Sorry for my mistakes and I will take carefully check in the next time.

Best Regards,

Jiang Xiao

Xiao JIANG <[email protected]> 于2021年10月31日周日 下午6:42写道:

part_of_bond (156 KB)

As far as I know, the grouping of atoms or determination of bonds depends on a specific cutoff parameter for the bond order (which should be 0.3 by default). There may be differences between the two fixes in how this is stored/processed. Since 0.3 is a number that cannot be stored exactly in floating point variables, it is also possible that the two source code generate slightly different code when using compiler optimization and that in turn may lead to choices of larger/smaller than the bond order cutoff be difference, if the cutoff is hit exactly (by chance).

Thanks for reporting back. It is reassuring to see that the code is consistent. :wink: