Michelanglo — PyMol
Convert a PyMol file to an interactive NGL viewport
Confused about something? Struggling markdown? Something not quite right? Send a message to the admin, who will get back to you by email as soon as they can.
For help using this page check the tour.
For extended documentation check documentation.
The following get converted:
- Dots and spheres
- Lines and sticks
- Ribbons and cartoons
- Mesh and surface
- Object-wide transparency
- Distances and hydrogen bonds
- Atom colours
- B-factor putty
Multiple models in a scene will be collapsed and chains letters will be relabelled to avoid clashes.
The following will not get converted:
- Disabled models
- Segment identifiers —segi are ambiguous
- CGO arrows —mesh data not extractable, but re-implementable with JS code.
- Maps/isomesh —mesh data not extractable, but re-implementable with JS code.
- Residue specific transparency —per-atom transparency data not extractable..
- Labels —bug with NGL.
Please see the Github readme for documentation about how the conversions are done.
NGL library and PDB file
For a web page to load a resource (e.g. image, PDB file or JS libary), the latter needs to be available online (i.e.not on one's laptop).
<script scr="address where the script can be downloaded dot js"></script>
This checkbox allows you to ommit this line (unchecked) if you are making other arrangements (i.e. you know what you are doing).
This library can be local or remote.
For example, if you have a
.html file with the protein code from here appropriately copy-pasted and you want to use it offline, then download the js file and save it next to your file (i.e. relative path) and add the line
If you are going to use the code on a page where you are not free to control what files are served, say your departmental webpage, opt for the remotely held file (CDN), which is the default value.
This also applies for the PDB code. If you add a PDB code, it will use that from the PDB. If it looks like a file name (e.g.
file.pdb) then it will assume you will upload it to the correct place (e.g.
file.pdb the PDB file is uploaded to the same folder as the HTML page;
https://www.myuni.ac.uk/~myusername/file.pdb will try to fetch it from the URL —do note that some places don't serve 'raw' or 'cross-origin' files. Alternatively you can click
Include PDB data, which means you don't have to worry.
The big red 403
The PDB and JS files cannot be kept on Dropbox or most cloud storage providers. If you get a Dropbox share link, set it 'all with link' and add the URL query
?db=1 to it, you will get the following error in the JS console (in Chrome, right click, inspect, Console tab):
stage.loadFile("https://www.dropbox.com/s/23mxwy0okylrvll/dddG.pdb?dl=1") (index):1 Access to XMLHttpRequest at 'https://www.dropbox.com/s/23mxwy0okylrvll/dddG.pdb?dl=1' from origin 'http://michelanglo.sgc.ox.ac.uk' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
This is because of a server-side security setting, which cannot be circumvented by the user —and Bitcoin hacker-miners. Likewise, only a specially configured server will serve JS libraries (called a "CDN").
Consequently, it is best to use the default CDN for NGL and tick
Include PDB data.
Demo PSEs. Protein alphabet taken from Howarth (2015).
In PyMOL and NGL different objects can be present in the same scene, but often this is not beneficial.
In PyMOL, the objects are things listed in the right hand side panel.
In most cases these are not meant to be separate,
but are simply different interacting parts that were imported separately.
Namely, they could have been combined with
create combo, protein_x or protein_y.
In Michelanglo, if multiple components (objects) are present, it is not possible to select a specific one and hydrogen bonding will not occur been the components, therefore collapsing them into a single component is recommended.
Overlays and ensembles
The only case when this is not acceptable is when you have overlayed protein structures or a NMR ensemble. If this is the case please disable this.