rxn.reaction_preprocessing.smiles_tokenizer.SmilesTokenizer

class rxn.reaction_preprocessing.smiles_tokenizer.SmilesTokenizer[source]

Bases: object

__init__()

Methods

__init__()

tokenize(smiles)

Tokenize a SMILES molecule or reaction, and join the tokens with spaces.

tokenize(smiles)[source]

Tokenize a SMILES molecule or reaction, and join the tokens with spaces. :type smiles: str :param smiles: SMILES string to tokenize, for instance ‘CC(CO)=N>>CC(C=O)N’.

Return type

str

Returns

SMILES string after tokenization, for instance ‘C C ( C O ) = N >> C C ( C = O ) N’.

Parameters

smiles (str) –