Esempio n. 1
0
        public void TestGetLigandLigandsVisitedTracking()
        {
            var molecule   = smiles.ParseSmiles("CC(C)C(CC)(C(C)(C)C)[H]");
            var ligand     = CIPTool.DefineLigand(molecule, new VisitedAtoms(), 3, 1);
            var sideChains = CIPTool.GetLigandLigands(ligand);

            foreach (var ligand2 in sideChains)
            {
                Assert.AreNotSame(ligand.VisitedAtoms, ligand2.VisitedAtoms);
            }
        }
Esempio n. 2
0
        public void TestGetLigandLigandsDoubleTriple()
        {
            var molecule   = smiles.ParseSmiles("CC(C)C(C#N)(C(=C)C)[H]");
            var ligand     = CIPTool.DefineLigand(molecule, new VisitedAtoms(), 3, 1);
            var sideChains = CIPTool.GetLigandLigands(ligand);

            Assert.AreEqual(2, sideChains.Count);
            ligand     = CIPTool.DefineLigand(molecule, new VisitedAtoms(), 3, 4);
            sideChains = CIPTool.GetLigandLigands(ligand);
            Assert.AreEqual(3, sideChains.Count);
            ligand     = CIPTool.DefineLigand(molecule, new VisitedAtoms(), 3, 6);
            sideChains = CIPTool.GetLigandLigands(ligand);
            Assert.AreEqual(3, sideChains.Count);
            ligand     = CIPTool.DefineLigand(molecule, new VisitedAtoms(), 3, 9);
            sideChains = CIPTool.GetLigandLigands(ligand);
            Assert.AreEqual(0, sideChains.Count);
        }