convert_smiles_to_mol()

Convert a SMILES string to an RDKit Mol object.

Usage

Source

convert_smiles_to_mol(
    smiles,
    sanitize=True,
)

Performs sanitization and validation of the molecule. Returns None if the SMILES is invalid or the molecule fails validation.

Parameters

smiles: str | None

SMILES string to convert.

sanitize: bool = True
True. Default is True.

Returns

Mol | None
None if conversion fails.