Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

miew

Package Overview
Dependencies
Maintainers
0
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

miew

Miew - 3D Molecular Viewer

  • 0.11.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.8K
decreased by-15.21%
Maintainers
0
Weekly downloads
 
Created
Source

miew

Version Downloads License

Miew is a high performance web tool for advanced visualization and manipulation of molecular structures.

The miew package is the core JavaScript library that implements the functionality. Please refer to the topmost README for an overview of the entire project.

Screenshot

Installation and Usage

Miew library is available as an npm package. It provides both UMD and ES2015 modules, so can be included in a SCRIPT tag via a CDN or built with a bundler of your choice. For more details refer to:

SCRIPT tag

<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <script src="https://unpkg.com/lodash@^4.17.21/lodash.js"></script>
    <script src="https://unpkg.com/three@0.153.0/build/three.min.js"></script>
    <script src="https://unpkg.com/miew@0.11.0/dist/Miew.min.js"></script>
    <link rel="stylesheet" href="https://unpkg.com/miew@0.11.0/dist/Miew.min.css" />
  </head>
  <body>
    <div class="miew-container" style="width:640px; height:480px"></div>

    <script>
      (function () {
        var viewer = new Miew({ load: '1CRN' });
        if (viewer.init()) {
          viewer.run();
        }
      })();
    </script>
  </body>
</html>

Webpack

Install using npm:

# npm init
# npm i -D webpack webpack-cli style-loader css-loader
npm i miew

src/index.js

import Miew from 'miew';
import './index.css';

window.onload = function () {
  var viewer = new Miew({ load: '1CRN' });
  if (viewer.init()) {
    viewer.run();
  }
};

src/index.css

@import 'miew';

dist/index.html

<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <script src="main.js"></script>
  </head>
  <body>
    <div class="miew-container" style="width:640px; height:480px"></div>
  </body>
</html>

webpack.config.js

module.exports = {
  module: {
    rules: [{
      test: /\.css$/,
      use: ['style-loader', 'css-loader'],
    }],
  },
};

Contribution

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests.

License

MIT

Copyright (c) 2015–2024 EPAM Systems, Inc.

Keywords

FAQs

Package last updated on 26 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc