forked from enviPath/enviPy
[Feature] Management Command to Compute and Store Reaction <-> Rule Associations (#453)
Co-authored-by: Tim Lorsbach <tim@lorsba.ch> Reviewed-on: enviPath/enviPy#453
This commit is contained in:
@ -448,6 +448,7 @@ class FormatConverter(object):
|
||||
r_smiles: List[str],
|
||||
standardize: bool = True,
|
||||
canonicalize_tautomers: bool = True,
|
||||
return_exact_match: bool = False,
|
||||
) -> bool:
|
||||
"""
|
||||
Check if all SMILES in the left list are covered by (contained in) the right list.
|
||||
@ -517,8 +518,11 @@ class FormatConverter(object):
|
||||
standardized_r_smiles.append(smi)
|
||||
else:
|
||||
standardized_r_smiles = r_smiles
|
||||
|
||||
return len(set(standardized_l_smiles).difference(set(standardized_r_smiles))) == 0
|
||||
if not return_exact_match:
|
||||
return len(set(standardized_l_smiles).difference(set(standardized_r_smiles))) == 0
|
||||
return len(set(standardized_l_smiles).difference(set(standardized_r_smiles))) == 0, set(
|
||||
standardized_l_smiles
|
||||
) == set(standardized_r_smiles)
|
||||
|
||||
|
||||
class Standardizer(ABC):
|
||||
|
||||
Reference in New Issue
Block a user