PCAViz is a tool for displaying molecular dynamics simulations in the browser. To encourage use, an easy-to-install PCAViz-powered WordPress plugin enables “plug-and-play” trajectory visualization. The PCAViz download also provides examples showing how to use PCAViz in any webpage.
The PCAViz WordPress Plugin uses shortcodes that can be inserted into any WordPress post or page.
.compressed.json
to be recognized. [pcaviz]
.compressed.json
that includes your specified text in its title, URL, or file name. [pcaviz file="larp1"]
You can also control the molecular styles. The WordPress plugin uses 3DMol.js to render molecules. Passing the plugin a 3DMol.js AtomStyleSpec JSON string changes the way the molecules are displayed. [pcaviz visStyle='{"cartoon": {"style": "trace", "color": "grey", "opacity": 0.75}}']
Note that the 3DMol.js documentation shows AtomStyleSpec examples as JavaScript objects. PCAViz accepts only JSON strings. The two look similar, but with important differences (e.g., keys in JSON strings must always be quoted). We recommend using a JSON validator to check your AtomStyleSpec strings.
[pcaviz height=150 width=150]
[pcaviz align="right" caption="My molecule in motion!"]
To instead use the caption associated with the .compressed.json
file in your media library: [pcaviz mediaLibraryCaption="true"]
(Note that this option is automatically set to true when no file
attribute is specified.)
[pcaviz playback_buttons="false"]
[pcaviz loop="false"]
[pcaviz autoplay="false"]
[pcaviz durationInMilliseconds=10000 updateFreqInMilliseconds=50]
[pcaviz windowAverageSize=25]
To control how the plugin caches calculated coordinates: [pcaviz caching="continuous"]
Acceptable values are “none” (no caching), “continuous” (cache each frame’s coordinates after they are first calculated), and “pre” (calculate and cache all frame coordinates before starting the animation).