Skip to content

Format capability matrix

This page is the short map of chematic's format surfaces. A check mark means an API exists; it does not mean that every feature of the external format is supported or preserved. Use checked APIs and format-specific references when coordinates, stereo, charges, properties, or opaque metadata matter.

See language bindings for API names, errors and limits for refusal behavior, and Open Babel file-I/O scope for comparison rules.

Common format conversion bridge

Python convert_format accepts SMILES, MOL/SDF V2000, MOL V3000, MOL2, CML, ChemicalJSON, MolJSON, CDXML, PDB, XYZ, PDBQT, and Gaussian input. The WASM convert_common_format surface intentionally covers the topology-focused subset: SMILES, MOL/V3000, MOL2, CML, ChemicalJSON, MolJSON, and CDXML.

The bridge is for bounded interoperability. It does not promise byte identity or preservation of every format-specific field. PDB, XYZ, and PDBQT output requires 3D coordinates. Multiple-record SDF work should use the SDF document or iterator APIs instead of relying on implicit first-record selection.

Exact-source routes are available for validated same-format MOL2, CJSON, and SDF documents. Cross-format conversion reconstructs the declared graph, coordinate, and metadata subset and reports or refuses unsupported loss.

Core support matrix

R and W mean read and write. Bounded means a documented subset. A dash means the operation is not exposed on that binding.

Format Rust Python WASM / Node Main boundary
SMILES R/W R/W R/W Graph/stereo text; not an identity key
SMARTS match validate/match match Query evaluation, not a general writer
BGF / BIOGRF 200 bounded R/W bounded R/W bounded R/W Editable nonperiodic atom/connectivity records; periodic/extended dialects refuse
Ghemical (gpr) bounded R/W bounded R/W bounded R/W Version 100, one nm coordinate set and optional partial charges; CLI also available
HIN bounded R/source W bounded R/source W inspect/source W No edited-graph writer
MOL/SDF V2000/V3000 R/W R/W R/W Use checked/source routes for stereo and SD fields
MOL2 R/W R/W R/W Typed/charge/metadata preservation is profile-specific
CML R/W R/W R/W Single-molecule checked profiles; unknown XML is not interpreted
ChemicalJSON R/W R/W R/W Strict local ChemicalJSON profile
MolJSON R/W R/W R/W Local atom-record dialect and non-node H counts; differs from upstream oxpig schema
CDXML bounded R/W bounded R/W bounded R/W Rich editing and all ChemDraw semantics are out of scope
PDB R/W R/W R/W Model/record and metadata handling is API-specific
mmCIF R/W R/W R/W Molecular and crystallographic profiles are distinct
Free Form Fractional (fract) bounded R/W bounded R/W bounded R/W Single-cell decimal/uncertainty record; CLI also available
CIF, small molecule R/W R — No Python writer or WASM surface
PQR R/W R/W R/W Numeric atom fields are checked
UniChem XYZ (unixyz) bounded R/W bounded R/W bounded R/W Single-record title, atomic numbers and exact coordinate decimals; CLI also available
XYZ / Extended XYZ R/W R/bounded W R/W Plain XYZ has no bonds; Python typed ExtXYZ R/I/S/L columns; WASM writes R only
Tinker XYZ (txyz) bounded R/W bounded R/W bounded R/W Single typed frame with explicit connectivity and optional cell; no bond-order perception
DL-POLY CONFIG/REVCON bounded R/W bounded R/W bounded R/W Single record; source-unit positions/velocities/forces and cell; imcon 0..3
Molden geometry/vibrations bounded R/W bounded R/W bounded R/W Explicit units and IR/Raman/modes; refuses GTO/MO and trajectories
PDBQT R/W R/W R/W Rigid checked-output profile
QCSchema R/W R/W validate/read No general WASM AtomicInput/Result writer
NWChem input (nw), Cartesian GEOMETRY block bounded R/W bounded R/W bounded R/W Units, center tags and nuclear attributes; full calculation decks refuse
ORCA input R/W R/W R/W Explicit units; checked xyz output retains represented fields and numeric bits
ORCA output R R R No writer
Gaussian input/log R/W or R R/W or R bounded Input and output are separate APIs
Gaussian Cube R/W R/W R/W Volumetric grid profile
OpenDX R/W R/W R/W Strict and explicitly lossy writers
ChemDoodle JSON bounded R/W bounded R/W — Molecular graph subset
DL-POLY HISTORY, Classic text bounded R/W bounded R/W bounded R/W All-frame records in raw source units; modern/binary layouts refuse
LAMMPS data R/W R/W R/W Units and atom styles are explicit
LAMMPS dump/trajectory R/W R/W R/W Streaming/materialization differs by binding
ViewMol (vmol) bounded R/W bounded R/W bounded R/W Raw unit factor, fixed axes, title and explicit Angstrom projection; CLI also available
DMol3, MOPAC, FHI-aims, EXYZ R/W R/W — Cartesian geometry profiles
LPMD 2.0 L bounded R/W bounded R/W bounded R/W All frames, oriented cells, raw columns; explicit Cartesian projection
GROMOS96 bounded R/W bounded R/W bounded R/W All supported blocks/frames and labels; caller-owned units

