# From a drawn molecule to a docking result

> Draw or look up a ligand in SketchIQ, check its charge and stereocentres, send it to AutoDock Vina with one click, pick a receptor and box, then open the best pose back in the drawer to make the next analog. Worked through with imatinib and c-Abl kinase.

To dock a molecule you drew, draw it or look it up in [SketchIQ](/app/molecule-drawer), the free chemical structure drawer by ProteinIQ, check that its charge and stereocentres are the ones you mean, and click `Dock to a protein`. [AutoDock Vina](/app/autodock-vina) opens with the molecule loaded as a SMILES file. Add a receptor by PDB ID, let the form draw the box around the binding site, and submit. Poses come back ranked in kcal/mol, and `Edit in SketchIQ` opens one back in the drawer for the next analog.

The drawing is the easy part. What decides whether the docking means anything is the chemistry you hand over, because Vina docks exactly the molecule it receives: the charges you drew, the stereocentres you defined or left open, and the ring shapes the 3D builder chose. We worked through the whole loop with imatinib and the c-Abl kinase structure it was crystallized in, using a public example job for the result so you can open the same run.

## What happens to a drawn molecule on its way to Vina

A docking program needs a 3D ligand with hydrogens, partial charges and a list of rotatable bonds, which for Vina means a PDBQT file. On the command line you build that yourself: embed a 3D conformer, add hydrogens, then run Meeko's `mk_prepare_ligand.py`. The path from SketchIQ does the same steps for you, in this order.

| Step | Where it runs | What it decides |
| --- | --- | --- |
| Drawing and checks | SketchIQ, in your browser | Atoms, bonds, formal charges, defined stereocentres |
| Hand-over | SketchIQ | Sends the largest fragment, without counterions, as a SMILES file |
| Hydrogens and 3D | RDKit, on the Vina server | Adds hydrogens to match the drawn charges, builds one conformer with ETKDG and relaxes it with MMFF |
| Docking preparation | Meeko 0.7.1 | Partial charges, atom types and rotatable bonds, written as PDBQT |
| Docking | AutoDock Vina 1.2.7 | Poses and scores inside the box |

Nothing in that chain second-guesses your chemistry. No step enumerates protonation states, tautomers or stereoisomers, so the first row is where a docking run is won or lost.

## Step 1: draw or load the ligand

Start from a known drug whenever you can. Docking it first gives you a reference score for the target, and analogs are quicker to make by editing a correct structure than by drawing from scratch.

1. Open [SketchIQ](/app/molecule-drawer).
2. Type a name, CAS number, PubChem CID or [SMILES string](/guides/smiles-notation) into the search box, for example `imatinib`, and press `Enter`.
3. Edit the structure on the canvas if you are making an analog. The panel on the right recalculates as you draw.
4. Read the panel: formula, molecular weight, `Rotatable bonds`, `Stereocentres` and the [Lipinski rule of 5](/guides/lipinski-rule-of-five) result.

![SketchIQ with imatinib on the canvas and the details panel showing formula C29H31N7O, molecular weight 493.61 g/mol, 7 rotatable bonds, 37 heavy atoms and 0 stereocentres](/images/guides/drawing-to-docking/sketchiq-imatinib.webp '**Figure 1. Imatinib loaded in SketchIQ.** The panel reports 37 heavy atoms, 7 rotatable bonds and no stereocentres before anything leaves the browser.')

Imatinib comes back with 37 heavy atoms and 7 rotatable bonds. Both numbers matter later. The heavy-atom count sets the price of the run, and Vina's hosted tool accepts up to 32 rotatable bonds per ligand, which leaves a lot of room before a flexible analog is refused. If you need to draw from a blank canvas, [drawing chemical structures online](/guides/draw-chemical-structures-online) covers the bond, ring and atom tools.

## Step 2: check the charge before you dock

Many drug-like molecules carry an amine or a carboxylic acid, and at pH 7.4 those are usually charged. A neutral drawing of a basic drug docks the minority form, and the missing proton changes which hydrogen bonds Vina can score.

