User:Eric Martz/Sandbox 3
ConSurf PrototypeConSurf Prototype
| |||||||||
2hhd, resolution 2.20Å () | |||||||||
---|---|---|---|---|---|---|---|---|---|
Ligands: | , | ||||||||
| |||||||||
| |||||||||
Resources: | FirstGlance, OCA, RCSB, PDBsum | ||||||||
Coordinates: | save as pdb, mmCIF, xml |
ScenesScenes
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 TestsButton 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 KeyUser 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
|
ScriptsScripts
When the Evolutionary Conservation block is expanded, a master script is run that colors and spacefills all chains.
The scripts below are designed to work both for single-model X-ray files, and for NMR Ensembles of Models. In the latter, the scripts show only model 1 for ConSurf scenes (frame 1.1).
Changing a CheckboxChanging a Checkbox
After a checkbox (in the expanded Evolutionary Conservation block) 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.
Design Goals for ConSurf ScriptsDesign Goals for ConSurf Scripts
ConSurfDB generates one script per chain. Proteopedia will generate, from these, a single consolidated script for each PDB entry. The initial view, shown automatically when the Evolutionary Conservation block is expanded, will be produced by the consolidated script, and will apply ConSurf colors to all chains concurrently. An example is the ConSurf color all 4 chains green linked scene above. The ConSurf team does not show such an all-chain view for hetero-oligomers because the conservation level colors are relative, and do not have the same quantitative conservation level meanings in sequence-different chains. Proteopedia will explain this, but will provide an all-chain view as the initial view. Individual chains can then be de-colored with the checkboxes.
In order to have to generate just a single ConSurf script per PDB file, that single consolidated script must serve two purposes. It must generate the desired initial view when the Evolutionary Conservation block is expanded, and it must serve the SAT Colors dialog, enabling the user to apply ConSurf colors to any selected protein moiety.
Note that (possibly) in contrast to the scripts at ConSurfDB, 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. Once these are defined, the scripts avoid re-defining them when called again, to save execution time.
Top Level ConSurf ScriptTop Level ConSurf Script
This is the script sent to Jmol when the Evolutionary Conservation block is expanded.
select protein define ~consurf_to_do selected consurf_spacefill = true script "wiki/ConSurf/hh/2hhd_consurf.spt"
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.sptconsurf_color_levels.spt
The purpose of this script is to color all, or any subset, of protein atoms according to ConSurf. This script is "constant": the same for all PDB entries. A big advantage of this script is that it sets the ConSurf color RGB 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 2hhd_consurf.spt has been run beforehand.
# Any protein atoms not assigned a consurf level, e.g. short peptides not processed by consurf, # will remain the following color. 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 [234,255,255] select ~consurf_to_color and ~con3 color [215,255,255] select ~consurf_to_color and ~con2 color [140,255,255] select ~consurf_to_color and ~con1 color [16,200,209]
2hhd_consurf.spt2hhd_consurf.spt
- This script defines ~con1, ~con2, ... ~con10, the atoms in each consurf level, unless they have already been defined in a previous execution of this script (see consurf_levels_defined). The amino acids per color grade are combined into each ~con## term for all chains as shown in the example script below.
- This script applies ConSurf colors to the protein atoms included in ~consurf_to_color (which must therefore be defined before calling this script).
- This script spacefills the atoms it colors only if consurf_spacefill is true. Therefore, consurf_spacefill must be set before calling this script.
xxxx