Creating Jmol Animations
Contributors
This Jmol Training Guide was created with funding from NIH Grant #1 R25 RR022749-01 and NSF-DUE #1323414 and #1725940. Revised 4/2021.

This Jmol Exploration was created using the Jmol Exploration Webpage Creator from the MSOE Center for BioMolecular Modeling.

version 2.0
Exploration Content

Advanced Scripting

Advanced scripting for e-posters takes the script of your static protein and elevates it to include elements like flashing or moving. With these script cassettes, you can focus your audience on different parts of your protein to tell its molecular story.

To get started, you will first have to set up the static image of your model design. In these examples, angiotensin converting enzyme (ACE) with bound Lisinopril is used (1o86.pdb). Any text in blue indicates a variable that must be specified based on the pdb file you are using. All cassettes will be written in the single command line format, with a semi-colon separating individual commands.

Define ligbind (LPR); Background white; backbone only; Backbone 1.5; Color backbone green; select ligbind; spacefill 1.25; wireframe 1.0; color cpk

Click on the button below to execute this script.

Initial Script - ACE with Lisinopril - PDB ID: 1o86

Below is a series of advanced scripting commands for tutorials. You don't have to use every type of command in one of your buttons, nor do you have to use them in the order presented here. Think of this as a script buffet – pick and choose what you want to use to get your story across. It'll all depend on what you want to show and when.

'Show orientation'/'moveto' Command

The move command allows you move your protein model around your Jmol screen. Although it doesn't matter for building the physical model, the move command can be used in tutorials to smoothly transition between different views of your model on screen.

First, line up your model on the screen as you'd want it to appear in the tutorial. You can rotate, translate, or zoom in on your protein to get it into position. Next, type 'show orientation' into your Jmol console. A set of text will pop up within your console. Copy the first four or so lines of text that starts with 'moveto' and goes until #OR (you do not have to include the #OR). Place this text into your e-posterscript. Then, continue on with your script. If you need your model to move again on screen, readjust your model and reuse the 'show orientation' command and once again copy the 'moveto' text into your script.

Here is a sample script showing the use of the moveto command; click on the button below to see the script executed in the Jmol window.

Define ligbind (LPR); Background white; backbone only; Backbone 1.5; Color backbone green; select ligbind; spacefill 1.25; wireframe 1.0; color cpk; moveto /* time, axisAngle */ 1.0 { -755 -631 180 120.08} /* zoom, translation */ 201.14 17.51 7.58 /* center, rotationRadius */ {40.551 39.3405 40.8385} 44.69673 /* navigation center, translation, depth */ {0.0 0.0 0.0} -2.4029727 180.53792 0.0;

Moveto Script

'Delay' Command

The delay command allows you to insert pauses within your e-poster script. Typically, I'll insert these between getting a protein in position and flashing a part of the protein (substrate, sidechain, etc.), just so it doesn't transition between the commands too quickly. In addition, some e-postercassettes need the delay command to work properly, such as 'flashing' (see below). However, the delay command can be used anywhere in your script that you feel you need a small break before the next set of commands begin.

Delay 0.6

The number after the 'delay' is the length of the pause in seconds. This value can vary greatly, depending on your use. Experiment with different numbers in your script until you pinpoint what feels appropriate for your script.

Here is a sample script, in which the backbone is initially green, then after a pause, becomes yellow.

Define ligbind (LPR); Background white; backbone only; Backbone 1.5; Color backbone green; select ligbind; spacefill 1.25; wireframe 1.0; color cpk; delay 1.0; select all; color backbone yellow

Click the button below to see this script in action.

Delay Script

Did you see the brief pause between the backbone changing from green to yellow? This is where the delay was inserted.

'Flashing' Cassette

This set of commands allows you to select any part of your protein and flash the color of the object to draw attention to it. There is no 'flash' command in Jmol; rather, the delay command is used successively as you switch between two colors. You can play around with the duration of the delay between colors to get the effect you want.

First, select the object you want to flash (name, chain, a specific section of amino acid numbers, etc.). In our example, we're going to focus on the ligand.

