code: public static void removeElectronContainer(IChemModel chemModel, IElectronContainer electrons) {
          ICrystal crystal = chemModel.getCrystal();
          if (crystal != null) {
              if (crystal.contains(electrons)) {
                  crystal.removeElectronContainer(electrons);
              }
              return;
          }
          IAtomContainerSet moleculeSet = chemModel.getMoleculeSet();
          if (moleculeSet != null) {
              MoleculeSetManipulator.removeElectronContainer(moleculeSet, electrons);
          }
          IReactionSet reactionSet = chemModel.getReactionSet();
          if (reactionSet != null) {
              ReactionSetManipulator.removeElectronContainer(reactionSet, electrons);
          }
      }
docs: Remove an ElectronContainer from all AtomContainers
  inside an IChemModel.
  
  @param chemModel  The IChemModel object.
  @param electrons  The ElectronContainer to remove.