From 64ac7c007fb7494e51b2e50944396d576cdb79fa Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Mar 2026 21:26:02 +0000 Subject: [PATCH 1/2] Initial plan From d9c2d7ecac6a7f2bfa926013f1cc52a0ad7666d3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Mar 2026 21:29:02 +0000 Subject: [PATCH 2/2] Remove redundant local FunctionalGroupInfo/MonomerRole class definitions from reaction_detector.py Co-authored-by: janitha-mahanthe <119646255+janitha-mahanthe@users.noreply.github.com> --- AutoREACTER/detectors/reaction_detector.py | 34 ---------------------- 1 file changed, 34 deletions(-) diff --git a/AutoREACTER/detectors/reaction_detector.py b/AutoREACTER/detectors/reaction_detector.py index 3fcd5e7..8f4f5c2 100644 --- a/AutoREACTER/detectors/reaction_detector.py +++ b/AutoREACTER/detectors/reaction_detector.py @@ -58,40 +58,6 @@ class EmptyReactionListError(Exception): This should be prevented by the reaction_selection method, but this error serves as a safeguard.""" pass -@dataclass(slots=True, frozen=True) -class FunctionalGroupInfo: - """ - Stores metadata about a specific functional group detected in a molecule. - - Attributes: - functionality_type: Category of the group (e.g., 'vinyl', 'diol'). - fg_name: Human-readable name of the functional group. - fg_smarts_1: Primary SMARTS pattern for detection. - fg_count_1: Number of occurrences of the primary pattern. - fg_smarts_2: Secondary SMARTS pattern (optional). - fg_count_2: Number of occurrences of the secondary pattern (optional). - """ - functionality_type: str - fg_name: str - fg_smarts_1: str - fg_count_1: int - fg_smarts_2: Optional[str] = None - fg_count_2: Optional[int] = None - -@dataclass(slots=True, frozen=True) -class MonomerRole: - """ - Represents a monomer and its associated functional groups. - - Attributes: - smiles: SMILES string of the monomer. - name: Identifier or name of the monomer. - functionalities: A tuple of FunctionalGroupInfo objects present in this monomer. - """ - smiles: str - name: str - functionalities: Tuple[FunctionalGroupInfo, ...] - @dataclass(slots=True, frozen=True) class ReactionTemplate: """