import pysmallworld

db = pysmallworld.Db("path_to_your_index")   # e.g. chembl_29 or your custom db
for hit in db.search("Clc1ccccc1", max_dist=4):
    print(hit.smiles, hit.distance)
