rdkit.VLib.NodeLib.DbMolSupply.DbMolSupplyNode

Package rdkit :: Package VLib :: Package NodeLib :: Module DbMolSupply :: Class DbMolSupplyNode |
[hide private]
[frames] | no frames]

# Class DbMolSupplyNode

source code

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

    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()

Instance Methods | [hide private]
__init__(self, dbResults, **kwargs) x.__init__(...) initializes x; see help(type(x)) for signature | source code
reset(self) resets our iteration state | source code
next(self) | source code
Inherited from `Supply.SupplyNode`: `AddParent`, `__next__` Inherited from `Node.VLibNode`: `AddChild`, `Destroy`, `GetChildren`, `GetParents`, `RemoveChild`, `RemoveParent`, `__iter__` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

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

Method Details | [hide private]

### __init__(self, dbResults, **kwargs) (Constructor) | source code
    x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: object.__init__ (inherited documentation)

### reset(self) | source code
    resets our iteration state
Overrides: Node.VLibNode.reset (inherited documentation)

### next(self) | source code
Overrides: Node.VLibNode.next