@ Override public void removeAtom ( IAtom atom ) { int position = getAtomNumber ( atom ) ; if ( position != - 1 ) { for ( int i = 0 ; i < bondCount ; i ++ ) { if ( bonds [ i ] . contains ( atom ) ) { removeBond ( i ) ; -- i ; } } for ( int i = 0 ; i < lonePairCount ; i ++ ) { if ( lonePairs [ i ] . contains ( atom ) ) { removeLonePair ( i ) ; -- i ; } } for ( int i = 0 ; i < singleElectronCount ; i ++ ) { if ( singleElectrons [ i ] . contains ( atom ) ) { removeSingleElectron ( i ) ; -- i ; } } removeAtomOnly ( position ) ; } notifyChanged ( ) ; }
Removes the given atom and all connected electronContainers from the AtomContainer .