Note: JSmol is a new version of Jmol that can run without Java. Jmol and JSmol are essentially the same program, and these names are sometimes used interchangeably.
Report corrections or questions to Daniel Barich.
NOTE: On a Mac computer the slashes go in the opposite orientation.
When the folder opens, download the model template folder at http://biology.kenyon.edu/BMB/jmodel.zip.
jmodel folder from the zip file into the folder you opened in the first step. Rename
the folder immediately with your tutorial name, which should be as follows: the authors' first and last
initials, all capital letters, in the same order you will use on your main page (i. e., Jane Doe and John
Smith would use JDJS). Then open the folder.
Your folder should have the following files:
3gap.pdb: This is the molecule that is loaded when the tutorial is first opened.
1cgp.pdb: This file contains the DNA complex that is loaded later in the tutorial.
https://internal.kenyon.edu/biology/tutorials/2018/<your folder Name>/index.htm
Note: Always open JSmol tutorials using the web address (with https:). The tutorials will not work if you simply drag the filename into the browser.
1cgp.pdb. Usually when you initial download the PDB file it goes into a downloads folder. Move into your folder.
index.htmin BlueGriffon, (do this by choosing File | Open file, then typing
\parana.kenyon.edu\bio-tutorialsinto the dialog box then clicking on your molecule, then the index file, then Open.
var loadScript(should be about line 58).
load 3gap.pdbwith the name of your own PDB file. **Be sure capitalization is consistent with your own filename.
select all - The entire molecule will be affected by subsequent commands.
labels off - Turns off labels (in case another button turned them on).
spacefill off Turns off spacefill.
color cpk - Colors all atoms according to the CPK color scheme. (default)
wireframe off - Turns off wireframe, in order to show other renderings.
ribbons off - Turns off ribbons.
cartoons off - Turns off cartoons.
backbone on - Turns on backbone.
select protein - Only protein atoms will be affected by subsequent commands.
backbone off - Turns off backbone (so it doesn't interfere with cartoon).
cartoons on - Turns on cartoon rendering
select *a - Only chain a(*=all of it) will be affected from now on.
color blue - Blue color will be applied (to chain a only).
select *b - Only chain b will be affected.
color purple - Purple will be applied(to chain b).
Note: Begin each button's list of commands with select all followed by commands to turn on/off each of the possible renderings, as shown in the first eight commands of this example. This way, the reader of your tutorial will not have to click on each and every button in sequence. For ease of readability, after each select command, place the off commands in a group before the on commands, as in the example.
Edit the first button by changing "color blue" to "color red." Save file in BlueGriffon.
Reload the page, usually by pressing
Control + Shift + R (Pressing
Control + R
may not work due to browser caching).
Press the button that you edited in BlueGriffon. What happens?
Push the second button.What does it do?
Check it out in BlueGriffon.
Command list for the second button (excluding the first eight commands, which are the same as above):
select protein- Selects protein atoms
select cmp- Selects cAMP (cyclic monophosphate) [Probably absent in your own pdb].
wireframe 0.6- Sets wireframe width to 0.6 angstroms.
select atomno=1652 or atomno=3325- Select the atoms numbered 1652 and 3325
label cAMP- Labels selected atoms "cAMP."
font label 31- Set label font to 31 points.
select 130-139- Selects residues 130-139
select 140-209- Select residues 140-209
You can copy the code from an existing button to wherever you want to put a new button.
Go to the line (about line 147) which contains the following code:
The easiest way to set the location, orientation, and zoom level of a molecule in JSmol is to use the moveTo command, as follows:
moveTo [time in seconds] [rotation axis x y z] [rotation angle] [zoom%] [translate x y]
This command moves the molecule [rotation angle] degrees counterclockwise (to the left) about the specified rotation axis, sets the zoom level, and translates the molecule so that [zoom%] if it is visible. Positive values for the transform arguments move the molecule to the right for the x-axis and up for the y-axis, and negative values reverse the direction. The zoom and translate arguments are optional, but everything else is required, and you cannot skip an argument.
Whenever a JSmol molecule is displayed, you can generate a moveTo command that, when executed, will place the molecule in the current position and orientation. Move the mouse over the applet, click the right mouse button, and Select Console. The console window will open, where you can type commands and execute them to see their effect immediately. Type show orientation and press Shift+Enter. The display at the top of the popup window should display a moveTo command. You can then copy this command to the clipboard (you may first need to click on editor) by selecting it with the mouse and pressing Ctrl+C. Now you can paste the command in a block of script commands in your tutorial. Note that the first number after the word moveTo is the number of seconds the molecule will take to move to the new position. Remember to set this number to 0 if you want the molecule to position itself instantly.
If you run into any problems, please check the Troubleshooting page before asking for help.