Open-source project
openbabel/openbabel avatar
openbabel/openbabel

Open Babel format conversion, Python bindings, and setup limits

Open Babel is a chemical toolbox designed to speak the many languages of chemical data.

1,391 stars487 forksC++GPL-2.0

At a glance

What is it?
Open Babel is a C++ chemical toolbox for converting, searching, analyzing, and storing chemical data across more than 90 formats. Its Python package and `obabel` console entry point make it useful, but the README gives no installation or first-command tutorial.
Who is it for?
Adopt Open Babel when format coverage, the C++ library, or its Python interface are primary requirements. Avoid it if your workflow needs a documented, reproducible installation path from this README alone, and first verify that `obabel` can be built on your target platform with the required Python, CMake, and SWIG configuration.
Can I use it commercially?
Yes, with conditions. GPL-2.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 39 days ago.
What is it written in?
Mainly C++, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

Open Babel's format boundary

Open Babel addresses a persistent problem in chemistry software: molecular information is distributed across incompatible file formats, and tools often disagree about which formats they can read or write. The project describes itself as a chemical toolbox for users who need to search, convert, analyze, or store data from molecular modeling, chemistry, solid-state materials, biochemistry, and related fields. Its intended audience therefore extends beyond organic chemistry. Inorganic chemistry, nuclear chemistry, bioinformatics, and materials work are all listed as supported areas.

The format boundary is the clearest reason to consider it. The README states that Open Babel can read, write, and convert over 90 chemical file formats. That makes it relevant when a pipeline receives a format that is not the native format of the next tool. It also matters for batch conversion, normalization, and temporary interchange between systems. However, the README does not provide a complete list of those 90 formats, identify which combinations are lossless, or explain how unsupported metadata is handled. The broad count should therefore not be interpreted as a guarantee that every format preserves every field.

This is a conversion and interoperability toolbox rather than a replacement for every specialist chemistry package. Its capability list includes SMARTS and other molecular-file filtering, plus 2D and 3D coordinate generation for SMILES, InChI, and other formats. Those are broad entry points, not a specification of behavior for each molecule class or representation.

C++ core, SWIG bridge, and data layer

The repository identifies C++ as its primary language. Its top-level structure separates `include/`, `src/`, `data/`, `tools/`, tests, documentation, and external dependencies. Based on that layout, the C++ library is the central implementation, while `tools/` contains executable-facing code and `data/` is reserved for project data. This separation fits a toolkit intended both as a programmer's library and as ready-to-use programs.

The Python configuration adds a more specific integration path. `pyproject.toml` uses `scikit_build_core.build`, sets `PYTHON_BINDINGS = "ON"`, sets `RUN_SWIG = "ON"`, and declares `swig` as a build requirement. The repository also includes the project scripts `openbabel-python.i` and `stereo.i` in the source distribution. Those files and settings connect the C++ library to generated Python bindings. The Python project description calls the package "Python interface to the Open Babel chemistry library," so Python is a binding layer for the existing library rather than a separate clean-room implementation.

The expected general data flow is conversion or analysis between a chemical representation accepted by the C++ layer and a caller using either the tools or bindings. The exact internal format handlers, parser classes, and error paths are not described in the README. It would be unsafe to assume that a command-line conversion and the Python call follow identical validation or warning behavior. Code integrating the library should inspect the target format's handler rather than infer support solely from the package-level claim of more than 90 formats.

Where the documented installation stops

The README directs readers to the Open Babel website for more information, but it does not give package-manager commands, platform prerequisites, build flags, or installation instructions. The repository does contain `INSTALL`, `CMakeLists.txt`, and `pyproject.toml`, so installation resources exist outside the README excerpt. Their contents are not shown in the README excerpt, and this article does not invent replacements for them.

A source installation should not be inferred to be equivalent to a Python wheel installation. The Python metadata requires Python 3.10 or newer and a CMake version of at least 3.12. Its build system also requires `scikit-build-core>=0.11`, `setuptools-scm`, `swig`, and `cmeel-eigen`. The CMake configuration enables InChI support, Python bindings, SWIG, and pip-oriented build behavior. Tests are disabled in that configuration through `ENABLE_TESTS = "OFF"`.

