Jmol-Application/C2/Script-Console-and-Script-Commands/English
Title of script: Script console and Script commands
Author: Snehalatha Kaliappan
Keywords: Script documentation, script commands, Molecular visualization, 3D models of chemical structures, Video tutorial
|
|
---|---|
Slide Number 1
Title Slide |
Welcome to this tutorial on Script console and script commands in Jmol Application. |
Slide Number 2
Learning Objectives |
In this tutorial, we will learn
|
Slide Number 3
Pre-requisites |
To follow this tutorial:
If not, watch the relevant tutorials available on our website. |
Slide Number 4
System Requirement |
To record this tutorial I am using
|
Slide Number 5
Modify Display in Jmol Application |
Display on Jmol panel can be modified using
|
Slide number 5
Modify Display in Jmol Application |
We had learnt to modify display using menu bar and Pop-up-menu in earlier tutorials.
|
Slide Number 6Script command | A set of commands is called Script command.
|
Slide Number 7
Script commands continued |
Writing such commands is called scripting.
Documentation of Jmol's scripting language and list of commands is available at this link. |
Switch to Jmol panel.
Cursor on panel |
This is Jmol Application window with a model of propane on screen.
|
Click on the 'File' menu in the menu bar. | To open a Script console window, click on File menu in the menu bar. |
Click on 'Console' in the drop-down menu | In the drop-down, scroll down and click on Console. |
Cursor on 'Jmol script console' window. | Jmol script console window opens on the screen. |
Cursor on 'Jmol script console' window. | Script console window has a text area to type the commands. |
Click on 'Editor', Variables, History and State. | At the bottom of the window, there is a button to open the Script editor window.
|
Click on 'Help' button. | Click on the Help button to open a page showing a list of available script commands. |
Click on 'OK' button. | Click on OK button to close this window. |
Cursor on 'Jmol script console' window. | Let us now try to write a few simple script commands.
|
Slide Number 8
Using commands. |
How to write script commands:
|
Slide Number 9
How to write Commands |
How to write these commands:
|
Slide Number 10
How to write Commands |
Continues with a set of parameters separated by spaces.
|
Slide Number 11
How to write Commands |
The command will appear red, until you have completed typing the command.
|
I am using Kmag screen magnifier to magnify the console. | |
Cursor on 'Jmol script console' window. | For example, to change the color of all the carbons in propane, to orange: |
After the $ prompt type select carbon;color atoms orange
>>Press Enter key
|
Place the cursor on the Script console window.
select carbon;color atoms orange
|
Cursor on Jmol panel. | The Propane model on the panel, now has all the carbons in orange color. |
After the $ prompt type
select all bonds;color bonds blue >> Press Enter key
|
Now to change the color of all bonds to blue.
select all bonds;color bonds blue Press Enter. |
Cursor on Jmol panel. | Observe that all the bonds in propane model are now blue in colour. |
Cursor on 'Jmol script console' window.
wireframe 0.05.
|
Next, let us change the size of bonds.
|
Cursor on 'Jmol script console' window.
>> Press Enter |
Similarly to increase the size of bonds.
|
In 'Jmol script console' window.
|
To change the size of atoms we will use the command spacefill followed by a decimal number.
Press Enter. |
Cursor on 'Jmol panel'. | Observe the size of atoms in the propane molecule decrease in size. |
Cursor on 'Jmol script console' window.
After the dollar prompt type 'spacefill 0.5' Press 'Enter' key on the key board. |
Similarly to increase the size of the atoms type:
Press Enter. |
Cursor on the panel. | You can see the change in size of the atoms. |
Cursor on 'Jmol script console' window. | Alternately, we can also use command cpk followed by percentage or decimal number.
The percentage represents the vandewaal's radius of the atom. |
Type 'cpk 25%' >> Press Enter | For example, type cpk 20% and press Enter.
|
Cursor on 'Jmol script console' window. | It is possible to write commands, to display lines of text on the Jmol panel. |
The command line for text starts with 'set echo'.
| |
Cursor on 'Jmol script console' window.
Type 'set echo top center;echo Propane' >> Press Enter
|
For example, we will display the name of the molecule as 'Propane' at the top center of the panel.
and press Enter. |
Cursor on the panel. | We can see the text 'Propane' displayed at the
top center of the panel. |
Cursor on 'Jmol script console' window. | We can also display other lines of text on the panel.
|
In 'Jmol script console' window.
After $ prompt type 'set echo bottom left; echo This is a model of Propane' >> Press Enter |
At the dollar prompt,
type set echo bottom left; echo This is a model of Propane
|
Cursor on the panel. | We can see the text line at the bottom left corner of the panel. |
Cursor on 'Jmol script console' window. | It is also possible to change the color, size and font of the displayed text. |
Cursor on 'Jmol script console' window.
After the $ prompt type 'font echo 30 Arial italic' >> Press Enter
|
For example, I want the text to be in Arial Italic font.
|
In 'Jmol script console' window.
'color echo yellow' >> Press Enter |
To change color of the text, we will use color echo followed by name of the colour.
|
Cursor on 'Jmol script console' window. | Likewise, you can explore many more commands and observe the changes.
|
Slide Number 12
Summary |
Let's Summarize:
In this tutorial we have learnt about:
We also learnt to
|
Slide Number 13
Assignment |
As an assignment
Create a model of 3-methyl-pentane. Use script commands to do the following.
|
Slide Number 14
Acknowledgement |
Watch the video available at this URL.
http://spoken-tutorial.org/What_is_a_Spoken_ Tutorial It summarizes the Spoken Tutorial project If you do not have good bandwidth, you can download and watch it |
Slide Number 15 | The Spoken Tutorial Project Team:
Conducts workshops using spoken tutorials Gives certificates to those who pass an on-line test For more details, please write to contact@spoken-tutorial.org |
Slide number 16 | Spoken Tutorial Project is a part of the Talk to a Teacher project
It is supported by the National Mission on Education through ICT, MHRD, Government of India More information on this Mission is available at this link http://spoken-tutorial.org/NMEICT-Intro ] |
This is Snehalatha from IIT Bombay signing off.
|