Molecular Playground/Support Script Help
From Proteopedia
This page offers some help and documentation in using the Molecular Playground (MP) Support Script provided. It is meant for advanced users that will be editing their own MP pages by hand (e.g. Level III pages). See also
Descriptions here are based on MPSupportVersion01.spt
.
MPSupport Script
Initializations
If you call MPSupportVersion01.spt
, the following will be done:
- Paints the background for top banner
- Defines the default text for 2nd line of top banner as "More at MolecularPlayground.Org"
- Defines variables for element colors H, C, N, O, F, Ca, Cl, Co, Cu, Fe, Mg, Mn, Mo, Ni, P, K, Se, Na, S, Zn (C, N and O are lighter than standard CPK).
- Defines and sets some variables by means of the
initializeVariables
function (also available for a separate call) —two alternative values depending on whether Jmol window is large (projection) or small (applet):- labelFontSize = 20 / 16
- labelBigFontSize = 24 / 24
- echoFontSize = 24 / 12
- echoColorKeyFontSize = 22 / 16
- colorKeyTopVertPct = 86 / 80
- colorKeyLineHeightPct = 4 / 6
Utilities available
These functions may be called to perform some operations in ways compatible with users acting on the MP projection.
- function initializeBeforeEachCycle(zapMode)
- clears all models
- clears all echos
- resets animation mode to 'once'
- resets window center
- sets antialiasdisplay off
- resets spin rates and orientation
- sets zoomLarge off
- function initializeMolecule()
- applies redefined lighter CPK colors to C, N, O
- function showBannerAcrossTop(bannerMessage, bannerMessage2)
- displays top banner text (2nd line has a default)
- function labelAtomWithPointer(theAtom, labelText, labelColor)
- displays a label with a pointer line
- function elementColorKey(elist)
- displays a legend with color keys for the elements
- function colorKey(keyText, keyColor)
- displays a legend with a custom color key
- function spinOn()
- reactivates spin if allowed by default (needed since
reset
androtate
turns spin off)
- reactivates spin if allowed by default (needed since
- function growSpacefill()
- grows atoms from 10% to 100% in 1% steps
- function growWireframe(wireMax)
- grows bonds from 0.01 to specified in 0.01 steps
- function getZoom()
- function entranceZoom(zoomStart, zoomEnd)
- function getY()
- as percent Y position
- function zoomRotatableTo(zoomEnd)
- not needed for Jmol 11.8.12+
- function slideY(yEnd)
- not needed for Jmol 11.9.10+