VLib.NodeLib.SmilesSupply.SmilesSupplyNode

Package VLib :: Package NodeLib :: Module SmilesSupply :: Class SmilesSupplyNode |
[hide private]
[frames] | no frames]

# Class SmilesSupplyNode

source code

       object --+
                |
    Node.VLibNode --+
                    |
    Supply.SupplyNode --+
                        |
                       SmilesSupplyNode

    Smiles supplier

    Sample Usage:
      >>> 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()

Instance Methods | [hide private]
__init__(self, fileName, delim=`'``\t``'`, nameColumn=1, smilesColumn=0, titleLine=0, **kwargs) | source code
reset(self) | source code
next(self) | source code
Inherited from `Supply.SupplyNode`: `AddParent` Inherited from `Node.VLibNode`: `AddChild`, `Destroy`, `GetChildren`, `GetParents`, `RemoveChild`, `RemoveParent`, `__iter__` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, fileName, delim=`'``\t``'`, nameColumn=1, smilesColumn=0, titleLine=0, **kwargs) (Constructor) | source code
Overrides: Supply.SupplyNode.__init__

### reset(self) | source code
Overrides: Supply.SupplyNode.reset

### next(self) | source code
Overrides: Supply.SupplyNode.next