Skip to content

Sharing by URL

Kui Xu edited this page May 30, 2020 · 2 revisions

Sharing by URL

URL Options

You can save a specific structural representation scene by saving operation options setting in VRmol as a URL, like https://vrmol.net/index.html?id=1dfb&panelShow=0&mainMode=7&showSurface=0&surfaceOpc=0.5&surfaceType=1&colorMode=602. And then you can load and share the scene by opening this previously-saved URL in the web browser or embedding it into your own website by using iframe, such as

<iframe src="https://vrmol.net/index.html?id=1dfb&panelShow=0&mainMode=7&showSurface=1&surfaceOpc=0.5&surfaceType=1" />

The options and their data types supported in VRmol are shown in the table below.

Options Data Type Value Comment
id String PDB code 4 charactors
panelShow Integer Show:1, Hide:0 Show menu panel or not
mainMode Integer LINE:1, DOT:2, BACKBONE:3, SPHERE:4, STICK:5, BALL_AND_ROD:6, TUBE:7, RIBBON_FLAT:8, RIBBON_ELLIPSE:9, RIBBON_RECTANGLE:10, RIBBON_STRIP:11, RIBBON_RAILWAY:12, CARTOON_SSE:13, SURFACE:14 Main Structure Representation
showSurface Integer Show:1, Hide:0 Show surface panel or not
surfaceOpc Float 0~1 Transparency of surface
surfaceType Integer Van der Waals surface:1, solvent excluded surface:2, solvent accessible surface:3, molecular surface:4 Surface type
colorMode Integer Element:601, Residue:602, Secondary Structure:603, Chain:604, Representation:605, B-Factor:606, Spectrum:607, Chain Spectrum:608, Hydrophobicity:609 Color schemes
vmode String desktop, vr Visualization Mode
fragment String ['a', 7, 6] Fragmentation, label the 7th residue with Ball & Rod style

Examples for API

  1. Present structure (PDB code:1MBS) with Ball & Rod style and hide the menu panel. Try it
<iframe src="https://vrmol.net/index.html?id=1mbs&panelShow=0&mainMode=6" />

shareing URL

  1. Present structure (PDB code:1DDB) with Tube style and show its Van der Waals surface with transparency (0.5), and hide the menu panel. Try it
<iframe src="https://vrmol.net/index.html?id=1dfb&panelShow=0&mainMode=7&showSurface=1&surfaceOpc=0.5&surfaceType=1"  />

shareing URL

  1. Present structure (PDB code:1F5X) with the 7th residue labeled with Ball & Rod style in VR mode. Try it
<iframe src="https://vrmol.net/?id=1f5x&fragment=['a',7,6]&vmode=vr"  />
  1. Present structure (PDB code:2HYY) with surface in VR. Try it
https://vrmol.net/index.html?id=2hyy&panelShow=1&mainMode=13&showSurface=1&surfaceOpc=1&surfaceType=1&colorMode=609&vmode=vr