OBABEL(1)

🌸 obabel(1) β€” User's Reference Manual, but make it group chat ✨

πŸŽ€ NAME πŸŽ€

obabel β€” a converter for chemistry and molecular modeling data files. Like, it takes your molecular data and gives it a whole new file-format outfit, bestie. πŸ’…


✨ SYNOPSIS ✨

Okay so here's the exact vibe:

obabel -Hhelp-options
obabel [OPTIONS] [-iinput-type | -:SMILES-string] infile [-ooutput-type]
       -Ooutfile

πŸ¦‹ DESCRIPTION πŸ¦‹

obabel is a cross-platform program designed to interconvert between many file formats used in molecular modeling and computational chemistry and related areas. No cap, it's the format-swapping main character. πŸ”₯

Open Babel is also a complete programmers toolkit for developing chemistry software. For more information, see the Open Babel web pages at https://openbabel.org/. 🫢


πŸ’– OPTIONS πŸ’–

If only input and output files are given, Open Babel will guess the file type from the filename extension. Lowkey detective work, honestly. πŸ”

  • -:SMILES-string β€” enter a SMILES string and use it in place of an input file. The SMILES-string might need to be enclosed in quotation marks to avoid shell interpretation. More than one can be used, and a molecule title can be included if enclosed in quotes. πŸ’¬
  • -aoptions β€” format-specific input options. See -Hformat-ID for options allowed by a particular format. πŸŽ€
  • --addtotitle β€” append text to the current molecule title. 🏷️
  • --addformula β€” append the molecular formula after the current molecule title. πŸ§ͺ
  • -b β€” convert dative bonds: e.g., [N+]([O-])=O to N(=O)=O. Chemistry glow-up, fr fr. βš—οΈ
  • -c β€” center atomic coordinates at (0,0,0). Put it in the middle, periodt. 🎯
  • -C β€” combine molecules in first file with others having the same name. Reunion episode energy. πŸ‘―
  • -e β€” continue after errors. We keep it moving, bestie. πŸšΆβ€β™€οΈ
  • -d β€” delete Hydrogens. Bye-bye, lil H's. πŸ‘‹
  • ---errorlevel n β€” filter the level of errors and warnings displayed:
    • 1 = critical errors only
    • 2 = include warnings too (default)
    • 3 = include informational messages too
    • 4 = include β€œaudit log” messages of changes to data
    • 5 = include debugging messages too
  • -f # β€” for multiple entry input, start import with molecule # as the first entry. Start at the part you actually care about. ⏩
  • -F β€” output the available fingerprint types. Fingerprints but make it chemistry. πŸ”Ž
  • -h β€” add hydrogens. Hydrating your molecule, iconic. πŸ’§
  • -H β€” output usage information. The classic "how do I work this thing" button. πŸ†˜
  • -Hformat-ID β€” output formatting information and options for format specified. Peep the format's whole lore. πŸ“–
  • -Hall β€” output formatting information and options for all formats. The full encyclopedia, no skips. πŸ“š
  • -iformat-ID β€” specifies input format, see below for the available formats. Tell it what you're feeding it. 🍽️
  • -j, --join β€” join all input molecules into a single output molecule entry. Friendship bracelet mode. 🫢
  • -k β€” translate computational chemistry modeling keywords (e.g., GAMESS and Gaussian). Translator era. πŸ—£οΈ
  • -m β€” produce multiple output files, to allow:
    • Splitting one input file β€” put each molecule into consecutively numbered output files
    • Batch conversion β€” convert each of multiple input files into a specified output format
  • -l # β€” for multiple entry input, stop import with molecule # as the last entry. Exit stage left. πŸšͺ
  • -oformat-ID β€” specifies output format, see below for the available formats. Tell it what outfit to leave in. πŸ‘—
  • -Ooutfile β€” specify the output file. Name the destination, bestie. πŸ“
  • -p β€” add Hydrogens appropriate for pH (use transforms in phmodel.txt). pH-pilled hydrogen behavior. πŸ§ͺ
  • --property β€” add or replace a property (e.g., in an MDL SD file). Property makeover moment. πŸ’…
  • -s SMARTS β€” convert only molecules matching the SMARTS pattern specified. If it matches, it slays. 🎯
  • --separate β€” separate disconnected fragments into individual molecular records. Break it up, break it up. βœ‚οΈ
  • -t β€” all input files describe a single molecule. Teamwork, but for files. 🀝
  • --title title β€” add or replace molecular title. Give it a name worth remembering. 🏷️
  • -xoptions β€” format-specific output options. See -H format-ID for options allowed by a particular format. πŸŽ€
  • -v SMARTS β€” convert only molecules NOT matching SMARTS pattern specified. The "not invited to the group chat" filter. πŸ™…β€β™€οΈ
  • -V β€” output version number and exit. Quick little version check, then dip. πŸ‘‹
  • -z β€” compress the output with gzip. Tiny file, big serve. πŸ—œοΈ

🌈 FILE FORMATS 🌈

okay so Open Babel currently supports literally all of these formats, bestie β€” full roster, no skips, no cap:

  • abinit β€” ABINIT Output Format [Read-only]
  • acesin β€” ACES input format [Write-only]
  • acesout β€” ACES output format [Read-only]
  • acr β€” ACR format [Read-only]
  • adf β€” ADF cartesian input format [Write-only]
  • adfband β€” ADF Band output format [Read-only]
  • adfdftb β€” ADF DFTB output format [Read-only]
  • adfout β€” ADF output format [Read-only]
  • alc β€” Alchemy format
  • aoforce β€” Turbomole AOFORCE output format [Read-only]
  • arc β€” Accelrys/MSI Biosym/Insight II CAR format [Read-only]
  • ascii β€” ASCII format [Write-only]
  • axsf β€” XCrySDen Structure Format [Read-only]
  • bgf β€” MSI BGF format
  • box β€” Dock 3.5 Box format
  • bs β€” Ball and Stick format
  • c09out β€” Crystal 09 output format [Read-only]
  • c3d1 β€” Chem3D Cartesian 1 format
  • c3d2 β€” Chem3D Cartesian 2 format
  • cac β€” CAChe MolStruct format [Write-only]
  • caccrt β€” Cacao Cartesian format
  • cache β€” CAChe MolStruct format [Write-only]
  • cacint β€” Cacao Internal format [Write-only]
  • can β€” Canonical SMILES format
  • car β€” Accelrys/MSI Biosym/Insight II CAR format [Read-only]
  • castep β€” CASTEP format [Read-only]
  • ccc β€” CCC format [Read-only]
  • cdjson β€” ChemDoodle JSON
  • cdx β€” ChemDraw binary format [Read-only]
  • cdxml β€” ChemDraw CDXML format
  • cht β€” Chemtool format [Write-only]
  • cif β€” Crystallographic Information File
  • cjson β€” Chemical JSON
  • ck β€” ChemKin format
  • cml β€” Chemical Markup Language
  • cmlr β€” CML Reaction format
  • cof β€” Culgi object file format
  • com β€” Gaussian Input [Write-only]
  • confabreport β€” Confab report format [Write-only]
  • CONFIG β€” DL-POLY CONFIG
  • CONTCAR β€” VASP format
  • CONTFF β€” MDFF format
  • copy β€” Copy raw text [Write-only]
  • crk2d β€” Chemical Resource Kit diagram(2D)
  • crk3d β€” Chemical Resource Kit 3D format
  • csr β€” Accelrys/MSI Quanta CSR format [Write-only]
  • cssr β€” CSD CSSR format [Write-only]
  • ct β€” ChemDraw Connection Table format
  • cub β€” Gaussian cube format
  • cube β€” Gaussian cube format
  • dallog β€” DALTON output format [Read-only]
  • dalmol β€” DALTON input format
  • dat β€” Generic Output file format [Read-only]
  • dmol β€” DMol3 coordinates format
  • dx β€” OpenDX cube format for APBS
  • ent β€” Protein Data Bank format
  • exyz β€” Extended XYZ cartesian coordinates format
  • fa β€” FASTA format
  • fasta β€” FASTA format
  • fch β€” Gaussian formatted checkpoint file format [Read-only]
  • fchk β€” Gaussian formatted checkpoint file format [Read-only]
  • fck β€” Gaussian formatted checkpoint file format [Read-only]
  • feat β€” Feature format
  • fh β€” Fenske-Hall Z-Matrix format [Write-only]
  • fhiaims β€” FHIaims XYZ format
  • fix β€” SMILES FIX format [Write-only]
  • fps β€” FPS text fingerprint format (Dalke) [Write-only]
  • fpt β€” Fingerprint format [Write-only]
  • fract β€” Free Form Fractional format
  • fs β€” Fastsearch format
  • fsa β€” FASTA format
  • g03 β€” Gaussian Output [Read-only]
  • g09 β€” Gaussian Output [Read-only]
  • g16 β€” Gaussian Output [Read-only]
  • g92 β€” Gaussian Output [Read-only]
  • g94 β€” Gaussian Output [Read-only]
  • g98 β€” Gaussian Output [Read-only]
  • gal β€” Gaussian Output [Read-only]
  • gam β€” GAMESS Output [Read-only]
  • gamess β€” GAMESS Output [Read-only]
  • gamin β€” GAMESS Input
  • gamout β€” GAMESS Output [Read-only]
  • gau β€” Gaussian Input [Write-only]
  • gjc β€” Gaussian Input [Write-only]
  • gjf β€” Gaussian Input [Write-only]
  • got β€” GULP format [Read-only]
  • gpr β€” Ghemical format
  • gr96 β€” GROMOS96 format [Write-only]
  • gro β€” GRO format
  • gukin β€” GAMESS-UK Input
  • gukout β€” GAMESS-UK Output
  • gzmat β€” Gaussian Z-Matrix Input
  • hin β€” HyperChem HIN format
  • HISTORY β€” DL-POLY HISTORY [Read-only]
  • inchi β€” InChI format
  • inchikey β€” InChIKey [Write-only]
  • inp β€” GAMESS Input
  • ins β€” ShelX format [Read-only]
  • jin β€” Jaguar input format
  • jout β€” Jaguar output format [Read-only]
  • k β€” Compare molecules using InChI [Write-only]
  • lmpdat β€” The LAMMPS data format [Write-only]
  • log β€” Generic Output file format [Read-only]
  • lpmd β€” LPMD format
  • mae β€” Maestro format
  • maegz β€” Maestro format
  • mcdl β€” MCDL format
  • mcif β€” Macromolecular Crystallographic Info
  • MDFF β€” MDFF format
  • mdl β€” MDL MOL format
  • ml2 β€” Sybyl Mol2 format
  • mmcif β€” Macromolecular Crystallographic Info
  • mmd β€” MacroModel format
  • mmod β€” MacroModel format
  • mna β€” Multilevel Neighborhoods of Atoms (MNA) [Write-only]
  • mol β€” MDL MOL format
  • mol2 β€” Sybyl Mol2 format
  • mold β€” Molden format
  • molden β€” Molden format
  • molf β€” Molden format
  • molreport β€” Open Babel molecule report [Write-only]
  • moo β€” MOPAC Output format [Read-only]
  • mop β€” MOPAC Cartesian format
  • mopcrt β€” MOPAC Cartesian format
  • mopin β€” MOPAC Internal
  • mopout β€” MOPAC Output format [Read-only]
  • mp β€” Molpro input format [Write-only]
  • mpc β€” MOPAC Cartesian format
  • mpd β€” MolPrint2D format [Write-only]
  • mpo β€” Molpro output format [Read-only]
  • mpqc β€” MPQC output format [Read-only]
  • mpqcin β€” MPQC simplified input format [Write-only]
  • mrv β€” Chemical Markup Language
  • msi β€” Accelrys/MSI Cerius II MSI format [Read-only]
  • msms β€” M.F. Sanner's MSMS input format [Write-only]
  • nul β€” Outputs nothing [Write-only]
  • nw β€” NWChem input format [Write-only]
  • nwo β€” NWChem output format [Read-only]
  • orca β€” ORCA output format [Read-only]
  • orcainp β€” ORCA input format [Write-only]
  • out β€” Generic Output file format [Read-only]
  • outmol β€” DMol3 coordinates format
  • output β€” Generic Output file format [Read-only]
  • paint β€” Painter format [Write-only]
  • pc β€” PubChem format [Read-only]
  • pcjson β€” PubChem JSON
  • pcm β€” PCModel Format
  • pdb β€” Protein Data Bank format
  • pdbqt β€” AutoDock PDBQT format
  • png β€” PNG 2D depiction
  • pointcloud β€” Point cloud on VDW surface [Write-only]
  • pos β€” POS cartesian coordinates format [Read-only]
  • POSCAR β€” VASP format
  • POSFF β€” MDFF format
  • pov β€” POV-Ray input format [Write-only]
  • pqr β€” PQR format
  • pqs β€” Parallel Quantum Solutions format
  • prep β€” Amber Prep format [Read-only]
  • pwscf β€” PWscf format [Read-only]
  • qcin β€” Q-Chem input format [Write-only]
  • qcout β€” Q-Chem output format [Read-only]
  • report β€” Open Babel report format [Write-only]
  • res β€” ShelX format [Read-only]
  • rinchi β€” RInChI [Write-only]
  • rsmi β€” Reaction SMILES format
  • rxn β€” MDL RXN format
  • sd β€” MDL MOL format
  • sdf β€” MDL MOL format
  • siesta β€” SIESTA format [Read-only]
  • smi β€” SMILES format
  • smiles β€” SMILES format
  • smy β€” SMILES format using Smiley parser [Read-only]
  • stl β€” STL 3D-printing format [Write-only]
  • svg β€” SVG 2D depiction [Write-only]
  • sy2 β€” Sybyl Mol2 format
  • t41 β€” ADF TAPE41 format [Read-only]
  • tdd β€” Thermo format
  • text β€” Read and write raw text
  • therm β€” Thermo format
  • tmol β€” TurboMole Coordinate format
  • txt β€” Title format
  • txyz β€” Tinker XYZ format
  • unixyz β€” UniChem XYZ format
  • VASP β€” VASP format
  • vmol β€” ViewMol format
  • wln β€” Wiswesser Line Notation [Read-only]
  • xed β€” XED format [Write-only]
  • xml β€” General XML format [Read-only]
  • xsf β€” XCrySDen Structure Format [Read-only]
  • xyz β€” XYZ cartesian coordinates format
  • yob β€” YASARA.org YOB format
  • zin β€” ZINDO input format [Write-only]

That's the whole roster πŸ’… the bracket labels are exactly as Open Babel lists them.


πŸŽ€ FORMAT OPTIONS πŸŽ€

okay so individual file formats may have additional formatting options. input format options are preceded by -a, e.g. -as. output format options are preceded by -x, e.g. -xn. for further specific information and options, use -Hformat-type, e.g. -Hcml β€” that's where the format-specific tea lives ✨


🌸 ENVIRONMENT 🌸

  • OB_RANDOM_SEED β€” Seed for the pseudo random number generator; a random seed is used if this is unset or null. This feature is effective if Open Babel is built with the -DOB_USE_OBRANDOMMT cpreprocessor flag (it will be automatically enabled when version 4 is released).

✨ EXAMPLES ✨

Standard conversion:

obabel ethanol.xyz -Oethanol.pdb

Conversion from a SMI file in STDIN to a Mol2 file written to STDOUT:

obabel -ismi -omol2

Split a multi-molecule file into new1.smi, new2.smi, etc.:

obabel infile.mol -Onew.smi -m

🫢 SEE ALSO 🫢

you'll also want to hang out with obenergy(1), obfit(1), obgrep(1), obminimize(1), obprop(1), obrotamer(1), and obrotate(1). the web pages for Open Babel can be found at: <http://openbabel.org/>


πŸ‘‘ AUTHORS πŸ‘‘

A cast of many, including the current maintainers Geoff Hutchison, Chris Morley, Michael Banck, and innumerable others who have contributed fixes and additions. For more contributors to Open Babel, see <https://openbabel.org/docs/Introduction/thanks.html> πŸ’–


Copyright (C) 1998-2001 by OpenEye Scientific Software, Inc. Some portions Copyright (C) 2001-2007 by Geoffrey R. Hutchison

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 2 of the License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.


xoxo, your Unix bestie πŸ’– β€” this page's footer says Open Babel 3.2, dated May 26, 2026, and the manpage tag is OBABEL(1). πŸŽ€

πŸ“¦ where this page comes from