2D and 3D molecular visualization in Jupyter notebooks using 3DMol.js and D3.js
Python JavaScript Shell
Latest commit baf6982 Jun 9, 2017 @avirshup avirshup committed on GitHub Merge pull request #45 from Autodesk/py3
Py3
Permalink
Failed to load latest commit information.
js Update widgets for new Layout object and get height and width kwargs … Mar 1, 2017
nbmolviz Update requirements and copyrights Jun 4, 2017
.gitattributes Migrate to versioneer May 20, 2016
.gitignore Sample test Oct 27, 2016
.travis.yml
CONTRIBUTING.md Create CONTRIBUTING.md Jul 13, 2016
LICENSE Add LICENSE, NOTICE, and copyright notices May 14, 2016
MANIFEST.in Better manifest.in syntax Oct 31, 2016
NOTICE NOTICE refers to d3 in node_modules Aug 10, 2016
README.md Deploy instuctions in readme Oct 31, 2016
RELEASES.md Cleanup for push to public Jul 14, 2016
requirements.txt Update requirements and copyrights Jun 4, 2017
set_filters.sh
setup.cfg Begin migration to the official jupyter-js-widgets template Jun 8, 2016
setup.py
versioneer.py Migrate to versioneer May 20, 2016

README.md

notebook-molecular-visualization

PyPI version

A Python widgets library for 2D and 3D molecular visualization in Jupyter notebooks

Installation

$ pip install nbmolviz
$ jupyter nbextension enable --python --system nbmolviz
$ jupyter nbextension enable --python --system widgetsnbextension

Examples

To draw an OpenBabel molecule:

import nbmolviz
import pybel
benzene = pybel.read_string('smi','c1cccc1').next()
nbmolviz.visualize(benzene)

Dev install

Requires npm.

$ git clone https://github.com/autodesk/notebook-molecular-visualization.git
$ cd notebook-molecular-visualization
$ python setup.py jsdeps
$ pip install -e .
$ jupyter nbextension install --py --symlink --user nbmolviz
$ jupyter nbextension enable --py --user nbmolviz

This will build your widgets into a folder at notebook-molecular-visualization/nbmolviz/static

During development, to see the effects of changes to any javascript files (in notebook-molecular/visualization/js/src), run python setup.py jsdeps and reload any notebook browser windows.

Tests

Run tests with:

pytest nbmolviz/_tests

Releasing a new version

Travis automatically releases commits that are tagged, so to trigger a new release, just do:

git tag <new tag version>
git push origin --tags

If you want to see what will be included in a release, run check-manifest. You could also manually build a release with python setup.py sdist and manually release with python setup.py sdist upload -r pypi.

Contributing

This project is developed and maintained by the Molecular Design Toolkit project. Please see that project's CONTRIBUTING document for details.

About

This package started life as hackathon project for the CECAM 2015 Macromolecular Simulation Workshop. It's since undergone a complete source rewrite, and is being released by BioNano Research at Autodesk as part of our suite of Molecular Design Tools.

The visualizers offered by this library were built using:

  • ipywidgets - UI library for interactivity in Jupyter notebooks
  • 3Dmol.js - 3D molecular visualization library for web browsers
  • D3.js - javascript library for graph visualization

License

Copyright 2016 Autodesk Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.