Bioinformatics ReviewBioinformatics Review
Notification Show More
Font ResizerAa
  •  Home
  • Docking
  • MD Simulation
  • Tools
  • More Topics
    • Softwares
    • Sequence Analysis
    • Algorithms
    • Bioinformatics Programming
    • Bioinformatics Research Updates
    • Drug Discovery
    • Phylogenetics
    • Structural Bioinformatics
    • Editorials
    • Tips & Tricks
    • Bioinformatics News
    • Featured
    • Genomics
    • Bioinformatics Infographics
  • Community
    • BiR-Research Group
    • Community Q&A
    • Ask a question
    • Join Telegram Channel
    • Join Facebook Group
    • Join Reddit Group
    • Subscription Options
    • Become a Patron
    • Write for us
  • About Us
    • About BiR
    • BiR Scope
    • The Team
    • Guidelines for Research Collaboration
    • Feedback
    • Contact Us
    • Recent @ BiR
  • Subscription
  • Account
    • Visit Dashboard
    • Login
Font ResizerAa
Bioinformatics ReviewBioinformatics Review
Search
Have an existing account? Sign In
Follow US
Cheminformatics

Converting file formats using Openbabel.

Dr. Muniba Faiza
Last updated: October 16, 2022 9:05 am
Dr. Muniba Faiza
Share
2 Min Read
Converting file formats using Openbabel.
SHARE

Openbabel [1] offers a wide range of operations. One of which is file format conversion which is most widely used. In this article, we will describe commands that convert file formats.

Assuming, you have already installed Openbabel on your system, you should be able to run it as obabel/babel in the terminal. Also, you can use the GUI of Openbabel that you will have to compile during its installation.

So, here is the command syntax for file conversion:

$ obabel -i<input_format> <input_filename> -o<output_format> -O <output_filename> -other_arguments

It is optional to provide input and output formats but it is always better to do so.

Let’s convert opensmiles SMILES to canonical SMILES.

$ obabel -ismi input.smi -osmi -O output.smi -ocan

Similarly, you can convert SMILES to InChi as shown below:

$ obabel -ismi input.smi -oinchi -O output.inchi

If you want, you can give some additional arguments such as ignoring isomers, removing duplicates, etc. Sometimes, the openbabel stops processing once it finds any invalid compound/molecule, so for that, you can -e to the command.

$ obabel -ismi input.smi -oinchi -O output.inchi -e --unique

Here, –unique will not convert the duplicate molecules.

If you want to ignore the stereochemistry of the molecules then you can use the following arguments:

$ obabel -ismi input.smi -oinchi -O output.inchi -e /nostereo /nochg /noiso /noEZ /sp3

You can also keep unique molecules based on the arguments given in the above command by writing –unique before the arguments as shown below.

$ obabel -ismi input.smi -oinchi -O output.inchi -e --unique /nostereo /nochg /noiso /noEZ /sp3

For further information on supported file formats, read here.


References

  1. O’Boyle, NM, Banck, M., James, CA, Morley, C., Vandermeersch, T., & Hutchison, GR (2011). Open Babel: An open chemical toolbox. Journal of cheminformatics, 3 (1), 1-14.
TAGGED:file format conversionobabelopenbabelsmiles to inchismiles to inchikey
Share This Article
Facebook Copy Link Print
ByDr. Muniba Faiza
Follow:
Dr. Muniba is a Bioinformatician based in New Delhi, India. She has completed her PhD in Bioinformatics from South China University of Technology, Guangzhou, China. She has cutting edge knowledge of bioinformatics tools, algorithms, and drug designing. When she is not reading she is found enjoying with the family. Know more about Muniba
Leave a Comment

Leave a Reply Cancel reply

You must be logged in to post a comment.

Starting in Bioinformatics? Do This First!
Starting in Bioinformatics? Do This First!
Tips & Tricks
[Editorial] Is it ethical to change the order of authors’ names in a manuscript?
Editorial Opinion
Installing bbtools on Ubuntu
[Tutorial] Installing BBTools on Ubuntu (Linux).
Sequence Analysis Software Tools
wes_data_analysis Whole Exome Sequencing (WES) Data visualization Toolkit
wes_data_analysis: Whole Exome Sequencing (WES) Data visualization Toolkit
Bioinformatics Programming GitHub Python

You Might Also Like

tanimoto_similarities.py: A Python script to calculate Tanimoto similarities of multiple compounds using RDKit.
Bioinformatics ProgrammingCheminformaticsPython

tanimoto_similarities.py: A Python script to calculate Tanimoto similarities of multiple compounds using RDKit.

July 2, 2022
How to obtain ligand structures in PDB format from PDB ligand IDs?
Bioinformatics ProgrammingCheminformaticsPython

How to obtain ligand structures in PDB format from PDB ligand IDs?

February 18, 2023
How to obtain SMILES of ligands using PDB ligand IDs?
Bioinformatics ProgrammingCheminformaticsPython

How to obtain SMILES of ligands using PDB ligand IDs?

January 5, 2023
Installing OpenBabel on Ubuntu
SoftwareTools

[Tutorial] How to install openbabel on Ubuntu (Linux)?

March 13, 2025
Copyright 2024 IQL Technologies
  • Journal
  • Customer Support
  • Contact Us
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Cookie Policy
  • Sitemap
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?

Not a member? Sign Up