From d14404254e8dcd1ef1f2884463c073cd0412a870 Mon Sep 17 00:00:00 2001 From: jrgissing <jrgiss05@gmail.com> Date: Sat, 1 Dec 2018 15:18:11 -0700 Subject: [PATCH] check for illegally deleted atoms --- src/USER-MISC/fix_bond_react.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/USER-MISC/fix_bond_react.cpp b/src/USER-MISC/fix_bond_react.cpp index b06f40c3f3..50efca8d09 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++) { -- GitLab