Imatinib shows why it is worth a look. Its published pKa values are 8.07, 3.73, 2.56 and 1.52, so only one site is basic enough to matter at physiological pH. The share of molecules protonated at that site follows from the Henderson-Hasselbalch equation:

$$
f_{\text{protonated}} = \frac{1}{1 + 10^{\,\text{pH} - \text{p}K_a}} = \frac{1}{1 + 10^{\,7.4 - 8.07}} \approx 0.82
$$

About four molecules in five carry one positive charge, which sits on the N-methylpiperazine, the only aliphatic amine group in the molecule. The PubChem structure SketchIQ loads is the neutral form, and that is what `Dock to a protein` would send.

SketchIQ can tell you this without a lookup. Under `pKa, predicted`, click `Predict pKa` and MolGpKa, a graph neural network that runs in the browser, lists every acidic and basic site with an estimate and the net charge at the pH you set. For imatinib it marks the two piperazine nitrogens as the most basic sites, at 7.6 and 7.5.

It also gives a net charge of +2 at pH 7.4, which is too high, because the panel scores each site on its own and a piperazine with one protonated nitrogen holds a second proton far less readily. Use the prediction to find the sites, then decide the charge with chemistry or a measured value. [Predicting pKa online](/guides/predict-pka-online) goes through reading the panel.

