示例#1
0
def test():
    h = Handler.TokenHandler()
    #h = Handler.WriteHandler()  # uncomment to print
    t1 = time.clock()
    for line in lines:
        #print "Parsing", line
        Smarts.tokenize(line, h)
    t2 = time.clock()
    print len(lines), "patt. in", t2 - t1, "s =>",
    print (t2-t1)/len(lines), "s/patt. ==",
    print len(lines)/(t2-t1), "patt./s"
示例#2
0
def test():
    h = Handler.TokenHandler()
    #h = Handler.WriteHandler()  # uncomment to print
    t1 = time.clock()
    for line in lines:
        #print "Parsing", line
        Smarts.tokenize(line, h)
    t2 = time.clock()
    print len(lines), "patt. in", t2 - t1, "s =>",
    print(t2 - t1) / len(lines), "s/patt. ==",
    print len(lines) / (t2 - t1), "patt./s"
示例#3
0
def test():
    lines = test_Smarts.lines
    h = BuildMatcher.BuildMatcher()
    t1 = time.clock()
    for line in lines:
        #print "-->", line
        Smarts.tokenize(line, h)
        s = h.mol.dump()
        #print s
    t2 = time.clock()

    print len(lines), "patt. in", t2 - t1, "s =>",
    print(t2 - t1) / len(lines), "s/patt. ==",
    print len(lines) / (t2 - t1), "patt./s"
示例#4
0
def test():
    import Smarts
    h = BuildMatcher()
    for smi in ["C",
                "CC",
                "c",
                "C(N)O",
                "[O]",
                "c1ccccc1",
                ]:
        print "*"*44
        print "-->", smi        
        Smarts.tokenize(smi, h)
        print h.mol.dump()
示例#5
0
def test():
    lines = test_Smarts.lines
    h = BuildMatcher.BuildMatcher()
    t1 = time.clock()
    for line in lines:
        #print "-->", line
        Smarts.tokenize(line, h)
        s = h.mol.dump()
        #print s
    t2 = time.clock()

    print len(lines), "patt. in", t2 - t1, "s =>",
    print (t2-t1)/len(lines), "s/patt. ==",
    print len(lines)/(t2-t1), "patt./s"
示例#6
0
def test():
    import Smarts
    h = BuildMatcher()
    for smi in [
            "C",
            "CC",
            "c",
            "C(N)O",
            "[O]",
            "c1ccccc1",
    ]:
        print "*" * 44
        print "-->", smi
        Smarts.tokenize(smi, h)
        print h.mol.dump()