Пример #1
0
        public void MakeEdgeTest_tripleBond()
        {
            MoleculeFromSignatureBuilder builder = new MoleculeFromSignatureBuilder(CDK.Builder);

            builder.MakeGraph();
            builder.MakeVertex("C");
            builder.MakeVertex("C");
            builder.MakeEdge(0, 1, "C", "C", "#");

            IAtomContainer product = builder.GetAtomContainer();

            Assert.AreEqual(2, product.Atoms.Count);
            Assert.AreEqual(1, product.Bonds.Count);
            Assert.AreEqual(BondOrder.Triple, product.Bonds[0].Order);
        }
Пример #2
0
        public void MakeEdgeTest_aromaticBond()
        {
            MoleculeFromSignatureBuilder builder = new MoleculeFromSignatureBuilder(CDK.Builder);

            builder.MakeGraph();
            builder.MakeVertex("C");
            builder.MakeVertex("C");
            builder.MakeEdge(0, 1, "C", "C", "p");

            IAtomContainer product = builder.GetAtomContainer();

            Assert.AreEqual(2, product.Atoms.Count);
            Assert.AreEqual(1, product.Bonds.Count);
            IBond bond = product.Bonds[0];

            Assert.AreEqual(BondOrder.Single, bond.Order);
            Assert.IsTrue(bond.IsAromatic);
        }