Connect with us

Tools

Converting smiles into 3D structures using openbabel.

Published

on

openbabel

Openbabel is used to inter-convert many file formats [1]. It is available for Linux, Windows, and MAC operating systems. In this article, we will learn how to generate 3D structures of compounds present in the form of smiles on Ubuntu as well as on Windows.

On Ubuntu

You can download the openbabel software on Ubuntu from the repository as shown below:

$ sudo apt-get install openbabel.

Save your downloaded smiles into smiles format (.smi), for example, ‘smiles.smi’. This is our input file. To generate 3D structures of these smiles into SDF format, type the following commands:

$ obabel -i smi smiles.smi -o sdf -O out.sdf -m -h --gen3d

Here, -m is used to split the output into multiple files. It is used in batch conversion, where you have multiple smiles in a single file (as described in this article) and you want individual files as output. -h adds hydrogens.

--gen3d is used to generate 3D coordinates for the structure.

Similarly, they can be converted into pdb as well as shown below:

$ obabel -i smi smiles.smi -o pdb -O out.pdb -m -h --gen3d

You can also convert files other than smiles. For example, pdb, mol, SDF, and so on. Just change the input-ID and input filename along with the output-ID and output filename according to your requirements.

For more options, type $ obabel -H.

On Windows

On Windows, you can download the binary file from here. You can use the GUI of openbabel as follows.

  1. Open the openbabel after installation.
  2. Upload your input file and specify the input format from the dropdown.
  3. Select options appropriate to your needs such as ‘Generate 3d’, ‘Output multiple conformers separately’, and so on.
  4. Select the output format and output file location.
  5. Click ‘Convert’.

You can input smiles or any other format using the editor given on the left side of GUI and obtain output without saving into any files.


References

  1. O’Boyle, N. M., Banck, M., James, C. A., Morley, C., Vandermeersch, T., & Hutchison, G. R. (2011). Open Babel: An open chemical toolbox. Journal of cheminformatics3(1), 33.

 

Tariq is founder of Bioinformatics Review and CEO at IQL Technologies. His areas of expertise include algorithm design, phylogenetics, MicroArray, Plant Systematics, and genome data analysis. If you have questions, reach out to him via his homepage.

Software

Installing PyVOL plugin in Pymol on Ubuntu (Linux).

Published

on

Installing PyVOL plugin in Pymol on Ubuntu (Linux).

PyVOL [1] is an excellent plugin of Pymol [2] for pocket visualization of proteins. In this article, we will install the PyVOL plugin in Pymol on Ubuntu. (more…)

Continue Reading

Tips & Tricks

How to download FASTA sequences from PDB for multiple structures?

Published

on

How to download FASTA sequences from PDB for multiple structures?

In this article, we are going to download FASTA sequences for multiple structures from PDB [1]. We need to have PDB IDs only for input. (more…)

Continue Reading

Software

How to install Kpax on Ubuntu (Linux)?

Published

on

How to install Kpax on Ubuntu (Linux)?

Kpax is a bioinformatics program to search and align protein structures [1]. It is currently available for Linux platforms only. In this article, we are going to install the latest version of Kpax (5.1.3) on Ubuntu (Linux). (more…)

Continue Reading

LATEST ISSUE

ADVERT