rdkit.VLib.NodeLib.DbMolSupply module

class rdkit.VLib.NodeLib.DbMolSupply.DbMolSupplyNode(dbResults, **kwargs)

Bases: SupplyNode

Supplies molecules from a db result set:

Sample Usage:
>>> from rdkit.Dbase.DbConnection import DbConnect
>>> dbName = os.path.join(RDConfig.RDCodeDir,'Chem','Fingerprints',                             'test_data','data.gdb')
>>> conn = DbConnect(dbName,'simple_mols')
>>> dataset = conn.GetData()
>>> suppl = DbMolSupplyNode(dataset)
>>> ms = [x for x in suppl]
>>> len(ms)
12
>>> ms[0].GetProp("ID")
'ether-1'
>>> ms[10].GetProp("ID")
'acid-4'
>>> suppl.reset()
>>> suppl.next().GetProp("ID")
'ether-1'
>>> suppl.next().GetProp("ID")
'acid-1'
>>> suppl.reset()
next()
reset()

resets our iteration state

rdkit.VLib.NodeLib.DbMolSupply.GetNode(dbName, tableName)