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, 1211🔥, 0💬
Popular Posts:
Molecule Summary: ID: FYI-1001105 SMILES: C=CCN1CCC23C4C(=O)CCC2(C 1CC5=C3C(=C(C=C5)OC6C(C( C(C(O6)C(=...
Molecule Summary: ID: FYI-1000962 SMILES: CCCc1ccccc1NCC(C)c1ccc(N [SH](C)(=O)Nc2cccnc2C(N) =O)cn1Rec...
Molecule Summary: ID: FYI-1003085 Names: InChIKey: JUQSUBXNHVMDLB-YPMHNXCES A-NSMILES: N#Cc3cc(c2cc(...
Molecule Summary: ID: FYI-1001720 SMILES: CCCCC1(Cc2cc(OCCCC3=NOC( =S)N3)c(Cl)c(Cl)c2C1=O)C 4CCCC4Rec...
Molecule Summary: ID: FYI-1000268 SMILES: N[17C@@](F)([18C])C(=[19 O])[20O]Received at FYIcenter.com...