Checked conversion reports (initial adapter)

convert_with_report-style APIs separate output from observations about dropped or unsupported meaning. Inspect the report before accepting an output. Strict paths refuse when the requested contract cannot be preserved; lossy paths must be selected explicitly.

This contract is narrower than successful parsing. A parser may accept a file while a requested cross-format conversion still refuses because the target cannot carry required coordinates, charges, stereo, properties, or metadata.

Immutable ChemicalJSON records

The local CJSON profile rejects duplicate keys, malformed known arrays, self/duplicate bonds, unsupported order tokens, and conflicting molecule-name declarations. Unknown fields can be retained as opaque source data, but they are not treated as interpreted chemistry.

Same-format checked conversion validates and returns exact source. CJSON → MOL2 requires a corresponding graph and explicit charge/name agreement; ambiguous or incomplete mappings refuse instead of choosing a value.

Related records:

Source-preserving document profiles

  • MOL2: a validated same-format route retains coordinates, atom typing, partial charges, comments, and opaque sections. Edited graph output is a different contract.
  • SDF: the complete-document route retains record order, SD fields, UTF-8 bytes, and line endings after validating every local-profile record.
  • CML: checked source retention preserves the original XML document. The separate graph/coordinate projection validates the interpreted subset and rejects partial or conflicting coordinate declarations. Its namespace-aware reader excludes foreign annotations from the graph and resolves forward IDs. Ordinary CML-to-CJSON conversion now checks graph/XYZ/name and local inferred H counts, refusing unrepresented annotations and 2D data before output.
  • V2000/V3000: coordinate projection keeps source-order finite x/y/z values, but target formats retain only the fields they can represent.

LAMMPS dump/trajectory

Rust, Python, and WASM expose bounded dump/trajectory readers and writers. Coordinate conversion depends on declared box and coordinate style; callers must not treat scaled, wrapped, and Cartesian positions as interchangeable. See language bindings for ownership and return-shape differences.

Formats that never fabricate bonds

Plain XYZ and geometry-only quantum-chemistry profiles do not encode molecular connectivity. Their readers preserve atoms and coordinates without inventing bonds. Call a separate perception step only when that policy is appropriate for the workflow.

For molecular formats that do carry connectivity, malformed or unsupported bonds are errors or typed unsupported outcomes. They are not silently replaced with single bonds.

Format-specific references

Use these pages when the short matrix is not enough:

The generated Python API reference is authoritative for current Python signatures. Rustdoc and TypeScript declarations remain the binding-specific sources of truth for Rust and WASM/Node.