rdkit.VLib.NodeLib.SmilesDupeFilter module — The RDKit 2016.09.1 documentation

# rdkit.VLib.NodeLib.SmilesDupeFilter module

class `rdkit.VLib.NodeLib.SmilesDupeFilter.` `DupeFilter`(**kwargs)

  Bases: `rdkit.VLib.Filter.FilterNode`

  canonical-smiles based duplicate filter

  Assumptions:

  > - inputs are molecules

  Sample Usage:

        >>> import os
        >>> from rdkit import RDConfig
        >>> from rdkit.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'

  `filter`(cmpd)
  `reset`()