rxn.chemutils.miscellaneous.sort_any

rxn.chemutils.miscellaneous.sort_any(any_smiles)[source]

Sort any SMILES string (molecule SMILES, multicomponent SMILES, reaction SMILES).

For single-component SMILES, the fragments will be reorderd. In the case of reaction SMILES, the format is kept.

Parameters

any_smiles (str) – any kind of SMILES string.

Raises

Exception – different kinds of exception may be raised during parsing.

Return type

str

Returns

the sorted SMILES string.