Package rdkit :: Package Chem :: Module rdfiltercatalog :: Class FilterHierarchyMatcher
[hide private]
[frames] | no frames]

Class FilterHierarchyMatcher

   object --+        
            |        
  ??.instance --+    
                |    
FilterMatcherBase --+
                    |
                   FilterHierarchyMatcher

Hierarchical Filter
 basic constructors: 
   FilterHierarchyMatcher( matcher )
   where can be any FilterMatcherBase (SmartsMatcher, etc)
 FilterHierarchyMatcher's have children and can form matching
  trees.  then GetFilterMatches is called, the most specific (
  i.e. lowest node in a branch) is returned.

 n.b. A FilterHierarchicalMatcher of functional groups is returned
  by calling GetFunctionalGroupHierarchy()

>>> from rdkit.Chem import MolFromSmiles
>>> from rdkit.Chem.FilterCatalog import *
>>> functionalGroups = GetFunctionalGroupHierarchy()
>>> [match.filterMatch.GetName() 
...     for match in functionalGroups.GetFilterMatches(
...         MolFromSmiles('c1ccccc1Cl'))]
['Halogen.Aromatic', 'Halogen.NotFluorine.Aromatic']

Instance Methods [hide private]
 
AddChild(...)
AddChild( (FilterHierarchyMatcher)arg1, (FilterHierarchyMatcher)arg2) -> FilterHierarchyMatcher : Add a child node to this hierarchy.
 
SetPattern(...)
SetPattern( (FilterHierarchyMatcher)arg1, (FilterMatcherBase)arg2) -> None : Set the filtermatcher pattern for this node.
 
__init__(...)
__init__( (object)arg1) -> None :

Inherited from FilterMatcherBase: GetMatches, GetName, HasMatch, IsValid, __reduce__, __str__

Inherited from unreachable.instance: __new__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  __instance_size__ = 24
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

AddChild(...)

 

AddChild( (FilterHierarchyMatcher)arg1, (FilterHierarchyMatcher)arg2) -> FilterHierarchyMatcher :
    Add a child node to this hierarchy.

    C++ signature :
        boost::shared_ptr<RDKit::FilterHierarchyMatcher> AddChild(RDKit::FilterHierarchyMatcher {lvalue},RDKit::FilterHierarchyMatcher)

SetPattern(...)

 

SetPattern( (FilterHierarchyMatcher)arg1, (FilterMatcherBase)arg2) -> None :
    Set the filtermatcher pattern for this node.  An empty node is considered a root node and passes along the matches to the children.

    C++ signature :
        void SetPattern(RDKit::FilterHierarchyMatcher {lvalue},RDKit::FilterMatcherBase)

__init__(...)
(Constructor)

 

__init__( (object)arg1) -> None :

    C++ signature :
        void __init__(_object*)

__init__( (object)arg1, (FilterMatcherBase)arg2) -> None :
    Construct from a filtermatcher

    C++ signature :
        void __init__(_object*,RDKit::FilterMatcherBase)

Overrides: object.__init__