Ejemplos de uso de Molstar en diferentes
Visor Molstar en SHAKER.umh.es
https://shaker.umh.es/molstar/visor.html

Puedes descargar una versión compilada que incluye coloración rojo a blanco para residuos.
RCSB PDB
Get a protein from the RCSB PDB with:
{{< mol-rcsb 7UAD >}}
AlphaFold model.
Load the predicted structure of a protein from the AlphaFold Database using the AlphaFold Database ID. The loaded structure is coloured based on the prediction score.
{{< mol-afdb P17706 >}}
Local pdb file
Get a local pdb file with:
{{< mol-url ./usos-variados/8SKL.pdb >}}
pdb file from url
Get a pdb file from a url:
{{< mol-url https://files.rcsb.org/download/5DTO.pdb >}}
local xyz file
Get a local xyz file with:
[]{.quarto-shortcode__-escaped data-is-shortcode="1" data-value=" }
{{< mol-url ./usos-variados/example.xyz >}}
local pdb and trajectory
Load a topology and a trajectory with:
{{{< mol-traj ./usos-variados/example.pdb ./usos-variados/example.xtc >}}"}
snapshot file
Load a snapshot file, to share a saved Mol* session which will save aesthetic parameters and scene setup.
{{< mol-snapshot ./usos-variados/1P22.molj >}}
local file with volume information
{{< mol-volume ./usos-variados/traj.xyz ./usos-variados/density.cube >}}
local MVSJ file
{{< mol-json ./usos-variados/1cbs.mvsj >}}
Customization
Molstar options
The first argument (plus the second for mol-traj) is a positional argument. After this you can pass keyword arguments, which will be merged with defaults and passed on to molstar.Viewer.create. For example, if you don’t have an animation you might want to hide the animation button and open the right options panel on load:
{{< mol-rcsb 7sgl viewportShowAnimation=false layoutShowLeftPanel=false layoutShowControls=true >}}
There is a list of available options in the molstar source code: here.
Example
{{< mol-rcsb 7eqr viewportShowAnimation=false >}}
Global options
To embed plain text files (such as .pdb, .xyz) into the rendered html, add this to your yml header:
molstar: embedThe molecules will then also appear if you open the html file without a web server. Note that this can increase the size of the file significantly and only works with the mol-url shortcode. It does not work for binary trajectory formats such as xtc.
CSS
Each embedded app is inserted into a div with an ID created from the path of the pdb-file or trajectory (please don’t embed the same thing twice, it will only show up once). So the first app on this page will respond to css for #app-7sgl.
All apps have the class molstar-app and the following css is included by default:
.molstar-app {
position: relative;
width: 100%;
padding-bottom: 56.25%;
}For example, you might want to make one app a bit shorter because there is text above it:
#app-7sgl {
padding-bottom: 40%;
}Presentaciones de Molstar hospedadas en SHAKER.umh.es
Ejemplos de ejecución en shaker.umh.es/molstar/
- visor personalizado: rcsb-molstar.css y coloración rojo a blanco.
- visor de datos de docking: receptor.pdbqt y ligando.mol2.
- mesoscale-explorer.
- mvs-stories.
- alphafolddb-pae.
- alpha-orbitals.
- basic-wrapper.
- ihm-restraints.
- interactions.
- ligand-editor.
- lighting.
- mvs-stories.
- proteopedia-wrapper.
- alphafolddb-pae.
- volume-mask.
Si hospedas Molstar bajo IIS no olvides activar los tipos MIME colocando en /molstar un archivo web.config.