rxn.chemutils.miscellaneous.is_valid_smiles

rxn.chemutils.miscellaneous.is_valid_smiles(smiles, check_valence=True)[source]

Whether a given string corresponds to a valid SMILES string.

Parameters
  • smiles (str) – string to check.

  • check_valence (bool, default: True) – whether to check the valence.

Return type

bool

Returns

True if the given SMILES is valid, else False.