mlchem.chem.manipulation.smarts_from_string

smarts_from_string(string: str) str

Convert a SMILES or InChI string into a SMARTS string.

Parameters:

string (str) – A string representing a molecule in SMILES or InChI format.

Returns:

A SMARTS string representing the molecular pattern.

Return type:

str