superstar54 / weas-widget

A widget to visualize and edit atomic structures in Jupyter Notebook
https://weas-widget.readthedocs.io/en/latest/index.html
MIT License
19 stars 3 forks source link

Not show in multiple tab #57

Open superstar54 opened 4 months ago

superstar54 commented 4 months ago
import ipywidgets as ipw
from ase.build import molecule
from weas_widget import WeasWidget

tab_contents = ['H2O', 'NH3', 'CH4']
children = [WeasWidget(from_ase=molecule(name)) for name in tab_contents]
tab = ipw.Tab()
tab.children = children
tab.titles = [str(i) for i in range(len(children))]
tab

https://github.com/superstar54/weas-widget/assets/11457659/25763deb-2434-4c0d-9d4a-c22a8328833c