logger.info('Optimizing those:') t1 = time.time() for mol in mols: if not mol.GetNumConformers(): continue needMore = 1 while needMore: needMore = AllChem.UFFOptimizeMolecule(mol, maxIters=200) t2 = time.time() logger.info('Results13: %.2f seconds' % (t2 - t1)) ts.append(t2 - t1) if tests[15]: logger.info('Find unique subgraphs') t1 = time.time() for mol in mols: Chem.FindUniqueSubgraphsOfLengthN(mol, 6) t2 = time.time() logger.info('Results14: %.2f seconds' % (t2 - t1)) ts.append(t2 - t1) if tests[16]: logger.info('Generate topological fingerprints') t1 = time.time() for mol in mols: Chem.RDKFingerprint(mol) t2 = time.time() logger.info('Results15: %.2f seconds' % (t2 - t1)) ts.append(t2 - t1) print 'times: ', ' || '.join(['%.1f' % x for x in ts])
def CalculateUniqueSubgraphPath6(mol): return len(Chem.FindUniqueSubgraphsOfLengthN(mol,6))