Esempio n. 1
0
        public void TestConvertToAtomContainerIRingSet()
        {
            IAtomContainer molecule = TestMoleculeFactory.MakeAlphaPinene();

            IRingSet       ringSet = Cycles.FindSSSR(molecule).ToRingSet();
            IAtomContainer ac      = RingPartitioner.ConvertToAtomContainer(ringSet);

            Assert.AreEqual(7, ac.Atoms.Count);
            Assert.AreEqual(8, ac.Bonds.Count);
        }
Esempio n. 2
0
        public void TestPartitionIntoRings()
        {
            var azulene = TestMoleculeFactory.MakeAzulene();
            var ringSet = Cycles.FindSSSR(azulene).ToRingSet();
            var list    = RingPartitioner.PartitionRings(ringSet);

            Assert.AreEqual(1, list.Count);

            var biphenyl = TestMoleculeFactory.MakeBiphenyl();

            ringSet = Cycles.FindSSSR(biphenyl).ToRingSet();
            list    = RingPartitioner.PartitionRings(ringSet);
            Assert.AreEqual(2, list.Count);

            var spiro = TestMoleculeFactory.MakeSpiroRings();

            ringSet = Cycles.FindSSSR(spiro).ToRingSet();
            list    = RingPartitioner.PartitionRings(ringSet);
            Assert.AreEqual(1, list.Count);
        }