Closed zachcp closed 5 months ago
This looks like you would only need to specify the MVSJ file and it will load the rest. Would you be open to a PR?
<link rel="stylesheet" type="text/css" href="molstar.css">
<script src="molstar.js"></script>
<div id = "app"></div>
<script>
molstar.Viewer.create("app", {
layoutIsExpanded: false,
layoutShowControls: false,
layoutShowRemoteState: false,
layoutShowSequence: true,
layoutShowLog: false,
layoutShowLeftPanel: true,
viewportShowExpand: true,
viewportShowSelectionMode: false,
viewportShowAnimation: false,
pdbProvider: "rcsb",
emdbProvider: "rcsb",
}).then(viewer => {
viewer.loadMvsFromUrl("./test.json", "mvsj"); // <== Looks like the viewer can load an MVSJ with just this line.
});
</script>
absolutely, would be a great addition :)
I didn't expect this to work, because we are getting the js and css for the embedded molstar from their web-viewer example (https://github.com/jmbuhr/quarto-molstar?tab=readme-ov-file#update-mol-extension-developement), in which I didn't see the UI for the extension, but maybe it's still built in.
I recently came across the mol-view-spec repo and it seems like a great way to programatically setup more complicated views that can be distributed. How difficult do you think it would be to support this format in quarto-molstar?