Communication between bond/create and bond/break

Dear Lammps users,

My question is same as discussed in this thread: communication between bond/create and bond/break · Issue #874 · lammps/lammps · GitHub

However, I am not able to open the links referred in the above link. The link is:


Could you please direct me to the correct links, specifically the one by user jewettaij?

Thanks and regard,

The mailing list has been close and the sourceforce archive does not exist anymore. However, all emails from the archive has been imported into this forum under the Mailing list archive sub-category. For obvious reasons, however, there is no direct mapping to the sourceforce archive messages, but you should be able to use the search feature of the forum.

That said, I would recommend to use fix bond/react which is well supported and has matured a lot since the discussion on GitHub you are referring to, over some unofficial hack that changes functionality that enables uses cases which were not intended in the first place.

I am able to resolve the problem of reformation of bonds using fix bond/react but I am getting following warning message. I am using LAMMPS version (19 Mar 2020).

“WARNING: One or more dynamic groups may not be updated at correct point in timestep (…/fix_group.cpp:171)”. Is it a major issue? I have read about this warning, but I am not sure which fixes acts immediately after the initial stage of time integration within a timestep.

Below is the order of commands I am using for bond breaking and reformation:

delete_bonds all bond 0 remove
group reactant type 2 3
fix 5 all bond/break 1 1 21.0
fix 6 all bond/break 1 2 14.68
molecule mol1 pre_cross_link.txt
molecule mol2 post_cross_link.txt
fix 12 all bond/react react myrxn1 reactant 1 0 14.0 mol1 mol2 map.txt prob 0.50 12345

System details: Bead-spring polymer chains with three atom types in each chain. Aim is to make inter-molecular bonds of type 2 (between atom types 2 and 3) to be reversible.

Thanks and regards,

The first thing to check when you are using an old version of LAMMPS is always to check with the most recent release version, if the issue persists. Or at least check the release notes for all releases since yours to see if there was a message related to this: Latest features & bug fixes in LAMMPS

When I look at the source code, I do not see that warning message with the current LAMMPS version.

Thanks. I have updated to LAMMPS version (22 Dec 2022) and the warning goes away but now I am getting following error:

ERROR: Invalid range string: 0 (…/delete_bonds.cpp:97)
Last command: delete_bonds all bond 0 remove

I checked the ERROR messages in documentation but couldn’t find this one. If I comment out this delete_bonds command, code runs without error.


The error message says that “0” is an invalid range. Looking at the documentation for the delete_bonds command you find that “0” would have to be a bond type or a range of bond types. “0” is an invalid bond type. There are no bonds of type zero. Thus LAMMPS is correct and your input is not.