Navigation

spacer

Previous topic

Adding new operations and options

Next topic

Common cheminformatics formats

This Page

Supported File Formats and Options¶

Chemists are a very imaginative group. They keep thinking of new file formats.

OpenBabel has support for 113 formats in total. It can read 84 formats and can write 85 formats. These formats are identified by a name (for example, ShelX format) and one or more short codes (in this case, ins or res). The titles of each section provide this information (for example, ShelX format (ins, res)).

The short code is used when using obabel or babel to convert files from one format to another:

obabel -iins myfile.ins -ocml

converts from ShelX format to Chemical Markup Language (in this case, no output file is specified and the output will be written to screen [stdout]). In fact, if the filename extension is the same as the file format code, then there is no need to specify the code. In other words, the following command will behave identically:

babel myfile.ins -ocml

As well as the general conversion options described elsewhere (see Options), each format may have its own options for either reading or writing. For example, the ShelX format has two options that affect reading of files, s and b. To set a file format option:

  • For Read Options, precede the option with -a at the command line
  • For Write Options, precede the option with -x

Mnemonic

To remember the correct switch for read or write options, think of “raw eggs”: read is a, write is x (“eggs”).

For example, if we wanted to set all bonds to single bonds when reading a ShelX format file, we could specify the s option:

babel -iins myfile.ins -ocml -as

More than one read (or write) option can be specified (e.g. -ax -ay -az). babel (but not obabel) also allows you to specify several options together (e.g. as -axyz).

Developer Note
To set the file formats for an OBConversion object, use SetInAndOutFormat(InCode, OutCode). To set a Read Option s, use SetOptions("s", OBConversion::INOPTIONS).
  • Common cheminformatics formats
    • Canonical SMILES format (can)
    • Chemical Markup Language (cml, mrv)
    • InChI format (inchi)
    • MDL MOL format (mol, mdl, sdf, sd)
    • Protein Data Bank format (pdb, ent)
    • SMILES format (smi, smiles)
    • Sybyl Mol2 format (ml2, sy2, mol2)
  • Utility formats
    • Compare molecules using InChI (k)
    • Copy raw text (copy)
    • Fastsearch format (fs)
    • Fingerprint format (fpt)
    • General XML format (xml)
    • Generic Output file format (dat, output, out, log)
    • MolPrint2D format (mpd)
    • Multilevel Neighborhoods of Atoms (MNA) (mna)
    • Open Babel molecule report (molreport)
    • Open Babel report format (report)
    • Outputs nothing (nul)
    • Reads raw text (text)
    • Title format (txt)
    • XYZ cartesian coordinates format (xyz)
  • Other cheminformatics formats
    • Accelrys/MSI Biosym/Insight II CAR format (arc, car)
    • Accelrys/MSI Cerius II MSI format (msi)
    • Accelrys/MSI Quanta CSR format (csr)
    • MCDL format (mcdl)
    • MSI BGF format (bgf)
    • PubChem format (pc)
  • Computational chemistry formats
    • ADF cartesian input format (adf)
    • ADF output format (adfout)
    • CAChe MolStruct format (cache, cac)
    • CASTEP format (castep)
    • Cacao Cartesian format (caccrt)
    • Cacao Internal format (cacint)
    • DMol3 coordinates format (outmol, dmol)
    • FHIaims XYZ format (fhiaims)
    • Fenske-Hall Z-Matrix format (fh)
    • GAMESS Input (inp, gamin)
    • GAMESS Output (gamout, gam, gamess)
    • GAMESS-UK Input (gukin)
    • GAMESS-UK Output (gukout)
    • GULP format (got)
    • Gaussian 98/03 Input (gjf, gjc, gau, com)
    • Gaussian Output (g09, g03, g94, g92, g98, gal)
    • Gaussian Z-Matrix Input (gzmat)
    • Gaussian formatted checkpoint file format (fchk, fch, fck)
    • HyperChem HIN format (hin)
    • Jaguar input format (jin)
    • Jaguar output format (jout)
    • MOPAC Cartesian format (mopcrt, mpc, mop)
    • MOPAC Internal (mopin)
    • MOPAC Output format (moo, mopout)
    • MPQC output format (mpqc)
    • MPQC simplified input format (mpqcin)
    • Molpro input format (mp)
    • Molpro output format (mpo)
    • NWChem input format (nw)
    • NWChem output format (nwo)
    • PWscf format (pwscf)
    • Parallel Quantum Solutions format (pqs)
    • Q-Chem input format (qcin)
    • Q-Chem output format (qcout)
    • TurboMole Coordinate format (tmol)
    • VASP format (CONTCAR, POSCAR)
    • ZINDO input format (zin)
  • Crystallography formats
    • ACR format (acr)
    • CSD CSSR format (cssr)
    • Crystallographic Information File (cif)
    • Free Form Fractional format (fract)
    • Macromolecular Crystallographic Info (mmcif, mcif)
    • ShelX format (ins, res)
  • Reaction formats
    • CML Reaction format (cmlr)
    • MDL RXN format (rxn)
    • Reaction SMILES format (rsmi)
  • Image formats
    • PNG files with embedded data (png)
    • POV-Ray input format (pov)
    • SVG 2D depiction (svg)
  • 2D drawing formats
    • ChemDraw CDXML format (cdxml)
    • ChemDraw Connection Table format (ct)
    • ChemDraw binary format (cdx)
    • Chemical Resource Kit diagram(2D) (crk2d)
    • Chemtool format (cht)
  • 3D viewer formats
    • Ball and Stick format (bs)
    • Chem3D Cartesian 1 format (c3d1)
    • Chem3D Cartesian 2 format (c3d2)
    • Chemical Resource Kit 3D format (crk3d)
    • Ghemical format (gpr)
    • Molden format (molden, mold, molf)
    • PCModel Format (pcm)
    • UniChem XYZ format (unixyz)
    • ViewMol format (vmol)
    • YASARA.org YOB format (yob)
  • Kinetics and Thermodynamics formats
    • ChemKin format (ck)
    • Thermo format (tdd, therm)
  • Molecular dynamics and docking formats
    • Amber Prep format (prep)
    • Autodock Protein Data Bank (pdbqt)
    • DL-POLY CONFIG (CONFIG)
    • DL-POLY HISTORY (HISTORY)
    • Dock 3.5 Box format (box)
    • GROMOS96 format (gr96)
    • MacroModel format (mmod, mmd)
    • Tinker MM2 format (txyz)
    • XTC format (xtc)
  • Volume data formats
    • ADF TAPE41 format (t41)
    • Gaussian cube format (cube, cub)
    • OpenDX cube format for APBS (dx)
  • Miscellaneous formats
    • M.F. Sanner’s MSMS input format (msms)
  • Biological data formats
    • FASTA format (fasta, fa, fsa)
    • PQR format (pqr)
  • Obscure formats
    • Alchemy format (alc)
    • CCC format (ccc)
    • Feature format (feat)
    • SMILES FIX format (fix)
    • XED format (xed)

Navigation

© Copyright 2010, Open Babel community. Created using Sphinx 1.0.7.
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.