public void TestOddCycleReadin() { string signatureString = "[C]([C]([C,2]([C,1]))[C]([C,1]))"; ColoredTree tree = AtomSignature.Parse(signatureString); Assert.AreEqual(signatureString, tree.ToString()); Molecule molecule = new MoleculeBuilder().FromTree(tree); Assert.AreEqual(5, molecule.GetAtomCount()); Assert.AreEqual(5, molecule.GetBondCount()); }
public void TestCage() { string signatureString = "[C]([C]([C,2]([C]([C,3][C,4]))[C]([C,5]" + "[C,3]([C,6]([C,1]))))[C]([C]([C,7][C]" + "([C,1][C,8]))[C,5]([C,8]([C,6])))[C]([C,2]" + "[C,7]([C,4]([C,1]))))"; ColoredTree tree = AtomSignature.Parse(signatureString); Assert.AreEqual(signatureString, tree.ToString()); Molecule molecule = new MoleculeBuilder().FromTree(tree); Assert.AreEqual(16, molecule.GetAtomCount()); Assert.AreEqual(24, molecule.GetBondCount()); }