User:Wayne Decatur/Biochem642 Sandbox Steps
From Proteopedia
BIOCHEM642: Basic editing and creation of scenes in your Sandboxes
Editing your page
- LOGIN AND GO TO YOUR SANDBOX.
- NOTE THE LAYOUT OF YOUR SANDBOX PAGE:
- First is a box telling others about your reservation and instructions not to delete.
- Next is a title 'Your Problem Set Scenes'.
- ON THE RIGHT and below the line under the title text is the 3D Jmol applet window with the 1d66 structure spinning in it.
- Finally, TO THE LEFT of the Jmol applet window is information instructing you how to specify a scene in the 3D applet window at the right.
- First to let everyone know this is your page and starting setting it up for the format it will need to be in when you turn in your problem set, you'll edit your Sandbox to have your name in place of "Your" in front of "Problem Set Scenes":
- Click on 'edit this page' up at the top of the page.
- NOTE THE LAYOUT OF YOUR SANDBOX PAGE EDITING PAGE AND HOW IT IS SPECIFYING WHAT YOU SEE ON THE PAGE:
- First is a line that is the template telling others about your reservation and instructions not to delete. (LEAVE THIS ALONE IN ALL EDITING YOU DO.)
- Next is the text of the title you saw which is in between some equal signs that just signals in wiki-talk, called wikitext, how that text is to be formatted special.
- Next is wikitext beginning with '<applet' and ending by being closed with '/>'. All the text between '<applet' and '/>' just specifies the parameters of how to set up and what to show in the Jmol applet window where you saw the 1d66 structure spinning.
- Finally, there is the text that tells the page how to display the instructions I set up for you. We will return to this block of text later.
- For now we are just going to change the 'Your' in the title text to read the possessive of your name, for example the line specifying the title on my page would read:
==Wayne Decatur's Problem Set Scenes== - Once you have changed text in the editing window and are satisfied, look below the editing window (you may need to scroll your browser page down), and click the 'Save Page' button.
- Congratulations, you just edited your first Proteopedia page!
Author a scene (view) to add to your Sandbox page
- Once again, click on 'edit this page' up at the top of the page.
- Below the edit window (where you worked to change the title) you will see a picture of a protein next to text that says Scene authoring tools. Click on 'show' next to this and the Scene authoring tools will pop open below.
- Click on the 'load molecule' tab and enter 1d66 into the top box. Press the 'load' button.
- Once you see the 1d66 structure in the window to the right (it won't be spinning), use the 'selections','representations', and/or 'color' tab to change the scene in some manner. It doesn't matter exactly how because you are just practicing to learn the interface for now.
- Once you have a new scene, click the 'save scene' tab and give the scene a name and description. Choose whether you want it to molecule to spin or not when it is displayed.
- When you are satisfied with your name and description, press 'save scene' and you will see text show up in the box labeled 'wikitext' below.
- Highlight and copy the text at the bottom of that box (all text after the colon), and paste it below the other text up in the edit window.
- Now hide the Scene Authoring tools by pressing 'hide' next to the name (where you pressed 'show' earlier) and the 'Save page' button will again be active. Click the 'Save page' button.
- Congratulations, you just made your first scene!
- However, you'll need to press the green text (green link) on your page to see it. If you click on it while viewing the page, the scene in the Jmol window at the right should change to the scene you generated.
Make the scene you made show automatically in the 3D Jmol applet window when the page comes up
- BEFORE YOU CLICK 'edit this page' AGAIN, read the last text in the window to the left of the 3D Jmol applet as this outlines the process. (Leave this block of text on the page until you are comfortable making 3D applets, at which point feel free to delete it, if you want.)
- Go ahead now and click on 'edit this page' up at the top of the page.
- We will finally consider the last block of text in the edit window:
- Note that at the end of this block of text and flanked by nowiki tags to tell the page not to process it as normal wikitext is wikitext for a 3D Jmol structure applet window very similar to what we saw above; however, there is a significant difference: the scene parameter has been added in front of the caption parameter.
- In between the single quotes for the scene parameter is the name of a dummy scene; there is no real scene corresponding to this name.
- In the edit window, the wikitext for the currently active Jmol applet window right now reads :
<Structure load='1d66' size='300' frame='true' align='right' caption='Your caption here.' /> - Add a scene parameter tag to the 3D applet window information wikitext by copying the text from the sample one and pasting it in the wikitext for the active one just in front of 'caption'. Note: the one you pasted isn't a real scene name though! It will now resemble:
<Structure load='1d66' size='300' frame='true' align='right' caption='Your caption here.' scene='Sandbox/TestScene/1' /> - You need to get your scene information in the Jmol window by changing the dummy name to the name of your scene:
- Copy the name of your scene from the wikitext you pasted before that made the green link. Just copy the name that is between the sing quotes.
- Replace the dummy text between the single quotes of the name parameter of the wikitext for the Jmol applet window with your scenes name by now pasting it between those single quotes. It will now resemble:
<Structure load='1d66' size='400' frame='true' align='right' caption='Your caption here.' scene='SandboxNUMBER/YOURSceneHERE/1'/> - Press 'Save the page' below.
- Your scene should now come up automatically when the page starts up!
Editing the caption below the Jmol applet window
- Proteopedia offers a couple of ways to add captions. One way is to use a caption parameter in the Jmol applet wikitext.
- The applet code that is pasted by pressing the 3D button on the right of the wikitext toolbar above the edit window, be default, includes the caption which be edited. Another way to add captions to scenes also exists.
- Here is how to edit the caption parameter of the wikitext for the Jmol applet window:
- Go into the edit mode, by pressing 'edit this page' at the top of the page, if you aren't already in this mode.
- Find in the edit window the particular wikitext for the Jmol applet window that you want to add the caption below. The wikitext for the Jmol applet window will resemble:
<applet load='1d66' size='400' frame='true' align='right' scene='SandboxNUMBER/YOURSceneHERE/1' caption='Your caption here.' /> - Edit the text in between the single quotes that you see after:
caption= - Save the page.
Showing additional scenes on your Sandbox page
- Make another scene and save it. (You can keep the same name because it will get a new version number.)
- As you did before, copy and then paste the wikitext you need for that scene above in the edit window.
- Now copy the entire wikitext for the Jmol applet window that is near the top of the page. It will look like:
<applet load='1d66' size='400' frame='true' align='right' scene='SandboxNUMBER/YOURSceneHERE/1' caption='Your caption here.' /> - Paste this text just above the wikitext you pasted already for the new scene you just made.
- Edit the text between the single quotes of the scene parameter and the caption parameter to suit the new scene.
- Hide the Scene authoring tool, if you haven't done so yet, and save the page. You now should have two Jmol applet windows on your page. One with your old scene and one with your new one.
You have completed the basic editing and authoring steps
- It is suggested you at least look at the items that may be useful below so that if you run into similar issues, you know where to find the answer.
- When you do your problem sets and create new scenes, you can edit the Jmol windows you already have by changing the name of the scene in the wikitext specifying the window. You don't have to change the name in the 'load' paramaeter within the Jmol window wikitext because the scene will open with the right pdb file if it was used when making the scene.
- Go back to the Outline of the Sessions and examine the rest of the entries under Authoring Scenes and Views in Proteopedia and beyond.
Items that may be useful
Using the wikitext toolbar as am easy way to make a 3D Jmol applet window
- Instead of copying from elsewhere and then pasting the wikitext specifying an applet window into a spot on your page, you can use the wiki toolbar that show above the edit window in edit mode.
- Enter edit mode if you aren't in it, by pressing 'edit this page' up at the top of the page.
- Click the button that says '3D' on the right of the toolbar.
- Edit load parameter to have the pdb ID code you need and edit the caption if you want.
- Edit any of the other parameters as you choose.
- You can also add a scene parameter and the name of one of your scenes in between the single quotes, if you desire. For example:
<applet load='1d66' size='400' frame='true' align='right' scene='SandboxNUMBER/YOURSceneHERE/1' caption='Your caption here.' />
Nicely arranging multiple Jmol applet windows
- Using 'left', 'right' and 'center' align tags with small window size allows easy arrangement: example page here
- Tables also provide a simple way to control the arrangement of Jmol Applet windows on a Proteopedia page, for examples see here.
- Tables are specified by wikitext or html within the code controlling the page that you see when you go to 'edit this page'.
- Using wikitext markup or html is your own choice. Both do the same; they just use different syntax for specifying columns and rows.
- Some people may be more familiar with HTML or have HTML editors that they can use to facilitate these efforts.
- To help I have made a page with some useful examples:
- The page is: here
- You should be able to copy and paste the code of the examples and then adapt them to your scenes by pasting your code for 3D Jmol applet windows where I had sample wikitext for Jmol applet windows.
- Remember, you copy always copy the code from any page and edit in a page to which you have access.
- Tables are specified by wikitext or html within the code controlling the page that you see when you go to 'edit this page'.
Getting wikitext or scene names for old scenes or if you forgot to copy the scene before:
- Enter edit mode if you aren't in it, by pressing 'edit this page' up at the top of the page.
- Show the Scene Authoring tools.
- Click the 'load scene' tab and use the menu to find and select the scene name and version number.
- The scene will then come up in the Jmol window at the right and the wikitext will appear in the window at the bottom.
- Copy the wikitext you need or just the name of the scene, if that is all you need.
- Paste that information where you need it.
Editing the caption in the Jmol applet window
- Instead of putting the caption as text below the Jmol applet, you can build caption text into scenes that will show at the bottom of the Jmol applet window.
- Captions in the window might be more useful, in particular, for pages where a single Jmol applet hosts several scenes via green links.
- Either load an old scene you want to add the caption to in the Scene authoring tool, or make a new one using the Scene authoring tool.
- Go to labels tab, and down near the bottom, above the measurements, click 'show' next to caption.
- Enter the text you want, next to 'text:', set any optional parameters you want, such as the color and size, and then click 'set label' next to the text you just entered.
- Your caption will be added.
- Feel free to change the options to adjust it now.
- Save your scene as usual. (Again, if this is a new version of an old scene, you can just hit 'Save scene' and let Proteopedia save a new version number of it automatically.)
Beyond the basics
- Go back to the Outline of the Sessions and examine the rest of the entries under Authoring Scenes and Views in Proteopedia and beyond.
- If you want to explore further authoring or scripting, look at other Proteopedia pages and see the resources on the page for the work sessions too.