Example #1
0
        public void AtomStereoReordered3()
        {
            var mol = new QueryAtomContainer();

            Assert.IsTrue(Smarts.Parse(mol, "[C@H](C)(O)CC"));
            var atoms = mol.Atoms.ToArray();

            Swap(atoms, 0, 1);
            mol.SetAtoms(atoms);
            Assert.AreEqual("C[C@@H1](O)CC", Smarts.Generate(mol));
        }
Example #2
0
        public void BondStereoCisThenTransUnspecWithNbr()
        {
            var mol = new QueryAtomContainer();

            Assert.IsTrue(Smarts.Parse(mol, "C/C=C(C)\\C=C\\?O"));
            Assert.AreEqual("C/C=C(C)\\C=C\\?O", Smarts.Generate(mol));
            var atoms = mol.Atoms.ToArray();

            Swap(atoms, 0, atoms.Length - 1);
            mol.SetAtoms(atoms);
            Assert.AreEqual("O/?C=C/C(=C\\C)C", Smarts.Generate(mol));
        }
Example #3
0
        public void BondStereoTrans()
        {
            var mol = new QueryAtomContainer();

            Assert.IsTrue(Smarts.Parse(mol, "C/C=C/C"));
            Assert.AreEqual("C/C=C/C", Smarts.Generate(mol));
            var atoms = mol.Atoms.ToArray();

            Swap(atoms, 0, 1);
            mol.SetAtoms(atoms);
            Assert.AreEqual("C(\\C)=C/C", Smarts.Generate(mol));
        }