What Is "babel" Command

Q

What Is "babel" Command? How to get command line help for Open Babel?

✍: FYIcenter.com

A

"babel" Command is the command to invoke Open Babel different functionalities by specifing different command options.

You can use "babel -H" command to get help information on Open Babel command:

fyicenter$ babel -H

Open Babel converts chemical structures from one file format to another

Usage: babel <input spec> <output spec> [Options]

Each spec can be a file whose extension decides the format.
Optionally the format can be specified by preceding the file by
-i<format-type> e.g. -icml, for input and -o<format-type> for output

See below for available format-types, which are the same as the 
file extensions and are case independent.
If no input or output file is given stdin or stdout are used instead.

More than one input file can be specified and their names can contain
wildcard chars (* and ?).The molecules are aggregated in the output file.

Conversion options
-f <#> Start import at molecule # specified
-l <#> End import at molecule # specified
-e Continue with next object after error, if possible
-z Compress the output with gzip
-k Attempt to translate keywords
-H Outputs this help text
-V Outputs version number
-L <category> Lists plugin classes of this category, e.g. <formats>
   Use just -L for a list of plugin categories.
   Use -L <ID> e.g. -L sdf for details of a format or other plugin.
-m Produces multiple output files, to allow:
   Splitting: e.g.        babel infile.mol new.smi -m
     puts each molecule into new1.smi new2.smi etc
   Batch conversion: e.g. babel *.mol -osmi -m
     converts each input file to a .smi file
For conversions of molecules
Additional options :
-d Delete hydrogens (make implicit)
-h Add hydrogens (make explicit)
-p <pH> Add hydrogens appropriate for this pH
-b Convert dative bonds e.g.[N+]([O-])=O to N(=O)=O
-r Remove all but the largest contiguous fragment
-c Center Coordinates
-C Combine mols in first file with others having same name
--filter <filterstring> Filter: convert only when tests are true:
--add <list> Add properties from descriptors
--delete <list> Delete properties in list
--append <list> Append properties or descriptors in list to title:
-s"smarts" Convert only if match SMARTS or mols in file:
-v"smarts" Convert only if NO match to SMARTS or mols in file(not displayed in GUI)
--join Join all input molecules into a single output molecule
--separate Output disconnected fragments separately
--property <attrib> <value> add or replace a property (SDF)
--title <title> Add or replace molecule title
--addtotitle <text> Append text to title
--writeconformers Output multiple conformers separately
--addoutindex Append output index to title
--0xout <file.xxx> Additional file output
--addfilename Append input filename to title
--AddInIndex Append input index to title
--AddPolarH Adds hydrogen to polar atoms only
--align Align coordinates to the first molecule
--canonical Canonicalize the atom order
--fillUC <param> Fill the unit cell (strict or keepconnect)
--gen2D Generate 2D coordinates
--gen3D Generate 3D coordinates
--largest # <descr> Output # mols with largest values
--partialcharge <method> Calculate partial charges by specified method
--readconformer Adjacent conformers combined into a single molecule
--sort <desc> Sort by descriptor(~desc for reverse)
--unique [param] remove duplicates by descriptor;default inchi

Interface to OBAPI internals
API options, e.g. ---errorlevel 2
 errorlevel # min warning level displayed

To see a list of recognized file formats use
  babel -L formats
To see details and specific options for a particular format, e.g CML, use
  babel -L cml

 

"babel" Command - Input Data Source and Format

Understanding "babel" Command Line Syntax

Understanding "babel" Command Line Syntax

⇑⇑ Open Babel Tutorials

2020-09-15, 148👍, 0💬