public void TestDefineLigandImplicitHydrogen() { var molecule = smiles.ParseSmiles("CC(C)C(C#N)(C(=C)C)"); var ligand = CIPTool.DefineLigand(molecule, new VisitedAtoms(), 3, CIPTool.Hydrogen); Assert.IsTrue(ligand is ImplicitHydrogenLigand); }
public void TestDefineLigand() { var ligand = CIPTool.DefineLigand(molecule, new VisitedAtoms(), 1, 2); Assert.AreEqual(molecule, ligand.AtomContainer); Assert.AreEqual(molecule.Atoms[1], ligand.CentralAtom); Assert.AreEqual(molecule.Atoms[2], ligand.LigandAtom); }
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); } }
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); }