openbabel

A toolkit guide for Open Babel, software that reads, writes, and converts chemical structure files. It also covers generating 3D molecular shapes, comparing conformations, calculating descriptors and fingerprints, and filtering compound libraries.

In plain words
What is it for?
Use it to convert files such as SMILES, SDF, MOL2, PDB, InChI, and XYZ; generate 3D coordinates; assign protonation states; calculate properties; and batch-process, deduplicate, or filter molecules.
Why use it?
Chemical data often arrives in incompatible file formats, and large libraries need repeated cleanup and filtering. This add-on provides Python and command-line workflows for those tasks.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/kdevos12/alkyl/openbabel
Any agent
npx skills add Kdevos12/ALKYL --skill openbabel
Clone the repo
git clone --depth 1 https://github.com/Kdevos12/ALKYL

Made for: Claude Code, Codex.

Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 937 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00048 $0.00937
Opus 5 $0.00024 $0.00468
Sonnet 5 $0.00010 $0.00187
Haiku 4.5 $0.00005 $0.00094

Measured 2d ago against content hash a75518a7beec, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

openbabel scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/openbabel/SKILL.md · 92 lines

How it starts

The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OpenBabel — Chemical Format Conversion & Manipulation

OpenBabel 3.1.1. Two interfaces: pybel (Python API, high-level) and obabel (CLI, batch processing). Supports 146 formats, MMFF94/UFF/GAFF force fields.

When to Use This Skill

  • Converting between molecular formats: SMILES ↔ SDF ↔ MOL2 ↔ PDB ↔ InChI ↔ CIF ↔ XYZ ↔ 100+ others
  • Generating 3D coordinates from SMILES (quick alternative to RDKit ETKDGv3)
  • Conformer searching with force field scoring
  • Protonation state at given pH
  • Computing molecular descriptors (LogP, TPSA, MR) and fingerprints
  • SMARTS substructure filtering of large libraries
  • Batch library processing (split, deduplicate, filter)
  • Converting formats unsupported by RDKit (CIF, VASP POSCAR, XYZ, etc.)

Quick Start

from openbabel import pybel

# Read SMILES → generate 3D → write SDF
mol = pybel.readstring('smi', 'CC(=O)Oc1ccccc1C(=O)O')   # aspirin
mol.make3D(forcefield='mmff94', steps=500)
mol.write('sdf', 'aspirin.sdf', overwrite=True)

# Read SDF → SMILES
for mol in pybel.readfile('sdf', 'library.sdf'):
    print(mol.write('can').strip())   # canonical SMILES

Router — What to Read

Task Reference
pybel Python API: read, write, 3D, descriptors, fingerprints, SMARTS references/pybel-python.md
obabel CLI: conversion, --gen3d, --conformer, filtering, pH, split references/obabel-cli.md
Format codes, fingerprint types, descriptors, Tanimoto references/formats-fingerprints.md

Two Interfaces

pybel obabel CLI
Use case Scripted workflows, per-molecule logic Batch conversion, library filtering
Import from openbabel import pybel subprocess or shell
Speed Moderate Fast (C++ core)
Flexibility High (per-atom access) Moderate (flags)

Installation

conda install -c conda-forge openbabel   # recommended (includes C++ libs)
pip install openbabel                     # Linux/macOS only

# Verify
python -c "from openbabel import pybel; print(pybel.readstring('smi','C').molwt)"
obabel --version

Read the full file on GitHub · 92 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 92 lines · 48 tokens per session scan A a75518a7beec

Subscribe to this mod's changes

openbabel is a skill published in the GitHub repository Kdevos12/ALKYL (6 stars, last pushed 5mo ago), licensed MIT. It adds 48 tokens to every session and 937 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

design-mcp-server

Design the tool surface, resources, and service layer for a new MCP server. Use when starting a new server, planning a major feature expansion, or when the user describes a domain/API they want to expose via MCP. Produces a design doc at docs/design.md that drives implementation.

cyanheads/pubchem-mcp-server · 62 tokens

add-tool

Scaffold a new MCP tool definition. Use when the user asks to add a tool, create a new tool, or implement a new capability for the server.

cyanheads/pubchem-mcp-server · 35 tokens

api-linter

MCP definition linter rules reference. Use when bun run lint:mcp or bun run devcheck reports a lint error or warning (format-parity, schema-is-object, name-format, server-json-, etc.) and you need to understand the rule, its severity, and how to fix it. Every rule ID the linter emits has an entry in this doc.

cyanheads/pubchem-mcp-server · 86 tokens

api-context

Canonical reference for the unified Context object passed to every tool and resource handler in @cyanheads/mcp-ts-core. Covers the full interface, its RequestContext base, all sub-APIs (ctx.log, ctx.state, ctx.requestInput, ctx.inputs, ctx.enrich, ctx.content), and when to use each.

cyanheads/pubchem-mcp-server · 79 tokens

api-canvas

DataCanvas primitive reference — a Tier 3 SQL/analytical workspace for tabular MCP servers, backed by DuckDB. Use when registering tables from upstream APIs, running ad-hoc SQL across them, and exporting results. Covers the acquire → register → query → export flow, per-table TTL, the token-sharing pattern for…

cyanheads/pubchem-mcp-server · 85 tokens

api-errors

McpError constructor, JsonRpcErrorCode reference, and error handling patterns for @cyanheads/mcp-ts-core. Use when looking up error codes, understanding where errors should be thrown vs. caught, or using ErrorHandler.tryCatch in services.

cyanheads/pubchem-mcp-server · 54 tokens