MolDraw › Chemistry tools › PDB to SDF Converter

PDB to SDF Converter (ligand extractor)

In short: Paste a PDB file or open one. Pick the ligand (HETATM group), and get an SDF file with its 3D coordinates, bonds and bond orders. It is free, runs in your web browser and needs no download.

Works for a small-molecule PDB and for a protein–ligand complex. Bonds come from CONECT records or from atom distances. Bond orders come from duplicated CONECT entries, or are estimated from the geometry.

Quick answer: Press Load example. It reads a cut-down PDB 1A28 (progesterone receptor) file, picks the ligand STR A 1 (progesterone) and writes SDF with 23 atoms and 26 bonds. The bond orders are estimated, so the SMILES shown matches progesterone, C21H30O2.

Ready.

SDF output

How to convert PDB to SDF

  1. Paste the PDB text or press Open .pdb file.
  2. Choose the ligand in Which atoms to convert. For a file that holds one small molecule, use Whole file.
  3. Keep Estimate bond orders ticked if the file has no bond orders (most PDB entries).
  4. Press Convert to SDF. Check the atom count, the bond source and the SMILES under the button.
  5. Press Download .sdf or Copy.

PDB and SDF: what changes

PDB (Protein Data Bank format) stores one atom per line with fixed columns: atom name, residue, chain and x, y, z in ångström. Ligands, ions and water are HETATM records. SDF (structure-data file) stores a MOL block per molecule: atoms, bonds with bond orders and charges, then optional data fields. Docking, cheminformatics and drawing programs read SDF.

How bonds are found

A PDB file stores atoms, not bonds. The converter uses CONECT records when the file has them. Atoms with no CONECT entry are bonded by distance: two atoms are bonded when they are closer than the sum of their covalent radii plus 0.45 Å. Hydrogen keeps one bond, carbon at most four.

How bond orders are found

Some programs (Open Babel, RDKit, PyMOL) write a double bond as two CONECT entries. When the file has such duplicates, they give the bond orders directly. Files from the Protein Data Bank do not have them. Then, with the estimate box ticked, the tool works out bond orders from the geometry: it decides whether each atom is sp, sp2 or sp3 from bond angles and bond lengths, finds flat 5- and 6-membered rings, gives aromatic rings alternating double bonds, and sets C=O, C=C, C=N and similar double bonds where the bond is short. This works well for well-resolved ligands, but it is an estimate. Always check the result.

What the SDF holds

One record: the MOL block (V2000, or V3000 above 999 atoms) with the PDB coordinates, formal charges from PDB columns 79–80, and data fields for the source group, the bond source, the bond-order method and the SMILES.

Limitations

Need to fix a bond? Open the SDF in MolDraw, a free online chemical structure editor, to check and edit bonds and charges.

Open MolDraw editor

Frequently asked questions

How do I extract a ligand from a PDB file as SDF?

Paste the PDB text or open the .pdb file. The largest HETATM group that is not water is picked for you; choose another group in the list if you need it. Press Convert to SDF, then Download .sdf. The coordinates are copied exactly from the PDB file.

Why are the bond orders estimated?

PDB files from the Protein Data Bank list atoms and, at most, which atoms are bonded. They do not store double or aromatic bonds. If the file repeats a CONECT entry for double bonds, those are used. Otherwise the tool estimates bond orders from bond lengths and angles, and tells you so. Check them before you use the file.

Does the SDF include hydrogens?

Only the hydrogens that are in the PDB file. X-ray structures usually have none. The tool does not add hydrogens or choose protonation states; do that in your modelling or docking program.

What if my PDB file has no CONECT records?

Then bonds are found from distances: two atoms are bonded when they are closer than the sum of their covalent radii plus 0.45 Å. This is the usual rule in chemistry programs. Very poor or clashing coordinates can give wrong bonds.

Is my file uploaded anywhere?

No. The PDB file is read and converted in your browser. Nothing is sent to a server.

Last updated: