Jmol/Interactivity
From Proteopedia
(Difference between revisions)
Line 12: | Line 12: | ||
</jmolButton> | </jmolButton> | ||
</jmol> | </jmol> | ||
- | |||
- | The following code was used to build the button and make it work: | ||
- | <nowiki> | ||
- | <jmol> | ||
- | <jmolButton> | ||
- | <script>script /scripts/37/376372/Overall/3.spt; | ||
- | hide water; set zshade off</script> | ||
- | <text>Lysozyme</text> | ||
- | </jmolButton> | ||
- | </jmol> | ||
- | </nowiki> | ||
- | |||
- | ===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 symbol in the parentheses (<jmol> | ||
- | <jmolLink> | ||
- | <script> select ligand; selectionHalos ON; delay 0.5;selectionHalos OFF;</script> | ||
- | <text>☼</text> | ||
- | </jmolLink> | ||
- | </jmol>) | ||
- | |||
- | <nowiki> | ||
- | (<jmol> | ||
- | <jmolLink> | ||
- | <script> select ligand; selectionHalos ON; | ||
- | delay 0.5; selectionHalos OFF;</script> | ||
- | <text>☼</text> | ||
- | </jmolLink> | ||
- | </jmol>) | ||
- | </nowiki> | ||
- | |||
- | ===Check box=== | ||
- | |||
- | This checkbox shows the ligand only when checked. | ||
- | |||
- | <jmol> | ||
- | <jmolCheckbox> | ||
- | <scriptWhenUnChecked>hide ligand or hidden</scriptWhenChecked> | ||
- | <scriptWhenchecked>hide hidden and not ligand</scriptWhenUnchecked> | ||
- | <checked>true</checked> | ||
- | <text>ligand</text> | ||
- | </jmolCheckbox> | ||
- | </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> | ||
- | |||
- | ===Radio button=== | ||
- | |||
- | This set of buttons selects one side chain to be shown (or none). | ||
- | |||
- | <jmol> | ||
- | <jmolRadioGroup> | ||
- | <item> | ||
- | <script>select sidechain; spacefill off; select sidechain and 35 ; spacefill on</script> | ||
- | <text>Residue 35</text> | ||
- | <checked>false</checked> | ||
- | </item> | ||
- | <item> | ||
- | <script>select sidechain; spacefill off; select sidechain and 52 ; spacefill on</script> | ||
- | <text>Residue 52</text> | ||
- | <checked>false</checked> | ||
- | </item> | ||
- | <item> | ||
- | <script>select sidechain; spacefill off</script> | ||
- | <text>No side chains</text> | ||
- | <checked>true</checked> | ||
- | </item> | ||
- | </jmolRadioGroup> | ||
- | </jmol> | ||
- | |||
- | <nowiki> | ||
- | <jmol> | ||
- | <jmolRadioGroup> | ||
- | <item> | ||
- | <script>select sidechain; spacefill off; select sidechain and 35 ; spacefill on</script> | ||
- | <text>Residue 35</text> | ||
- | <checked>false</checked> | ||
- | </item> | ||
- | <item> | ||
- | <script>select sidechain; spacefill off; select sidechain and 52 ; spacefill on</script> | ||
- | <text>Residue 52</text> | ||
- | <checked>false</checked> | ||
- | </item> | ||
- | <item> | ||
- | <script>select sidechain; spacefill off</script> | ||
- | <text>No side chains</text> | ||
- | <checked>true</checked> | ||
- | </item> | ||
- | </jmolRadioGroup> | ||
- | </jmol> | ||
- | </nowiki> |
Revision as of 12:24, 19 June 2020
|