rxn.chemutils.tokenization.to_tokens

rxn.chemutils.tokenization.to_tokens(smiles)[source]

Tokenize a SMILES molecule or reaction into a list of tokens.

Parameters

smiles (str) – SMILES string to tokenize.

Raises

TokenizationError – in case of mismatch between the SMILES and the joined tokens.

Return type

List[str]

Returns

List of tokens (give back the original SMILES string if appended).