GithubHelp home page GithubHelp logo

armish / 3dmol.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 3dmol/3dmol.js

0.0 2.0 0.0 47.98 MB

WebGL accelerated JavaScript molecular graphics library

License: Other

JavaScript 82.46% CSS 17.36% Python 0.01% TeX 0.17% Shell 0.01%

3dmol.js's Introduction

<style> .page-title {visibility: hidden; height: 0px; width: 0px;} //hack to get rid of Index </style> <script src="http://3Dmol.csb.pitt.edu/build/3Dmol-min.js"></script> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-55629183-1', 'auto'); ga('send', 'pageview'); </script>

#3Dmol.js

<script> setInterval(function() { if($3Dmol.viewers) if($3Dmol.viewers[0]) { var view = $3Dmol.viewers[0]; view.rotate(1); } }, 50); </script>

##Overview

3Dmol.js is an object-oriented, webGL based JavaScript library for online molecular visualization - No Java required! With 3Dmol.js, you can add beautifully rendered molecular visualizations to your web applications. Features include

  • support for pdb, sdf, mol2, xyz, and cube formats
  • parallelized molecular surface computation
  • sphere, stick, line, cross, cartoon, and surface styles
  • atom property based selection and styling
  • labels
  • clickable interactivity with molecular data
  • geometric shapes including spheres and arrows

Getting Started

Molecular data can be shared and visualized without writing any HTML using only a declarative URL specification and our hosted viewer (see {@tutorial url}).

Viewers can be quickly embedded in any HTML document using just two lines of source code (see {@tutorial embeddable}).

####Mouse Controls####

Movement |      | Mouse Input |      | Touch Input ---------|-|:------------|------------ Rotation | | Primary Mouse Button | | Single touch Translation | | Middle Mouse Button or Ctrl+Primary | | Triple touch Zoom | | Scroll Wheel or Second Mouse Button or Shift+Primary | | Pinch (double touch) Slab | | Ctrl+Second | | Not Available

##Developing with 3Dmol.js##

3Dmol.js provides a full-featured API for manipulating and styling molecular data.

###Getting the source code### The library is available as a single minified JavaScript file (includes jQuery):

{@lang xml}<script src="http://3Dmol.csb.pitt.edu/build/3Dmol-min.js"></script> 

An un-minified file is also provided for debugging purposes. ``` {@lang xml}<script src="http://3Dmol.csb.pitt.edu/build/3Dmol.js"></script> ```

There is also an unminified version provided that is missing jQuery for use when compiling your own minified libraries.

{@lang xml}<script src="http://3Dmol.csb.pitt.edu/build/3Dmol-nojquery.js"></script>

The full source distribution is available [from github](https://github.com/dkoes/3Dmol.js).
git clone https://github.com/dkoes/3Dmol.js.git

Since 3Dmol.js is licensed under the permissive BSD open-source license, you are free to copy this code and use it any any project, as long the code is properly acknowledged.

###Using the source code###

Every 3Dmol.js viewer canvas corresponds to a {@link $3Dmol.GLViewer} object. The viewer object includes methods for setting viewer properties and for creating and manipulating molecular models, surfaces and custom geometric shapes within the view.

A {@link $3Dmol.GLModel} object represents molecular data. Each model object stores its own rendering data and provides a convient way to reference a defined part of the scene.

Models are manipulated and styled using {@link AtomSpec} JavaScript objects.

An example of a viewer that manipulates the styles of the embedded objects is shown below. View the source code for the implementation details.

<iframe width=800, height=800 src="http://3dmol.csb.pitt.edu/doc/example.html"></iframe>

##FAQ

What are your future plans for 3Dmol.js?

Due to limited resources, our focus is on developing 3Dmol.js as a molecular viewer library, rather than a full featured cheminformatics/bioinformatics toolkit. For example, adding support for WebGL 2.0 has a higher priority than adding editing functionality to the hosted viewer. We hope others use 3Dmol.js as a building block for such web applications and look forward to collaborating with web developers to deliver the visualization functionality needed to enable them. Of course, if additional resources become available we may expand the scope of our efforts. However, the goal is to keep the core of 3Dmol.js as small as possible and focused on visualization.

Are you planning on supporting additional file formats?

Time permitting, we will add support for additional formats as they are requested. We also hope to integrate with other cheminformatics libraries to automatically provide additional formats and analyses.

Does 3Dmol.js work with touch devices?

Yes, as long as they support WebGL. For example, it runs great in Safari on an iPad running iOS 8.

##Contact

Please address any questions or concerns to [email protected].
You may also submit an issue on github.

##Funding

3DMol.js is funded is funded through R01GM108340 from the National Institute of General Medical Sciences. The content is solely the responsibility of the authors and does not necessarily represent the official views of the National Institute of General Medical Sciences or the National Institutes of Health.

3dmol.js's People

Contributors

dkoes avatar nrego avatar

Watchers

B. Arman Aksoy avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.