[Feature] Implemented SMARTS filtering for Rules (#246)

Reactant Filter SMARTS as well as Product Filter SMARTS are now reflected when applying rules.

Fixes #245

Co-authored-by: Tim Lorsbach <tim@lorsba.ch>
Reviewed-on: enviPath/enviPy#246
This commit is contained in:
2025-11-28 23:28:41 +13:00
parent fd2e2c2534
commit e8ae494c16
4 changed files with 90 additions and 3 deletions

View File

@ -1241,7 +1241,12 @@ class SimpleAmbitRule(SimpleRule):
return "simple-rule"
def apply(self, smiles):
return FormatConverter.apply(smiles, self.smirks)
return FormatConverter.apply(
smiles,
self.smirks,
reactant_filter_smarts=self.reactant_filter_smarts,
product_filter_smarts=self.product_filter_smarts,
)
@property
def reactants_smarts(self):