Molecular Playground/Procedures
From Proteopedia
This page is under development. It is presently very incomplete! |
This page details procedures for authoring content modules for Molecular Playground. It is a supplement to the main article on authoring modules, Molecular Playground/Authoring.
Help Is Available!
If you have any questions about these procedures, or run into any problems, please contact Template:Martz Email.
Installing a state script from Proteopedia
- Choose or make a page in Proteopedia where you will create your customized molecular scene. A good place to do this is in a Sandbox in your User namespace, such as "User:Your Name/Sandbox 1". Step by step instructions for creating and using such a Sandbox are available in Help:Sandboxes.
-
Create the customized molecular scene that you wish to show in MP by using the Scene Authoring Tools in Proteopedia. Save your scene so that it is displayed on the page where you are developing it. Introductory videos and extensive help are available to get you started with these easy-to-use tools.
-
Save your scene without "zoom-out" and "transition". Don't worry if you have already saved your scene. You can save as many versions of each scene as you wish.
- Edit your page and Show the Scene Authoring Tools.
-
Load your scene.
-
Click on the Save tab.
-
Add to the description "No zoom-out, no transition".
-
Set the scene to spin when it loads.
-
Check show advanced options.
-
Check both of the advanced options: skip the zoom-out and skip the transition.
-
Save your scene, making sure to change the scene number in your wikitext to show this new version of the scene.
-
Save the page and click the green link to display the scene. Fix any problems that you see.
-
Capture the state script for your scene. In order to project your scene in MP, you will need to capture the state script into a file on your computer. When completed, the script file will be submitted to the MP team. Having a local copy on your computer also has the advantage that you can display the scene in the Jmol application, in a 1024 x 768 pixel window, just as it will appear when projected in MP.
- Choose a short name for the MP module you are developing, typically using the name of the molecule. This name will be used in the names of all the files making up the module, thereby making them easy to identify. If there need to be spaces within the name, replace them with underscores (or simply omit the spaces). For example, "your_molecule" or "yourMolecule".
-
Create a folder (directory) on your computer to contain the files for this module, e.g. a folder named yourMolecule.
-
Display the state script: Display your scene in Proteopedia. Toggle spinning OFF. Orient the molecule as you would like it to first appear, by rotating it with the mouse. Click on "Jmol" (or right click) to open Jmol's menu, and select Show, Current state.
-
Save the state script into a file: Block select the entire state script in the upper frame of the Jmol Script Console window. (On Macs, you'll have to use the mouse for this.) Copy the entire state script into a text editing program. On Macs, you'll have to drag the blocked text and drop it into the text editor program. Save the state script into a file named e.g. yourMolecule_state.spt in the yourMolecule folder. The file type .spt signifies that this is a Jmol script. Be sure to save it as plain text. On Macs, plain text editors are TextEdit (comes with OS X; select Make Plain Text on the Format menu), and TextWrangler (free from BareBoneSoftware). On Windows, you could use WordPad (select Text Document on the save as type menu), Notepad, or MS Word (select Plain Text on the save as type menu).
-
Disable the load command: Put a hash sign (#) before the load command in the state script. You will find this command at the end of the second block of commands, namely, at the end of the block that begins "function _setFileState() {". Prefixing "#" comments it out", disabling it. The result should look something like this:
- #load /*file*/"http://proteopedia.org/cgi-bin/getpdbz?3ckz";
Save the state script file with the load command disabled.
-
Test your state script in the Jmol application.
- Put Jmol.jar in yourMolecule folder. Download Jmol: At Jmol.Org, select Download (upper right), go to the Jmol Downloads Page, and download the current version as a binary.zip file. Unzip the file (this is automatic on Macs), and copy the file Jmol.jar (one of a large number of files in the zipped download). This is the Jmol application. Paste Jmol.jar into yourMolecule folder.
-
Add the PDB file: Put a copy of the PDB file used in your module in the yourMolecule folder. In Proteopedia, search for your PDB code, and on the page titled with that PDB code, use the coordinates: save as pdb link to download the file.
-
Open Jmol: You should now have 3 files in yourMolecule folder: Jmol.jar, a PDB file which we'll refer to as yourMolecule.pdb, and a yourMolecule_state.spt file. Double-click Jmol.jar, and a black window will appear titled "Jmol". If the white "Jmol Script Console" window does not appear, use Jmol's File menu, Output Console to open it.
-
Display your scene: Type "load yourMolecule.pdb"