Openbabel is used to inter-convert many file formats . 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.
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
-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, you can download the binary file from here. You can use the GUI of openbabel as follows.
- Open the openbabel after installation.
- Upload your input file and specify the input format from the dropdown.
- Select options appropriate to your needs such as ‘Generate 3d’, ‘Output multiple conformers separately’, and so on.
- Select the output format and output file location.
- 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.
- 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 cheminformatics, 3(1), 33.
How to install Kpax on Ubuntu (Linux)?
Kpax is a bioinformatics program to search and align protein structures . 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…)
How to run do_dssp command (mkdssp) in Gromacs 2022?
In the latest version of GROMACS (2022) , there are some issues regarding the gmx do_dssp command. Apparently, this command either does not run displaying a fatal error, or if it runs then it does not read any frame from MD simulation files. In this article, we are going to run the same command for GROMACS 2022. (more…)