DEV Community

devin2xing
devin2xing

Posted on

SMILES to PDBQT for AutoDock Vina — Worked Examples

SMILES to PDBQT for AutoDock Vina — Worked Examples

AutoDock Vina and AutoDock 4 do not read SMILES. They expect a PDBQT file: 3D coordinates, AutoDock atom types, partial charges, and a tree of rotatable bonds. Turning a SMILES string into that file looks like a format conversion. The examples below show what one public API actually returned, and which parts of ligand preparation that file still does not finish for you.

The numbers and file excerpts are as returned by https://api.seqandchem.com on 1 December 2026 between 11:30:55 and 11:31:00, Asia/Shanghai (UTC+8). The JSON bodies and response headers did not include an Open Babel or application version, so the library version for these responses is unknown. This check did not dock the ligands or assign charges by another method.

PDBQT is a writable format, but 3D is not automatic

GET /api/v1/formats listed pdbqt as "AutoDock PDBQT format", with both read and write set to true (191 formats in that response).

The public API documentation says that requesting a 3D format (sdf, mol2, xyz, pdb) adds --gen3d automatically if you do not pass it. pdbqt is not in that list. A call that omits the option does not invent a conformer.

POST /api/v1/convert with ethanol CCO, from=smi, to=pdbqt, and no opts returned HTTP 200 and log: "1 molecule converted". The PDBQT had three atom records, all at the origin, no hydrogen records, all charges +0.000, and TORSDOF 0:

ROOT
ATOM      1  C   UNL     1       0.000   0.000   0.000  0.00  0.00    +0.000 C
ATOM      2  C   UNL     1       0.000   0.000   0.000  0.00  0.00    +0.000 C
ATOM      3  O   UNL     1       0.000   0.000   0.000  0.00  0.00    +0.000 OA
ENDROOT
TORSDOF 0
Enter fullscreen mode Exit fullscreen mode

A successful conversion is not the same thing as a docking-ready ligand. Atoms stacked at (0, 0, 0) are not a 3D conformer.

Ethanol with --gen3d

The same SMILES with "opts": ["--gen3d"] returned four atom records and a 3D layout. The carbon–carbon bond was in the ROOT; the hydroxyl was a BRANCH. AutoDock types were C, C, OA and a polar hydrogen HD. Every charge column was still +0.000. TORSDOF was 1:

ROOT
ATOM      1  C   UNL     1       1.034  -0.095   0.027  0.00  0.00    +0.000 C
ATOM      2  C   UNL     1       2.548  -0.092   0.021  0.00  0.00    +0.000 C
ENDROOT
BRANCH   2   3
ATOM      3  O   UNL     1       3.030   1.051  -0.671  0.00  0.00    +0.000 OA
ATOM      4  H   UNL     1       2.690   1.007  -1.581  0.00  0.00    +0.000 HD
ENDBRANCH   2   3
TORSDOF 1
Enter fullscreen mode Exit fullscreen mode

The REMARK header listed 2 active torsions (C1–C2 and C2–O3). That count is not the same as TORSDOF 1, and only one BRANCH is in the tree. If you are checking a file before docking, read the atom coordinates, the BRANCH tree and the TORSDOF line, not only the remark.

Aspirin, in the protonation state written in the SMILES

Aspirin as CC(=O)Oc1ccccc1C(=O)O is the neutral carboxylic acid. The same convert call with --gen3d returned:

Field Value in this response
Atom records 14 (13 heavy atoms and one HD on the acid)
AutoDock types present A, C, OA, HD
TORSDOF 4
BRANCH sections 4
REMARK active torsions 5
Charge column +0.000 on every atom
Coordinates 3D (14 distinct positions)

The output kept the carboxylic acid hydrogen. It did not switch the molecule to a carboxylate. If you intend to dock the form that predominates at a given pH, that decision belongs in the SMILES (or in a preparation tool that enumerates protonation states). This endpoint does not infer a physiological form.

Ibuprofen from a SMILES that does not mark the chiral centre

The SMILES CC(C)Cc1ccc(cc1)C(C)C(=O)O does not specify the stereochemistry at the alpha carbon. The convert call with --gen3d still returned a 3D PDBQT: 16 atom records (15 heavy atoms and one HD), TORSDOF 5, five BRANCH sections, and all charges +0.000.

Do not treat that 3D geometry as a specified enantiomer. The generator still has to place that centre in some configuration. If you need a particular stereoisomer, mark it in the input (@ / @@, or a stereo-aware file) and check the output.

A counter-ion is not stripped automatically

Sodium acetate, CC(=O)[O-].[Na+], also returned HTTP 200 and log: "1 molecule converted". The PDBQT contained two successive ROOT / TORSDOF blocks: a four-atom acetate fragment and a separate atom record of type Na. Both TORSDOF lines were 0. All five charge columns were +0.000.

If the intended ligand is acetate alone, the sodium is still in this file. A salt SMILES is not automatically reduced to the organic component.

A failed parse is an error, not an empty ligand

POST /api/v1/convert with data=NotAMolecule, to=pdbqt and --gen3d returned HTTP 422, ok: false, and error: "Conversion failed". The detail field included Open Babel Error in ParseSimple and SMILES string contains a character 't' which is invalid, then 0 molecules converted.

That message is specific to this input string. It is not a generic template for every bad SMILES. The useful part is the status: a string that is not a molecule comes back as an error, not as a PDBQT with zero atoms.

What these files still leave for you to check

Every successful PDBQT in this set had a charge column of +0.000 on every atom. A file with AutoDock types and a torsion tree but all-zero charges is not equivalent to a ligand prepared with Gasteiger or another charge model. SeqChem's SMILES to PDBQT guide describes that limitation and points to preparation tools such as Meeko or AutoDockTools for production docking.

The other limits visible in these responses are equally practical:

Check What these calls showed
3D coordinates Not added for pdbqt unless --gen3d was requested
Charges The q column was all zero
Protonation The structure was the one written in the SMILES
Stereochemistry An unmarked chiral centre still received some 3D configuration
Salts The counter-ion was still present
Torsions TORSDOF, the BRANCH tree and the REMARK count were not always the same number
Receptor These calls converted a ligand SMILES only

One force-field-optimised conformer is also only a starting geometry, not an ensemble. This check did not record which force field was used.

Try the same calls

Ethanol without 3D generation:

curl -s https://api.seqandchem.com/api/v1/convert \
  -H 'Content-Type: application/json' \
  -d '{"from":"smi","to":"pdbqt","data":"CCO"}'
Enter fullscreen mode Exit fullscreen mode

The same molecule with --gen3d:

curl -s https://api.seqandchem.com/api/v1/convert \
  -H 'Content-Type: application/json' \
  -d '{"from":"smi","to":"pdbqt","data":"CCO","opts":["--gen3d"]}'
Enter fullscreen mode Exit fullscreen mode

The broader preparation workflow — protonation, torsion inspection, charges, receptor preparation and validation — is in SeqChem's guide to SMILES to PDBQT for AutoDock Vina. The SMILES to PDBQT converter is the corresponding tool. API details are in the SeqChem API documentation.

Top comments (0)