Difference between revisions of "Babel"

From Open Babel
Jump to: navigation, search
(Updated for 2.1 version.)
Line 11: Line 11:
 
==Description==
 
==Description==
  
Open Babel is a cross-platform program designed to interconvert between many file formats used in molecular modeling and computational chemistry and related areas.
+
Babel is a cross-platform program designed to interconvert between many file formats used in molecular modeling and computational chemistry and related areas.
  
Note that Open Babel can also be used as a library to interconvert many file formats and to provide standard chemistry software routines. See the Open Babel web pages <'''http://openbabel.sourceforge.net/'''> for more information.
+
Open Babel is also a complete programmers toolkit for developing chemistry software. For more information, se the Open Babel web pages <'''http://openbabel.sourceforge.net/'''>.
  
 
==Options==
 
==Options==
Line 19: Line 19:
 
If only input and ouput files are given, Open Babel will guess the file type from the [[List of extensions|filename extension]].
 
If only input and ouput files are given, Open Babel will guess the file type from the [[List of extensions|filename extension]].
  
; '''---errorlevel''' ''2''
 
: 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
 
 
; '''-a''' ''options''
 
; '''-a''' ''options''
 
: Format-specific input options. See '''-H''' ''format-ID'' for options allowed by a particular format
 
: Format-specific input options. See '''-H''' ''format-ID'' for options allowed by a particular format
 +
; '''--addtotitle'''
 +
: Append text after the current molecule title
 +
; '''--addformula'''
 +
: Append the molecular formula after the current molecule title
 
; '''-b'''
 
; '''-b'''
 
