/// <summary> Clones this <code>RingSet</code> including the Rings. /// /// </summary> /// <returns> The cloned object /// </returns> public override System.Object Clone() { RingSet clone = (RingSet)base.Clone(); IAtomContainer[] result = AtomContainers; for (int i = 0; i < result.Length; i++) { clone.addAtomContainer((IAtomContainer)result[i].Clone()); } return(clone); }
/// <summary> Returns a vector of all rings that this atom is part of. /// /// </summary> /// <param name="atom"> The atom to be checked /// </param> /// <returns> A vector of all rings that this bond is part of /// </returns> public virtual IRingSet getRings(IAtom atom) { IRingSet rings = new RingSet(); IRing ring; for (int i = 0; i < AtomContainerCount; i++) { ring = (Ring)getAtomContainer(i); if (ring.contains(atom)) { rings.addAtomContainer(ring); } } return(rings); }