TEXT FORMAT

Molfile

MDL Molfile / SDF

The MDL Molfile is a plain-text chemical structure format that encodes a single molecule as a connection table (Ctab): an explicit list of atoms and the bonds between them. It was created by MDL Information Systems in the 1980s as part of the broader CTfile (chemical table file) family, and the specification is now maintained by BIOVIA, a subsidiary of Dassault Systemes, after the lineage passed through Symyx Technologies and Accelrys. Despite its age it remains one of the most universally supported formats in cheminformatics, readable and writable by essentially every structure toolkit and database.

A Molfile begins with a three-line header block (a molecule name, a program/timestamp/dimension line, and a free-text comment), followed by a counts line and then the Ctab proper. In the classic V2000 dialect the file uses rigid fixed-width columns: the counts line packs the atom count, bond count and other flags into three-character fields; each atom line carries x/y/z coordinates (in angstroms, 2D or 3D), an element symbol, and fields for charge, mass difference and stereo parity; each bond line names two 1-based atom indices plus a bond type (single, double, triple, aromatic) and bond stereo flag. An optional properties block of "M " lines (charges, isotopes, radicals) precedes the terminating "M END" line. Because atom and bond counts occupy only three digits, V2000 is capped at 999 atoms and 999 bonds; the newer V3000 dialect replaces the fixed-width layout with tagged, free-format lines, lifting that limit and adding richer stereochemistry and enhanced R-group/Markush support.

As a graph format the Molfile is a labeled undirected graph where atoms are typed nodes carrying geometric coordinates and bonds are typed edges, which makes it a natural interchange target for molecular graph tooling. It is the record unit of the widely used SDF structure-data file, where multiple Molfiles are concatenated and each is augmented with tagged data fields and separated by a "$$$$" delimiter. Related CTfile members reuse the same embedded Ctab for reactions (RXNfile) and generic/Markush structures (RGfile). Conversion to and from line notations such as SMILES, InChI and InChIKey, and to peers like MOL2, CML, PDB or XYZ, is handled by toolkits including Open Babel and RDKit.

Its strengths are ubiquity, human readability, explicit 2D/3D coordinates, and a lossless connection table with defined stereochemistry. Its limitations are equally well known: the V2000 999-atom ceiling, brittle column-aligned parsing, ambiguous handling of aromaticity and charged or radical species, and an SDF data-field line-length convention (nominally 200 characters) that real-world SMILES and InChI values routinely violate.

Alternative Names: Chemical table file, CTfile, SDF, Structure-Data File

File Extensions: .mol.sdf vV3000
FeatureMDL Molfile / SDF
Multiple Graphs per Document supported
Nodes supported
Undirected Edges supported
Directed Edges not supported
Hyperedges not supported
Mixed-directionality Edges not supported
Parallel Edges not supported
Self-loops not supported
Edges on Edges not supported
Nested Graphs in Nodes not supported
Nested Graphs in Edges not supported
Nested Graphs in Graphs not supported
Node Labels not supported
Edge Labels not supported
Attributes on Nodes supported
Attributes on Edges supported
Attributes on Graphs supported
Typed Edges supported

Tools(Read & Write)

Read-only Tools

Write-only Tools

Frequently Asked Questions

What is a MDL Molfile / SDF file?

A MDL Molfile / SDF file stores a graph — its nodes, edges and attributes — in the MDL Molfile / SDF format (also: Chemical table file, CTfile, SDF, Structure-Data File). See the feature table above for what it supports.

How do I open a MDL Molfile / SDF file?

Open it in a graph tool that supports MDL Molfile / SDF, or convert it to a format your tool reads. With GraphInOut you can convert MDL Molfile / SDF to GraphML, DOT, Connected JSON and more, right in your browser.

How do I convert a MDL Molfile / SDF file to another format?

Use the Convert from MDL Molfile / SDF link above: upload or paste your MDL Molfile / SDF file (input preset to MDL Molfile / SDF), choose a target format and download the result — free, no install.