def generate_scaffold(smiles, include_chirality=False): """Compute the Bemis-Murcko scaffold for a SMILES string.""" from rdkit import Chem mol = Chem.MolFromSmiles(smiles) engine = ScaffoldGenerator(include_chirality=include_chirality) scaffold = engine.get_scaffold(mol) return scaffold
def generate_scaffold(smiles, include_chirality=False): """Compute the Bemis-Murcko scaffold for a SMILES string. Note ---- This function requires `rdkit` to be installed. """ from rdkit import Chem mol = Chem.MolFromSmiles(smiles) engine = ScaffoldGenerator(include_chirality=include_chirality) scaffold = engine.get_scaffold(mol) return scaffold
def _generate_scaffold(self, smile, include_chirality=False): """Compute the Bemis-Murcko scaffold for data.test SMILES string.""" mol = Chem.MolFromSmiles(smile) engine = ScaffoldGenerator(include_chirality=include_chirality) scaffold = engine.get_scaffold(mol) return scaffold