Proteopedia:DIY:Macros

From Proteopedia

(Difference between revisions)
Jump to: navigation, search
m
m (try separate buttons)
Line 28: Line 28:
</pre>
</pre>
-
 
+
The <code><nowiki>bobble()</nowiki></code> part triggers the action. The <code><nowiki>exit</nowiki></code> ends the looping bobble.</br>
You can try the result here:
You can try the result here:
Line 36: Line 36:
spin off;
spin off;
script /mc/ktheis.spt;
script /mc/ktheis.spt;
-
bobble(); delay 5.0; exit;
+
if (~bobble); ~bobble=false; exit; else; bobble(); ~bobble=true; endif;
</script>
</script>
<text>Toggle Bobble on/off</text>
<text>Toggle Bobble on/off</text>
Line 42: Line 42:
</jmol>
</jmol>
-
The <code><nowiki>bobble()</nowiki></code> part triggers the action. The <code><nowiki>exit</nowiki></code> ends the looping bobble.
+
'''Doesn't seem to stop!?!?'''
 +
 
 +
<jmol>
 +
<jmolButton>
 +
<script>script /mc/ktheis.spt;bobble()</script>
 +
<text>Start Bobbling</text>
 +
</jmolButton>
 +
</jmol> <jmol>
 +
<jmolButton>
 +
<script>exit</script>
 +
<text>Stop Bobble</text>
 +
</jmolButton>
 +
</jmol>
 +
 
 +
 
This example shows how to specify an item or items to act on by passing in a parameter.
This example shows how to specify an item or items to act on by passing in a parameter.

Revision as of 02:41, 4 January 2021

Macros as a tool

Macros can be used in Proteopedia pages to call commonly used JSmol code. Macro functions can take parameters so that the code is general but can act on the specified item or items. Additional macros can be made.

This page is meant to be a resource for finding and using macros.

Structure of UvrB in complex with ATP

Drag the structure with the mouse to rotate

Proteopedia Page Contributors and Editors (what is this?)

Wayne Decatur, Jaime Prilusky

Personal tools