VLib.NodeLib.SmilesDupeFilter.DupeFilter

Package VLib :: Package NodeLib :: Module SmilesDupeFilter :: Class DupeFilter |
[hide private]
[frames] | no frames]

# Class DupeFilter

source code

       object --+
                |
    Node.VLibNode --+
                    |
    Filter.FilterNode --+
                        |
                       DupeFilter

    canonical-smiles based duplicate filter

    Assumptions:

      - inputs are molecules

    Sample Usage:
      >>> from VLib.NodeLib.SDSupply import SDSupplyNode
      >>> fileN = os.path.join(RDConfig.RDCodeDir,'VLib','NodeLib',                             'test_data','NCI_aids.10.sdf')
      >>> suppl = SDSupplyNode(fileN)
      >>> filt = DupeFilter()
      >>> filt.AddParent(suppl)
      >>> ms = [x for x in filt]
      >>> len(ms)
      10
      >>> ms[0].GetProp("_Name")
      '48'
      >>> ms[1].GetProp("_Name")
      '78'
      >>> filt.reset()
      >>> filt.next().GetProp("_Name")
      '48'

Instance Methods | [hide private]
__init__(self, **kwargs) | source code
reset(self) resets our iteration state... | source code
filter(self, cmpd) | source code
Inherited from `Filter.FilterNode`: `Negate`, `SetNegate`, `next` Inherited from `Node.VLibNode`: `AddChild`, `AddParent`, `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, **kwargs) (Constructor) | source code
Overrides: Filter.FilterNode.__init__

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