PDB to MOL2 Converter
v2.0.0Convert PDB structures up to 20,000 atoms with Open Babel and clear chemistry caveats.
To convert PDB to MOL2, a program has to read the atom coordinates, perceive the bonds and bond orders, assign SYBYL atom types, and add partial charges, because MOL2 stores all four and PDB usually stores only the first. You can do it online with this converter, with one obabel command, or by saving the structure from ChimeraX. Remove waters and any chains or ligands the next program doesn't need before converting.
The converter runs Open Babel 3.1.0 in your browser and keeps the existing coordinates and hydrogens.
.pdb or .ent file, or fetch a structure by PDB ID..mol2 file from Files.A failed charge assignment stops the conversion rather than returning a file without charges.
This command passes Open Babel the same arguments the online tool uses, including Gasteiger charges, but skips the tool's checks for alternate locations, insertion codes, and extra models:
obabel input.pdb -O output.mol2 --partialcharge gasteigerAdd -h to add hydrogens, or -p 7.4 to add them for a given pH. Leave out --gen3d when the PDB already has coordinates, which is nearly always: it discards them and builds a new conformer, so a ligand loses the pose it had in the binding site.
Run open input.pdb, add hydrogens with addh and charges with addcharge if the receiving program needs them, then save output.mol2. By default addcharge gives standard residues AMBER charges and other residues AM1-BCC charges, so the charge column differs from Open Babel's Gasteiger values.
The bundled methanol example supplies two heavy atoms and explicit connectivity:
HETATM 1 C1 UNL A 1 0.000 0.000 0.000 1.00 20.00 C
HETATM 2 O1 UNL A 1 1.400 0.000 0.000 1.00 20.00 O
CONECT 1 2
CONECT 2 1
ENDOpen Babel returns:
@<TRIPOS>MOLECULE
*****
2 1 0 0 0
SMALL
GASTEIGER
@<TRIPOS>ATOM
1 C1 0.0000 0.0000 0.0000 C.3 1 UNL1 0.2175
2 O1 1.4000 0.0000 0.0000 O.3 1 UNL1 -0.2175
@<TRIPOS>BOND
1 1 2 1This is a chemistry inference, not a lossless rewrite. PDB records coordinates and may include connectivity, but it usually does not contain the complete bond-order, protonation, atom-typing, or partial-charge information expected by MOL2 consumers. Inspect the result before using it for docking, force-field assignment, or simulation.
The second bundled example contains a six-carbon benzene ring without CONECT records. Open Babel returns six atoms typed C.ar and six aromatic bonds marked ar. No explicit hydrogen atoms are added in either example.
| Input | Accepted value |
|---|---|
| Format | .pdb or .ent with ATOM or HETATM coordinate records |
| Source | Pasted content, uploaded file, or RCSB PDB ID |
| Input size | Up to 5 MB for pasted text or an uploaded file |
| Atom count | Up to 20,000 coordinate records |
| Models | The first model is converted, with global CONECT records retained; additional models produce a warning |
PDB uses fixed-column atom records. Blank lines, a leading UTF-8 byte-order mark, and Windows or older Mac line endings are cleaned without moving atom fields. Tabs, non-ASCII characters inside atom records, invalid coordinates, missing atom names, and non-integer residue numbers are rejected with a line number.
Atom serials must be unique positive integers. The converter checks the five-column covalent fields in each CONECT record, rejecting partly numeric fields, missing atoms, and self-bonds. Extracting a ligand or renumbering atoms requires updating its connectivity too.
Unresolved alternate conformers, repeated records for the same atom, and PDB insertion codes are rejected because combining alternate coordinates or collapsing insertion-coded residues would make the MOL2 ambiguous. Select one coordinate record per atom and renumber insertion-coded residues before conversion. A single already-selected conformer is accepted. Ligand atoms that share a name within one residue, such as the element-only names Open Babel writes, are separate atoms and convert normally.
An ensemble must have matched MODEL and ENDMDL records for the first model, with coordinates inside its model block. Records after the document's END are rejected if they contain coordinates or connectivity. Submit one PDB document per conversion.
Missing element columns are accepted with an element-inference warning; unrecognized element symbols are rejected. MOL2 residue labels omit PDB chain IDs. If two chains share a residue name and number, the converter warns that those labels coincide. Keep the original PDB when chain identity matters.
The 20,000-atom ceiling bounds browser memory and bond-perception time. For a larger assembly, reduce the structure to the chains, ligand, or binding site that the next calculation needs, or run Open Babel locally.
There are no settings. Coordinates and explicit hydrogens stay unchanged; bond perception and Gasteiger charges use one fixed Open Babel conversion path. Chain removal, water removal, protonation changes, and structure preparation should be completed explicitly before conversion.
| File | Contents |
|---|---|
name.mol2 | Native MOL2 text returned by Open Babel, including atoms, perceived bonds, SYBYL atom types, and Gasteiger charges |
name-run-log.txt | Open Babel arguments and messages, atom/bond summary, text cleanup, model selection, and input-specific warnings; runtime self-tests are labeled separately from the PDB conversion |
Preview opens first with an atom/bond summary and the MOL2 text. Files contains both downloads; uploaded .pdb and .ent files supply the output basename. The chemistry warning remains visible above the output. A result with missing atoms or inconsistent atom/bond counts is rejected rather than offered as a partial download.
PDB was designed around macromolecular coordinates. Its CONECT records can identify bonded atom pairs, particularly for heterogens, but many files omit them and conventional PDB connectivity does not reliably encode aromaticity or complete bond order. MOL2 expects an explicit molecular graph, SYBYL atom types, and per-atom charges.
Open Babel fills that gap using its PDB reader, residue templates, distance-based connectivity, and bond-order perception. It cannot recover chemistry that is ambiguous from the source file. A chemically curated SDF or existing MOL2 remains the better source for a ligand when one is available.
Large proteins deserve extra care. A whole-protein MOL2 is not automatically parameterized for AMBER, CHARMM, OPLS, or another force field, and Gasteiger charges are not a substitute for force-field-specific preparation. Convert only when the receiving program explicitly needs MOL2, and use its recommended preparation workflow afterward.
| Goal | Tool |
|---|---|
| Convert a bounded PDB structure to MOL2 with chemistry inference | PDB to MOL2 |
| Convert among other chemistry formats or choose hydrogen, pH, and minimization options | Open Babel |
| Preserve macromolecular structure metadata in mmCIF | PDB to CIF |
| Convert a small-molecule PDB to SDF | PDB to SDF |
| Extract protein sequences rather than molecular chemistry | PDB to FASTA |
Run obabel input.pdb -O output.mol2 --partialcharge gasteiger. Add -h if the PDB lacks hydrogens, and leave out --gen3d, which replaces the coordinates already in the file with a newly built conformer.
Not in this converter, and not in Open Babel unless you pass -h or -p. Most crystal structures have no hydrogens, so the MOL2 has none either. When the next program expects a protonated structure, add them before conversion with PDBFixer, which protonates a protein at a chosen pH, or in ChimeraX with addh.
It can convert a structure containing up to 20,000 atoms, but the resulting MOL2 is a format conversion, not a force-field-ready protein. Large assemblies should usually be reduced to the component required by the next program.
Yes. ProteinIQ includes global connectivity with the first model before Open Babel reads it. Repeated bonded serials reach the native reader unchanged. When connectivity or bond order is absent, Open Babel uses residue information and molecular geometry to infer the missing graph.
No. Open Babel can recognize common chemistry, including aromatic rings, but a PDB file may not contain enough information to resolve unusual ligands, metals, covalent modifications, or protonation-dependent groups. Verify those cases against a curated chemical record.
The conversion requests Open Babel Gasteiger partial charges, and the MOL2 charge type is reported as GASTEIGER. These are general-purpose inferred charges, not charges prepared for a particular docking engine or molecular-mechanics force field.
Some elements and atom types, including metals, are unsupported by this charge model. The converter stops without substituting a different model or returning uncharged output. Use a preparation method suited to the chemistry, or Open Babel with Partial charges set to None when only a coordinate conversion is needed. Inspect the per-atom charges rather than relying on the MOL2 header alone, even when charge assignment succeeds.
A MOL2 file should describe one coordinate state. Select one PDB alternate conformer before conversion so atoms from different states are not combined into the same molecular graph.
The Open Babel MOL2 output does not preserve insertion codes unambiguously in residue labels. Renumber those residues first so distinct PDB residues cannot collapse to the same MOL2 identity.
Convert ligand and peptide PDB coordinates to SDF with RDKit bond perception.
Convert SDF or MOL structures to PDB with connectivity records, headers, and chain assignments.
Convert PDB coordinates to mmCIF with model selection and warnings for omitted records.
Run Open Babel online with molecular format conversion, coordinate generation, and hydrogen options.
Generate MOL2 files from SMILES strings for docking, scoring, and modeling workflows.
Extract canonical SMILES strings from MOL2 ligand files for cheminformatics workflows.
Generate 3D PDB files from SMILES strings for visualization and small-molecule workflows.
Extract observed or full SEQRES sequences from PDB structures with chain selection and RCSB fetching.