Proteopedia:DIY:Macros

From Proteopedia

(Difference between revisions)
Jump to: navigation, search
m
m
Line 5: Line 5:
This page is meant to be a resource for finding and using macros.
This page is meant to be a resource for finding and using macros.
-
<StructureSection load='1mbo' size='340' side='right' caption='Structure of UvrB in complex with ATP' scene=''>
+
<StructureSection load='1mbo' size='340' side='right' caption='Structure of myoglobin in complex with heme and oxygen' scene=''>
==Defined Macros==
==Defined Macros==
Line 75: Line 75:
-
'''Example #2: Use of a parameter'''
+
'''Example #2: Supply the macro a parameter'''
This example shows how to specify an item or items to act on by passing in a parameter. It is based on the 'Link' example at [[Jmol/Interactivity#Link|Jmol/Interactivity]] where the ligand 'blinks'.
This example shows how to specify an item or items to act on by passing in a parameter. It is based on the 'Link' example at [[Jmol/Interactivity#Link|Jmol/Interactivity]] where the ligand 'blinks'.
Line 84: Line 84:
(<jmol>
(<jmol>
<jmolLink>
<jmolLink>
-
<script>script /mc/ktheis.spt;blink('[ATP]')</script>
+
<script>script /mc/ktheis.spt;blink('ligand')</script>
<text>☼</text>
<text>☼</text>
</jmolLink>
</jmolLink>
Line 90: Line 90:
</pre>
</pre>
 +
'''Doesn't seem to allow anything other than ligand!?!?''' Why doesn't 'HEM' or '[HEM]' work as the peekaboo example seems to indicate it should?!?!
You can try the result here:<br/>
You can try the result here:<br/>
To show ligand(s), click on the green sun symbol in the parentheses --> (<jmol>
To show ligand(s), click on the green sun symbol in the parentheses --> (<jmol>
<jmolLink>
<jmolLink>
-
<script>script /mc/ktheis.spt;blink('[ATP]')</script>
+
<script>script /mc/ktheis.spt;blink('ligand')</script>
<text>☼</text>
<text>☼</text>
</jmolLink>
</jmolLink>
</jmol>)
</jmol>)
 +
 +
 +
'''Example #3: Another showing supplying the macro a parameter'''
 +
 +
 +
Example code:
 +
 +
<pre>
 +
(<jmol>
 +
<jmolLink>
 +
<script>script /mc/ktheis.spt;peekaboo('HEM')</script>
 +
<text>Hide Heme for a moment</text>
 +
</jmolLink>
 +
</jmol>)
 +
</pre>
 +
 +
'''Doesn't seem to allow anything other than ligand!?!?''' Why doesn't 'HEM' or '[HEM]' work as the peekaboo example seems to indicate it should?!?!
 +
 +
You can try the result here:<br/>
 +
To show ligand(s), click on the green sun symbol in the parentheses --> (<jmol>
 +
<jmolLink>
 +
<script>script /mc/ktheis.spt;peekaboo('HEM')</script>
 +
<text>Hide Heme for a moment</text>
 +
</jmolLink>
 +
</jmol>)

Revision as of 03:29, 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 myoglobin in complex with heme and oxygen

Drag the structure with the mouse to rotate

Proteopedia Page Contributors and Editors (what is this?)

Wayne Decatur, Jaime Prilusky

Personal tools