Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

hainm/molstarview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usable but still "Work-in-progress"

Codes are copied/adapted from nglview and molstar. Will update the licenses.

molstarview-widget

Example

  • Load structure and trajectory
from molstarview.widget import MolstarView
from nglview.adaptor import SimpletrajTrajectory
import nglview as nv

traj = SimpletrajTrajectory(nv.datafiles.XTC, nv.datafiles.PDB)
view = MolstarView()
view.add_trajectory(traj)

struc = nv.FileStructure('1tsu.pdb')
view.add_structure(struc)
view

Installation

Only development installation is available (requires Node.js and Yarn version 1),

$ git clone https://github.com/molstar/molstarview-widget.git
$ cd molstarview-widget
$ pip install -e .
$ jupyter nbextension install --py --symlink --overwrite --sys-prefix molstarview
$ jupyter nbextension enable --py --sys-prefix molstarview

When actively developing your extension for JupyterLab, run the command:

$ jupyter labextension develop --overwrite molstarview

Then you need to rebuild the JS when you make a code change:

$ cd js
$ yarn run build

You then need to refresh the JupyterLab page when your javascript changes.

Acknowledgement

About

This repo is deprecated. I move the work to support molstar in nglview: https://github.com/nglviewer/nglview

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published