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"
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"
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"
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()
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"
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()