embedded.html 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
  6. <link rel="icon" href="./favicon.ico" type="image/x-icon">
  7. <title>Embedded Mol* Viewer</title>
  8. <style>
  9. #app {
  10. position: absolute;
  11. left: 100px;
  12. top: 100px;
  13. width: 800px;
  14. height: 600px;
  15. }
  16. </style>
  17. <link rel="stylesheet" type="text/css" href="molstar.css" />
  18. </head>
  19. <body>
  20. <div id="app"></div>
  21. <script type="text/javascript" src="./molstar.js"></script>
  22. <script type="text/javascript">
  23. molstar.Viewer.create('app', {
  24. layoutIsExpanded: true,
  25. layoutShowControls: false,
  26. layoutShowRemoteState: false,
  27. layoutShowSequence: true,
  28. layoutShowLog: false,
  29. layoutShowLeftPanel: true,
  30. viewportShowExpand: true,
  31. viewportShowSelectionMode: false,
  32. viewportShowAnimation: false,
  33. pdbProvider: 'rcsb',
  34. emdbProvider: 'rcsb',
  35. }).then(viewer => {
  36. viewer.loadPdb('7bv2');
  37. viewer.loadEmdb('EMD-30210', { detail: 6 });
  38. // viewer.loadAllModelsOrAssemblyFromUrl('https://cs.litemol.org/5ire/full', 'mmcif', false, { representationParams: { theme: { globalName: 'operator-name' } } })
  39. // viewer.loadStructureFromUrl('my url', 'pdb', false, {
  40. // representationParams: {
  41. // theme: {
  42. // globalName: 'uniform',
  43. // globalColorParams: { value: 0xff0000 }
  44. // }
  45. // },
  46. // label: 'my structure'
  47. // });
  48. });
  49. </script>
  50. </body>
  51. </html>