MOLinsight

 

Molinsight logo

Babel Conversion Tool

 

To convert a file named input_file into another file output_file enter the command

babel -ixxxxx input_file -oyyyyy output_file

where you should replace xxxxx and yyyyy by the strings corresponding to the chemical formats of the input and output files respectively. Examples of formats are

mol – MDL Molfile

smi – SMILES

inchi – InChI

For example, to convert file propan1ol.mol in the MDL Molfile format into SMILES you should use the command

babel -imol propan1ol.mol -osmi propan1ol.smi

A full list of possible formats is in the OpenBabel web site.

Depending on your installation of babel you may need to include the full path to the babel program (e.g. c:\programs\OpenBabel-2.2.3\babel). Don’t forget that if you are not at the directory of input_file and output_file, you should include the full path leading to these files.

Useful options of babel are the addition or removing of hydrogen atoms. To add hydrogen atoms to the output structure include “-h” at the end of the command. To delete hydrogen atoms include “-d” at the end of the command.

For example, to convert file propan1ol.mol into file propan1olH.mol, both in the MDL Molfile format but the second with H atoms, use the command

babel -imol propan1ol.mol -omol propan1olH.mol -h

 

 

 

go to main page

 

 

 

 

 

Webmaster: Vasco Bonifácio

last update: 06.02.2010