Example #1
0
        // @cdk.bug 1632610
        public void TestCycloButene()
        {
            var mol = parser.ParseSmiles("C=CC=C");

            BODRIsotopeFactory.Instance.ConfigureAtoms(mol);
            AddImplicitHydrogens(mol);

            var structures = VicinitySampler.Sample(mol);
            var count      = 0;

            foreach (var temp in structures)
            {
                Assert.IsNotNull(temp);
                Assert.IsTrue(ConnectivityChecker.IsConnected(temp));
                Assert.AreEqual(mol.Atoms.Count, temp.Atoms.Count);
                count++;
            }
            Assert.AreEqual(1, count);
        }
Example #2
0
        public void TestVicinitySampler_sample()
        {
            IAtomContainer mol = TestMoleculeFactory.MakeEthylPropylPhenantren();

            BODRIsotopeFactory.Instance.ConfigureAtoms(mol);
            AddImplicitHydrogens(mol);

            var structures = VicinitySampler.Sample(mol);
            var count      = 0;

            foreach (var temp in structures)
            {
                Assert.IsNotNull(temp);
                Assert.IsTrue(ConnectivityChecker.IsConnected(temp));
                Assert.AreEqual(mol.Atoms.Count, temp.Atoms.Count);
                count++;
            }
            Assert.AreEqual(37, count);
        }