search_class

search_class(class_dict: dict[str, list[str]], structures: list[Mol], params: SubstructMatchParameters | None = None) list[dict[str, str | int]][source]

Search for a single class and return results as dictionaries.

Performs substructure matching between input structures and class SMARTS patterns using RDKit’s FilterCatalog for efficient batch matching.

Args:

class_dict: Dictionary mapping class_id to list of SMARTS patterns. structures: List of RDKit Mol objects to classify. params: Optional SubstructMatchParameters forwarded to RDKit

substructure matching.

Returns:

List of dictionaries with match information: - class_id: Identifier of matched class - class_structure: SMARTS pattern that matched - structure_inchikey: InChIKey of matched structure - structure_smarts: SMARTS representation of structure - structure_ab: Total atoms + bonds in structure - matched_ab: Number of matched atoms + bonds