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, 448🔥, 0💬
Popular Posts:
What is Open Babel Fastsearch Index file? How to generate it with the "babel" command? Fastsearch in...
Molecule Summary: ID: FYI-1002401 Names: InChIKey: XMGQYMWWDOXHJM-UHFFFAOYS A-NSMILES: C=C(C)C1CC=C(...
Molecule Summary: ID: FYI-1002218 Names: InChIKey: MVAWJSIDNICKHF-UHFFFAOYS A-NSMILES: CC(=O)NCCc1c[...
Molecule Summary: ID: FYI-1001887 SMILES: CC1=C(C(=CC2=CC3=C(C(=C1 2)O)C(=O)C4(C(=O)C=C(C(C 4(C3=O)O)O...
Molecule Summary: ID: FYI-1002752 Names: InChIKey: WUVDTBFXOMMUGQ-UHFFFAOYS A-NSMILES: CNC26C1C5C4C1...