File size: 698 Bytes
b7b5e1a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<head>
    <link rel="stylesheet" type="text/css" href="molstar.css" />
</head>
<body>
    <div id="app" style="height: 50rem; width: 100%"></div>
    <script type="text/javascript" src="molstar.js"></script>
    <script type="text/javascript">
        function getParam(name, regex) {
            var r = new RegExp(name + "=" + "(" + regex + ")[&]?", "i");
            return decodeURIComponent(
                ((window.location.search || "").match(r) || [])[1] || ""
            );
        }
        const structure_url = getParam("structure-url", "[^&]+");
        var viewer = new molstar.Viewer("app");
        viewer.loadStructureFromUrl(structure_url, "pdb", false);
    </script>
</body>