Ejemplo n.º 1
0
 /// <summary>
 /// Do not use - temporary method until the SMARTS packages are cleaned up.
 /// </summary>
 /// <remarks>
 /// Prepares a target molecule for matching with SMARTS.
 /// </remarks>
 /// <param name="container">the container to initialise</param>
 /// <param name="ringQuery">whether the smarts will check ring size queries</param>
 public static void Prepare(IAtomContainer container, bool ringQuery)
 {
     if (ringQuery)
     {
         SMARTSAtomInvariants.ConfigureDaylightWithRingInfo(container);
     }
     else
     {
         SMARTSAtomInvariants.ConfigureDaylightWithoutRingInfo(container);
     }
 }
Ejemplo n.º 2
0
        public void NoRingInfo()
        {
            var container = sp.ParseSmiles("C1CC23CCC11CCC4(CC1)CCC(CC2)(CC3)CC4");

            SMARTSAtomInvariants.ConfigureDaylightWithoutRingInfo(container);
            foreach (var atom in container.Atoms)
            {
                SMARTSAtomInvariants inv = atom.GetProperty <SMARTSAtomInvariants>(SMARTSAtomInvariants.Key);
                Assert.IsTrue(inv.RingSize.Count == 0);
                Assert.AreEqual(0, inv.RingNumber);
            }
        }