Help:Copying FirstGlance Scenes into Proteopedia: Difference between revisions

From Proteopedia
Jump to navigation Jump to search
Eric Martz (talk | contribs)
No edit summary
Eric Martz (talk | contribs)
No edit summary
 
(44 intermediate revisions by the same user not shown)
Line 1: Line 1:
<center><table width="90%" border="1" cellpadding="8" style="background: #ffffa0;"><tr><td>
[[FirstGlance in Jmol]] makes it easy to obtain '''certain types''' of molecular scenes more easily than generating those scenes in Proteopedia's [[Scene Authoring Tools]]. This page explains how to move those scenes into Proteopedia, attaching them to a green link.
<b>Mac Users:</b> As of March, 2011 (Apple [[Java|Java version]] 1.5.0_28), there are intermittant problems copying and pasting state scripts from the Jmol Console (on Macs only).  The only workaround we know is to do the procedure below on a Windows computer. We suspect that this is due to a temporary problem in Apple Java. This message will be removed once the problem is resolved.
</td></tr></table></center>


<applet load='1gpk' size='350' frame='true' align='right' caption="Selected contacts between an anti-Alzheimer`s drug analog and acetylcholinesterase in [[1gpk]]. Scene generated largely and quite easily in [[FirstGlance in Jmol]]. Atoms shown as balls are within non-covalent bonding distances. Use '''popup''' to see details in this scene!"  
<StructureSection size='350' side='right' caption="Selected contacts between an anti-Alzheimer`s drug analog and acetylcholinesterase in [[1gpk]]. Scene generated largely and quite easily in [[FirstGlance in Jmol]]. Atoms shown as balls are within non-covalent bonding distances. Use '''popup''' to see details in this scene!" scene='23/236474/Selected_hup_contacts2/3'>
scene='Help:Copying_FirstGlance_Scenes_into_Proteopedia/Selected_ligand_contacts/4' />
==Procedure==
1. Obtain the '''desired scene''' in FirstGlance in Jmol. Turn off spinning (even if you want it to spin in Proteopedia), and orient and zoom the molecule as you want it to appear initially.
''This procedure was improved in July, 2024.''


