public void TestGetAllAtomContainers_IRingSet() { IRingSet rs = builder.NewRingSet(); rs.Add(builder.NewRing()); rs.Add(builder.NewRing()); var list = RingSetManipulator.GetAllAtomContainers(rs); Assert.AreEqual(2, list.Count()); }
/// <summary> /// Puts all rings of a ringSet in a single atomContainer /// </summary> /// <param name="ringSet">The ringSet to use</param> /// <returns>The produced atomContainer</returns> public static IAtomContainer GetAllInOneContainer(IRingSet ringSet) { IAtomContainer resultContainer = ringSet.Builder.NewAtomContainer(); IEnumerator <IAtomContainer> containers = RingSetManipulator.GetAllAtomContainers(ringSet).GetEnumerator(); while (containers.MoveNext()) { resultContainer.Add(containers.Current); } return(resultContainer); }