Proteopedia:DIY:Templates
From Proteopedia
(Difference between revisions)
(New page: Templates as a tool) |
|||
(17 intermediate revisions not shown.) | |||
Line 1: | Line 1: | ||
- | Templates as a tool | + | '''Templates as a tool''' |
+ | |||
+ | Existing templates can be used in Proteopedia pages to call commonly used wiki-text or Jmol code. A good description of how to use them, with color templates, can be found [[DRuMS#The DRuMS Color Schemes|here]]. Additional templates can be made, and you find a list of existing templates under [https://proteopedia.org/wiki/index.php?title=Special%3AAllpages&from=Abstract&namespace=10 All Pages]. | ||
+ | |||
+ | This page is meant to be a resource for finding and using templates. | ||
+ | |||
+ | <StructureSection load='' size='300' side='right' caption='Surface to test templates' scene='60/607777/Surf_test/1' pspeed='8'> | ||
+ | |||
+ | ==Surface display== | ||
+ | |||
+ | ===Surface toggles=== | ||
+ | |||
+ | These 3 controls are inserted using templates: | ||
+ | |||
+ | {{Button Toggle Surface}} · {{Link Toggle Surface}} · {{Checkbox Toggle Surface}} | ||
+ | |||
+ | :<small>''Note to Wiki admin's: for the checkboxes to work, you must add a function setupCheckboxShiftClick() that overrides the one included in wikibits.js''</small> | ||
+ | |||
+ | ===Surface fade templates=== | ||
+ | Ready to use anywhere easily: | ||
+ | |||
+ | {{Link FadeSurfaceBasic}} (basic) | ||
+ | |||
+ | {{Link FadeSurface}} (with fancy cartoons) | ||
+ | |||
+ | {{Link Toggle FancyCartoonHighQualityView}} | ||
+ | |||
+ | {{Link FadeInSurface}} | ||
+ | |||
+ | As buttons:<br/> | ||
+ | |||
+ | {{Button FadeSurfaceBasic}} (basic) | ||
+ | |||
+ | {{Button FadeSurface}} (with fancy cartoons) | ||
+ | |||
+ | {{Button FadeInSurface}} | ||
+ | |||
+ | ===Surface fade code-in-page versions=== | ||
+ | |||
+ | While not templates, carry out similar functions as the `Surface Fade` templates and may be useful for further development or as examples of using Jmol coding in Proteopedia pages. | ||
+ | |||
+ | <jmol> | ||
+ | <jmolLink> | ||
+ | <script> var a = [1,2,3,4,5,6,7,8]; for(var i IN a) {isosurface translucent @i; delay 0.4;} | ||
+ | </script> | ||
+ | <text>Fade surface to invisible</text> | ||
+ | </jmolLink> | ||
+ | </jmol> (basic) | ||
+ | |||
+ | <jmol> | ||
+ | <jmolLink> | ||
+ | <script> set ribbonborder on; set antialiasdisplay on; var a = [1,2,3,4,5,6,7,8]; for(var i IN a) {isosurface translucent @i; delay 0.4;} | ||
+ | </script> | ||
+ | <text>Fade surface to invisible</text> | ||
+ | </jmolLink> | ||
+ | </jmol> (with fancy cartoons) | ||
+ | |||
+ | <jmol> | ||
+ | <jmolLink> | ||
+ | <script> var a = [8,7,6,5,4,3,2,1,0]; for(var i IN a) {isosurface translucent @i; delay 0.4;} | ||
+ | </script> | ||
+ | <text>Fade back to surface opaque</text> | ||
+ | </jmolLink> | ||
+ | </jmol> | ||
+ | |||
+ | |||
+ | ==Atom rendering style== | ||
+ | |||
+ | These controls are not templates, but inserted directly as wiki extension tags: | ||
+ | |||
+ | <jmol> | ||
+ | <jmolCheckbox> | ||
+ | <scriptWhenChecked>spacefill on</scriptWhenChecked> | ||
+ | <scriptWhenUnchecked>spacefill off</scriptWhenUnchecked> | ||
+ | <text>spacefill on/off</text> | ||
+ | </jmolCheckbox> | ||
+ | </jmol> | ||
+ | |||
+ | <jmol> | ||
+ | <jmolRadioGroup> | ||
+ | <item> | ||
+ | <text>spacefill on</text> | ||
+ | <script>spacefill on</script> | ||
+ | </item> | ||
+ | <item> | ||
+ | <text>spacefill off</text> | ||
+ | <script>spacefill off</script> | ||
+ | </item> | ||
+ | </jmolRadioGroup> | ||
+ | </jmol> | ||
+ | |||
+ | ==Label handling== | ||
+ | |||
+ | {{Link Toggle LabelsOff}} (No-demo made yet.) | ||
+ | |||
+ | ==Color handling== | ||
+ | |||
+ | * See [[DRuMS#The DRuMS Color Schemes|DRuMS color template]]. | ||
+ | |||
+ | * See [[Help:Coloring_text#Color_Scheme_Templates|Color Scheme Templates]]. | ||
+ | |||
+ | Additional examples not listed there: | ||
+ | |||
+ | {{Button ColorLeucine}} | ||
+ | |||
+ | {{Button ColorReceptorLeucine}} (No-demo made yet.) | ||
+ | |||
+ | {{Button HeteroCPKColorScheme}} (No-demo made yet.) | ||
+ | |||
+ | {{User:Wayne Decatur/Template ColorKey Composition lcprotein|Template ColorKey Composition protein}} - `protein` darkened for light backgrounds | ||
+ | |||
+ | </StructureSection> | ||
+ | |||
+ | |||
+ | ==See Also== | ||
+ | |||
+ | * [[Proteopedia:Cookbook]] | ||
+ | * [[DRuMS#The DRuMS Color Schemes|DRuMS color templates]] | ||
+ | * [[Help:Color_Keys]] | ||
+ | * [[Help:Coloring_text]] |
Current revision
Templates as a tool
Existing templates can be used in Proteopedia pages to call commonly used wiki-text or Jmol code. A good description of how to use them, with color templates, can be found here. Additional templates can be made, and you find a list of existing templates under All Pages.
This page is meant to be a resource for finding and using templates.
|