public static void removeAtomAndConnectedElectronContainers ( IChemModel chemModel , IAtom atom ) { ICrystal crystal = chemModel . getCrystal ( ) ; if ( crystal != null ) { if ( crystal . contains ( atom ) ) { crystal . removeAtom ( atom ) ; } return ; } IAtomContainerSet moleculeSet = chemModel . getMoleculeSet ( ) ; if ( moleculeSet != null ) { MoleculeSetManipulator . removeAtomAndConnectedElectronContainers ( moleculeSet , atom ) ; } IReactionSet reactionSet = chemModel . getReactionSet ( ) ; if ( reactionSet != null ) { ReactionSetManipulator . removeAtomAndConnectedElectronContainers ( reactionSet , atom ) ; } }
Remove an Atom and the connected ElectronContainers from all AtomContainers inside an IChemModel .