/** * Removes the given atom from the AtomContainer. Note that the * electronContainers are unaffected: you also have to take care of removing * all electronContainers to this atom from the container. * *@param atom The atom to be removed */ @Override public void removeAtomOnly(IAtom atom) { int position = getAtomNumber(atom); if (position != -1) { removeAtomOnly(position); } }
int position = getAtomNumber(atom); if (position != -1) { for (int i = 0; i < bondCount; i++) {
newAtoms = new IAtom[bond.getAtomCount()]; for (int j = 0; j < bond.getAtomCount(); ++j) { newAtoms[j] = clone.getAtom(getAtomNumber(bond.getAtom(j))); newLp = (ILonePair) lp.clone(); if (lp.getAtom() != null) { newLp.setAtom(clone.getAtom(getAtomNumber(lp.getAtom()))); newSe = (ISingleElectron) se.clone(); if (se.getAtom() != null) { newSe.setAtom(clone.getAtom(getAtomNumber(se.getAtom())));