コード例 #1
0
        public void TestGetFunctionalGroupSubstructureSet()
        {
            var smarts = StandardSubstructureSets.GetFunctionalGroupSMARTS();

            Assert.IsNotNull(smarts);
            Assert.AreEqual(307, smarts.Count());
        }
コード例 #2
0
 /// <summary>
 /// Set up the fingerprinter to use the fragments from <see cref="StandardSubstructureSets"/>.
 /// </summary>
 public SubstructureFingerprinter()
 {
     try
     {
         SetSmarts(StandardSubstructureSets.GetFunctionalGroupSMARTS());
     }
     catch (Exception ex)
     {
         throw new InvalidOperationException("Could not load SMARTS patterns", ex);
     }
 }
コード例 #3
0
        public void TestSize()
        {
            SubstructureFingerprinter fp;

            fp = new SubstructureFingerprinter();
            Assert.AreEqual(307, fp.Length);

            fp = new SubstructureFingerprinter(StandardSubstructureSets.GetFunctionalGroupSMARTS());
            Assert.AreEqual(307, fp.Length);

            fp = new SubstructureFingerprinter(StandardSubstructureSets.GetCountableMACCSSMARTS());
            Assert.AreEqual(142, fp.Length);
        }