diff --git a/src/USER-MISC/fix_bond_react.cpp b/src/USER-MISC/fix_bond_react.cpp index b06f40c3f30685b51f477777b6d442e6b3326d23..50efca8d097df34ba7c3016ea823eee7f2e540ed 100644 --- a/src/USER-MISC/fix_bond_react.cpp +++ b/src/USER-MISC/fix_bond_react.cpp @@ -1653,6 +1653,18 @@ void FixBondReact::find_landlocked_atoms(int myrxn) } } + // additionally, if a deleted atom is bonded to a undeleted atom, bad + for (int i = 0; i < onemol->natoms; i++) { + if (delete_atoms[i][myrxn] == 1) { + int ii = reverse_equiv[i][1][myrxn] - 1; + for (int j = 0; j < twomol_nxspecial[ii][0]; j++) { + if (delete_atoms[equivalences[twomol_xspecial[ii][j]-1][1][myrxn]-1][myrxn] == 0) { + error->one(FLERR,"A deleted atom cannot be bonded to an undeleted atom"); + } + } + } + } + // also, if atoms change number of bonds, but aren't landlocked, that could be bad if (me == 0) for (int i = 0; i < twomol->natoms; i++) {