User:Karsten Theis/Molecular Playground
From Proteopedia
Karsten Theis (Talk | contribs)
(New page: == Project name == Choose a project name, for example UvrB_1d9z. In the example, I combined the protein name with the PDB ID code of the coordinates I am showing. == First scene == The ea...)
Next diff →
Revision as of 13:40, 3 May 2025
Contents |
Project name
Choose a project name, for example UvrB_1d9z. In the example, I combined the protein name with the PDB ID code of the coordinates I am showing.
First scene
The easiest way to get started is with an existing Jmol scene (from Proteopedia, First Glance or from other sources - just make sure you have the rights to it). In the Jmol window, right-click somewhere on the top, and choose "console" from the menu. Then, type "write project_name.pngj" and save the file. This contains the coordinates and the drawing commands.
Then, start on your script file, named "project_name.spt". It could be as simple as:
load UvrB_1d9z.pngj spin on
This assumes that your "UvrB_1d9z.pngj" file is in the same folder as the script file, "UvrB_1d9z.spt", which is how the molecular playground is set up.
Banner
There is space for limited text at the top of the display, called the banner. We will add one command to set the banner to "DNA repair protein UvrB":
load UvrB_1d9z.pngj message driver:DNA repair protein UvrB spin on
When running in the molecular playground, the banner is also used to give feedback when the viewers hands are detected for rotation and zoom. This minimal file is ready for the molecular playground, but we will expand it a bit for testing.
Testing online or offline
With a little bit of extra work, we can write a script that you can test online on share (by posting on Proteopedia, for example), or run locally. You will see the line "if (_applet)" below, which checks if Jmol is running in an applet (i.e. is online). Here is the updated script:
if (_applet) { script https://proteopedia.org/wiki/images/6/65/Molecular_playground_helpers.spt load https://proteopedia.org/wiki/images/f/f6/Uvrb_1d9z.pngj } else { script Molecular_playground_helpers.spt load UvrB_1d9z.pngj } banner("DNA repair protein UvrB") spin on
For the applet, the URLs are given in their complete form, so they should work on Proteopedia and on other platforms. Try opening up Jmol Simple, clicking on console, and pasting the code above to test.