# RDKit Chemistry Toolkit: Molecule Images, Properties & Search (`jumblemog/rdkit-chemistry-toolkit`) Actor

Give molecules as SMILES, InChI or names (caffeine, IUPAC, read offline): get molecular weight, logP, TPSA, Lipinski and other drug-likeness rules, PAINS alerts, 2D images, 3D structures (SDF), fingerprints, similarity and substructure search. Built on RDKit, for chemists and AI agents.

- **URL**: https://apify.com/jumblemog/rdkit-chemistry-toolkit.md
- **Developed by:** [Jumble Mog](https://apify.com/jumblemog) (community)
- **Categories:** AI, Developer tools, Automation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## RDKit Chemistry Toolkit: Molecule Images, Properties & Search

**Cheminformatics without installing anything.** Give molecules as SMILES, InChI, Molfiles or plain names (`caffeine`, `vitamin C`, `2-acetyloxybenzoic acid`) and get back canonical SMILES, InChI and InChIKey, molecular weight, logP, TPSA and 20 more properties, Lipinski's rule of five and eight other drug-likeness rules, PAINS and Brenk structural alerts, clean 2D structure images, 3D structures for docking, fingerprints, Tanimoto similarity and substructure search. Everything is computed with [RDKit](https://www.rdkit.org), the open-source toolkit used across the pharmaceutical industry, and names are read offline, so no compound you send ever leaves the run. One molecule or 100,000, from people, spreadsheets, automations and AI agents.

![Eight molecules drawn by this Actor, each with its name, formula, molecular weight, logP, TPSA, QED and Lipinski result: aspirin, caffeine, ibuprofen with its carboxylic acid highlighted, morphine, penicillin G with its beta-lactam ring highlighted, imatinib, testosterone and quinine](https://api.apify.com/v2/key-value-stores/Km5b4PG3kYHdZSb1E/records/rdkit-chemistry-toolkit-examples.png?signature=1bcsNB5LjNC1hcYyKVuFh)

### What it does

- **Reads molecules** as SMILES, InChI, Molfiles (V2000 and V3000) or names. Names are looked up in a built-in list of over 700 common names, abbreviations and formulas (aspirin, paracetamol, atorvastatin, sucrose, testosterone, DMSO, H2O...), and anything else goes to [OPSIN](https://github.com/dan2097/opsin), the IUPAC name parser from the University of Cambridge, running inside the Actor. The built-in list comes from OPSIN too, plus over 100 drugs and natural products OPSIN doesn't know, each added only when two independent sources (its SMILES and its systematic name or InChIKey) agreed on the structure.
- **Identifiers**: canonical isomeric SMILES, standard InChI and InChIKey, molecular formula. Duplicates in a batch are flagged.
- **Properties**: molecular weight, exact mass, logP (Wildman-Crippen), molar refractivity, TPSA, H-bond donors and acceptors, rotatable bonds, rings, aromatic rings, heteroatoms, Fsp3, stereocenters (and how many are unspecified), formal charge, QED drug-likeness, synthetic accessibility score, natural-product likeness and the Bemis-Murcko scaffold.
- **Drug-likeness rules**: Lipinski's rule of five, Veber, Ghose, Egan, Muegge, lead-likeness, the rule of three for fragments, GSK 4/400 and Pfizer 3/75. Each says whether the molecule passes and which limits it breaks, in words (`molecular weight is 534.6, limit 500`).
- **Structural alerts**: PAINS (pan-assay interference compounds), Brenk, NIH, ZINC and ChEMBL filter sets, listed by name.
- **2D images**: textbook-style drawings (PNG or SVG, any size), with stereo wedges, optional R/S labels, atom numbers, transparent or black-and-white backgrounds, and substructure highlighting. A grid image of the whole batch too.
- **3D structures**: coordinates with hydrogens from RDKit's ETKDG v3 method, minimized with the MMFF94 force field (UFF as a fallback), as SDF, PDB or XYZ, with up to 50 conformers per molecule sorted by energy.
- **Search and compare**: substructure search with SMARTS or SMILES (with counts and highlighted matches), Tanimoto similarity to a reference molecule on Morgan fingerprints, filters that keep only matches, and a full similarity matrix as CSV.
- **For machine learning**: Morgan (ECFP-like) fingerprints, MACCS keys and all 217 RDKit descriptors.
- **Clean-up**: optional standardization that strips salts and solvents, neutralizes charges and picks one tautomer, reporting what changed.
- **Files in, files out**: read an SDF, SMILES, CSV or text file from a link (gzipped too) or an Apify dataset, and get a combined SDF with the results as data fields, ready for ChemDraw, PyMOL, KNIME or DataWarrior.

### How to use it

1. Put molecules into **Molecules**, one per line: SMILES, names, InChI or whole Molfiles. Or link a file in **Molecule file link**.
2. Pick what you need: properties, rules and images are on by default; turn on 3D structures, fingerprints, descriptors, a grid image or an SDF file as you like.
3. Click **Start**. Each molecule becomes a row in the **Output** tab, with its drawing.

You can also run it through the [Apify API](https://docs.apify.com/api/v2), on a schedule, or from Make, n8n, Zapier and other integrations.

### How-to examples

Each example below is a complete input, checked with a run of the Actor.

#### How to convert a chemical name to SMILES and InChIKey

```json
{"molecules": ["aspirin", "caffeine", "CC(C)Cc1ccc(cc1)[C@@H](C)C(=O)O"]}
```

Result: aspirin as `CC(=O)Oc1ccccc1C(=O)O` (InChIKey BSYNRYMUTXBXSQ-UHFFFAOYSA-N, C9H8O4, 180.159 g/mol, logP 1.31, TPSA 63.6), caffeine as `Cn1c(=O)c2c(ncn2C)n(C)c1=O`, and the ibuprofen SMILES canonicalized with its stereocenter kept. Each comes with a 2D drawing and 20 more properties.

#### How to check Lipinski's rule of five and drug-likeness

The same request also checks Lipinski, Veber, Ghose, Egan, Muegge and other rules, with QED and structural alerts. All three pass Lipinski here, with QED 0.55 for aspirin, 0.538 for caffeine and 0.822 for ibuprofen. A molecule that fails says which limit it breaks, in words.

#### How to find similar molecules (Tanimoto similarity)

```json
{"molecules": ["ibuprofen", "naproxen", "aspirin", "paracetamol"], "similarTo": "ibuprofen", "image": false}
```

Result: Tanimoto similarity to ibuprofen on Morgan fingerprints: 1.0 for ibuprofen itself, 0.42 for naproxen, 0.20 for aspirin and 0.18 for paracetamol. Add `minSimilarityPercent` to keep only the close ones, or use `fileUrl` to search an SDF library.

#### How to let an AI agent work with molecules

Add this Actor to the [Apify MCP server](https://mcp.apify.com) with `https://mcp.apify.com/?tools=jumblemog/rdkit-chemistry-toolkit`. Language models often get SMILES and molecular weights wrong, so the agent sends names or SMILES and uses the checked identifiers and properties that come back.

### FAQ

**Can it read chemical names?** Yes: over 700 common names, abbreviations and formulas are built in, and systematic IUPAC names (`2-acetyloxybenzoic acid`) are read by OPSIN, all offline.

**Can it make 3D structures?** Yes, with RDKit's ETKDG method and an MMFF94 minimization, as SDF, PDB or XYZ, with up to 50 conformers per molecule.

**Does it work on a whole compound library?** Yes. Read an SDF, SMILES or CSV file from a link or an Apify dataset, and get a combined SDF back.

**Can I get fingerprints for machine learning?** Yes: Morgan (ECFP-like) fingerprints, MACCS keys and all 217 RDKit descriptors.

**Does it work with Zapier, Make or n8n?** Yes. Call the Actor with its Apify app or an HTTP request and pass the results on.

### Input

| Field | What it does |
| --- | --- |
| `molecules` | SMILES, InChI, names or Molfiles, one per entry. A SMILES followed by a space and a name keeps the name. API callers can pass objects like `{"smiles": "CCO", "name": "ethanol"}`. |
| `fileUrl` | A public SDF, MOL, SMILES, CSV/TSV or text file (gzipped too, up to 50 MB). CSV needs a `smiles`, `inchi`, `name` or `molecule` column. |
| `datasetId`, `moleculeField` | An Apify dataset whose items hold molecules, and the field to read (found automatically when it's called smiles, inchi or name). |
| `properties` | The properties listed above (on by default). |
| `druglikeness` | The nine drug-likeness rules (on by default). |
| `alerts` | Structural alert sets: `PAINS` and `BRENK` by default, also `NIH`, `ZINC` and `CHEMBL`. Empty to skip. |
| `standardize` | `none` (default), `salts` (remove salts and solvents, neutralize) or `full` (also the canonical tautomer). |
| `fingerprints`, `fingerprintRadius`, `fingerprintSize` | Morgan fingerprint and MACCS keys as lists of set bits; radius 2 (ECFP4-like) and 2,048 bits by default. |
| `allDescriptors` | All 217 RDKit descriptors. |
| `image`, `imageFormat`, `imageSize` | A drawing of each molecule (on by default), `png` or `svg`, 100 to 2,000 pixels (400 by default). |
| `transparentBackground`, `blackAndWhite`, `showAtomNumbers`, `showStereoLabels` | Drawing styles. |
| `gridImage` | One image with the first 100 molecules and their names. |
| `substructure`, `onlyMatches` | A SMARTS or SMILES pattern to find (and highlight), and whether to keep only the molecules that have it. |
| `similarTo`, `minSimilarityPercent` | A molecule (SMILES or name) to compare with, and the minimum similarity to keep (0 to 100). |
| `similarityMatrix` | Tanimoto similarity between every pair of the first 1,000 molecules, as CSV. |
| `structure3d`, `structureFormat`, `conformers` | 3D structures as `sdf` (default), `pdb` or `xyz`, with 1 to 50 conformers. |
| `sdfFile` | One SDF file with every molecule and its main results as data fields. |

Properties, rules and images for a few molecules:

```json
{"molecules": ["aspirin", "caffeine", "CC(C)Cc1ccc(cc1)[C@@H](C)C(=O)O"]}
```

A similarity search over a file, keeping molecules at least 60% similar to imatinib:

```json
{
  "fileUrl": "https://example.com/library.sdf",
  "similarTo": "imatinib",
  "minSimilarityPercent": 60,
  "properties": false,
  "druglikeness": false,
  "image": false
}
```

3D structures for docking, three conformers each, as one SDF:

```json
{"molecules": ["ibuprofen", "naproxen"], "structure3d": true, "conformers": 3, "image": false}
```

### Output

Each molecule becomes one dataset item:

```json
{
  "index": 1,
  "input": "aspirin",
  "name": "aspirin",
  "inputType": "name",
  "valid": true,
  "error": null,
  "smiles": "CC(=O)Oc1ccccc1C(=O)O",
  "inchi": "InChI=1S/C9H8O4/c1-6(10)13-8-5-3-2-4-7(8)9(11)12/h2-5H,1H3,(H,11,12)",
  "inchiKey": "BSYNRYMUTXBXSQ-UHFFFAOYSA-N",
  "formula": "C9H8O4",
  "molecularWeight": 180.159,
  "exactMass": 180.04226,
  "heavyAtoms": 13,
  "atoms": 21,
  "formalCharge": 0,
  "logP": 1.31,
  "molarRefractivity": 44.71,
  "tpsa": 63.6,
  "hBondDonors": 1,
  "hBondAcceptors": 3,
  "rotatableBonds": 2,
  "rings": 1,
  "aromaticRings": 1,
  "heteroatoms": 4,
  "fractionCsp3": 0.111,
  "stereocenters": 0,
  "unspecifiedStereocenters": 0,
  "qed": 0.55,
  "syntheticAccessibility": 1.58,
  "naturalProductLikeness": 0.12,
  "scaffold": "c1ccccc1",
  "passesLipinski": true,
  "lipinskiViolations": 0,
  "druglikeness": {
    "lipinski": {"passes": true, "violations": []},
    "veber": {"passes": true, "violations": []},
    "muegge": {"passes": false, "violations": ["molecular weight is 180.159, limit 200 to 600"]},
    "...": "ghose, egan, leadLike, ruleOfThree, gsk4400, pfizer375"
  },
  "alertCount": 1,
  "alerts": [{"catalog": "BRENK", "set": "Brenk", "alert": "phenol_ester"}],
  "imageUrl": "https://api.apify.com/v2/key-value-stores/.../records/molecule-00001.png",
  "duplicateOf": null
}
```

| Field | What it holds |
| --- | --- |
| `valid`, `error` | Whether the molecule could be read, and if not, why in plain words: `Not valid SMILES: a ring is opened but never closed`, `Atom 1 (N) has 5 bonds, more than N allows`, `'C6H12O6' looks like a molecular formula...`. |
| `smiles`, `inchi`, `inchiKey`, `formula` | Identifiers of the molecule (after standardization, when it's on). |
| `molecularWeight` ... `scaffold` | The properties. `hBondDonors` and `hBondAcceptors` use RDKit's definitions; the Lipinski rule uses Lipinski's own (NH + OH, N + O). |
| `passesLipinski`, `lipinskiViolations`, `druglikeness` | The rule of five at a glance, and every rule with the limits broken. |
| `alertCount`, `alerts` | Structural alerts that match. |
| `substructureMatch`, `substructureMatches`, `similarity` | Search results, when asked for. |
| `morganFingerprint`, `maccsKeys`, `descriptors` | Machine-learning features, when asked for. |
| `structure3dUrl`, `conformers`, `forceField`, `energy` | The 3D file and its lowest energy in kcal/mol, when asked for. |
| `imageUrl` | A public link to the drawing. |
| `originalSmiles`, `standardization` | With standardization: the molecule before clean-up and what changed. |
| `duplicateOf` | The index of an earlier molecule in the run with the same InChIKey. |
| `fields` | The other columns of a CSV row, the data fields of an SDF record or the rest of a dataset item, so results can be joined back. |

The run's `OUTPUT` record holds up to 1,000 results (most similar first when comparing), plus `gridImageUrl`, `similarityMatrixUrl` and `sdfFileUrl` when those were asked for, so the run-sync API endpoint returns everything in one response. Images and files live in the run's key-value store; download them within your plan's data retention period.

### Pricing

You pay per **molecule in the results**, at the price shown on this page. Molecules that can't be read, names that aren't recognized and molecules left out by the substructure or similarity filters are never charged. Grid images, similarity matrices and SDF files cost nothing extra. If you set a maximum cost per run, the Actor stops when the next molecule wouldn't fit.

### Speed

Measured on Apify with the default 2 GB of memory: a run with a few molecules returns in about 6 seconds through the run-sync API, most of it the run starting up, and 1,000 molecules with properties, rules, alerts and an image each take about 30 seconds of processing. 3D structures take longer, from a fraction of a second for small molecules to a few seconds for big flexible ones with many conformers. Send many molecules in one run when you can.

### Tips and limits

- **Names**: common names, abbreviations (DMSO, THF, EDTA, GABA), simple formulas (H2O, CO2, NaCl) and systematic IUPAC names work. Brand names, mixtures, peptides written as sequences, proteins and polymers don't; use a SMILES for those. Names are never looked up online, because PubChem and similar services don't allow automated lookups in their robots.txt.
- **Plain molecular formulas** like C6H12O6 aren't turned into structures, because one formula fits many molecules.
- **Stereochemistry** is kept as given. Names and SMILES without it give molecules with unspecified stereocenters, counted in `unspecifiedStereocenters`.
- **3D structures** are for molecules up to 200 heavy atoms; each has a time limit, so very flexible molecules with many conformers may need fewer conformers.
- Molecules up to 1,000 heavy atoms are read; batches up to 100,000 molecules per run.
- Each molecule is processed in a separate, unprivileged process with a memory cap and a time limit, so one bad molecule can't stop the rest of the run.
- Computed values are estimates from established methods (Wildman-Crippen logP, Ertl's TPSA and SA score, Bickerton's QED). They are good for ranking and filtering, not a replacement for measured data.

### For AI agents and developers

Language models often get SMILES, molecular weights and formulas subtly wrong. This Actor is the chemistry tool they can call: it works with the [Apify MCP server](https://mcp.apify.com), so agents can use it as a tool. Pass names or SMILES in `molecules` and read the results; `imageUrl` gives a drawing to show the user. For a direct API call that waits for the answer:

```bash
curl -X POST "https://api.apify.com/v2/acts/jumblemog~rdkit-chemistry-toolkit/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"molecules": ["caffeine"]}'
```

Or get every result of a batch, with the grid image and similarity matrix links, in one JSON response with `run-sync`, which returns the run's `OUTPUT`:

```bash
curl -X POST "https://api.apify.com/v2/acts/jumblemog~rdkit-chemistry-toolkit/run-sync?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"molecules": ["aspirin", "ibuprofen", "naproxen", "diclofenac"], "similarTo": "aspirin", "gridImage": true}'
```

### Credits

- Built on [RDKit](https://www.rdkit.org) (BSD-3-Clause), including the SA score (Ertl and Schuffenhauer) and NP-likeness (Ertl et al.) models from its Contrib folder, and [OPSIN](https://github.com/dan2097/opsin) (MIT) by Daniel Lowe, running on OpenJDK.
- Structural alert sets as distributed with RDKit: PAINS (Baell and Holloway, 2010), Brenk et al. (2008), NIH (Jadhav et al.), ZINC and the ChEMBL rule sets.
- This Actor isn't affiliated with the RDKit project, the University of Cambridge, PubChem or ChEMBL.

# Actor input Schema

## `molecules` (type: `array`):

One molecule per entry: a SMILES string (CC(=O)Oc1ccccc1C(=O)O), an InChI (InChI=1S/...), a common name (aspirin, caffeine, vitamin C, H2O), a systematic IUPAC name (2-acetyloxybenzoic acid) or a whole Molfile. A SMILES followed by a space and a name (a .smi line) keeps the name. API callers can also pass objects such as {"smiles": "CCO", "name": "ethanol"}.

## `fileUrl` (type: `string`):

A link to a public SDF, MOL, SMILES (.smi), CSV/TSV or text file, optionally gzipped (up to 50 MB and 100,000 molecules), or a GitHub file. CSV files need a column named smiles, inchi, name or molecule (or set Molecule field). SDF titles and CSV columns are kept with each result. The site's robots.txt is respected.

## `datasetId` (type: `string`):

A dataset in your Apify account, such as another Actor's results, whose items hold molecules (up to 100,000). The tool gets read access to this dataset only.

## `moleculeField` (type: `string`):

The CSV column or dataset field that holds the molecules. Left empty, the first column named smiles, canonical_smiles, molecule, structure, inchi or name is used.

## `properties` (type: `boolean`):

Molecular weight, exact mass, logP (Wildman-Crippen), molar refractivity, TPSA, H-bond donors and acceptors, rotatable bonds, rings, aromatic rings, heteroatoms, Fsp3, stereocenters, formal charge, QED drug-likeness, synthetic accessibility score, natural-product likeness and the Murcko scaffold.

## `druglikeness` (type: `boolean`):

Lipinski's rule of five, Veber, Ghose, Egan, Muegge, lead-likeness, the rule of three for fragments, GSK 4/400 and Pfizer 3/75, each with the limits the molecule breaks.

## `alerts` (type: `array`):

Substructure filter sets to check each molecule against. Matches are listed by name. Leave empty to skip.

## `standardize` (type: `string`):

Clean up molecules before computing anything (RDKit's MolStandardize): keep the largest organic part, normalize groups, neutralize charges and optionally choose one tautomer. The original SMILES and the changes made are listed.

## `fingerprints` (type: `boolean`):

Morgan (ECFP-like) fingerprint and MACCS keys, as lists of the bits that are set. For machine learning and your own similarity searches.

## `allDescriptors` (type: `boolean`):

Every descriptor RDKit computes (BalabanJ, BertzCT, Chi indices, EState, Kappa, PEOE_VSA, SlogP_VSA, fragment counts and more), for QSAR and machine learning.

## `image` (type: `boolean`):

A structure drawing of each molecule, saved in the run's key-value store with a public link (imageUrl).

## `imageFormat` (type: `string`):

PNG for chat, documents and spreadsheets; SVG to scale without losing sharpness.

## `imageSize` (type: `integer`):

Width and height of each image.

## `transparentBackground` (type: `boolean`):

Draw on a transparent background instead of white.

## `blackAndWhite` (type: `boolean`):

Draw every atom in black instead of coloring O, N, S and halogens.

## `showAtomNumbers` (type: `boolean`):

Label each atom with its number (counting from 1, as in Molfiles).

## `showStereoLabels` (type: `boolean`):

Label stereocenters (R/S) and stereo double bonds (E/Z) in the drawings.

## `gridImage` (type: `boolean`):

Also draw the first 100 molecules side by side in one image, labeled with their names (gridImageUrl in the OUTPUT record).

## `substructure` (type: `string`):

A pattern to look for in every molecule, such as C(=O)\[OH] for carboxylic acids or c1ccccc1 for a benzene ring. Each result says whether it matches and how often, and the matching atoms are highlighted in the images.

## `onlyMatches` (type: `boolean`):

Leave molecules without the substructure out of the results. Left-out molecules aren't charged.

## `similarTo` (type: `string`):

A molecule to compare every molecule with. Each result gets its Tanimoto similarity (0 to 1) on Morgan fingerprints, and the OUTPUT record lists the most similar first.

## `minSimilarityPercent` (type: `integer`):

Leave out molecules less similar than this to the Compare with molecule, for example 70 for a similarity of 0.7 or more. Left-out molecules aren't charged.

## `similarityMatrix` (type: `boolean`):

Also compute the Tanimoto similarity between every pair of molecules (the first 1,000), saved as a CSV file (similarityMatrixUrl in the OUTPUT record).

## `fingerprintRadius` (type: `integer`):

2 is ECFP4-like, 3 is ECFP6-like. Used for similarity and the fingerprints output.

## `fingerprintSize` (type: `integer`):

Number of bits in the Morgan fingerprint.

## `structure3d` (type: `boolean`):

Build 3D coordinates with hydrogens (RDKit ETKDG v3, then MMFF94 or UFF energy minimization) and save them as a file per molecule (structure3dUrl), with the energy. For docking, modeling and viewers. Molecules up to 200 heavy atoms.

## `structureFormat` (type: `string`):

The format of the 3D files.

## `conformers` (type: `integer`):

How many distinct 3D conformers to generate. They are minimized and saved in one file, lowest energy first.

## `sdfFile` (type: `boolean`):

Also save all molecules in one SDF file with their main results (weight, logP, TPSA, QED, Lipinski and more) as data fields, ready for ChemDraw, PyMOL, KNIME or DataWarrior (sdfFileUrl in the OUTPUT record).

## Actor input object example

```json
{
  "molecules": [
    "aspirin",
    "caffeine",
    "CC(C)Cc1ccc(cc1)[C@@H](C)C(=O)O"
  ],
  "properties": true,
  "druglikeness": true,
  "alerts": [
    "PAINS",
    "BRENK"
  ],
  "standardize": "none",
  "fingerprints": false,
  "allDescriptors": false,
  "image": true,
  "imageFormat": "png",
  "imageSize": 400,
  "transparentBackground": false,
  "blackAndWhite": false,
  "showAtomNumbers": false,
  "showStereoLabels": false,
  "gridImage": false,
  "onlyMatches": false,
  "minSimilarityPercent": 0,
  "similarityMatrix": false,
  "fingerprintRadius": 2,
  "fingerprintSize": 2048,
  "structure3d": false,
  "structureFormat": "sdf",
  "conformers": 1,
  "sdfFile": false
}
```

# Actor output Schema

## `results` (type: `string`):

One item per molecule: identifiers, properties, rules, alerts, image link, or the error.

## `output` (type: `string`):

The OUTPUT record: {"results": \[...]} with up to 1,000 results (most similar first when comparing), plus links to the grid image, similarity matrix and SDF file. Also returned by the run-sync API endpoint.

## `files` (type: `string`):

The images, 3D structures and other files saved in the run's key-value store.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "molecules": [
        "aspirin",
        "caffeine",
        "CC(C)Cc1ccc(cc1)[C@@H](C)C(=O)O"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("jumblemog/rdkit-chemistry-toolkit").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "molecules": [
        "aspirin",
        "caffeine",
        "CC(C)Cc1ccc(cc1)[C@@H](C)C(=O)O",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("jumblemog/rdkit-chemistry-toolkit").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "molecules": [
    "aspirin",
    "caffeine",
    "CC(C)Cc1ccc(cc1)[C@@H](C)C(=O)O"
  ]
}' |
apify call jumblemog/rdkit-chemistry-toolkit --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jumblemog/rdkit-chemistry-toolkit"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/LqQglDe0HU4bcFzj7/builds/Q6vehOilE55JdsP90/openapi.json
