Skip to content

Commit

Permalink
In process
Browse files Browse the repository at this point in the history
  • Loading branch information
dprada committed Aug 10, 2023
1 parent fc8d8aa commit 00b2367
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 5 deletions.
22 changes: 22 additions & 0 deletions NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Libraries:

- https://github.com/widgetti/ipyvolume/tree/master/ipyvolume
- https://github.com/nglviewer/nglview
- https://github.com/nglviewer/ngl
- https://github.com/cxhernandez/ipymol
- https://github.com/3dmol/3Dmol.js
- https://github.com/3dmol/3Dmol.js/tree/master/py3Dmol

WebGL:

- https://github.com/mrdoob/three.js/

Typescript:

- https://github.com/rmorshea/spectate

Widgets:

- https://ipywidgets.readthedocs.io/en/stable/examples/Widget%20Custom.html
- https://ipywidgets.readthedocs.io/en/stable/examples/Widget%20Low%20Level.html

26 changes: 21 additions & 5 deletions ipymolsysview/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,35 @@
TODO: Add module docstring
"""

from ipymolsysview import pyunitwizard as puw
from ipywidgets import DOMWidget
from traitlets import Unicode
from traitlets import Unicode, Int
from ._frontend import module_name, module_version


class Widget(DOMWidget):
"""TODO: Add docstring here
"""

_model_name = Unicode('MolSysModel').tag(sync=True)
_model_module = Unicode(module_name).tag(sync=True)
_model_module_version = Unicode(module_version).tag(sync=True)
_view_name = Unicode('MolSysView').tag(sync=True)
_view_module = Unicode(module_name).tag(sync=True)
_view_module_version = Unicode(module_version).tag(sync=True)

value = Unicode('Hello IPyMolSysView!').tag(sync=True)
n_atoms = Int(0).tag(sync=True)

def __init__(self, molecular_system, selection='all', structure_indices='all', syntax='MolSysMT'):

.self.molecular_system = molecular_system
.self.selection = selection
.self.syntax = syntax
.self.structure_indices = structure_indices

from molsysmt import get

coordinates = get(self.molecular_system, selection=self.selection,
structure_indices=self.structure_indices, syntax=self.syntax)

coordinates_value = puw.get_value(coordinates, standard=True)
coordinates_value = coordinates_value[0]


0 comments on commit 00b2367

Please sign in to comment.