Jmol/Interactivity: Difference between revisions
No edit summary |
No edit summary |
||
| Line 46: | Line 46: | ||
===Check box=== | ===Check box=== | ||
This checkbox | This checkbox shows the ligand only when checked. | ||
<jmol> | <jmol> | ||
| Line 52: | Line 52: | ||
<scriptWhenChecked>hide ligand or hidden</scriptWhenChecked> | <scriptWhenChecked>hide ligand or hidden</scriptWhenChecked> | ||
<scriptWhenUnchecked>hide hidden and not ligand</scriptWhenUnchecked> | <scriptWhenUnchecked>hide hidden and not ligand</scriptWhenUnchecked> | ||
<checked> | <checked>true</checked> | ||
<text> | <text>ligand</text> | ||
</jmolCheckbox> | </jmolCheckbox> | ||
</jmol> | </jmol> | ||
<nowiki> | |||
<jmol> | |||
</ | <jmolCheckbox> | ||
<scriptWhenChecked>hide ligand or hidden</scriptWhenChecked> | |||
<scriptWhenUnchecked>hide hidden and not ligand</scriptWhenUnchecked> | |||
<checked>true</checked> | |||
<text>ligand</text> | |||
</jmolCheckbox> | |||
</jmol> | |||
</nowiki> | |||
Revision as of 12:14, 19 June 2020
<StructureSection load='1d9z' size='340' side='right' caption='Structure of UvrB in complex with ATP' scene=>
Interactive Jmol elements
Some pages contain buttons, radio buttons and other elements that allow the reader to manipulate the 3D Jmol scene by clicking on them.
Button
This button loads a different molecule and scene, and makes sure waters and hidden and zshade is turned off:
The following code was used to build the button and make it work:
<jmol>
<jmolButton>
<script>script /scripts/37/376372/Overall/3.spt;
hide water; set zshade off</script>
<text>Lysozyme</text>
</jmolButton>
</jmol>
Link
You can associate a couple of commands with a green link (instead of the usual behavior of a green link to load a new scene). For example, the link below make parts of the structure "blink":
To show ligand(s), click on the sun symbolin the parentheses ()
(carb<jmol>
<jmolLink>
<script> select ligand; selectionHalos ON;
delay 0.5; selectionHalos OFF;</script>
<text>☼</text>
</jmolLink>
</jmol>)
Check box
This checkbox shows the ligand only when checked.
<jmol>
<jmolCheckbox>
<scriptWhenChecked>hide ligand or hidden</scriptWhenChecked>
<scriptWhenUnchecked>hide hidden and not ligand</scriptWhenUnchecked>
<checked>true</checked>
<text>ligand</text>
</jmolCheckbox>
</jmol>