gabrielelanaro / chemview Goto Github PK
View Code? Open in Web Editor NEWThe new generation molecular viewer for IPython notebook
License: GNU Lesser General Public License v2.1
The new generation molecular viewer for IPython notebook
License: GNU Lesser General Public License v2.1
Hi Gabriele,
I initially fork mdtraj.html module to separated package, name mdview.
However @rmcgibbo pointed out that I should look at your chemview package.
I've tried chemview
with pytraj and this seems quite easy to plug to chemview
So I just have few question?
chemview
to something more general, like for biology structure (protein, membrane, ...)Let me know what you think. thanks.
This is necessary to implement proper fullscreen handling, as when the container goes fullscreen, it will handle the placing of UI elements.
Other UI elements include colorbar/filtering options
Necessary for #19
I use chemview on several machines within several virtual environments. Consequently, I have to install chemview and its dependencies frequently. Being a non-Anaconda user, I've found it is a pain to get chemview installed each time for several reasons:
I suggest making the usage of Numba optional, i.e. something like this:
try:
import numba as nb
except ImportError:
print("WARNING: Not using Numba JIT compiler, marching cubes algorithm significantly slower", file=sys.stderr)
This may reduce the activation barrier for new users who are not using Anaconda and want to try chemview.
When I try to install the chemview widget as per the installation instructions, I get the following error:
KeyError: 'The Python module chemview is not a valid nbextension, it is missing the
_jupyter_nbextension_paths() method.'
A way to syncronize "cameras" across different widgets from an user perspective my idea would be:
from IPython.display import display
from IPython.utils.traitlets import link
mv1 = MolecularViewer() # returns an IPython widget
mv2 = MolecularViewer()
link(mv1.camera, mv2.camera) # Now the cameras are linked
display(v1)
display(v2)
Hi,
I try the points and spheres:
spheres rotation has not problem,
but points seems does not work right (also the mouse zoom) !
here is my test code, I put a box with lines for reference.
you may need ASE to run it.
from ase import Atoms
import numpy as np
import chemview
import time
from chemview.utils import get_atom_color
from chemview import RepresentationViewer
from IPython.display import display
chemview.enable_notebook()
def viewer(atom):
cell = atom.cell.astype('float32')
ps = atom.positions.astype('float32')
original=np.zeros(3,dtype=float)
lines=[[original,cell[0]],
[cell[1],cell[1]+cell[0]],
[cell[2],cell[2]+cell[0]],
[cell[1]+cell[2],cell[0]+cell[1]+cell[2]],
[original,cell[1]],
[cell[0],cell[0]+cell[1]],
[cell[2],cell[2]+cell[1]],
[cell[0]+cell[2],cell[0]+cell[1]+cell[2]],
[original,cell[2]],
[cell[0],cell[0]+cell[2]],
[cell[1],cell[1]+cell[2]],
[cell[0]+cell[1],cell[0]+cell[1]+cell[2]] ]
rv=RepresentationViewer(600, 600)
color= np.array([0xFF0000, 0x00FF00, 0x0000FF])[[0, 1, 2]].tolist()
for line in lines:
rv.add_representation('lines', {'startCoords': line[0],
'endCoords': line[1],
'startColors': color,
'endColors': color},
)
colors = [get_atom_color(t.upper()) for t in atom.get_chemical_symbols()]
rv.add_representation('spheres', {'coordinates': ps,
'colors': colors ,
'radii': [0.1]*len(ps),
'resolution': 32})
# rv.add_representation('points', {'coordinates': ps,
# 'colors': colors ,
# 'sizes': [50]*len(ps),
# 'opacity': 1.0})
rv.autozoom(ps)
return rv
atom = Atoms(['Fe','Ni','Ni','Ni'],[(0,0,0),
(0.5,0,0.5),
(0,0.5,0.5),
(0.5,0.5,0)],pbc=[True,True,True])
viewer(atom*4)
Please un-comment the part for points and try to repeat my problem.
This could be use as a extension for crystal?
BTW:
does chemview works with the new jupyter notebook, I also try your branch new-widget, but not work for me ?
Best Regards!
hey man,
can you update most of you notebooks here?
https://github.com/gabrielelanaro/chemview/tree/master/notebooks
For example: https://github.com/gabrielelanaro/chemview/blob/master/notebooks/BigSystems.ipynb
I'm sorry to open a ticket for an aspect that no one else seems to have had trouble with, but I can't get anything to render with chemview. I've installed decent versions of all the dependencies through pip or conda (below shows mostly pip, but I've another try that's mostly conda to same result). chemview itself is installed from a git clone through pip install .
to get a recent version that's Jupyter-compatible. Running the basic tutorial gives only warnings (no errors) but also no rendered molecule. Any suggestions as to what I'm doing wrong?
>>> conda list
chemview 0.6 <pip>
ipykernel 4.3.1 py27_0 defaults
ipython 4.1.2 py27_2 defaults
ipython-genutils 0.1.0 <pip>
ipython-notebook 4.0.4 py27_0 defaults
ipython-qtconsole 3.1.0 py27_0 defaults
ipython_genutils 0.1.0 py27_0 defaults
ipywidgets 4.1.1 py27_0 defaults
jupyter 1.0.0 <pip>
jupyter-client 4.2.2 <pip>
jupyter-console 4.1.1 <pip>
jupyter-core 4.1.0 <pip>
jupyter_client 4.2.2 py27_0 defaults
jupyter_core 4.1.0 py27_0 defaults
matplotlib 1.4.3 np19py27_2 defaults
nglview 0.4 <pip>
notebook 4.2.0 py27_0 defaults
numba 0.14.0 np19py27_0 http://repo.continuum.io/pkgs/free/osx-64/numba-
numpy 1.9.2 py27_0 defaults
openbabel 2.3.2 py27_0 https://conda.binstar.org/psi4/osx-64/openbabel-2.3.2-
python 2.7.11 0 defaults
traitlets 4.2.1 py27_0 defaults
vapory 0.1.1 <pip>
I work mostly from Julia and I'd love to use chemview for visualising within an IJulia notebook. I appreciate that you may not be interested in fixing anything related to this, but I am hoping you can give me some pointers.
I use Julia 0.5 and Anaconda. To import python packages I use PyCall
. When I first tried, even numba
import failed, but eventually I built llvmlite
from source, pointing to the LLVM 3.7.1 library that comes included with Julia. I can now successfully @pyimport numba
.
But when I try @pyimport chemview
I get the following error message (in the Julia REPL; from the notebook I don't get anything useful at all): (sorry for the very long output)
signal (11): Segmentation fault: 11
while loading no file, in expression starting on line 426
_ZN4llvm17PMTopLevelManager16findAnalysisPassEPKv at /Users/ortner/anaconda/lib/python2.7/site-packages/llvmlite/binding/libllvmlite.dylib (unknown line)
_ZN4llvm17PMTopLevelManager12schedulePassEPNS_4PassE at /Users/ortner/anaconda/lib/python2.7/site-packages/llvmlite/binding/libllvmlite.dylib (unknown line)
_ZN4llvm18PassManagerBuilder25populateModulePassManagerERNS_6legacy15PassManagerBaseE at /Users/ortner/anaconda/lib/python2.7/site-packages/llvmlite/binding/libllvmlite.dylib (unknown line)
ffi_call_unix64 at /Users/ortner/anaconda/lib/python2.7/lib-dynload/_ctypes.so (unknown line)
ffi_call at /Users/ortner/anaconda/lib/python2.7/lib-dynload/_ctypes.so (unknown line)
_ctypes_callproc at /Users/ortner/anaconda/lib/python2.7/lib-dynload/_ctypes.so (unknown line)
PyCFuncPtr_call at /Users/ortner/anaconda/lib/python2.7/lib-dynload/_ctypes.so (unknown line)
PyObject_Call at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalFrameEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalCodeEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
fast_function at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalFrameEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalCodeEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
fast_function at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalFrameEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalCodeEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
fast_function at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalFrameEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalCodeEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
fast_function at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalFrameEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalCodeEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
function_call at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyObject_Call at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
instancemethod_call at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyObject_Call at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
slot_tp_init at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
type_call at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyObject_Call at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalFrameEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalCodeEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
fast_function at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalFrameEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalCodeEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
function_call at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyObject_Call at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
instancemethod_call at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyObject_Call at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
slot_tp_init at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
type_call at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyObject_Call at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalFrameEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalCodeEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
fast_function at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalFrameEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalCodeEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
function_call at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyObject_Call at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyObject_CallFunctionObjArgs at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
slot_tp_descr_get at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
_PyObject_GenericGetAttrWithDict at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalFrameEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalCodeEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
function_call at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyObject_Call at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
call_function_tail at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyObject_CallFunction at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
property_descr_get at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
_PyObject_GenericGetAttrWithDict at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalFrameEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalCodeEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
function_call at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyObject_Call at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
instancemethod_call at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyObject_Call at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
slot_tp_init at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
type_call at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyObject_Call at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalFrameEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalCodeEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
fast_function at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalFrameEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalCodeEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalCode at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyImport_ExecCodeModuleEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
load_source_module at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
import_submodule at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
load_next at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyImport_ImportModuleLevel at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
builtin___import__ at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyObject_Call at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_CallObjectWithKeywords at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalFrameEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalCodeEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalCode at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyImport_ExecCodeModuleEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
load_source_module at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
import_submodule at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
load_next at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyImport_ImportModuleLevel at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
builtin___import__ at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyObject_Call at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_CallObjectWithKeywords at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalFrameEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalCodeEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyEval_EvalCode at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyImport_ExecCodeModuleEx at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
load_source_module at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
load_package at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
import_submodule at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
load_next at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyImport_ImportModuleLevel at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
builtin___import__ at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyObject_Call at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
call_function_tail at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyObject_CallFunction at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyImport_Import at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
PyImport_ImportModule at /Users/ortner/anaconda/lib/libpython2.7.dylib (unknown line)
# lots more julia related lines
Allocations: 3500342 (Pool: 3497996; Big: 2346); GC: 5
Segmentation fault: 11
the recommended version is python 2.7 and 3.6.
Hi,
env: jupyter notebook
is it easy for you to add
So far the API of chemview is pretty good.
I've been trying few visualize program but VMD is the best one IMO, in term off rotating molecule, mouse sensitivity.
Most of other programs give me a feeling of 'heavy' movement.
So what do you think about change the default values for:
It should update fast
The marching cube wrongly swaps the x and y axes (this error was made to adapt the code for np.meshgrid, which is weird)
Hi,
error show on this line
rep = {k: v.copy() for v in self.representations.items()}
BTW:
how to change the "perspective" ?
sometimes I want they looks no "perspective" effect.
Thanks!
Best Regards!
Transparency in molecular representations could allow comparisons between large geometries such as proteins and nanotubes in chemical reactions, optimisations etc.
For entire representations, it's fairly easy to allow transparency by adding:
transparent: true, opacity: alpha
to the THREE material's arguments. However, a bit more effort would be needed to control individual atoms, but I can't think of a situation where varying transparencies could be useful.
For now, if it seems useful, I can add an opacity option for balls_and_sticks and isosurfaces.
Attempting to run the Quick Start notebook:
from chemview import enable_notebook, MolecularViewer
enable_notebook()
results in
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-d8be18394f63> in <module>()
----> 1 from chemview import enable_notebook, MolecularViewer
2 enable_notebook()
/usr/lib/python2.7/site-packages/chemview/__init__.py in <module>()
----> 1 from .install import enable_notebook
2 from .widget import RepresentationViewer
3 from .viewer import MolecularViewer, TrajectoryControls
4 from .trajectory import TrajectoryViewer
/usr/lib/python2.7/site-packages/chemview/install.py in <module>()
4 import warnings
5 from IPython.display import display, Javascript
----> 6 from IPython.html.nbextensions import install_nbextension
7 with warnings.catch_warnings():
8 warnings.simplefilter("ignore")
ImportError: No module named nbextensions
so it looks like things need to be updated for Jupyter Notebook.
I am unable to install chemview.
When I follow the conda instructions:
conda install -c http://conda.binstar.org/gabrielelanaro
doesn't work (Error: too few arguments, must supply command line package specs or --file
)conda install -c gabrielelanaro chemview=0.3
does workThe notebook is not quite working after this installation:
I don't know if this is exclusively related to Python 3.
When I clone the repo and install the package locally, I get this error:
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm WARN [email protected] No license field.
rebuilding js and css failed
missing files: ['/tmp/pip-67vQhC-build/chemview/static/extension.js', '/tmp/pip-67vQhC-build/chemview/static/index.js']
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-67vQhC-build/setup.py", line 170, in <module>
setup(**setup_args)
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/tmp/pip-67vQhC-build/setup.py", line 45, in run
raise e
ValueError: Missing file: /tmp/pip-67vQhC-build/chemview/static/extension.js
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-67vQhC-build/
I'm on Ubuntu 16.10. The only python thing that is probably non-standard is that I have python and pip as alias for python3 and pip3.
We want to produce static versions of the widget
We have developed a new scene API that is standardized
Hi, thanks for releasing chemview, it's a very neat tool. We've been developing an interface between it and the Atomic Simulation Environment (ASE) as part of our materials science toolkit matscipy, and have come across some issues rendering bonds.
Here's are a couple of screenshots to show what I mean, before and after zooming out, and the self-contained code used to setup the MolecularViewer
. I've taken care only to include bonds which are fully within the simulation cell, so it's not a boundary wrapping issue.
Any suggestions of what might be going on?
import numpy as np
from chemview import enable_notebook
from chemview import MolecularViewer, RepresentationViewer
enable_notebook()
positions = np.array(
[[ 0. , 0. , 0. ],
[ 1.3575, 1.3575, 1.3575],
[ 0. , 2.715 , 2.715 ],
[ 1.3575, 4.0725, 4.0725],
[ 2.715 , 0. , 2.715 ],
[ 4.0725, 1.3575, 4.0725],
[ 2.715 , 2.715 , 0. ],
[ 4.0725, 4.0725, 1.3575],
[ 0. , 0. , 5.43 ],
[ 1.3575, 1.3575, 6.7875],
[ 0. , 2.715 , 8.145 ],
[ 1.3575, 4.0725, 9.5025],
[ 2.715 , 0. , 8.145 ],
[ 4.0725, 1.3575, 9.5025],
[ 2.715 , 2.715 , 5.43 ],
[ 4.0725, 4.0725, 6.7875],
[ 5.43 , 0. , 0. ],
[ 6.7875, 1.3575, 1.3575],
[ 5.43 , 2.715 , 2.715 ],
[ 6.7875, 4.0725, 4.0725],
[ 8.145 , 0. , 2.715 ],
[ 9.5025, 1.3575, 4.0725],
[ 8.145 , 2.715 , 0. ],
[ 9.5025, 4.0725, 1.3575],
[ 5.43 , 0. , 5.43 ],
[ 6.7875, 1.3575, 6.7875],
[ 5.43 , 2.715 , 8.145 ],
[ 6.7875, 4.0725, 9.5025],
[ 8.145 , 0. , 8.145 ],
[ 9.5025, 1.3575, 9.5025],
[ 8.145 , 2.715 , 5.43 ],
[ 9.5025, 4.0725, 6.7875]])
topology = {'atom_types':
['Si',
'Si',
'Si',
'Si',
'Si',
'Si',
'Si',
'Si',
'Si',
'Si',
'Si',
'Si',
'Si',
'Si',
'Si',
'Si',
'Si',
'Si',
'Si',
'Si',
'Si',
'Si',
'Si',
'Si',
'Si',
'Si',
'Si',
'Si',
'Si',
'Si',
'Si',
'Si'],
'bonds': [(0, 1),
(1, 6),
(1, 4),
(1, 2),
(2, 3),
(3, 14),
(4, 5),
(5, 18),
(5, 24),
(5, 14),
(6, 7),
(7, 18),
(8, 9),
(9, 14),
(9, 12),
(9, 10),
(10, 11),
(12, 13),
(13, 26),
(14, 15),
(15, 26),
(16, 17),
(17, 22),
(17, 20),
(17, 18),
(18, 19),
(19, 30),
(20, 21),
(21, 30),
(22, 23),
(24, 25),
(25, 30),
(25, 28),
(25, 26),
(26, 27),
(28, 29),
(30, 31)]}
mv = MolecularViewer(positions/10,
topology=topology)
mv.ball_and_sticks()
mv
We can also use firstpersoncontrols on fullscreen http://threejs.org/examples/js/controls/FirstPersonControls.js
We need to first subdivide each strand using splines:
https://github.com/HongjianLi/iview/blob/master/public/iview/iview.js#L759
then we draw strips between set of points
https://github.com/HongjianLi/iview/blob/master/public/iview/iview.js#L813
what about another kind of spline? http://threejs.org/examples/#canvas_geometry_nurbs
also the function extrude in three js may be really useful
So for a course we want to instruct students to write a piece of python that retrieves mol files from PubChem or other services (like the NIH resolver), and display those in 3D. How do I accomplish that in chemview? I think I might need chemlab, but installing it from conda gives a dependency issue with python 3. I also could not find the repository to install from source.
Hi,
install jupyter from conda
everything stop working ....
Please help
Best Regards!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.