Molecular Playground/Procedures: Difference between revisions
Eric Martz (talk | contribs) |
Eric Martz (talk | contribs) |
||
(28 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
This page details procedures for authoring content modules for [http://molecularplayground.org Molecular Playground]. It is a supplement to the main article on authoring modules, [[Molecular Playground/Authoring]]. | This page details procedures for authoring content modules for [http://molecularplayground.org Molecular Playground]. It is a supplement to the main article on authoring modules, [[Molecular Playground/Authoring]]. | ||
This page describes procedures step by step. Modules at [[Molecular_Playground/Authoring#Three_Levels|Levels II and III]] use utility functions in MPSupportVersion01.spt. A list of these function is provided at [[Molecular_Playground/Support_Script_Help]]. | |||
==Help Is Available!== | ==Help Is Available!== | ||
Line 5: | Line 7: | ||
{{Template:Martz_email}} ([[User:Eric Martz]]). If you have suggestions to improve this page, either edit the page yourself, or email the suggestions to Eric. | {{Template:Martz_email}} ([[User:Eric Martz]]). If you have suggestions to improve this page, either edit the page yourself, or email the suggestions to Eric. | ||
== | ==Create a Customized Molecular Scene in Proteopedia== | ||
This procedure applies to [[Molecular_Playground/Authoring#Three_Levels|Levels I and II]]. | |||
<ol> | <ol> | ||
<li> | <li> | ||
'''Create a page in Proteopedia''' where you will create your customized molecular scene. A good place to do this is in a protected 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#Protected_Sandbox_Pages]]. | |||
</li><li> | |||
Normally, in Proteopedia, while editing a page, you insert Jmol by clicking a button labeled '''3D''' at the top of the wikitext box. This Jmol is square. However, for Molecular Playground, you need a '''rectangular Jmol''' the same shape as the projection. Instead of clicking the 3D button, paste this into your page | |||
<pre> | |||
<applet size='[450,338]' frame='true' align='right' | |||
caption='YYY' /> | |||
</pre> | |||
and then save the page. Jmol will be empty, but that's OK, we are going to add a molecule next. | |||
</li><li> | </li><li> | ||
'''Create the customized molecular scene''' that you wish to show in MP by using the ''Scene Authoring Tools'' in Proteopedia. '''Save''' your scene | '''Create the customized molecular scene''' that you wish to show in MP by using the ''Scene Authoring Tools'' in Proteopedia. '''Save''' your scene, and copy the green link that displays it into your wikitext box. Introductory videos and extensive help are available to get you started with these easy-to-use tools. | ||
<center> | <center> | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 45: | Line 56: | ||
</li> | </li> | ||
</ol> | </ol> | ||
</ol> | |||
==Capture the State Script for Your Scene== | |||
This procedure applies to [[Molecular_Playground/Authoring#Three_Levels|Levels I and II]]. | |||
<ol start='5'> | |||
<li> | <li> | ||
'''Capture the [[Jmol#State_Scripts|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. | '''Capture the [[Jmol#State_Scripts|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. | ||
Line 80: | Line 97: | ||
</li><!-- sublist --> | </li><!-- sublist --> | ||
</ol><!-- sublist --> | </ol><!-- sublist --> | ||
</li><li> | </li> | ||
</ol> | |||
===Submit Your Level I Module=== | |||
You have now completed the preparation of your Jmol state script. If you are making a '''Level I''' module, write your banner title, and submit the script file, PDB file, and banner title to the [http://molecularplayground.org MP Team]. Remember to design your banner text for the general public, including non-scientists. | |||
Please also develop a web page (see [[Molecular Playground/Authoring#Web Page Procedure in Proteopedia]]), and submit the address (URL) of that page as well. | |||
If you are making a '''Level II''' module, proceed with the next section. | |||
==Completing A Level II Module== | |||
<ol start='6'> | |||
<li> | |||
'''Add a banner and (optionally) a color key'''. | '''Add a banner and (optionally) a color key'''. | ||
<ol type="a"><!-- sublist --> | <ol type="a"><!-- sublist --> | ||
Line 87: | Line 118: | ||
:*[[Image:MP_relenza03.spt]] | :*[[Image:MP_relenza03.spt]] | ||
:*[[Image:MPSceneVersion01.spt]] | :*[[Image:MPSceneVersion01.spt]] | ||
:*[[Image:MPSupportVersion01.spt]] | :*[[Image:MPSupportVersion01.spt]] (see description of what is in this at [[Molecular_Playground/Support_Script_Help]]) | ||
</li><li><!-- sublist --> | </li><li><!-- sublist --> | ||
'''Rename''' MP_relenza.spt to | '''Rename''' MP_relenza.spt to yourMolecule.spt. | ||
</li><li><!-- sublist --> | </li><li><!-- sublist --> | ||
'''Customize''' the variables defined in | '''Customize''' the variables defined in yourMolecule.spt to specify details for your molecule. Change the following variable definitions: | ||
:*pdbFileName | :*pdbFileName | ||
:*localStateScript | :*localStateScript | ||
:*bannerMessage: Create a short, one-line description of your scene, mentioning the name of the molecule, and what is important about the scene or the molecule. | :*bannerMessage: Create a short, one-line description of your scene, mentioning the name of the molecule, and what is important about the scene or the molecule. Remember to design this for the general public, including non-scientists. | ||
Be careful to keep each variable's value within quotation marks! | |||
</li><li><!-- sublist --> | </li><li><!-- sublist --> | ||
'''Test''' your scripts. You should now have 6 files in the yourMolecule folder: Jmol.jar, yourMolecule.pdb, yourMolecule_state.spt, and the three .spt files listed above. In the Jmol application's white ''Jmol Script Console'' window (bottom section), enter '''script | '''Test''' your scripts. You should now have 6 files in the yourMolecule folder: Jmol.jar, yourMolecule.pdb, yourMolecule_state.spt, and the three .spt files listed above. In the Jmol application's white ''Jmol Script Console'' window (bottom section), enter '''script yourMolecule.spt'''. You should see your molecule, in your scene, with your banner at the top. (If not, re-check the preceding steps.) You will also see an inappropriate color key left over from the Relenza module. | ||
</li><li><!-- sublist --> | </li><li><!-- sublist --> | ||
'''Color key?''' | '''Color key?''' | ||
Line 109: | Line 141: | ||
'''Final Testing:''' Test your script, making adjustments as needed, to make sure it shows everything as you wish. | '''Final Testing:''' Test your script, making adjustments as needed, to make sure it shows everything as you wish. | ||
</li><li> | </li><li> | ||
'''Submit Your New Module to Molecular Playground:''' You will need to submit | '''Submit Your New Module to Molecular Playground:''' You will need to submit three of the six files in yourMolecule folder to be displayed in Molecular Playground: yourMolecule.spt, yourMolecule_state.spt, and yourMolecule.pdb. See email contacts at [http://molecularplayground.org MolecularPlayground.Org]. | ||
</li> | </li> | ||
</ol> | </ol> | ||
==Displaying | ==Displaying a Level II Scene in a Proteopedia Web Page== | ||
This procedure assumes that you have followed the procedure above to create a script '' | |||
This procedure does NOT apply to Level I modules. For Level II modules, you should begin creating your web page following the instructions at [[Molecular Playground/Authoring#Web Page Procedure in Proteopedia]]. You will reach a step in that procedure where you are invited, as a non-required option, to follow the procedure below. | |||
This procedure assumes that you have followed the procedure above, for Level II modules, to create a script ''yourMolecule.spt'' (where ''yourMolecule'' is the name of the molecule that you are displaying). Here is explained how to display that script in a page in Proteopedia, which can become the web page that you offer for more information to those MP onlookers who visit [http://molecularplayground.org MolecularPlayground.Org]. | |||
<ol> | <ol> | ||
<li> | <li> | ||
'''Specify ''proteopediaStateScript'':''' In | '''Specify ''proteopediaStateScript'':''' In ''yourMolecule.spt'' is the variable ''proteopediaStateScript'' that needs to specify the filepath for your state script on the Proteopedia server. Display the Proteopedia page where you developed your molecular scene, and edit that page. | ||
<!-- | |||
Click on the word ''Jmol'' to the lower right of the molecule, to raise Jmol's menu. On the menu, click on '''Show, History'''. The white ''Jmol Script Console'' will open, showing the filepath. Copy only the part beginning "/wiki...", excluding the word "script" and the semicolon at the end. | |||
--> | |||
From the <applet .... /> tag, copy the name of the scene, after "name=". From the example [[Molecular Playground/Relenza]], this is | |||
:User:Eric_Martz/Molecular_Playground/Authoring/3ckz_relenza_tyr274/9 | |||
On '''Macs, copy with Ctrl-C''' not Cmd-C. Paste it into the file ''MP_yourMolecule.spt'' between the double quotes for the value of ''proteopediaStateScript''. Now, add '''/wiki/scripts/''' to the beginning, and '''.spt''' to the end. The final product should look similar to this: | |||
:proteopediaStateScript = "/wiki/scripts/User:Eric_Martz/Molecular_Playground/Authoring/3ckz_relenza_tyr274/9.spt" | |||
(which came from the example [http://proteopedia.org/wiki/images/5/54/MP_relenza03.spt MP_relenza03.spt]). | |||
</li><li> | </li><li> | ||
'''Put a button into your web page:''' At the point where you want a button to display your scene, copy and paste the following into the wikitext of your web page: | '''Put a button into your web page:''' At the point where you want a button to display your scene, copy and paste the following into the wikitext of your web page: | ||
Line 132: | Line 175: | ||
Make sure there are no spaces before any of the lines you pasted in. | Make sure there are no spaces before any of the lines you pasted in. | ||
Save the page. (If you click the button now, your Jmol will display the Relenza scene.) | Save the page. (If you click the button now, your Jmol will display the Relenza scene.) | ||
Note: Alternatively you may use a green link to play your script instead of a button. See the demonstration at [[Demonstration of a complex animation playing from a green link]]. | |||
</li><li> | </li><li> | ||
'''Upload your script:''' At Proteopedia, click on ''Upload file'' in the toolbox on the left side of every page. Use the ''Choose File'' button to select MP_yourMolecule.spt. You don't need to change anything else on the page. (Optionally, in the Summary box, enter the title of the permanent page in Proteopedia where you will display the scene.) Click the button ''Upload file''. | '''Upload your script:''' At Proteopedia, click on ''Upload file'' in the toolbox on the left side of every page. Use the ''Choose File'' button to select MP_yourMolecule.spt. You don't need to change anything else on the page. (Optionally, in the Summary box, enter the title of the permanent page in Proteopedia where you will display the scene.) Click the button ''Upload file''. | ||
Line 146: | Line 191: | ||
Now, resume building your web page at [[Molecular_Playground/Authoring#Procedure_for_using_Proteopedia]]. | Now, resume building your web page at [[Molecular_Playground/Authoring#Procedure_for_using_Proteopedia]]. | ||
== Advanced Authoring == | |||
If you are editing your own script manually (e.g. for a Level III module), you may still make profit of the utilitites included in the support script. | |||
See [[Molecular Playground/Support Script Help]]. | |||
==Notes== | ==Notes== | ||
<references /> | <references /> | ||
[[Category:Molecular Playground]] | [[Category:Molecular Playground]] |