This distinction matters for adoption. A team may be able to use the C++ library while deciding not to compile the Python bindings, or may install an existing package distribution without reproducing the repository's complete build configuration. The available project metadata establishes requirements, but it does not document which platforms have prebuilt binaries or how a particular system package should be installed.

The `obabel` first-use tutorial the README omits

The first usable entry point declared by the Python package is the console script named `obabel`. Its package target is `openbabel.executable:obabel`. This tells an integrator the command name and the Python entry point, but it does not document the command's arguments, input behavior, or expected output.

For an initial setup review, begin with the information actually defined in `pyproject.toml`. Confirm that the environment meets the declared Python requirement, then follow either the repository's `INSTALL` file for a source build or the package documentation linked from the project metadata. After obtaining a distribution, verify that the package manager exposes the declared console command. The command should then be queried using the syntax documented by the installed Open Babel documentation.

No example conversion is included here because the README supplies neither an input sample nor a confirmed command-line syntax. Choosing flags such as input, output, or geometry options would create a tutorial that cannot be traced to the available documentation. That absence is a real setup limitation. New users need the website or installed command documentation before completing a first file conversion.

Licensing and upgrade boundaries

Open Babel is distributed under the GNU General Public License version 2. The `pyproject.toml` package metadata uses `GPL-2.0-only`, which is more specific than the README's general GPL statement. The repository includes a `COPYING` file and says that it should accompany distributions. Code that incorporates or links the library needs to account for GPL-2.0-only obligations, including the applicable source-license, notice, and redistribution terms. This is a licensing boundary to review, not legal advice.

The repository is not archived. Its last push was on 2026-09-14, which is the available maintenance signal alongside release history. Recent releases include Open Babel 3.2.1 on 2026-07-11 and Open Babel 3.2.0 on 2026-05-26. Open Babel 3.1.1 is also listed, dated 2020-05-08. The release naming has changed from an openbabel-2 series to openbabel-3, so upgrade notes and migration material may matter when moving from an older deployment.

The README does not document a compatibility policy, format-handler deprecation schedule, or rolling upgrade procedure. Upgrading a chemistry pipeline should therefore be treated as a software and data-compatibility review, not merely a version-number change. Conversion results should be checked against representative files before an existing batch process changes versions.

Open Babel versus a format-specific library

The practical alternative is a format-specific native library combined with conversion code for the other required formats. This approach differs in design from Open Babel's shared toolbox. A single-format library can expose one domain model without maintaining handlers for more than 90 formats. Open Babel instead places many chemical representations behind a common toolbox and offers command-line programs plus Python bindings around it.

That choice can cut both ways. Open Babel is the more plausible option when a system must accept several heterogeneous inputs and users need to move between them without selecting a separate dependency for every format. Its SMARTS filtering and 2D or 3D coordinate-generation entries also make it broader than a parser alone. A format-specific library is the cleaner candidate when one format is fixed, its native library already matches the surrounding application, and avoiding a general conversion layer matters more than broad interchange.

The repository does not provide format-by-format fidelity comparisons or benchmark data. Consequently, this is a difference in approach, not a claim that one route preserves every molecular field better. The deciding evidence should be a pilot conversion using the actual input formats, metadata, stereochemistry expectations, and downstream consumer.

Editorial conclusion

Adopt Open Babel when format coverage, the C++ library, or its Python interface are primary requirements. Avoid it if your workflow needs a documented, reproducible installation path from this README alone, and first verify that `obabel` can be built on your target platform with the required Python, CMake, and SWIG configuration.

Frequently asked questions

What file formats does Open Babel support?

The README states that Open Babel can read, write, and convert more than 90 chemical file formats. It does not include the complete format list or explain format-specific lossiness.

What Python version does Open Babel require?

The Python package metadata sets `requires-python` to `>=3.10`. The build also declares Python 3.10 as its minimum version.

What license applies to Open Babel?

The README identifies GPL version 2, while `pyproject.toml` uses the SPDX-style license expression `GPL-2.0-only`. The repository includes `COPYING` with the full license text.

Does Open Babel provide Python bindings and a command-line entry point?

The package metadata enables Python bindings and SWIG and declares the `obabel` console script. The project description identifies the Python package as the interface to the Open Babel chemistry library.

Official sources

  1. License: GPL-2.0
  2. openbabel/openbabel on GitHub
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/openbabel-openbabel.svg)](https://hysenlabs.com/projects/openbabel-openbabel)

Was this useful?