rdkit.VLib.NodeLib.SmilesSupply module

class rdkit.VLib.NodeLib.SmilesSupply.SmilesSupplyNode(fileName, delim='\t', nameColumn=1, smilesColumn=0, titleLine=0, **kwargs)

Bases: SupplyNode

Smiles supplier

Sample Usage:
>>> import os
>>> from rdkit import RDConfig
>>> fileN = os.path.join(RDConfig.RDCodeDir,'VLib','NodeLib',                               'test_data','pgp_20.txt')
>>> suppl = SmilesSupplyNode(fileN,delim="\t",smilesColumn=2,nameColumn=1,titleLine=1)
>>> ms = [x for x in suppl]
>>> len(ms)
20
>>> ms[0].GetProp("_Name")
'ALDOSTERONE'
>>> ms[0].GetProp("ID")
'RD-PGP-0001'
>>> ms[1].GetProp("_Name")
'AMIODARONE'
>>> ms[3].GetProp("ID")
'RD-PGP-0004'
>>> suppl.reset()
>>> suppl.next().GetProp("_Name")
'ALDOSTERONE'
>>> suppl.next().GetProp("_Name")
'AMIODARONE'
>>> suppl.reset()
next()
reset()

resets our iteration state