rxn.reaction_preprocessing.special_tokens
Module for functionality related to special tokens (such as light and heat) to include in reaction SMILES.
Important comments: 1. Other modules should always try to use the functions defined here, i.e. try to:
never explicitly mention “[Lv]” or “[Ts]”
not refer directly to LIGHT_TOKEN or HEAT_TOKEN: normally the functions in this module should be sufficient (adding such tokens, removing them, querying whether a reaction contains them).
The functions here rely on ReactionEquation instead of SMILES strings. This makes the code independent of the reaction SMILES format. Conversion to and from strings should be done outside this module.
The Python objects starting with an underscore are meant not to be used elsewhere.
Functions
|
Add the heat token to the precursors of a reaction or list of SMILES. |
|
Add the light token to the precursors of a reaction or list of SMILES. |
|
Whether a reaction (or set of SMILES strings) contains the heat token. |
|
Whether a reaction (or set of SMILES strings) contains the light token. |
|
Strip all the special tokens from a reaction or list of SMILES strings. |
|
Strip the heat from a reaction or list of SMILES strings. |
|
Strip the light token from a reaction or list of SMILES strings. |