Part of the Jmol Training Guide
from the MSOE Center for BioMolecular Modeling
Any time you design something exceptionally cool in Jmol, you should save it! Saving your work allows you to revisit the design later, share the design with a collaborator, and revert back to your saved state if something goes wrong later on.
There are two main ways we suggest you save your progress in Jmol, as a JPEG File and as a Script. Each technique has its own advantages and disadvantages and are described in more detail below.
Note that both of the saving options described below can only be performed on the desktop version of Jmol. The web embedded Jmol shown to the right and the console below will not work for practicing these saving commands.
If you want to create a image of your molecule from Jmol (to use in a poster, for example), you can save a JPEG or a PNG file. To do this, click the "File" menu located on the top left of the Display Window. In the dropdown menu, select "Export" and then "Export Image".
Alternatively, you also save a JPEG or a PNG file by clicking on the small camera icon in the Jmol Toolbar Menu. This will open up the same saving dialog box as exporting an image through the "File" menu.
Any image saved from Jmol functions like any other JPEG on your computer and can be opened without Jmol in programs like Microsoft Word and Powerpoint.
Note that your image will capture exactly how your molecular structure was displayed in the Jmol Display Window on your screen. The larger the size of your display window on the screen, the higher the resolution of the image that is exported.
One of the neatest tricks in Jmol is the secrete reloading power of a saved Jmol JPEG file. If you have saved a JPEG from Jmol, you can drag the JPEG into an open Jmol display window (the same way you can open a PDB file by dragging it into the display window). This will bring your saved work back up in Jmol. the structure will be fully interactive and is ready to begin editing again!
Note that the JPEG file has to be saved in the same folder as the .pdb file that accompanies the image.
Be aware that if you edit the JPEG file in an image editing program (such as Microsoft Paint or Adobe Photoshop), you may loose the ability to reload your saved work in Jmol using the JPEG. The way Jmol uses JPEG files to reload your molecular design is by storing the Jmol commands you used in a special Comments section of the JPEG file. This comments section is often overwritten when the JPEG is opened and resaved using a different piece of software.
Similarly, when sharing your JPEG file by email, make sure to attach the JPEG file, rather than inserting it "inline" into the email text and content. Inserting a JPEG into an email's text often overwrites the comments section of the JPEG, removing a record of your saved design.
Saving a JPEG of your model design is useful, but it won't give you a record of the commands you used to produce the design. Script Files allow you to create an exact record of the commands you entered to produce your model design. This information will be helpful if you decide to create an Jmol Tutorial or Proteopedia Page to accompany a model.
After you have completed your model design, click the "History" button on the Jmol Console. This will generate a list of all the commands you entered, without any of the Jmol feedback messages. Copy and paste this history into a word processor or text editor such as Microsoft Word or Notepad.
Be sure to include the following information in your text document before saving:
There are some basic steps you can run through to "clean up" your script and make it easier for you (and others) to interpret later on.
Any line that begins with the symbol # is ignored by Jmol, so you can add comments to your script. It is often a good idea to add comments to indicate what features you are depicting in each of the blocks of commands (we often call these blocks of related Jmol commands "cassettes").
Below is a sample script before and after editing. Click Here to view the graphic below as a PDF document so it can be enlarged and studied in detail.
After annotating your script, you should always run the script in Jmol to make sure there aren't any errors and that the final molecular display is correct. To run a script file:
You can make changes to your script in the Script Editor Window and rerun the script to view the changes.
If you make a change to your script in the Script Editor Window, you should test out the change by running the script on a "fresh" .pdb file. To do this, either reload the .pdb file in Jmol, or simply click "Undo" on the Jmol Console to revert your model to its original form. This will let you quickly see effect of the change you made in your script.
Be sure you save your final revised script into a text editor or word processor when you are finished making your edits.
If the script doesn't execute, look in the Console for error messages. The console should direct to you the location of your error, where you an correct the script as needed.
If you can't find the error, you can click on "Step" instead of "Run" to execute the script line by line. You will need to click the step button to execute each individual line in your script.
Alternately, you can quickly narrow your search by removing the last half of the script, then running the first half. If the first part runs without problems, you can add additional chunks of script and run again. If the first part doesn't work, break it down into smaller chunks to isolate the problem.
As you are exploring your molecule and developing your molecular story, you will probably go through several iterations of your model design. We recommend that you save your designs early and often. We suggest that you save each design as a new file, and that you number the designs consecutively.
It is not a good idea to save over your earlier designs! Once you are satisfied with your final designs, you may wish to delete the unnecessary files, but keep iterative designs while creating your molecular design.
© Copyright 1995- - MSOE Center for BioMolecular Modeling