opening molstar with different type
saurabhdea opened this issue · 9 comments
hey quarto is there any way to render Mol* with different type 3D representation for example gaussian surface as default not as cartoon. in your given code viewer.loadStructureFromUrl("./www/traj.xyz", "xyz")
Yes, you can load it normally, make adjustments, save your view as a snapshot and then include that instead with https://jmbuhr.de/quarto-molstar/#snapshot-file
Thankyou jmbuhr
it there any possibility to show snapshot view in pdb file rather than MOLJ file. ?
No, the file needs to contain the information about the representation and other molstar settings that you made when saving the snapshot. A pdb file only contains the structure and has no idea that molstar exists, so you can't save molstar settings to the pdb.
unless I'm misunderstanding your question.
I think they are asking if you can have a different default style. The viewer can take some options for initialising, but I can'f for the life of me figure out what those potential options actually are:
loadPdb(pdb: string, options?: LoadStructureOptions) {
Mol* continues to have literally no documentation whatsoever which makes it really hard to develop for. If we can figure out what those potential options are, then we could include some basic options in the short code for initialising with some default styles etc
That makes sense. Yes, It's a bit wild out there.
Yes, I am working on a project where I want to add pockets (cavities) by default to the gaussian surface, but I am unable to change the type of structure, as we can in JSMOL.
so if i am using this body
<body>
<div id="app-id" class="molstar-app"></div>
<script type="text/javascript">
molstar.Viewer.create("app-id", {"emdbProvider":"rcsb","layoutShowLeftPanel":true,"layoutShowRemoteState":false,"viewportShowAnimation":true,"pdbProvider":"rcsb","layoutShowSequence":false,"viewportShowSelectionMode":false,"layoutShowLog":false,"viewportShowExpand":true,"layoutShowControls":false,"layoutIsExpanded":false}).then(viewer => {
viewer.loadStructureFromUrl("./www/traj.xyz", "xyz")
});
</script>
</body>
how i can use
loadPdb(pdb: string, options?: LoadStructureOptions) {
for showing pdb file as gaussian surface ?