How to run Python scripts with RDKit

Choose Insert › Run a Python script, write or open a script, and press Run (Ctrl+Enter). It reads the page through athanor.doc and rdkit, prints below, and places its changes as one undo step.

On a Mac, Ctrl is Cmd.

Steps

  1. Choose Main menu › Insert › Run a Python script. The editor opens with an example that counts the rings in every structure on the page.

    The Python script window with the ring-counting example, Run, and the output area.The Python script window with the ring-counting example, Run, and the output area.

  2. Edit the script, or Open a script… you saved before.

  3. Press Run or Ctrl+Enter. print() writes below the editor.

  4. Give it a name and press Save to keep it.

What a script can do

  • from athanor import doc reads the page as it is when you run it; doc.molecules() lists its structures, each with .smiles, .name and .formula.
  • from rdkit import Chem gives a subset of RDKit.
  • Changes are placed when the script ends, as one undo step. New structures pass the safety screen before they are placed.

Note

Scripts run on this device with no network, in Python loaded from the app itself, never a CDN. Scripts are saved on this device only.

Is this helpful?

Last updated Nov 12, 2026