openBabel_skill

Convert molecular files between formats and generate 3D conformations using OpenBabel.

539|171|Updated May 3, 2018
One-click install
npx skills add https://github.com/cas-bigdatalab/piflow --skill openbabel-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openBabel_skill
Source: https://github.com/cas-bigdatalab/piflow/tree/main/workspace/skills/openBabel_skill
Command: npx skills add https://github.com/cas-bigdatalab/piflow --skill openbabel-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pybel, and includes scripts (resource) components.

What problem does it solve?

Researchers in chemistry and chemical engineering often need to convert molecular structure files between formats like .smi, .mol, .xyz, .gjf, and .sdf, or generate 3D coordinates from SMILES strings and 2D structures. Doing this manually with OpenBabel commands is repetitive and error-prone.

Core Features & Use Cases

  • Format Conversion: Convert molecular files between .smi, .mol, .xyz, .gjf, .sdf, and other OpenBabel-supported formats.
  • 3D Conformation Generation: Generate 3D structures with coordinates from SMILES or 2D structures using the --gen3d option.
  • Structured Outputs: Produces a primary output file, logs, a summary.md report, and a compressed zip of all outputs.
  • Use Case: A computational chemist has an acetic.smi file and needs a Gaussian input file. The skill converts it to .gjf format, optionally generating 3D coordinates, and packages all outputs with a task summary.

Quick Start

Convert the molecule file acetic.smi to xyz format with 3D conformation generation and save all outputs to the specified working directory.

Frequently Asked Questions about openBabel_skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert a SMILES file to xyz format with OpenBabel?

Run the skill script with inputPath pointing to your .smi file and outType set to xyz. The script invokes the obabel command to perform the conversion and writes the result to the primaryOutputPath you specify.

How to generate 3D molecular coordinates from a SMILES string?

Set the isGen3d parameter to true when running the conversion. The script adds the --gen3d -best flags to OpenBabel, which generates 3D coordinates, or falls back to pybel's make3D with the mmff94 forcefield.

What molecular file formats does OpenBabel conversion support?

The skill supports input formats including .smi, .mol, .xyz, .gjf, and .sdf, and outputs to .xyz, .mol, .gjf, .sdf, and other formats OpenBabel supports. The output file extension must match the specified outType.

Why does OpenBabel conversion fail with command not found?

The failure occurs when OpenBabel is not installed on the system. The script tries both obabel and openbabel.obabel commands, then falls back to the pybel Python module, so at least one of these must be available.

Does the output file extension need to match the outType parameter?

Yes, the script validates that the primaryOutputPath extension matches the outType value and exits with an error if they differ. For example, outType xyz requires a primaryOutputPath ending in .xyz.