Select ligbind

Then use alternating 'color' and 'delay' commands to flash the object.

color lawngreen; delay 0.4; color cpk; delay 0.4; color lawngreen; delay 0.4; color cpk; delay 0.4;color lawngreen; delay 0.4; color cpk; delay 0.4;color lawngreen; delay 0.4; color cpk;

The first color used in the sequence is the color that the object should flash, normally a bright color that is different from the current color of the object. Then, a small delay is used, usually 0.4. The second color is the 'original' color of the object. This sequence is repeated for as long as you would like the object to flash. Flashing four times (in this case, from cpk to lawngreen) is typically sufficient to capture the audience's attention, though it can be modified to fit your purpose.

This sample script shows the flashing sequence in context. The ligand will flash five times in this example. Click on the button below the script to execute the script in the Jmol window at right.

Define ligbind (LPR); Background white; backbone only; Backbone 1.5; Color backbone yellow; select ligbind; spacefill 1.25; wireframe 1.0; color cpk; color lawngreen; delay 0.4; color cpk; delay 0.4; color lawngreen; delay 0.4; color cpk; delay 0.4;color lawngreen; delay 0.4; color cpk; delay 0.4;color lawngreen; delay 0.4; color cpk;

Flashing Ligand

'Zshade' Command

The 'zshade' command fades out the 'back' of the protein; it allows the audience to better see what is is the foreground. because there is less 'visual clutter'.

Insert the following command into your script:

set zshade on

Here's a sample script using the zshade command. Click the button to execute the script in the Jmol window.

Define ligbind (LPR); Background white; Spacefill off; Wireframe off; backbone only; Backbone 1.5; Color backbone green; select ligbind; spacefill 1.25; wireframe 1.0; color cpk; set zshade on

set zshade on

Spin command

You can turn spin on and off by toggling between the spin on and spin off commands.
A delay of 12.0 will allow the structure to complete one full rotation.

Insert the following command into your script, typically as the last command:

spin on

Here's a sample script using the spin on and spin off commands. Click the button to execute the script in the Jmol window.

Define ligbind (LPR); Background white; backbone only; Backbone 1.5; Color backbone green; select ligbind; spacefill 1.25; wireframe 1.0; color cpk; spin on; delay 12.0; spin off

Spin script

Putting It All Together

As you are crafting these advanced scripts for an e-poster or Jmol tutorial, you now have to consider the order in which you execute your commands. Jmol 'reads' your script in order and executes the script in that order. So, if you want your protein to move into a position, then you want your substrate to flash, THAT is the order in which you must enter the cassettes: move, then flash. When your script begins to get long, it helps to read through the script, command by command, and imagine what is happening to your protein. Is this what you want your audience to see, too?

Now, let's put a few scripting cassettes together. The sample script below displays the protein in backbone, then orients it to see the ligand. The ligand then flashes in green, and then shading is added to give the protein depth and make the ligand more visible. After reviewing the script, click the button to see it execute.

Define ligbind (LPR); Background white; backbone only; Backbone 1.5; Color backbone yellow; select ligbind; spacefill 1.25; wireframe 1.0; color cpk; delay 1.0; moveto /* time, axisAngle */ 1.0 { -755 -631 180 120.08} /* zoom, translation */ 201.14 17.51 7.58 /* center, rotationRadius */ {40.551 39.3405 40.8385} 44.69673 /* navigation center, translation, depth */ {0.0 0.0 0.0} -2.4029727 180.53792 0.0 ; delay 1.0; Select ligbind; Color lawngreen; Delay 0.4; Color cpk; Delay 0.4; Color lawngreen; Delay 0.4; Color cpk; Delay 0.4; Color lawngreen; Delay 0.4; Color cpk; Delay 0.4; Color lawngreen; Delay 0.4; Color cpk; delay 0.4; color lawngreen; delay 0.4; color cpk; set zshade on

Multiple Cassette Script

Multiple advanced scripting cassettes were put together to create a cohesive button that points out the drug bound to this protein.

Jmol