Skip to content

Library Request: molstar a protein viewer. #1061

Answered by mbostock
zachcp asked this question in Q&A
Discussion options

You must be logged in to vote

Here’s how I got it working. First I downloaded the molstar library, putting the files in docs:

curl -o docs/molstar.js https://molstar.org/viewer/molstar.js
curl -o docs/molstar.css https://molstar.org/viewer/molstar.css

Then I created the following page following the plugin documentation:

<link rel="stylesheet" type="text/css" href="molstar.css">

```js
import "./molstar.js";

const molstar = window.molstar;
```

<div id="app" style="position: relative; width: 800px; height: 600px;"></div>

```js echo
molstar.Viewer.create("app", {
  layoutIsExpanded: false,
  layoutShowControls: false,
  layoutShowRemoteState: false,
  layoutShowSequence: true,
  layoutShowLog: false,
  layoutShowLeftP…

Replies: 4 comments 16 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by zachcp
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
14 replies
@zachcp
Comment options

@zachcp
Comment options

@Fil
Comment options

Fil Mar 18, 2024
Collaborator

@Fil
Comment options

Fil Aug 25, 2024
Collaborator

@mbostock
Comment options

Comment options

You must be logged in to vote
2 replies
@Fil
Comment options

Fil Aug 25, 2024
Collaborator

@zachcp
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
enhancement New feature or request
3 participants
Converted from issue

This discussion was converted from issue #1059 on March 15, 2024 01:19.