Example #1
0
 public static void removeAtomAndConnectedElectronContainers(IReaction reaction, IAtom atom)
 {
     IMolecule[] reactants = reaction.Reactants.Molecules;
     for (int i = 0; i < reactants.Length; i++)
     {
         IMolecule mol = reactants[i];
         if (mol.contains(atom))
         {
             mol.removeAtomAndConnectedElectronContainers(atom);
         }
     }
     IMolecule[] products = reaction.Products.Molecules;
     for (int i = 0; i < products.Length; i++)
     {
         IMolecule mol = products[i];
         if (mol.contains(atom))
         {
             mol.removeAtomAndConnectedElectronContainers(atom);
         }
     }
 }