You can keep track of the distances during a bond break or you can find out which bonds have been broken after the run by analyzing the topology.
You can use simple any scripting language (to find out the distance between atoms) to analyze or use existing lammps features for this (computes).
After which you can use the set command to change it to whatever type you want.
Hope this helps
Arun