rxn.chemutils.conversion.canonicalize_smiles

rxn.chemutils.conversion.canonicalize_smiles(smiles, check_valence=True)[source]

Canonicalize a SMILES string for a molecule.

Parameters
  • smiles (str) – SMILES string to canonicalize.

  • check_valence (bool, default: True) – if False, will not do any valence check.

Raises

InvalidSmiles for problems in parsing SMILES or in the sanitization.

Return type

str

Returns

Canonicalized SMILES string.