2. '''Open Jmol's Console:''' Click on the word '''Jmol''' at the lower right corner below the molecule. On the menu that opens, click '''Console'''. A new small white window will appear. It is the ''Jmol Console''.
1. View the molecule in FirstGlance.
:*If the molecule has a [[PDB code]], search for the page titled with that PDB code in Proteopedia. At that page, click on the link to ''FirstGlance'' beneath the molecule, in the '''Resources''' block.
:*Or, simply go to [http://firstglance.jmol.org firstglance.jmol.org] and enter the PDB code.
:*If the model does not have a PDB code (e.g. a [[Practical Guide to Homology Modeling|homology model]]), upload the PDB file at [http://firstglance.jmol.org firstglance.jmol.org].
:*If you want to color the protein by evolutionary conservation, there are two methods:
:**It is possible to create a green-linked scene with a molecule colored by evolutionary conservation simply by using the button "evolutionary conservation" in the "color" tab of the [[SAT|Molecular Scene Authoring Tools]]. However, as explained in [[Conservation, Evolutionary#Caveats|Caveats]], this pre-calculated color scheme may obscure important parts of the conservation pattern. This is explained at [[Interpreting_ConSurf_Results#Diversity_in_the_MSA|Diversity in the MSA]] and with an example under [[Interpreting_ConSurf_Results#Average_Pairwise_Distance|Average Pairwise Distance]].
:**You can use custom settings at the ConSurf Server to limit the MSA largely to proteins of a single function. Some examples are explained at [[Interpreting ConSurf Results]], and the basic ConSurf Server procedure is at the [[ConSurf Quick Analysis Procedure]].


3. '''Display the state script:''' Click the console buttons ''Clear Output'', then ''State''. A long Jmol command script will appear in the top box of the Console. This script describes the current state or scene in Jmol. (If you are using this as a guide to help copy scenes from other Jmol-based sources, you should note that for later versions of Jmol, such as 11.8.9, you show the state by selecting ''Show'' and then ''Current state'' from the Jmol menu that comes up under the Jmol frank. Counter-intuitively (and counter earlier versions), hitting the ''State'' button in the console presently '''''does not''''' show the state script.)
2. Obtain the '''desired scene''' in FirstGlance in Jmol. Turn off spinning (even if you want it to spin in Proteopedia), and orient and zoom the molecule as you want it to appear initially.


4. '''Copy the state script:''' Click in the top box of the Console, then Ctrl-A (Windows) or Cmd-A (Apple) to select the long script. Ctrl-C (Windows) or Cmd-C (Apple) to copy the script to the clipboard. On Mac OS X it will be helpful to drag the blocked state script and drop it into a text editor such as TextEdit.
3. Right-click (Mac: Ctrl-click) on or near the molecule to open JSmol's menu. Select '''File''', '''Save script with state'''. A dialog will appear in which you can choose the location on your computer's disk to save the file. Take note of the name of the file and where you are putting it. This file contains a ''state script'' of JSmol commands that will produce your scene.


5. Edit the page in Proteopedia where you want to install the scene from FirstGlance in Jmol. Show the '''Scene Authoring Tool'''.
4. '''Delete the load command.''' Edit the state script file with a [[Help:Plain text editors|plain text editor]]. Before you use the state script, you must the entire command at the end of the 3rd block of commands, and then save the file with that change. Delete <font color="red">everything shown below in red</font>: the entire command beginning with "load", deleting everything up until the closing bracket "}" (keeping that closing bracket!). The load command may be long, wrapping onto several lines in your plain text editor.
 
6. '''Load your molecule:'''
Use the '''load molecule''' tab to load your PDB code into the Jmol in the ''Scene Authoring Tool''.
 
7. Click the '''select all''' button below Jmol.
 
8. Open the '''representations''' tab and click the '''hide selection''' button. This hides the molecule -- there will be nothing in Jmol.
 
9. Click '''Jmol''' at the lower right of Jmol, to open Jmol's menu. Click '''Console''' to open the console.
 
10. '''Paste''' your state script (from the clipboard) into the bottom box of Jmol's Console, and DO NOT press Enter or click Run yet.  On '''Mac OS X''', paste with '''Ctrl-V''' instead of Cmd-V, but DO NOT press Enter of click Run yet.
 
11. '''Comment out the load command.''' Before you Run the state script, you must insert # before the word "load" in the command at the end of the 3rd block of commands. This disables the command, which is required. It should look something like this:
<blockquote>
<blockquote>
function _setFileState() {
function _setFileState() {
Line 33: Line 24:
<br> &nbsp; <font color="#808080">... blah blah blah ...  </font>
<br> &nbsp; <font color="#808080">... blah blah blah ...  </font>
<br> &nbsp; set smartAromatic true;
<br> &nbsp; set smartAromatic true;
<br> &nbsp; <font color="red">#</font>load /*file*/"<nowiki>http://www.rcsb.org/pdb/cgi/export.cgi/1GPK.pdb.gz</nowiki>";
<br> &nbsp; <font color="red">load /*file*/"<nowiki>http://www.rcsb.org/pdb/cgi/export.cgi/1GPK.pdb.gz</nowiki>"; </font>
<br><br>
<br><br>
}</blockquote>
}</blockquote>


12. '''Run''' the pasted state script by clicking the ''Run'' button in Jmol's Console. Your FirstGlance scene should appear in the ''Scene Authoring Tool's'' Jmol.  
5. Edit the page in Proteopedia where you want to install the scene from FirstGlance in Jmol. Show the '''Scene Authoring Tool'''.


13. Use the '''save scene''' tab to save the copied scene. Follow the instructions there to insert a green link into the page to show your scene.
6. '''Load your molecule:''' Use the '''load molecule''' tab to load your PDB code (or uploaded molecule) into JSmol in the ''Scene Authoring Tool''.


See the similar procedure [[Conservation%2C_Evolutionary#How_to_Insert_a_ConSurf_Result_Into_a_Proteopedia_Green_Link|How to Insert a ConSurf Result Into a Proteopedia Green Link]].
7. '''Exit load molecule mode''' by clicking on, for example, the ''selections'' tab. Additional options will appear below the molecule.
 
8. '''Drag''' the edited state script file and '''drop''' it into JSmol (where the molecule is displayed). Your scene should appear in a few seconds.
 
9. Use the '''save scene''' tab to save your scene. Follow the instructions there to insert a green link into the page to show your scene.


==Tweaking the Scene from FirstGlance==
==Tweaking the Scene from FirstGlance==
<applet load='1gpk' size='300' frame='true' align='right' caption='Scenes from [[1gpk]].' />
 
[[1gpk]] was displayed in  [[FirstGlance in Jmol]].
[[1gpk]] was displayed in  [[FirstGlance in Jmol]].
<scene name='Help:Copying_FirstGlance_Scenes_into_Proteopedia/Selected_ligand_contacts/1'>Selected contacts</scene> were visualized in [[FirstGlance in Jmol]] using the ''Contacts..'' and ''Hide..'' dialogs, simply by clicking on controls. The scene was transferred into Proteopedia using the above procedure.
<scene name='23/236474/Selected_hup_contacts2/1'>Selected contacts</scene> were visualized in [[FirstGlance in Jmol]] using the ''Contacts..'' and ''Hide..'' dialogs, simply by clicking on controls. The scene was transferred into Proteopedia using the above procedure.
 
Then, in Proteopedia's [[SAT]], the <scene name='23/236474/Selected_hup_contacts2/2'>sizes of labels were reduced</scene> by clicking ''select all'', then in the ''labels'' dialog, reducing the size to 12<ref>The size of the font for distances in Ångstroms was reduced by opening the "measurements" box under the Labels tab, and selecting size 12.</ref>, changing the color to orange, and changing the offsets to 1 and 1 (all without entering any label text or clicking the ''set label'' button). Finally, <scene name='23/236474/Selected_hup_contacts2/3'>the drug was labeled</scene>.
 
</StructureSection>
 
==Feedback==
If you have problems getting this to work, or suggestions to clarify this page, please email [[Image:Contact-email.png]]
 
==Notes==
<references />


Then, in Proteopedia's [[SAT]], the <scene name='Help:Copying_FirstGlance_Scenes_into_Proteopedia/Selected_ligand_contacts/2'>sizes of labels were reduced</scene> by clicking ''select all'', then in the ''labels'' dialog, reducing the size to 12, selecting boldface, and changing the offsets to 1 and 0 (without entering any label text or clicking the ''set label'' button). Finally, <scene name='Help:Copying_FirstGlance_Scenes_into_Proteopedia/Selected_ligand_contacts/4'>the drug was labeled</scene>.
==See Also==
*[[Help:How to Insert a ConSurf Result Into a Proteopedia Green Link]]
*[[Help:How to put a PACUPP scene into Proteopedia]]
*[http://wiki.jmol.org/index.php/Copying_and_pasting_scripts Copying and pasting scripts]

Latest revision as of 03:45, 28 July 2024

FirstGlance in Jmol makes it easy to obtain certain types of molecular scenes more easily than generating those scenes in Proteopedia's Scene Authoring Tools. This page explains how to move those scenes into Proteopedia, attaching them to a green link.

Procedure

This procedure was improved in July, 2024.

1. View the molecule in FirstGlance.

  • If the molecule has a PDB code, search for the page titled with that PDB code in Proteopedia. At that page, click on the link to FirstGlance beneath the molecule, in the Resources block.
  • Or, simply go to firstglance.jmol.org and enter the PDB code.
  • If the model does not have a PDB code (e.g. a homology model), upload the PDB file at firstglance.jmol.org.
  • If you want to color the protein by evolutionary conservation, there are two methods:

2. Obtain the desired scene in FirstGlance in Jmol. Turn off spinning (even if you want it to spin in Proteopedia), and orient and zoom the molecule as you want it to appear initially.

3. Right-click (Mac: Ctrl-click) on or near the molecule to open JSmol's menu. Select File, Save script with state. A dialog will appear in which you can choose the location on your computer's disk to save the file. Take note of the name of the file and where you are putting it. This file contains a state script of JSmol commands that will produce your scene.

4. Delete the load command. Edit the state script file with a plain text editor. Before you use the state script, you must the entire command at the end of the 3rd block of commands, and then save the file with that change. Delete everything shown below in red: the entire command beginning with "load", deleting everything up until the closing bracket "}" (keeping that closing bracket!). The load command may be long, wrapping onto several lines in your plain text editor.

function _setFileState() {

  set allowEmbeddedScripts false;
  ... blah blah blah ...
  set smartAromatic true;
  load /*file*/"http://www.rcsb.org/pdb/cgi/export.cgi/1GPK.pdb.gz";

}

5. Edit the page in Proteopedia where you want to install the scene from FirstGlance in Jmol. Show the Scene Authoring Tool.

6. Load your molecule: Use the load molecule tab to load your PDB code (or uploaded molecule) into JSmol in the Scene Authoring Tool.

7. Exit load molecule mode by clicking on, for example, the selections tab. Additional options will appear below the molecule.

8. Drag the edited state script file and drop it into JSmol (where the molecule is displayed). Your scene should appear in a few seconds.

9. Use the save scene tab to save your scene. Follow the instructions there to insert a green link into the page to show your scene.

Tweaking the Scene from FirstGlance

1gpk was displayed in FirstGlance in Jmol.

were visualized in FirstGlance in Jmol using the Contacts.. and Hide.. dialogs, simply by clicking on controls. The scene was transferred into Proteopedia using the above procedure.

Then, in Proteopedia's SAT, the by clicking select all, then in the labels dialog, reducing the size to 12[1], changing the color to orange, and changing the offsets to 1 and 1 (all without entering any label text or clicking the set label button). Finally, .


Selected contacts between an anti-Alzheimer`s drug analog and acetylcholinesterase in 1gpk. Scene generated largely and quite easily in FirstGlance in Jmol. Atoms shown as balls are within non-covalent bonding distances. Use popup to see details in this scene!

Drag the structure with the mouse to rotate

FeedbackFeedback

If you have problems getting this to work, or suggestions to clarify this page, please email

NotesNotes

  1. The size of the font for distances in Ångstroms was reduced by opening the "measurements" box under the Labels tab, and selecting size 12.

See AlsoSee Also

Proteopedia Page Contributors and Editors (what is this?)Proteopedia Page Contributors and Editors (what is this?)

Eric Martz, Wayne Decatur, Eran Hodis