User:Eric Martz/Sandbox 3
From Proteopedia
Contents |
ConSurf Prototype
| |||||||||
| 2hhd, resolution 2.20Å () | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Ligands: | , | ||||||||
| |||||||||
| |||||||||
| Resources: | FirstGlance, OCA, RCSB, PDBsum | ||||||||
| Coordinates: | save as pdb, mmCIF, xml | ||||||||
Scenes
Opening the proposed Evolutionary Conservation section below the molecule would automatically color all chains by ConSurf, and spacefill them. Checkboxes in this section, one per chain, would be checked when the section is first opened. Unchecking a given chain would render it as a gray backbone (as in ConSurf). Ligands will be ball and stick, with dot surfaces, colored by element (as in ConSurf; oops, forgot to do the sulfates in some scenes). Here, for demonstration purposes, are 5 of the 16 possible scenes that 4-chain-checkboxes could generate:
- (2 alphas, A and C, and 2 betas, B and D, in 2HHD).
- (one alpha, one beta)
- (both alphas)
Button Tests
Lower case x so it doesn't look like chain X. Two spaces in empty [ ]. Uses document.getElementById('jmb_A').value='...'. Works in
- Internet Explorer 7/Windows XP
- Internet Explorer 6/Windows 98
- Firefox2/Windows 98/Windows XP
- Firefox2/OSX
- Safari/OSX (mouse movement needed to get the text change, else button label is always one step behind).
Uses bB.value='...'. Firefox: javascript error, bB is not defined, so no button text change in Firefox. Firefox every second click ignored unless mouseout between clicks. Works in Safari/OSX and Internet Explorer 6/7/Windows.
Checkmark: ✓ but if it is used in the button text label, the previous characters don't appear. Could maybe use a button label ✓A instead of A[✓], but haven't tested it. And in Internet Explorer 7, this "checkmark" appears as two horizontal bars. Not worth pursuing, I think. (Similarly, I often see problems with greek letters, so it is better to spell them out in English than to try to show the actual greek letter.)
User Interface & Color Key
To keep the user interface simple in Proteopedia, at least to start with, I propose that the only controls will be one checkbox per chain to ConSurf-color+spacefill each chain or not. The color key will not be interactive (unlike in ConSurf). Clicking the link Complete results at ConSurf will provide a path to the display in FirstGlance in Jmol with many more options.
Below are non-interactive mockups just to suggest the look for a user interface that would be an additional expandable block beneath the molecule.
- Links do not work.
- When a chain is "checked" [x], it will be colored by conservation, and spacefill it. When unchecked, that chain will become a gray backbone trace.
- The link to Explanation would go to a Proteopedia page of explanation. It might be a revised version of Conservation, Evolutionary.
Before expanding this section, it could look like this:
|
Evolutionary Conservation: [show] |
After expanding, it could look like this (using buttons):
|
Evolutionary Conservation: [hide] | |
|
Toggle Conservation Colors: | Rows = identical sequences:
|
| Further Information: |
Explanation
|
Scripts
When the Evolutionary Conservation block is expanded, a master script is run that colors and spacefills all chains.
The scripts below will need to be tweaked a bit for NMR Ensembles of Models. In these, we will want to show only model 1 for ConSurf scenes.
Changing a Checkbox
After a checkbox is changed, the currently checked chains are put into this script:
select protein spacefill off select (:a,:c) # LIST OF CHECKED CHAINS spacefill
The gray backbones for all chains are always rendered, but are hidden within spacefilled atoms, when a chain is spacefilled. Once set, the colors never change. Although the backbones are gray, the atoms are ConSurf-colored. All a checkbox needs to do is spacefill the appropriate set of chains. The colors remain.
ConSurf Scripts
The master script will need to be generated by ConSurf for each PDB code. It differs in a few minor ways from the per-chain scripts currently being generated.
- All chains are colored and spacefilled, not just one chain. This includes both sequence-identical chains, and sequence different chains.
- The 10 color grade groups of residues are selected only once, for all chains, as shown in the example script below.
- The defined Jmol variables ~con1, ~con2, ... ~con10 now each begin with a tilde (~). This is the recommended practice for such variables in Jmol, to avoid possible conflicts.
MASTER SCRIPT
script "/wiki/scripts/allRenderingsOff.spt" select hetero and not water spacefill 0.5 wireframe 0.3 color cpk dots if (!consurf_levels_defined) script "/wiki/ConSurf/hh/2hhd_consurf.spt" endif select protein define ~consurf_to_color selected script consurf_color_levels.spt select protein spacefill backbone 0.4 color backbone [xc8c8c8] select nucleic cartoon color cpk
consurf_color_levels.spt
The purpose of this script is to color all protein atoms according to ConSurf. This script can be "constant", the same for all PDB entries. A big advantage of this script is that it sets the ConSurf color values. If any ever need to be changed, only this one script needs changing. This script requires that the atom subset term ~consurf_to_color be defined beforehand. It also requires that the script 2hhd_consurf.spt has been run beforehand.
#any protein not in a consurf level, e.g. short peptides not processed by consurf, is colored here select ~consurf_to_color color yellow #each consurf level is now colored with the standard consurf colors select ~consurf_to_color and ~con10 color [255,255,150] select ~consurf_to_color and ~con9 color [160,37,96] select ~consurf_to_color and ~con8 color [240,125,171] select ~consurf_to_color and ~con7 color [250,201,222] select ~consurf_to_color and ~con6 color [252,237,244] select ~consurf_to_color and ~con5 color [255,255,255]] select ~consurf_to_color and ~con4 color [255,255,150] select ~consurf_to_color and ~con3 color [255,255,150] select ~consurf_to_color and ~con2 color [255,255,150] select ~consurf_to_color and ~con1 color [255,255,150]
2hhd_consurf.spt
The purpose of this script is to define ~con1, ~con2, ... ~con10, the atoms in each consurf level. This script does not color or spacefill the atoms. The amino acids per color grade are combined into each ~con## term for all chains as shown in the example script below.

