Trees | Indices | Help |
|
---|
|
object --+ | ??.instance --+ | FilterMatcherBase
Base class for matching molecules to filters. A FilterMatcherBase supplies the following API - IsValid() returns True if the matcher is valid for use, False otherwise - HasMatch(mol) returns True if the molecule matches the filter - GetMatches(mol) -> [FilterMatch, FilterMatch] returns all the FilterMatch data that matches the molecule print( FilterMatcherBase ) will print user-friendly information about the filter Note that a FilterMatcherBase can be combined from may FilterMatcherBases This is why GetMatches can return multiple FilterMatcherBases. >>> from rdkit.Chem.FilterCatalog import * >>> carbon_matcher = SmartsMatcher('Carbon', '[#6]', 0, 1) >>> oxygen_matcher = SmartsMatcher('Oxygen', '[#8]', 0, 1) >>> co_matcher = FilterMatchOps.Or(carbon_matcher, oxygen_matcher) >>> mol = Chem.MolFromSmiles('C') >>> matches = co_matcher.GetMatches(mol) >>> len(matches) 1 >>> print(matches[0].filterMatch) Carbon
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
|
|||
Inherited from |
|
GetMatches( (FilterMatcherBase)arg1, (Mol)mol) -> VectFilterMatch : Returns the list of matching subfilters mol matches any filter C++ signature : std::vector<RDKit::FilterMatch, std::allocator<RDKit::FilterMatch> > GetMatches(RDKit::FilterMatcherBase {lvalue},RDKit::ROMol) |
GetName( (FilterMatcherBase)arg1) -> str : C++ signature : std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > GetName(RDKit::FilterMatcherBase {lvalue}) |
HasMatch( (FilterMatcherBase)arg1, (Mol)mol) -> bool : Returns True if mol matches the filter C++ signature : bool HasMatch(RDKit::FilterMatcherBase {lvalue},RDKit::ROMol) |
IsValid( (FilterMatcherBase)arg1) -> bool : Return True if the filter matcher is valid, False otherwise C++ signature : bool IsValid(RDKit::FilterMatcherBase {lvalue}) |
Raises an exception This class cannot be instantiated from Python
|
helper for pickle
|
__str__( (FilterMatcherBase)arg1) -> str : C++ signature : std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > __str__(RDKit::FilterMatcherBase {lvalue})
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu Aug 25 09:15:50 2016 | http://epydoc.sourceforge.net |