: Convert dative bonds (e.g., <code>[N+]([O-])=O</code> to <code>N(=O)=O</code>
 
: Convert dative bonds (e.g., <code>[N+]([O-])=O</code> to <code>N(=O)=O</code>
 
; '''-c'''
 
; '''-c'''
 
: Center atomic coordinates at (0,0,0)
 
: Center atomic coordinates at (0,0,0)
 +
; '''-C'''
 +
: Combine molecules in first file with others having the same name
 
; '''-d'''
 
; '''-d'''
 
: Delete Hydrogens
 
: Delete Hydrogens
 +
; '''-e'''
 +
: Continue to convert molecules after errors
 +
; '''---errorlevel''' ''2''
 +
: 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''' ''<nowiki>#</nowiki>''
 
; '''-f''' ''<nowiki>#</nowiki>''
 
: For multiple entry input, start import with molecule # as the first entry
 
: For multiple entry input, start import with molecule # as the first entry
Line 49: Line 57:
 
: Specifies input format, see below for the available [[:Category:Formats|formats]]
 
: Specifies input format, see below for the available [[:Category:Formats|formats]]
 
; '''-j'''
 
; '''-j'''
 +
; '''--join'''
 
: Join all input molecules into a single output molecule entry
 
: Join all input molecules into a single output molecule entry
 +
; '''-k'''
 +
: Translate computational chemistry modeling keywords (e.g., [[GAMESS]] and [[Gaussian]])
 
; '''-m'''
 
; '''-m'''
 
: Produce multiple output files, to allow:
 
: Produce multiple output files, to allow:
Line 60: Line 71:
 
; '''-p'''
 
; '''-p'''
 
: Add Hydrogens appropriate for pH (use transforms in phmodel.txt)
 
: Add Hydrogens appropriate for pH (use transforms in phmodel.txt)
 +
; '''--property'''
 +
: Add or replace a property (e.g., in an [[MDL SD]] file)
 
; '''-s''' ''[[SMARTS]]''
 
; '''-s''' ''[[SMARTS]]''
 
: Convert only molecules matching the [[SMARTS]] pattern specified
 
: Convert only molecules matching the [[SMARTS]] pattern specified
 +
; '''--separate'''
 +
: Separate disconnected fragments into individual molecular records
 
; '''-t'''
 
; '''-t'''
 
: All input files describe a single molecule
 
: All input files describe a single molecule
 +
; '''--title''' ''title''
 +
: Add or replace molecular title
 
; '''-x''' ''options''
 
; '''-x''' ''options''
 
: Format-specific output options. See '''-H''' ''format-ID'' for options allowed by a particular format
 
: Format-specific output options. See '''-H''' ''format-ID'' for options allowed by a particular format
Line 77: Line 94:
 
The following [[formats]] are currently supported by Open Babel:
 
The following [[formats]] are currently supported by Open Babel:
  
 +
* acr -- Carine ASCI Crystal
 
* alc -- Alchemy format
 
* alc -- Alchemy format
 +
* arc -- Accelrys/MSI Biosym/Insight II CAR format [Read-only]
 
* bgf -- MSI BGF format
 
* bgf -- MSI BGF format
 
* box -- Dock 3.5 Box format
 
* box -- Dock 3.5 Box format
Line 86: Line 105:
 
* cache -- CAChe MolStruct format [Write-only]
 
* cache -- CAChe MolStruct format [Write-only]
 
* cacint -- Cacao Internal format [Write-only]
 
* cacint -- Cacao Internal format [Write-only]
 +
* can -- Canonical SMILES format
 
* car -- Accelrys/MSI Biosym/Insight II CAR format [Read-only]
 
* car -- Accelrys/MSI Biosym/Insight II CAR format [Read-only]
 
* ccc -- CCC format [Read-only]
 
* ccc -- CCC format [Read-only]
 +
* cdx -- ChemDraw binary format [Read-only]
 +
* cdxml -- ChemDraw CDXML format
 
* cht -- Chemtool format [Write-only]
 
* cht -- Chemtool format [Write-only]
 +
* cif -- Crystallographic Information File
 
* cml -- Chemical Markup Language
 
* cml -- Chemical Markup Language
 
* cmlr -- CML Reaction format
 
* cmlr -- CML Reaction format
Line 100: Line 123:
 
* dmol -- DMol3 coordinates format
 
* dmol -- DMol3 coordinates format
 
* ent -- Protein Data Bank format
 
* ent -- Protein Data Bank format
 +
* fa -- FASTA format [Write-only]
 +
* fasta -- FASTA format [Write-only]
 +
* 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
 
* feat -- Feature format
 
* fh -- Fenske-Hall Z-Matrix format [Write-only]
 
* fh -- Fenske-Hall Z-Matrix format [Write-only]
Line 105: Line 133:
 
* fpt -- Fingerprint format [Write-only]
 
* fpt -- Fingerprint format [Write-only]
 
* fract -- Free Form Fractional format
 
* fract -- Free Form Fractional format
* fs -- FastSearching Index
+
* fs -- Open Babel FastSearching database
* g03 -- Gaussian98/03 Output [Read-only]
+
* fsa -- FASTA format [Write-only]
* g98 -- Gaussian98/03 Output [Read-only]
+
* g03 -- Gaussian 98/03 Output [Read-only]
 +
* g98 -- Gaussian 98/03 Output [Read-only]
 
* gam -- GAMESS Output [Read-only]
 
* gam -- GAMESS Output [Read-only]
 
* gamin -- GAMESS Input [Write-only]
 
* gamin -- GAMESS Input [Write-only]
 
* gamout -- GAMESS Output [Read-only]
 
* gamout -- GAMESS Output [Read-only]
 
* gau -- Gaussian 98/03 Cartesian Input [Write-only]
 
* gau -- Gaussian 98/03 Cartesian Input [Write-only]
 +
* gjc -- Gaussian 98/03 Cartesian Input [Write-only]
 +
* gjf -- Gaussian 98/03 Cartesian Input [Write-only]
 
* gpr -- Ghemical format
 
* gpr -- Ghemical format
 
* gr96 -- GROMOS96 format [Write-only]
 
* gr96 -- GROMOS96 format [Write-only]
 
* hin -- HyperChem HIN format
 
* hin -- HyperChem HIN format
* inchi -- IUPAC InChI descriptor [Write-only]
+
* inchi -- IUPAC InChI [Write-only]
 
* inp -- GAMESS Input [Write-only]
 
* inp -- GAMESS Input [Write-only]
 
* ins -- ShelX format [Read-only]
 
* ins -- ShelX format [Read-only]
Line 125: Line 156:
 
* mol -- MDL MOL format
 
* mol -- MDL MOL format
 
* mol2 -- Sybyl Mol2 format
 
* mol2 -- Sybyl Mol2 format
 +
* molreport -- Open Babel molecule report [Write-only]
 +
* moo -- MOPAC Output format [Read-only]
 +
* mop -- MOPAC Cartesian format
 
* mopcrt -- MOPAC Cartesian format
 
* mopcrt -- MOPAC Cartesian format
 +
* mopin -- MOPAC Internal
 
* mopout -- MOPAC Output format [Read-only]
 
* mopout -- MOPAC Output format [Read-only]
 +
* mpc -- MOPAC Cartesian format
 
* mpd -- Sybyl descriptor format [Write-only]
 
* mpd -- Sybyl descriptor format [Write-only]
 
* mpqc -- MPQC output format [Read-only]
 
* mpqc -- MPQC output format [Read-only]
Line 146: Line 182:
 
* sdf -- MDL MOL format
 
* sdf -- MDL MOL format
 
* smi -- SMILES format
 
* smi -- SMILES format
 +
* sy2 -- Sybyl Mol2 format
 +
* tdd -- Thermo format
 
* test -- Test format [Write-only]
 
* test -- Test format [Write-only]
 +
* therm -- Thermo format
 
* tmol -- TurboMole Coordinate format
 
* tmol -- TurboMole Coordinate format
 
* txyz -- Tinker MM2 format [Write-only]
 
* txyz -- Tinker MM2 format [Write-only]
Line 183: Line 222:
 
==See Also==
 
==See Also==
  
[[obfit]] , [[obgrep]] , [[obprop]] , [[obrotate]].
+
[[obenergy]], [[obfit]], [[obgrep]], [[obminimize]], [[obprop]], [[obrotate]], [[obrotamer]]
  
 
The web pages for Open Babel can be found at: <'''http://openbabel.sourceforge.net/'''>
 
The web pages for Open Babel can be found at: <'''http://openbabel.sourceforge.net/'''>
Line 193: Line 232:
 
==Copyright==
 
==Copyright==
  
Copyright © 1998-2001 by OpenEye Scientific Software, Inc. Some portions Copyright © 2001-2005 by Geoffrey R. Hutchison and other contributors.
+
Copyright &copy; 1998-2001 by OpenEye Scientific Software, Inc. Some portions Copyright &copy; 2001-2007 by Geoffrey R. Hutchison and other contributors.
  
 
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the [http://www.fsf.org/licensing/licenses/gpl.html Free Software Foundation].
 
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the [http://www.fsf.org/licensing/licenses/gpl.html Free Software Foundation].

Revision as of 04:39, 9 April 2007

Name

babel -- a converter for chemistry and molecular modeling data files

Synopsis

babel [-H help-options]

babel [OPTIONS] [-i input-type] infile [-o output-type] outfile

Description

Babel is a cross-platform program designed to interconvert between many file formats used in molecular modeling and computational chemistry and related areas.

Open Babel is also a complete programmers toolkit for developing chemistry software. For more information, se the Open Babel web pages <http://openbabel.sourceforge.net/>.

Options

If only input and ouput files are given, Open Babel will guess the file type from the filename extension.

-a options
Format-specific input options. See -H format-ID for options allowed by a particular format
--addtotitle
Append text after 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
-c
Center atomic coordinates at (0,0,0)
-C
Combine molecules in first file with others having the same name
-d
Delete Hydrogens
-e
Continue to convert molecules after errors
---errorlevel 2
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
-F
Output the available fingerprint types
-h
Add hydrogens
-H
Output usage information
-H format-ID
Output formatting information and options for format specified
-Hall
Output formatting information and options for all formats
-i<format-ID>
Specifies input format, see below for the available formats
-j
--join
Join all input molecules into a single output molecule entry
-k
Translate computational chemistry modeling keywords (e.g., GAMESS and Gaussian)
-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
-o format-ID
Specifies output format, see below for the available formats
-p
Add Hydrogens appropriate for pH (use transforms in phmodel.txt)
--property
Add or replace a property (e.g., in an MDL SD file)
-s SMARTS
Convert only molecules matching the SMARTS pattern specified
--separate
Separate disconnected fragments into individual molecular records
-t
All input files describe a single molecule
--title title
Add or replace molecular title
-x options
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
-V
Output version number and exit
-z
Compress the output with gzip

File Formats

The following formats are currently supported by Open Babel:

  • acr -- Carine ASCI Crystal
  • alc -- Alchemy format
  • arc -- Accelrys/MSI Biosym/Insight II CAR format [Read-only]
  • bgf -- MSI BGF format
  • box -- Dock 3.5 Box format
  • bs -- Ball and Stick format
  • c3d1 -- Chem3D Cartesian 1 format
  • c3d2 -- Chem3D Cartesian 2 format
  • 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]
  • ccc -- CCC format [Read-only]
  • cdx -- ChemDraw binary format [Read-only]
  • cdxml -- ChemDraw CDXML format
  • cht -- Chemtool format [Write-only]
  • cif -- Crystallographic Information File
  • cml -- Chemical Markup Language
  • cmlr -- CML Reaction format
  • com -- Gaussian 98/03 Cartesian Input [Write-only]
  • copy -- Copies raw text [Write-only]
  • crk2d -- Chemical Resource Kit 2D diagram format
  • 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
  • dmol -- DMol3 coordinates format
  • ent -- Protein Data Bank format
  • fa -- FASTA format [Write-only]
  • fasta -- FASTA format [Write-only]
  • 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]
  • fix -- SMILES FIX format [Write-only]
  • fpt -- Fingerprint format [Write-only]
  • fract -- Free Form Fractional format
  • fs -- Open Babel FastSearching database
  • fsa -- FASTA format [Write-only]
  • g03 -- Gaussian 98/03 Output [Read-only]
  • g98 -- Gaussian 98/03 Output [Read-only]
  • gam -- GAMESS Output [Read-only]
  • gamin -- GAMESS Input [Write-only]
  • gamout -- GAMESS Output [Read-only]
  • gau -- Gaussian 98/03 Cartesian Input [Write-only]
  • gjc -- Gaussian 98/03 Cartesian Input [Write-only]
  • gjf -- Gaussian 98/03 Cartesian Input [Write-only]
  • gpr -- Ghemical format
  • gr96 -- GROMOS96 format [Write-only]
  • hin -- HyperChem HIN format
  • inchi -- IUPAC InChI [Write-only]
  • inp -- GAMESS Input [Write-only]
  • ins -- ShelX format [Read-only]
  • jin -- Jaguar input format [Write-only]
  • jout -- Jaguar output format [Read-only]
  • mdl -- MDL MOL format
  • mmd -- MacroModel format
  • mmod -- MacroModel format
  • mol -- MDL MOL format
  • mol2 -- Sybyl Mol2 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]
  • mpc -- MOPAC Cartesian format
  • mpd -- Sybyl descriptor format [Write-only]
  • mpqc -- MPQC output format [Read-only]
  • mpqcin -- MPQC simplified input format [Write-only]
  • nw -- NWChem input format [Write-only]
  • nwo -- NWChem output format [Read-only]
  • pc -- PubChem format [Read-only]
  • pcm -- PCModel format
  • pdb -- Protein Data Bank format
  • pov -- POV-Ray input format [Write-only]
  • pqs -- Parallel Quantum Solutions format
  • prep -- Amber Prep 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]
  • rxn -- MDL RXN format
  • sd -- MDL MOL format
  • sdf -- MDL MOL format
  • smi -- SMILES format
  • sy2 -- Sybyl Mol2 format
  • tdd -- Thermo format
  • test -- Test format [Write-only]
  • therm -- Thermo format
  • tmol -- TurboMole Coordinate format
  • txyz -- Tinker MM2 format [Write-only]
  • unixyz -- UniChem XYZ format
  • vmol -- ViewMol format
  • xed -- XED format [Write-only]
  • xml -- General XML format [Read-only]
  • xyz -- XYZ cartesian coordinates format
  • yob -- YASARA.org YOB format
  • zin -- ZINDO input format [Write-only]

Format Options

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 -H<format-type>
e.g., -Hcml

Examples

Standard conversion:

babel -ixyz ethanol.xyz -opdb ethanol.pdb

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

babel -ismi -omol2

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

babel infile.mol new.smi -m

See Also

obenergy, obfit, obgrep, obminimize, obprop, obrotate, obrotamer

The web pages for Open Babel can be found at: <http://openbabel.sourceforge.net/>

Authors

A cast of many, including currrent maintainers Geoff Hutchison, Chris Morley, Michael Banck, and innumerable others who have contributed fixes and additions. For more contributors to Open Babel, see the Contributor List

Copyright

Copyright © 1998-2001 by OpenEye Scientific Software, Inc. Some portions Copyright © 2001-2007 by Geoffrey R. Hutchison and other contributors.

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

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.