rxn.chemutils.conversion.mdl_to_mol

rxn.chemutils.conversion.mdl_to_mol(mdl, sanitize=True)[source]

Convert an MDL Mol string to an RDKit Mol.

Mainly a wrapper around MolFromMolBlock that raises InvalidMdl when necessary.

Raises

InvalidMdl for empty or invalid MDL mol strings.

Parameters
  • mdl (str) – MDL Mol string to convert.

  • sanitize (bool, default: True) – whether to sanitize the molecules or not. Note: sanitization here corresponds to doing a sanitization with SANITIZE_ALL.

Return type

Mol

Returns

Mol instance.