rxn.chemutils.rdf.reaction_smiles_extractor.ReactionSmilesExtractor
- class rxn.chemutils.rdf.reaction_smiles_extractor.ReactionSmilesExtractor(fragment_bond=None, sanitize=True)[source]
Bases:
object
Extract reaction SMILES from RdfReaction instances.
- Parameters
fragment_bond (
Optional
[str
], default:None
) –sanitize (
bool
, default:True
) –
- __init__(fragment_bond=None, sanitize=True)[source]
- Parameters
fragment_bond (
Optional
[str
], default:None
) –sanitize (
bool
, default:True
) –
Methods
__init__
([fragment_bond, sanitize])- param fragment_bond
to_reaction_equation
(reaction)Extract the reaction equation.
to_reaction_smiles
(reaction)Extract the reaction SMILES.
to_string
(reaction_equation)Convert a ReactionEquation to a reaction SMILES.
- to_reaction_equation(reaction)[source]
Extract the reaction equation.
- Parameters
reaction (
RdfReaction
) – RdfReaction to extract the reaction equation from.- Return type
- to_reaction_smiles(reaction)[source]
Extract the reaction SMILES.
- Parameters
reaction (
RdfReaction
) – RdfReaction to extract the reaction equation from.- Return type
str
- to_string(reaction_equation)[source]
Convert a ReactionEquation to a reaction SMILES.
Useful function as it automatically uses the correct fragment bond.
- Parameters
reaction_equation (
ReactionEquation
) –- Return type
str