User:Eric Martz/Molecular Playground/Authoring: Difference between revisions

From Proteopedia
Jump to navigation Jump to search
Eric Martz (talk | contribs)
Eric Martz (talk | contribs)
x
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
{| style="background:pink;"
This page has been moved to a permanent location, [[Molecular Playground/Authoring]].
| This page is under development. It is presently very incomplete!
|}
 
This page makes recommendations and offers shortcuts for authoring effective presentation modules for Molecular Playground (MP; see [http://molecularplayground.org MolecularPlayground.Org]).
 
==Components of a Module for MP==
 
Each module in MP will ideally include the following components:
<ol>
<li> A '''[[#Jmol Scripting Options|Jmol script]]''' that
  <ol type="a">
  <li>
Displays a '''molecule''', optionally with animations, labels, and color keys.
  </li>
  <li>
Displays a '''one-line text banner''' stating the name of the molecule and why it is important, plus a second line with the invitation "More at MolecularPlayground.Org".
  </li>
  </ol>
</li>
<li>
A '''[[#Web Pages|web page]]''' that plays the above Jmol script, and also provides more information about the molecule for a general audience, with links to information in greater depth. The author of the module can choose to put the web page in Proteopedia, or elsewhere.
</li>
</ol>
For examples, see "The Molecules" web pages linked to [http://molecularplayground.org MolecularPlayground.Org].
 
==Designing An Effective Module==
 
===Use light colors on a black background===
 
Because MP projects in a well lit atrium, generally a black background (which will appear medium gray) works best. Dark colors are hard to see on the black background, so use light colors as much as possible. In particular, Jmol's default [[CPK]] colors for carbon, oxygen and nitrogen are marginally visible. Therefore the support script provided for MP includes a function ''colorAllLightCPK'' that applies lighter colors to these elements.
 
===Facilitate rotation by onlookers===
 
MP invites onlookers to interact by rotating the structure at any time. Therefore, scripts should be designed to permit rotation as much as possible. Furthermore, it may be desirable for the user-set orientation to remain while the script proceeds, perhaps all the way to the end of the script. For example, a ''moveto'' command precludes rotation until the specified orientation is completed. In the version of Jmol currently used in Proteopedia (11.8.9 in December, 2009), ''zoomto'' commands also enforce the current orientation, "fighting" with the onlooker who attempts rotation during the timed zoomto. Therefore, the support script provided for MP includes a function ''zoomRotatableTo()'' that performs the zoom while permitting rotation.
 
===Avoid displays that seriously slow Jmol===
The following displays cause spinning or rotation to become slow and jerky in the full-sized (1024 x 768 pixels) MP projection. Your displays will be more satisfying if these can be avoided. A good way to test this is to try your scripts in the Jmol application at 1024 x 768 pixels.
 
* '''Large numbers of spacefilled atoms''', such as spacefilling all atoms in a protein. The higher the zoom, the jerkier the spinning.
 
* '''Translucency'''.
 
* '''High-Quality Display''', namely ''set antialiasdisplay true''. The MPSupportVersion01.spt actually uses high-quality when the script is displayed in the applet, because at the typical applet size (450 x 350 pixels) the speed penalty is acceptable.
 
* '''Trace''' is slower than backbone. Thick traces are slower than thin traces. High zoom levels are even slower. You can get away with a thin trace at low zoom for a moderate-sized protein.
 
===Test your script at 1024 x 768 pixels===
 
The UMass ISB<ref>[http://MolecularPlayground.Org MolecularPlayground.Org]</ref> projector projects a rectangle 1024 pixels wide by 768 pixels high. When testing your scripts, it is best to size the Jmol application window close to 1024 x 768 pixels. (The pixel dimensions are shown at the bottom of the Jmol application window.) Speed and jerkiness of rotation are affected by the window size. Also, zoom values differ for square vs. rectangular Jmols. (The support script provided for MP specifies ''set zoomLarge off'', which makes 100% zoom show the entire molecule within the smaller dimension of Jmol.)
 
Molecular Playground pages in Proteopedia should also use rectangular Jmols, rather than the default square ones. A good size is 450 x 338 (which has the same width/height ratio of 1.333 as does 1024 x 768). This can be specified in the applet tag in the wikitext editing box with size='[450,338]'. To see exactly how to do this, try editing the section below that contains a Jmol, which has this recommended size.
 
==Jmol Scripting Options==
 
===A Single Molecular Scene, Spinning===
 
The '''simplest option''' is a '''single customized molecular scene''',  with the molecule '''spinning''' slowly. Such a scene, lacking complicated animations, can be created in Proteopedia -- without learning any Jmol scripting language. Proteopedia offers ''Molecular Scene-Authoring Tools'' that make this relatively easy. Details will be found below under [[#Procedure|Procedure]], but first, let's look at a concrete example.
 
<applet size='[450,338]' frame='true' align='right' scene='User:Eric_Martz/Molecular_Playground/Authoring/3ckz_relenza_tyr274/9' caption='Relenza binding to influenza neuraminidase N1 mutant H274Y (3ckz).' />
 
====Example====
At right is an example of a
customized molecular scene<ref>This scene shows the anti-influenza drug ''Relenza'' binding to mutant neuraminidase H274Y ([[3ckz]]). This mutant is resistant to ''Tamiflu''. For more information, see [[Avian_Influenza_Neuraminidase%2C_Tamiflu_and_Relenza#Resistance_to_Tamiflu_and_Relenza]].</ref> (<scene name='User:Eric_Martz/Molecular_Playground/Authoring/3ckz_relenza_tyr274/9'>restore initial scene</scene>), created with Proteopedia's ''Scene Authoring Tools''.
 
Now we'll use the MP support script (explained in the procedure linked below) to put a banner at the top of Jmol<ref name="button">The font sizes in the banner and color key will be proportionally larger when projected in MP, but they will not be larger in the ''Popup'' window in Proteopedia. Using the MP support script in Proteopedia requires that we upload our main script. Uploaded scripts can be played with buttons, as demonstrated above, but are not played with green links.</ref>. Notice also that the chemical element colors for carbon, oxygen, and nitrogen ([[CPK|CPK colors]]) are now lighter, as recommended [[#Use light colors on a black background|above]].
<jmol>
<jmolButton>
<script>
script "/wiki/images/6/6c/MP_relenza01.spt"
</script>
<text>Add Banner</text>
</jmolButton>
</jmol>
([[:Image:MP_relenza01.spt|MP_relenza01.spt]])
 
Next, we'll use the MP support script (explained below) to add a color key<ref name="button" />.
<jmol>
<jmolButton>
<script>
script "/wiki/images/3/31/MP_relenza02.spt"
</script>
<text>Add Color Key</text>
</jmolButton>
</jmol>
([[:Image:MP_relenza02.spt|MP_relenza02.spt]])
 
Finally, we can jazz up the entrance with zooming <ref name="button" />.
<jmol>
<jmolButton>
<script>
script "/wiki/images/5/54/MP_relenza03.spt"
</script>
<text>Add Zooming Entrance</text>
</jmolButton>
</jmol>
([[:Image:MP_relenza03.spt|MP_relenza03.spt]])
 
====Procedure====
 
The step-by-step procedure for constructing scripts, similar to those exemplified above, will be found at [[Molecular Playground/Procedures#Installing a state script from Proteopedia]]. This procedure includes an explanation of how to use the MP Support scripts that will be required ([[Image:MPSceneVersion01.spt]] and [[Image:MPSupportVersion01.spt]]).
 
===A Complex Animation===
If your module will be more complex than can be produced by a single scene in Proteopedia, then you will need to write much of the script by hand. However, we still strongly recommend that you first do a module based upon a single Proteopedia scene. This will familiarize you with key points that will not be repeated below.
 
In creating a script for a complex animation, you don't have to start from scratch! You should start by downloading the script from whichever of these existing modules has the most in common with your plans:
* [[Molecular Playground/Tamiflu]] (a single molecular model)
* [[Molecular Playground/HIV Protease Inhibitor]] (a multiple-model animation)
 
You will find links for downloading the scripts on the above-linked pages. These scripts contain crucial sections for initialization (including calling the support script), defining useful variables, loading the molecule,  etc. They will show, by example, how to do the things displayed in these modules. You can change the module-specific parts of one of these scripts to customize it for your module. The first step is to change the local PDB file loaded from tamiflu.pdb or hivdrug.pdb to yourMolecule.pdb . It is a good idea to test the script after each change. That way, if something doesn't work, you'll know which change caused the problem.
 
Proteopedia contains a support script for Molecular Playground, [[Image:MPSupportVersion01.spt]]. The support script contains functions that make it easy to do commonly needed tasks, such as
* colorAllLightCPK: makes the default colors for carbon, nitrogen, and oxygen lighter, so they show up better when projected in a well-lighted room.
* showBannerAcrossTop() places a banner across the top of Jmol. It sets up a white background for the banner, and automatically adjusts the font size for projection vs. an applet on the web page.
* labelAtomWithPointer()
* zoomRotatableTo() zooms slowly (up or down), and permits the onlooker to rotate the molecule during zooming.
* growSpacefill() and growWireframe() make the selected atoms "grow" slowly into spacefilled or wireframe representations, permitting rotation by the onlooker during these transitions.
If you need a transition or function that is not included, don't hesitate to ask for help in adding it. Please contact {{Template:Martz_email}}.
 
==Web Pages==
MP offers more information about the molecule displayed in each module by going to [http://molecularplayground.org MolecularPlayground.Org]. The web page providing that information should be brief, should emphasize the impact or importance of the structure displayed, and should be designed for a general audience of non-scientists. Links to articles in greater depth (possibly within Proteopedia, or at [http://wikipedia.org Wikipedia]) can be provided for those who want more.
 
Examples:
* [[Molecular Playground/HIV Protease Inhibitor]]
* [[Molecular Playground/Tamiflu]]
 
===Advantages of using Proteopedia===
Creating the web page in Proteopedia has numerous advantages.
*Creation and later editing of the page, using the wikitext mechanism, are quite easy, requiring no specialized knowledge of HTML.
*Other visitors to Proteopedia may improve the web page in a collaborative effort. Alternatively, should you prefer, you can [[Help:Protected pages|protect]] your page from editing by anyone but yourself. It is also possible to hide the page from others while you are developing it, using Proteopedia's [[Proteopedia:Workbench|Workbench]] mechanism.
*You may show the exact scene or animation, as projected at MP, in Jmol on the web page in Proteopedia. Installing Jmol on your page is very easy, requiring no specialized knowledge of the Jmol applet.
*You do not need to provide a web server. Proteopedia's web server makes your page available to the world immediately, with no additional effort, free of charge.
*Detailed instructions are provided (below).
 
Your MP web page need not be in Proteopedia. You can put it on another server if you prefer.
 
===Procedure for using Proteopedia===
<ol>
<li>
'''Identify the page''' in Proteopedia where you will develop your article to provide more information as a supplement to your module in MP.
There are three options:
<ol type="a"><!-- sublist -->
<li><!-- sublist -->
A '''protected''' page that only you can edit. This can be the temporary or permanent location of your web page. See [[Help:Protected Pages]].
</li><li><!-- sublist -->
A '''page that only you can view'''. If you are uncomfortable about others seeing your page while you are developing it, you could use this option. Note that Proteopedia administrators can see such pages. For instructions, see [[Proteopedia:Workbench]].
</li><li><!-- sublist -->
A '''permanent page'''. Such a page should be titled "Molecular Playground/Your Molecule" (where "Your Molecule" is replaced by the name of your molecule). This will distinguish it from a page titled simply "Your Molecule", which would be intended to treat the subject in more depth for an audience of scientists. Content developed on a protected page or a workbench page could be moved to such a permanent page when it is finished. For instructions, see [[Help:Editing#How_To_Create_A_New_Page]].
</li><!-- sublist -->
</ol><!-- sublist -->
</li><li>
Write the text for your page, dividing it into logical sections. See the example pages linked [[#Web Pages|above]]. On the example pages, use the ''edit this page'' tab to see how the wikitext is done, then Cancel editing.
</li><li>
Insert <nowiki>{{Template:MP_masthead}}</nowiki> at the top of your page to show the MP masthead photographs. Depending on what follows, you may need to put several blank lines after it to force the ''Contents'' table down, as done in [[Molecular_Playground/HIV_Protease_Inhibitor]].
</li><li>
Search for related pages in Proteopedia, Wikipedia, and the scientific literature and provide links to them.
</li><li>
At the bottom of your page, add <nowiki>[[Category: Molecular Playground]]</nowiki>. This adds your page to that Category, which lists all such pages.
</li>
</ol>
 
==Notes and References==
<references />
 
[[Category: Molecular Playground]]

Latest revision as of 06:14, 20 December 2009

This page has been moved to a permanent location, Molecular Playground/Authoring.