Proteopedia:DIY:Macros

From Proteopedia

(Difference between revisions)
Jump to: navigation, search
m
m
Line 9: Line 9:
==Defined Macros==
==Defined Macros==
 +
'''Example #1: Calling a basic macro function'''
The currently listing of defined macro functions can be found at [[Proteopedia:Macros]].
The currently listing of defined macro functions can be found at [[Proteopedia:Macros]].
Line 72: Line 73:
</jmolButton>
</jmolButton>
</jmol>
</jmol>
 +
 +
 +
'''Example #2: Use of 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'.
 +
 +
Example code:
 +
 +
<nowiki>
 +
(<jmol>
 +
<jmolLink>
 +
<script>script /mc/ktheis.spt;blink(ligand)</script>
 +
<text>☼</text>
 +
</jmolLink>
 +
</jmol>)
 +
</nowiki>
 +
 +
</br>
 +
You can try the result here:
 +
To show ligand(s), click on the sun symbol in the parentheses (<jmol>
 +
<jmolLink>
 +
<script>script /mc/ktheis.spt;blink(ligand)</script>
 +
<text>☼</text>
 +
</jmolLink>
 +
</jmol>)
-
This example shows how to specify an item or items to act on by passing in a parameter.
 

Revision as of 02:54, 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