To dock the monocation, add the charge before you send the molecule. Pick `Charge Plus` in the left toolbar and click the methylated piperazine nitrogen, or paste a protonated SMILES into the search box:
```text
Cc1ccc(NC(=O)c2ccc(CN3CC[NH+](C)CC3)cc2)cc1Nc1nccc(-c2cccnc2)n1
```
The formula row changes to C₂₉H₃₂N₇O⁺ and the [InChIKey](/guides/inchi-inchikey-smiles-cas) ends in `-O` instead of `-N`, which confirms the extra proton. When you cannot decide between two forms, dock both and compare them in the same run, as described [under iterating](#step-6-edit-the-pose-and-dock-the-next-analog).

## Step 3: check the stereocentres

The `Stereocentres` row counts stereocentres and says how many are undefined. Imatinib has none. Load a SMILES such as `CC(N)C(=O)Nc1ccccc1`, an alanine anilide drawn without a wedge, and the row reads `1 (1 undefined)`.

An undefined centre is not docked as both isomers. RDKit builds one 3D conformer, which fixes the centre in one configuration, and Vina never inverts a stereocentre during the search: it rotates bonds and moves the whole molecule, nothing more. You get one enantiomer without being told which.

Draw the wedge or hash bond for the isomer you mean, and dock the other as a separate ligand when the configuration is unknown. [Drawing stereochemistry with wedges and dashes](/guides/stereochemistry-wedges-dashes) covers how to set R and S on the canvas.

Rings are the other thing the 3D step fixes. Vina keeps ring conformations as built, so a cyclohexane stays the chair RDKit made, while Meeko can open macrocycles so that their shape is searched too. For a ligand whose ring pucker matters, submit a reviewed 3D SDF from a conformer tool instead of a SMILES string.

## Step 4: send the molecule to AutoDock Vina

1. In the SketchIQ panel, click `Open in` beside the molecule's name.
2. Choose `Dock`. AutoDock Vina opens with the molecule as the ligand, named after the compound, here `Imatinib.smi`.
3. Under `Receptor`, click the menu beside `Upload file`, choose `Fetch from RCSB`, type the PDB ID (`1IEP`) and click `Add file`.
4. Leave `Task` on `Single ligand` and `Scoring function` on `Vina (default)`.

![AutoDock Vina form opened from SketchIQ with Imatinib.smi in the ligand field, an empty receptor upload field, Single ligand selected and Vina default scoring](/images/guides/drawing-to-docking/vina-form-from-sketchiq.webp '**Figure 2. AutoDock Vina opened from SketchIQ.** The drawn molecule arrives as a SMILES file; the receptor is still to be added.')

`Open in` is disabled while the structure check reports a problem, such as a bad valence, so a broken drawing never reaches the docking form. With several fragments on the canvas, such as a drug and its counterion, the largest one goes. Select a fragment first to send that one instead.

If the receptor you need has no experimental structure, predict one first and upload the PDB file. A predicted model of an apo protein often has a pocket that is too closed for the ligand, so prefer a structure solved with a ligand in the same site.

## Step 5: choose the box and read the result

Vina only searches inside a box, so the box decides where the ligand can go. Open `Binding pocket`. With `Pocket definition` on `Automatic`, the form looks for a co-crystallized ligand in the receptor and builds the box around it. For 1IEP it reports `Resolved for this receptor: bound ligand`, picks imatinib itself (`STI A:201`) and draws a box of 18.66 × 26.74 × 23.53 Å over the structure.

That ligand is removed before docking, so redocking the drawn imatinib into its own pocket checks that the setup can find a known pose.

The form also warns that 1IEP holds 172 waters and several chloride ions, and that automatic preparation keeps waters unless you remove them. Waters in the site can block a pose, so decide which belong in the model. The Vina FAQ advises keeping the search space under about 30 × 30 × 30 Å, or raising `Exhaustiveness` for a larger region. When the site is unknown, [fpocket](/app/fpocket) proposes candidate pockets.

With those defaults, `Exhaustiveness` 8 and 9 poses, the form quoted **22 credits** for imatinib with an estimated run time under a minute. We did not submit a new job. The result below is the public example run [c-Abl kinase with imatinib](/app/autodock-vina?jobId=hpk93sw2k6c1fz1wdgokvw2h), which uses the same receptor (PDB `1IEP`, 2.1 Å) and imatinib from PubChem CID 5291, with the box set by `Manual coordinates` to the same 18.66 × 26.74 × 23.53 Å size, centred at (15.19, 53.902, 16.917) Å, and `Random seed` 42.

![AutoDock Vina result for imatinib in c-Abl kinase, with the receptor as a ribbon, the top pose in the pocket and a pose table listing affinities from -12.512 to -9.775 kcal/mol](/images/guides/drawing-to-docking/vina-example-result.webp '**Figure 3. The public c-Abl and imatinib example.** Vina returned five poses; the best scores −12.512 kcal/mol.')

| Pose | Affinity (kcal/mol) | RMSD lower bound from pose 1 (Å) |
| --- | --- | --- |
| 1 | −12.512 | 0.000 |
| 2 | −11.290 | 1.405 |
| 3 | −10.489 | 2.879 |
| 4 | −10.287 | 1.790 |
| 5 | −9.775 | 2.279 |

Vina asked for nine poses and kept five, because the others were more than 3 kcal/mol worse than the best or within 1 Å of a better pose. The affinity is a ranking score, not a measured binding free energy, and Trott and Olson's fit to experimental data leaves an error of a few kcal/mol. The [Vina score](/guides/vina-score) explains how it is built and why it grows more negative with ligand size.

The useful number here is the reference. −12.512 kcal/mol is what imatinib scores in the pocket of its own crystal structure with this exact setup. An analog docked into the same receptor and box, with the same scoring function and seed, can be compared against it; a score from a different box or receptor cannot.

Before trusting the top pose, check it against the crystal ligand in the structure viewer, since imatinib's pose in 1IEP is known. Ticking `Check poses with PoseBusters` on the form runs [PoseBusters](/app/posebusters) on the results for 5 more credits, and `Analyze interactions with ProLIF` lists the contacts with [ProLIF](/app/prolif).

## Step 6: edit the pose and dock the next analog

1. In the result, open the `Files` tab.
2. Find the pose you want, such as `pose_mode01.sdf`, and click the row menu (`⋯`).
3. Click `Edit in SketchIQ`. The pose opens on the canvas as a flat 2D structure, with its explicit hydrogens folded back into their atoms.
4. Change the molecule, check its charge and stereocentres again, and click `Dock to a protein`.
5. Add the same receptor and keep the same box, scoring function and `Random seed` as the reference run.

`Edit in SketchIQ` appears on SDF, MOL, SMILES, InChI, CML, CDXML and KET files, in job results and in your Library. Vina writes a bonded `pose_modeNN.sdf` next to each `pose_modeNN.pdbqt` when Meeko can restore the ligand's chemistry. The public c-Abl example was run before the tool wrote SDF poses and lists PDBQT files only, so the menu item appears on your own runs rather than on that one. If the drawer already held a drawing, one `Undo` brings it back.

For more than one candidate, put the reference and the analogs in one job. Switch `Task` to `Batch screen` and add each ligand; a batch docks up to 10 ligands independently against the same receptor and box, so their scores share one scale. Docking the protonated and neutral forms of the same compound side by side is the cheapest way to see how much the charge moves the pose.

## Common mistakes

| Problem | What you see | Fix |
| --- | --- | --- |
| Basic amine drawn neutral | A pose that misses a salt bridge or hydrogen bond the crystal ligand makes | Add the formal charge in SketchIQ, or dock both forms in one batch |
| Undefined stereocentre | `Stereocentres` reads `1 (1 undefined)`; the docked isomer is arbitrary | Draw the wedge for the isomer you mean, and dock the other separately |
| Salt drawn with its counterion | Only the largest fragment arrives, which can be the wrong one for a small drug with a large counterion | Select the drug fragment before clicking `Dock to a protein` |
| Box fell back to the whole protein | The top pose sits on the surface away from the site | Check `Resolved for this receptor` and the box preview; use `Select residues` or `Manual coordinates` |
| Comparing scores across setups | An analog looks better only because its box or receptor differed | Keep receptor, box, scoring function and seed identical, or dock everything in one batch |

## What to do with the result

A docking pose is a hypothesis, and other tools can test it. [GNINA](/app/gnina) docks the same site with a CNN scoring function, which gives a second opinion on the ranking. [Boltz-2](/app/boltz-2) co-folds the protein with the ligand and predicts the complex without a box, and SketchIQ sends to it with `Co-fold with a protein`.

For the molecule itself, `Predict ADMET` sends it to [ADMET-AI](/app/admet-ai). The [molecular docking](/use-cases/molecular-docking) overview compares the docking tools ProteinIQ runs, and [structure-based virtual screening](/use-cases/structure-based-virtual-screening) covers docking hundreds of compounds rather than a handful of analogs.

## FAQ

### Can I dock a molecule I drew without installing anything?

Yes. SketchIQ runs in the browser without an account, and `Dock to a protein` opens AutoDock Vina with the structure loaded. Submitting the docking run needs a ProteinIQ account and costs credits; a single imatinib-sized ligand with default settings was quoted at 22.

### Do I need to add hydrogens or make a PDBQT file first?

No. The SMILES file gets hydrogens and a 3D conformer from RDKit, and Meeko writes the PDBQT on the server. What you do need to set is the protonation state, because hydrogens are added to match the charges you drew.

### What file does SketchIQ send to AutoDock Vina?

A one-line SMILES file of the parent molecule, without counterions, named after the compound when PubChem knows it (`Imatinib.smi`), after its PubChem CID when the name is long, and after its formula otherwise. To keep your own 3D coordinates or partial charges, export an SDF from another tool and upload it instead; [chemical file formats](/guides/chemical-file-formats) compares what each format keeps.

### Why does a docked pose open flat in SketchIQ?

The drawer edits 2D structures, so it lays out 3D coordinates flat and folds explicit hydrogens into their atoms. The connectivity and charges carry over, so check the `Stereocentres` row before docking the edited molecule; the 3D pose stays in the result files.

### Is a more negative Vina score a better binder?

Only within one setup. A more negative score ranks better against the same receptor, box and scoring function, but the score is not a dissociation constant, and larger molecules score more negatively without binding more tightly.
