Difference between revisions of "Jmol-Application/C2/Script-Console-and-Script-Commands/English-timed"

From Script | Spoken-Tutorial
Jump to: navigation, search
Line 266: Line 266:
 
|-
 
|-
 
| 05:26
 
| 05:26
|The decimal number represents radius of the atom, in '''angstroms.'''
+
|The decimal number represents radius of the atom in '''angstroms.'''
  
 
|-
 
|-
Line 331: Line 331:
 
|-
 
|-
 
| 06:48
 
| 06:48
| We can see the text ''''Propane'''' displayed at the  top center of the '''panel.'''
+
| We can see the text "Propane", displayed at the  top center of the panel.
  
 
|-
 
|-
 
| 06:54
 
| 06:54
| We can also display other lines of text on the '''panel. '''
+
| We can also display other lines of text on the panel.
  
 
|-
 
|-
 
| 06:58
 
| 06:58
|For example, I want some text in the bottom left corner of the '''panel.'''
+
|For example, I want some text in the bottom left corner of the panel.
  
 
|-
 
|-

Revision as of 18:05, 30 March 2016

Time Narration
00:01 Welcome to this tutorial on Script console and script commands in Jmol Application.
00:08 In this tutorial, we will learn:
00:11 * About script commands
00:13 * How to use script console window
00:16 * Change display of model by using script commands
00:21 * Display lines of text on the panel.
00:24 To follow this tutorial,
00:26 you should know how to
00:27 create and edit molecular models in Jmol Application.
00:32 If not, watch the relevant tutorials available on our website.
00:37 To record this tutorial, I am using:
00:39 * Ubuntu OS version. 12.04
00:44 * Jmol version 12.2.2
00:47 * Java version 7.
00:51 Display on Jmol panel can be modified using:
00:55 * Options in Menu bar
00:57 * Options in the Pop-up-menu or
01:00 * by Scripting commands on the script console.
01:04 We had learnt to modify display using menu bar and Pop-up-menu in earlier tutorials.
01:13 In this tutorial, we will learn to use script commands.
01:18 A set of commands is called Script command.
01:22 Script commands control the display of a model on panel.
01:27 Jmol uses a command language, based on RasMol program.
01:32 Writing such commands is called scripting.
01:36 Documentation of Jmol's scripting language and list of commands is available at this link.

http://chemapps.stolaf.edu/jmol/docs/

01:44 Now, how to use script commands?
01:47 Script commands are typed on the “Script console” window.
01:53 Script console is the command line interface of Jmol.
01:58 It is available on the menu bar, under File and Console option.
02:03 This is Jmol Application window with a model of propane on screen.
02:08 Let us now learn to use Script console to change the display.
02:12 To open a Script console window, click on File menu in the menu bar.
02:19 In the drop-down, scroll down and click on Console.
02:24 Jmol script console window opens on the screen.
02:29 Script console window has a text area to type the commands.
02:34 At the bottom of the window, there is a button to open the Script editor window.
02:40 Other buttons, namely, Variables, Clear, History and State are also present on this window.
02:49 Click on the Help button to open a page showing a list of available script commands.
02:57 Click on OK button to close this window.
03:01 Let us now try to write a few simple script commands.
03:05 How to write these commands?
03:08 Type the command after the $ prompt on the Script console window.
03:13 Script commands start with a command word,
03:17 continues with a set of parameters separated by spaces.
03:22 And is terminated by the end of line character or semicolon.
03:27 The command will appear red, until you have completed typing the command.
03:33 Press Enter key on the keyboard to activate the command.
03:37 I am using Kmag screen magnifier to magnify the console.
03:44 For example, to change the color of all the carbons in propane to orange- place the cursor on the Script Console window.
03:53 At the dollar prompt, type: select carbon semicolon color atoms orange
04:05 Press Enter key on the keyboard.
04:08 The Propane model on the panel, now has all the carbons in orange color.
04:14 Now, to change the color of all bonds to blue-
04:18 At the dollar prompt, type:
04:20 select all bonds semicolon color bonds blue
04:26 press Enter.
04:29 Observe that all the bonds in propane model are now blue in colour.
04:35 Next, let us change the size of bonds.
04:39 At the dollar prompt, type: wireframe 0.05
04:45 The decimal number is used to specify the radius of bonds, in angstroms. Press Enter.
04:53 Note the change in size of the bonds in the Propane model.
04:58 Similarly, to increase the size of bonds, at the prompt, type: wireframe 0.1
05:07 Once again, note the change in size of the bonds.
05:12 To change the size of atoms, we will use the command spacefill followed by a decimal number.
05:20 At the dollar prompt, type: spacefill 0.2
05:26 The decimal number represents radius of the atom in angstroms.
05:30 Press Enter.
05:33 Observe the size of atoms in the propane molecule decrease in size.
05:39 Similarly, to increase the size of the atoms, type:
05:43 spacefill 0.5
05:46 Press Enter.
05:48 You can see the change in size of the atoms.
05:51 Alternately, we can also use command cpk followed by percentage or decimal number.
05:59 The percentage represents the vanderwaals radius of the atom.
06:04 For example, type: cpk 20% and press Enter.
06:11 Note the change in the size of the atoms.
06:15 It is possible to write commands, to display lines of text on the Jmol panel.
06:22 The command line for text starts with 'set echo'.
06:27 It is followed by the position of the text on the screen.
06:31 For example, we will display the name of the molecule as 'Propane' at the top center of the panel.
06:39 So, type: set echo top center semicolon echo Propane

and press Enter.

06:48 We can see the text "Propane", displayed at the top center of the panel.
06:54 We can also display other lines of text on the panel.
06:58 For example, I want some text in the bottom left corner of the panel.
07:04 At the dollar prompt,
07:06 type: set echo bottom left semicolon echo This is a model of Propane
07:15 Press Enter.
07:17 We can see the text line at the bottom left corner of the panel.
07:22 It is also possible to change the color, size and font of the displayed text.
07:29 For example, I want the text to be in Arial Italic font.
07:34 At the dollar prompt ($), type: font echo 20 Arial italic
07:42 Press Enter.
07:43 This will convert the text to 'Arial Italic' font.
07:48 To change color of the text, we will use color echo followed by name of the colour.
07:55 So, type: "color echo yellow" and press Enter.
08:01 Note the change in font colour.
08:05 Likewise, you can explore many more commands and observe the changes.
08:11 Let's Summarize:
08:13 In this tutorial, we have learned about:
08:15 * Script Commands and
08:17 * Script Console.
08:18 We also learned to:
08:19 * Change the display properties of the model by using script commands and
08:24 * Display lines of text on the panel.
08:28 As an assignment-
08:30 Create a model of 3-methyl-pentane.
08:33 Use script commands to do the following.
08:36 Change the color of all hydrogens to blue.
08:40 Change the color of all the bonds to red
08:43 and set the molecule to spin.
08:46 Watch the video available at this URL.

http://spoken-tutorial.org/What_is_a_Spoken_Tutorial

08:49 It summarizes the Spoken Tutorial project.
08:52 If you do not have good bandwidth, you can download and watch it.
08:57 The Spoken Tutorial Project team:
08:59 * Conducts workshops using spoken tutorials.
09:02 Gives certificates to those who pass an on-line test.
09:06 For more details, please write to: contact@spoken-tutorial.org
09:13 Spoken Tutorial project is a part of the Talk to a Teacher project.
09:17 It is supported by the National Mission on Education through ICT, MHRD, Government of India.
09:24 More information on this mission is available at this link:

http://spoken-tutorial.org/NMEICT-Intro

09:30 This is Snehalatha from IIT Bombay, signing off.

Thank you for joining.

Contributors and Content Editors

PoojaMoolya, Pratik kamble, Sandhya.np14