ORCA---Computational-Chemistry/C2/Create-XYZ-File-using-Open-Babel/English

From Script | Spoken-Tutorial
Jump to: navigation, search

Title of the script: Create XYZ File using Open Babel

Authors: Madhuri Ganapathi, Raj Singh, Snehalatha Kaliappan.

Keywords: ORCA, Open Babel, Jmol, XYZ file, mol file, SMILES string, orca input file, video tutorial.

Visual Cue Narration
Slide Number 1

Title slide

Welcome to this spoken tutorial on Create XYZ File using Open Babel.
Slide Number 2

Learning Objectives

In this tutorial, we will learn to,
  • Load water molecule in Jmol
  • Save the file in mol format
  • Create SMILES string
  • Create XYZ file format using Open Babel.
Slide Number 3

System Requirements

Here I am using,
  • Ubuntu Linux OS version 22.04
  • Jmol version 16.2.35
  • Java version 11.0.25
  • Gedit text editor version 41.0

A working internet connection.

Slide Number 4

Pre-requisites

https://spoken-tutorial.org

To follow this tutorial, learners should be familiar with the Jmol interface.

Please watch the Jmol tutorials available on this website.

Point to the interface. I have opened the Jmol interface.
Click on File and select Get MOL option.

In the text box that appears type water and click OK button.

Let us load the water molecule on the Jmol panel.

Click on File and select Get MOL option.

In the text box that appears, type water and click OK button.

Point to the water molecule.

Click on the Open model kit icon on the tool bar.

From the options click on minimize.

A water molecule appears on the panel.

Click on the model kit icon.

From the options select minimize to minimize the structure.

Click on Open the model kit.

Select save file option.

Save dialog box opens.

Type the file name as water.mol and click on Save button.

Let us now save the file.

Open the model kit menu.

Select save file option.

Save dialog box opens.

Choose a suitable location to save the file.

Type the file name as water.mol .

In Files of Type option select Mol.

Click on Save button at the bottom right corner.

Cursor on the panel. Let us open the 2-D Editor in Jmol.
Click on Tools menu, select 2-D Editor from the drop-down Click on Tools menu, select 2-D Editor from the drop-down.

water molecule is shown in the editor.

Click on the yellow smiley button at the top left of the window.

Cursor on the pop-up window.

Copy the SMILES string(O)for water using Ctrl and C buttons.

A small pop-up window opens.

Here we will see capital “O” which is the SMILES string for water molecule.

Copy the SMILES string using Ctrl and C keys.

Click on the Close button on the SMILES window. Let us close the SMILES window.
Slide Number 5

Create XYZ File Format

Here we will demonstrate two ways to create XYZ file format using Open Babel .

One using SMILES string and the other using a mol file.

XYZ file format will be used to create input file to run ORCA.

Show Openbabel interface.

https://www.cheminfo.org/Chemistry/Cheminformatics/FormatConverter/index.html

point to the page.

Open any web browser.

Type Openbabel in the Google search bar.

Click on the link Open Babel Chemical file format converter.

Open Babel page opens.

This is an online web page to convert chemical structure files to various file formats.

Cursor in the open babel page. Let’s demonstrate how to convert a mol file and a SMILES string to xyz format.
Inside the Input block delete the default SMILE

type the SMILE of water O or [OH2].

On the left side of the page we can see an INPUT panel.

In the centre of the page you will see the Options panel.

On the right side we have an OUTPUT panel.

In the INPUT panel delete the default SMILE string.

Copy/Paste or type the SMILES string here as O for water molecule.

Point to the Options window.

Point to the Input format - SMILES.

Select the output format as XYZ from the drop down list.

In the Options panel, the input format is selected as SMILES.

Select the output format as XYZ from the drop down list.

In Generate Coordinates drop down, select 3D. In the Generate Coordinates drop down, select 3D.
Click on the “Convert” button below.

Click on the Convert button found below the Options panel.

Leave the other options as default.

Click on the Convert button found below the Options panel.

Navigate to the output section on the right side of the interface.

Click on the download File icon on the top right corner of the Output box.

In the OUTPUT box, xyz coordinates of the water molecule will appear.

On the top right corner of the Output box, click the Download File icon.

In the Save dialog box, In the Name field, the default name structure.xyz is seen.

Change the name as water.xyz

Click on the Save button at the top right corner of the dialog box.

Show the downloading file.

The file downloads as structure.xyz to my Downloads folder.

Rename the file as water.xyz.

If a save file dialog box opens, save the file as water.xyz.

Back to Open Babel Chemical file format converter page.

Point to the input box. Now let’s convert a mol file to xyz format.

In the Open babel page, on the top left side we can see Drop or paste here your input file box.

Click inside the box, File Upload window opens. Click inside the box, File Upload window opens.
Point to the water.mol in the folder.

Select the saved water.mol file from the folder.

Click the Open button at the top right corner of the window.

Select the saved water.mol file from the folder.

Click the Open button at the top right corner of the window.

Point to the information.

Point to the word ”string”.

Select the word string and press Delete key on the keyboard.

The INPUT box displays the information of the structure.

In the INPUT box, delete the first line.

The url here.

In some cases you may see a word “string”

This is done to avoid the url or word string showing up in the output file.

From the Options panel, select the input format as mol--MDL MOL format. From the Options panel, select the input file format as mol--MDL MOL format.
Select the output format as xyz--XYZ cartesian coordinates format. Now select the output format as xyz-XYZ cartesian coordinates format.
In Generate Coordinates drop down, select 3D. In the Generate Coordinates drop down, select 3D.
Below the Options box, click on the Convert button. Leave the other options as such in the panel.

Below the Options box, click on the Convert button.

Point to the coordinates.

Navigate to the output section on the right side of the interface.

In the OUTPUT box, the xyz coordinates of the water molecule are displayed.
Click on the download File icon on the top right corner of the Output box. As explained before, download the xyz file.

Click the Download File icon in the Output box.

Save the file structure.xyz as water.xyz.

Right-click on water.xyz file.

Select Open with Text Editor option.

Let us open the Downloads folder and navigate to water.xyz .

Right-click on the file and open the file using a text editor.

Windows users may use notepad or any other text editor.

Point to the numbers and xyz coordinates.

Point to the values.

The numbers in rows are the xyz coordinates of the atoms, Oxygen, Hydrogen and Hydrogen.

They are in Angstrom units.

The values here are tab separated.

We will use this water.xyz file to create the input file to run ORCA.

Slide Number 6

Summary

In this tutorial we have learnt to,

Load water molecule in Jmol

Save the file in mol format

Create SMILES string

Create XYZ file format using Open Babel

With this we come to the end of this tutorial

Let us summarise.

Slide Number 7

Assignment

As an assignment
  • Generate SMILES and mol file for carbon monoxide and ammonia molecules using Jmol.
  • Create the XYZ files using SMILES and mol file in Open Babel.
Slide Number 8

Thank you

Thank you for joining.

Contributors and Content Editors

Madhurig, Snehalathak