supplier
- supplier(version=None, *, prefix=None, **kwargs)[source]
Get a
rdkit.Chem.ForwardSDMolSupplier
for the given version of ChEMBL.- Parameters:
- Yields:
A supplier to be used in a context manager
In the following example, a supplier is used to get fingerprints and SMILES.
from rdkit import Chem import chembl_downloader data = [] with chembl_downloader.supplier() as suppl: for i, mol in enumerate(suppl): if mol is None or mol.GetNumAtoms() > 50: continue fp = Chem.PatternFingerprint(mol, fpSize=1024, tautomerFingerprints=True) smi = Chem.MolToSmiles(mol) data.append((smi, fp))