Collections:
3Dmol.js Bug - data-ui=true Impacts on Selection
Why is the default style done after removing data-ui="true" in the embedded 3Dmol viewer?
✍: FYIcenter.com
There seems to be code bug in the 3Dmol.js library. Here is an HTML code example, Embedded-Viewer-data-ui-Bug.html, that contains 2 embedded viewers: one with data-ui="true" and the other without data-ui="true":
<html> <body> <p>Without data-ui=true</p> <div style="width: 400px; height: 400px; position: relative;" class="viewer_3Dmoljs" data-pdb="1YCR" data-select1='chain:A' data-style1='cartoon:color=spectrum' data-select2='chain:B' data-style2='stick' ></div> <p>With data-ui=true</p> <div style="width: 400px; height: 400px; position: relative;" class="viewer_3Dmoljs" data-pdb="1YCR" data-select1='chain:A' data-style1='cartoon:color=spectrum' data-select2='chain:B' data-style2='stick' data-ui="true" ></div> <script src="/3Dmol-min.js"></script> </body></html>
This example HTML code will displays the same protein in two DIV elements:
As you can see, when UI components are turned on, the default style of "line" is applied to the default selection of "all".
⇒ Load Data by URL into Embedded 3Dmol Viewer
⇐ Multiple Selections with Embedded 3Dmol Viewer
⇑⇑ 3Dmol.js FAQ
2023-02-03, 325🔥, 0💬
Popular Posts:
Molecule Summary: ID: FYI-1003047 Names: InChIKey: RAXXELZNTBOGNW-UHFFFAOYS A-NSMILES: c1c[nH]cn1 Re...
How to generate a molecule SVG picture from a SMILES string? The easiest way to generate a molecule ...
Molecule Summary: ID: FYI-1000198 SMILES: (1S,3R,5R,6S,8S,10S,11R, 13S,15S,16R,18S,20S,21R, 23R,25R,26...
How stereoinformation is being read from input data by Open Babel? Most molecule data files store st...
Molecule Summary: ID: FYI-1002893 Names: InChIKey: YZJMQWTUVKKLNZ-UHFFFAOYS A-NSMILES: NS(=O)(=O)c3c...