Open Babel
v1.0.0Run Open Babel online with molecular format conversion, coordinate generation, and hydrogen options.
Open Babel online on ProteinIQ is the obabel file converter running in your browser. Paste or upload a molecule, choose the input and output formats, and download the converted file with a log of what Open Babel did. Aspirin entered as CC(=O)Oc1ccccc1C(=O)O comes back as a 21-atom SDF with 3D coordinates and explicit hydrogens when Generate coordinates is set to Generate 3D, or as a PDBQT file with AutoDock atom types and a torsion tree when the output is pdbqt.
The converter runs Open Babel 3.1.0, compiled to WebAssembly from the cheminfo-to-web browser port, on your own device. The Open Babel project has since released 3.2.0 and 3.2.1, so a file that behaves differently with a recent desktop obabel may be hitting a newer reader or writer. Besides format conversion, the tool can generate 2D or 3D coordinates, add or remove hydrogens, protonate for a pH, assign Gasteiger charges and run a short force-field minimization.
Open Babel conversions are free and use no credits. Signed-out visitors can convert 5 molecule records per run, the Free plan 100 records, and paid plans have no record cap. Uploaded files are limited to 10 MiB, and a conversion that runs longer than 120 seconds stops with a timeout message.
| Input | Accepted | Notes |
|---|---|---|
Molecule or structure | Pasted text or one uploaded file with any extension in the format table | One or many records, such as several SMILES lines, a multi-record SDF or a multi-model PDB |
With Input format at Auto-detect from file or content, the reader is chosen from the uploaded file's extension first. Pasted text is matched against content signatures in this order: InChI=, CIF data_ or loop_, MOL2 @<TRIPOS>MOLECULE, MOL or SDF (M END or a V2000/V3000 counts line), PDB record names such as ATOM, HETATM or HEADER, PDBQT ROOT/BRANCH/TORSDOF, an XYZ atom count on the first line, and FASTA > headers. Anything else is read as SMILES, so NCCN ethylenediamine converts as a named SMILES. Selecting a format turns detection off.
Pasted PDBQT text matches the PDB signature first and then fails to read as PDB, so select pdbqt as the input format when pasting a docking file. An uploaded .pdbqt file is recognized by its extension.
Some problems are caught before conversion. A MOL or SDF record must have three header lines (title, program and comment) with the counts line on line 4, so an extra line on top, such as a # Name: comment from a download page, is reported with its line number and Convert stays disabled until it is removed.
A FASTA header with no sequence line beneath it is reported the same way, and XML input (CML, MRV, CDXML, PubChem XML) is refused because this browser build has no XML support; provide those molecules as SDF, MOL2 or SMILES instead. A selected input format that disagrees with the file extension or content produces a warning but still runs.
Keep blank MOL and SDF title lines when pasting, because they are part of the file layout. Records are converted in input order, with the chosen operations applied to each molecule separately.
The Input format and Output format menus list the same 187 format codes, several of them aliases (sdf and sd, pdb and ent, mol2 and ml2). Whether a code can be read, written or both is decided by the Open Babel build itself; the table below records what the browser build reports for each one.
| Group | Read and write | Read only | Write only |
|---|---|---|---|
| Line notations and identifiers | can, smi, smiles, inchi, mcdl, rsmi | smy | inchikey, k |
| MDL, ChemDraw and JSON connection tables | mol, mdl, sd, sdf, rxn, ct†, cdjson, pcjson | cdx | None |
| Biomolecular, docking and simulation | pdb, ent, pdbqt, pqr, cif, mcif, mmcif, mol2, ml2, sy2, gro, box†, fasta†, fa†, fsa† | prep | gr96† |
| Coordinates and crystallography | xyz, exyz, unixyz†, txyz†, fract, contcar, poscar, vasp, fhiaims†, cub, cube, dx† | acr, pos, ins, res, xsf, axsf | cssr |
| Molecular dynamics and materials codes | config†, lpmd, contff, mdff, posff | history, siesta | lmpdat† |
| Quantum chemistry inputs | gzmat, gamin†, inp†, gukin, jin†, mop, mopcrt, mpc, mopin, dalmol†, tmol†, pqs†, caccrt†, dmol†, outmol† | None | com†, gau†, gjc†, gjf†, orcainp†, nw†, qcin†, mp†, mpqcin†, acesin†, adf†, zin†, cacint†, fh† |
| Quantum chemistry outputs | gukout | log, out, dat, output, g03, g09, g16, g92, g94, g98, gal, fch, fchk, fck, gam, gamess, gamout, orca, nwo, qcout, jout, moo, mopout, mpqc, mpo, adfout, adfband, adfdftb, t41, abinit, acesout, castep, c09out, dallog, aoforce, pwscf, got | None |
| Modeling program files | hin, mmd, mmod, bgf†, c3d1, c3d2, crk2d, crk3d, bs†, gpr†, mold†, molden†, molf†, pcm, vmol†, yob, alc†, feat† | car, arc, msi, ccc | csr, xed†, cac, cache, cht, msms†, pov†, pointcloud† |
| Thermochemistry and kinetics | ck, tdd, therm | None | None |
| Fingerprints, reports and text | fs, text, txt | None | fpt, mpd, mna, molreport, report, copy, nul, fix |
Formats marked † write one molecule per file, so a multi-record input stops with an error instead of dropping the later molecules. Fourteen codes in the menus are not compiled into this build and fail in both directions: png, svg, ascii and paint depictions, mae and maegz, xtc, stl, wln, rinchi, cmlr, fps, cof and confabreport. XML formats such as CML and MRV are not in the menus at all.
The build's own flags are not the whole story. In tests of the pinned build for this page, a valid XYZ file failed to read, PubChem JSON input aborted inside the parser, and a CIF holding two data blocks converted only the first. Use SDF, MOL2 or SMILES for those molecules when you can.
| Parameter | Type | Default | Description |
|---|---|---|---|
Input format | enum | Auto-detect from file or content | Searchable list of the format codes above. Selecting one overrides extension and content detection. |
Output format | enum | mol | Searchable list of the format codes above. The downloaded file takes this code as its extension. |
| Parameter | Type | Default | Description |
|---|---|---|---|
Generate coordinates | enum | No change | No change, Generate 2D or Generate 3D. |
Hydrogens | enum | No change | Add hydrogens, Add polar hydrogens, Add non-polar hydrogens, Delete hydrogens, Delete non-polar hydrogens or No change. |
pH correction | string | empty | A number such as 7.4; .5, +7.4 and exponent forms are accepted. Empty turns pH correction off. |
Partial charges | enum | No change | No change or Assign Gasteiger charges. |
Force field minimization | enum | No minimization | MMFF94, MMFF94s, UFF, GAFF or Ghemical. Needs coordinates in the input or from Generate 3D. |
Minimization steps | integer | 250 | Steepest-descent steps, 1 to 5,000. Shown only when a force field is selected. |
Each molecule goes through the options in a fixed order: coordinates are generated first, then the pH correction is applied, then hydrogens are changed, then charges are assigned, and minimization runs last. The log lists the matching obabel arguments (--gen3d, -p 7.4, -h, --addpolarh, --partialcharge gasteiger, --minimize --ff MMFF94 --steps 250 and so on), which makes a run easy to repeat on the command line.
Generate 3D builds a conformer with explicit hydrogens even when Hydrogens is No change; aspirin went from 13 atoms to 21. The coordinates differ slightly each time you convert, so keep the file you used rather than expecting a rerun to reproduce it. Generate 2D writes a flat layout for drawing programs and is not a starting geometry for docking.
The pH model rewrites protonation group by group. At pH 7.4 it turns acetic acid into acetate and ethylamine into ethylammonium:
CC(=O)[O-] acetic_acid
CC[NH3+] ethylamineEvery ionizable group is treated on its own, so a molecule with several acidic or basic sites can come out more charged than it really is at that pH. Hydrogens are put back for the corrected state when Hydrogens is No change. For ranges of protonation states rather than one, use ligand protonation with Dimorphite-DL.
Minimization refuses to run on a molecule without coordinates, with the message Force-field minimization requires coordinates. Generate 3D coordinates before minimization. Steepest descent with a few hundred steps relaxes clashes and bond lengths; it does not search for the lowest-energy conformer.
| Output | Contents |
|---|---|
Preview | The converted file as text, ready to copy |
Files | The converted file and the conversion log |
| Converted file | Named after the uploaded file, or converted, with the output format code as the extension, for example ligands.pdbqt |
| Conversion log | -conversion-log.txt with the resolved input and output formats, every setting, the equivalent obabel arguments, Open Babel's own warnings and the molecule count |
Read the Open Babel log when an output looks wrong. It is where warnings such as No 2D or 3D coordinates exist appear, along with the number of molecules converted, which should match the number you submitted.
A successful conversion means Open Babel could read the input and write the output format. Whatever the output format cannot store is dropped, and whatever the input did not contain has to be guessed.
SMILES has no coordinates. Without Generate coordinates, a SMILES to MOL or SDF conversion writes a valid connection table with every atom at the origin, and Open Babel warns about it in the log. Ethanol converted with the defaults:
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.0000 0.0000 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0Set Generate 3D for any file that will be docked, minimized or viewed in 3D. Stereocenters written in the SMILES survive: C[C@H](N)C(=O)O came back from a 3D PDB as the same L-alanine. A center left unspecified in the SMILES is assigned one configuration during 3D generation, which may not be the one you wanted.
PDB has no bond-order field. Open Babel writes CONECT records and repeats a partner atom for a double bond, so the ester and acid carbonyls in aspirin appear as duplicated entries:
CONECT 2 1 3 3 4
CONECT 11 10 12 12 13Programs that read only connectivity ignore the duplicates. Formal charges go in columns 79 and 80 (N1+ for tetramethylammonium) and are read back by Open Babel. The molecule title moves to the COMPND record, and SD data fields such as a <MW> value are dropped.
Reading a ligand PDB, Open Babel uses CONECT records where they exist and otherwise perceives bonds and bond orders from interatomic distances. A clean 3D aspirin model with its hydrogens and CONECT lines removed still came back as CC(=O)Oc1ccccc1C(=O)O. Distorted crystal ligands, missing atoms and alternate locations make that perception unreliable, so check the SMILES of the result against the expected compound. Converting a whole protein PDB treats it as one large molecule; extract the ligand first.
The MOL2 writer assigns SYBYL atom types and fills the charge column with Gasteiger charges even when Partial charges is No change. Aspirin's acid oxygen came out at -0.4770. Replace them if your next program needs AM1-BCC or force-field charges.
PDBQT stores AutoDock atom types, partial charges and a torsion tree, and keeps only polar hydrogens. With Partial charges at No change, every charge is written as +0.000, which AutoDock Vina ignores but AutoDock 4 does not. Select Assign Gasteiger charges, together with Add polar hydrogens if the input lacks them, to get charged PDBQT. Coordinates must be 3D: start from a 3D SDF or set Generate 3D.
Going back from PDBQT loses information. Without non-polar hydrogens or bond orders, aspirin read from its own PDBQT became C1(=C([C]=[C][C]=[C]1)C(=O)O)OC(=O)[C], with radical carbons where hydrogens used to be. Use PDBQT to SDF for docked poses written by Meeko, which carry the remarks needed to rebuild the chemistry.
inchi and inchikey output are standard identifiers for registration and lookup. Aspirin gives InChI=1S/C9H8O4/c1-6(10)13-8-5-3-2-4-7(8)9(11)12/h2-5H,1H3,(H,11,12) and BSYNRYMUTXBXSQ-UHFFFAOYSA-N. An InChIKey is a hash and cannot be converted back to a structure, so inchikey is write-only.
Errors appear in a Processing failed notice in the output panel, with the reason from Open Babel or from the input checks. Correct the input and press Convert again.
| Message | Cause and fix |
|---|---|
Input record 2: Open Babel could not parse the input as smi. | The numbered record is unreadable in the selected or detected format, here an unclosed ring in C1CC. Fix or remove that record. |
... could not parse the input as sdf. followed by a line explanation | The MOL or SDF header layout is off, for example one extra line above the counts line. Remove the line the message names. |
Output format gjf supports only one molecule. Choose SDF or SMILES for multiple molecules. | The output format holds a single molecule. Convert one record at a time or pick a multi-record format. |
Open Babel does not support input format inchikey. | The format is write-only or missing from this build. Choose a readable format from the table. |
Open Babel produced an empty output string. | The output format is read-only or missing from this build, such as svg, png or gamout. Choose a writable format. |
Force-field minimization requires coordinates. Generate 3D coordinates before minimization. | The input has no coordinates. Set Generate 3D or start from a 3D file. |
When Open Babel reports a read error, the conversion stops at that record. If record 2 of 3 is broken, you get the error naming record 2 instead of a file with two molecules. Compare the molecule count in the log with your input all the same, because the multi-block CIF case above ends without an error.
The focused converters on ProteinIQ handle one conversion with settings chosen for it, and several use RDKit or Meeko rather than Open Babel. Use them when you know the destination, and keep Open Babel for less common formats or when you want explicit control of each step.
| Conversion | Tool | What it does differently |
|---|---|---|
| SMILES to 3D SDF | SMILES to SDF | RDKit 3D conformers, one file per entry plus a combined batch file |
| SMILES to PDB | SMILES to PDB | RDKit 3D coordinates written as PDB |
| SMILES to MOL2 | SMILES to MOL2 | RDKit 3D structure written as Tripos MOL2 |
| SDF to PDB | SDF to PDB | Open Babel in the browser, each SDF record converted separately, optional hydrogens and 3D |
| PDB to SDF | PDB to SDF | RDKit bond perception for ligand and peptide PDB files |
| PDB to MOL2 | PDB to MOL2 | Open Babel in the browser for structures up to 20,000 atoms |
| SDF or MOL2 to SMILES | SDF to SMILES, MOL2 to SMILES | RDKit canonical SMILES for compound tables |
| SDF to PDBQT | SDF to PDBQT | Meeko atom types, charges and torsion tree, one or more PDBQT files per molecule |
| SMILES to PDBQT | SMILES to PDBQT | RDKit ETKDGv3 conformer, then Meeko preparation |
| PDB to PQR | PDB2PQR | Force-field charges and radii for proteins before electrostatics |
For docking, the converted ligand is only one input. Pose quality also depends on receptor preparation, protonation and the search, which AutoDock Vina and GNINA handle once the files are ready.
The Open Babel project distributes its programs for installation and does not run an official conversion server; openbabel.org links to the user guide and API reference, not to a web service. The two official ways to run it are the obabel command-line program and the Open Babel GUI, which its documentation describes as a graphical front end with the same capabilities as obabel, available on Windows, Linux and macOS (started with obgui on Linux and macOS).
The obabel equivalent of a ProteinIQ run is printed in the conversion log. A SMILES file converted to a 3D, hydrogen-complete SDF corresponds to:
obabel -ismi ligands.smi -osdf -O ligands.sdf --gen3d -hThe command line is the better choice for large libraries, scripted pipelines, a newer Open Babel release, XML formats such as CML, and image output with png or svg where the installed build includes them. The browser converter needs no installation and works on any device, which suits a handful of molecules or a quick check of what a file contains.
Convert SDF or MOL structures to PDB with connectivity records, headers, and chain assignments.
Convert ligand and peptide PDB coordinates to SDF with RDKit bond perception.
Convert PDB structures up to 20,000 atoms with Open Babel and clear chemistry caveats.
Convert PDB coordinates to mmCIF with model selection and warnings for omitted records.
Generate 3D PDB files from SMILES strings for visualization and small-molecule workflows.
Convert SDF ligands to PDBQT with Meeko, preserving supplied coordinates.
Generate 3D SDF files from SMILES strings with batch conversion and downloadable combined outputs.
Extract canonical SMILES strings from SDF ligand files, one record at a time or in batch.
Extract canonical SMILES strings from MOL2 ligand files for cheminformatics workflows.
Generate SMILES strings from InChI identifiers for search, filtering, and modeling workflows.