{"id":15359642,"url":"https://github.com/jhsmit/ipymolstar","last_synced_at":"2025-04-15T07:23:09.242Z","repository":{"id":222490892,"uuid":"757345550","full_name":"Jhsmit/ipymolstar","owner":"Jhsmit","description":"PDBeMolstar as anywidget","archived":false,"fork":false,"pushed_at":"2025-04-09T15:14:14.000Z","size":657,"stargazers_count":32,"open_issues_count":4,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T15:23:46.003Z","etag":null,"topics":["anywidget","molstar","pdbe"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jhsmit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-14T10:00:22.000Z","updated_at":"2025-04-09T00:42:37.000Z","dependencies_parsed_at":"2024-03-18T19:57:39.280Z","dependency_job_id":"f8d39539-b487-447f-9bfb-782de7fa32b9","html_url":"https://github.com/Jhsmit/ipymolstar","commit_stats":{"total_commits":79,"total_committers":1,"mean_commits":79.0,"dds":0.0,"last_synced_commit":"acd549bf4df5bab7dac2990f95061ce6e801cb3e"},"previous_names":["jhsmit/ipymolstar"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jhsmit%2Fipymolstar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jhsmit%2Fipymolstar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jhsmit%2Fipymolstar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jhsmit%2Fipymolstar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jhsmit","download_url":"https://codeload.github.com/Jhsmit/ipymolstar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249024395,"owners_count":21200111,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anywidget","molstar","pdbe"],"created_at":"2024-10-01T12:45:30.321Z","updated_at":"2025-04-15T07:23:09.227Z","avatar_url":"https://github.com/Jhsmit.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ipymolstar\n\n![image](https://github.com/Jhsmit/ipymolstar/assets/7881506/589a94d5-2647-4977-90aa-c886c10cacb9)\n\n\n## Live Demos\n\nGive `ipymolstar` a spin without even installing python!\n\n\n - Try it in jupyter lab via [JupyterLite](https://github.com/Jhsmit/ipymolstar-demo) 🌍🚀\n - Explore the solara ☀️ [demo application](https://github.com/Jhsmit/ploomber-solara-ipymolstar) on [Ploomber-cloud](https://hidden-resonance-5816.ploomberapp.io) ⛅\n - Grab a cup and play with the [solara](https://app.py.cafe/jhsmit/ipymolstar-solara), [pyshiny](https://py.cafe/jhsmit/ipymolstar-shiny) or [panel](https://app.py.cafe/jhsmit/ipymolstar-panel) live demo's on PyCafé ☕\n  - Upload your Alphafold3 .zip result and view plddt or chain colors in the `solarafold` result viewer on [huggingface](https://huggingface.co/spaces/Jhsmit/solarafold) 🤗\n - Control the camera 📷 with [MolViewSpec](https://pypi.org/project/molviewspec/) from python 🐍 in a solara ☀️ dashboard on [PyCafé](https://py.cafe/jhsmit/molviewspec-protein-visualization) ☕\n\nYou can find other examples in the examples directory.\n\n## Preview\n\nYou can run a quick preview of `ipymolstar` in a notebook with [juv](https://github.com/manzt/juv):\n    \n```sh\njuv run example.ipynb\n```\n\n## Installation\n\n```sh\npip install ipymolstar\n```\n\u003e [!WARNING]  \n\u003e Make sure you install ipymolstar in an environment that contains your installation of Jupyter. If you have installed Jupyter in a different environment from your project (requiring you to use a named, non-default kernel), you will have to install ipymolstar (or only anywidget) in your Jupyter environment as well.\n\n\n## Use\n\n```python\nfrom ipymolstar import PDBeMolstar\nview = PDBeMolstar(molecule_id='1qyn', theme='light', hide_water=True)\nview\n```\n\nLoading local data, hiding the buttons:\n\n```python\nfrom pathlib import Path \nfpth = Path().resolve() / 'assets' / '6vsb.bcif'\ncustom_data = {\n    'data': fpth.read_bytes(),\n    'format': 'cif',\n    'binary': True,\n    }\nview = PDBeMolstar(\n    custom_data=custom_data, \n    hide_controls_icon=True, \n    hide_expand_icon=True, \n    hide_settings_icon=True, \n    hide_selection_icon=True, \n    hide_animation_icon=True,\n    hide_water=True,\n    hide_carbs=True,\n)\nview\n```\n\nSee the example notebook for more advanced usage. \nSolara example code can be found [here](https://github.com/Jhsmit/ploomber-solara-ipymolstar)\n\n## Citing\n\n`ipymolstar` uses [anywidget](https://github.com/manzt/anywidget) to create a widgets based on [Mol*](https://molstar.org/)\n\nTo cite Mol*:\n\u003e David Sehnal, Sebastian Bittrich, Mandar Deshpande, Radka Svobodová, Karel Berka, Václav Bazgier, Sameer Velankar, Stephen K Burley, Jaroslav Koča, Alexander S Rose: Mol* Viewer: modern web app for 3D visualization and analysis of large biomolecular structures, Nucleic Acids Research, 2021; [10.1093/nar/gkab31](https://doi.org/10.1093/nar/gkab314).\n\n\n### PDBeMolstar\nThe PDBeMolstar widget is based on the [PDBe integration](https://github.com/molstar/pdbe-molstar) of Mol*.\n\n\n### MolViewSpec\n\nThe MolViewSpec widget is based on [MolViewSpec](https://github.com/molstar/mol-view-spec). To cite MolViewSpec:\n\n\u003e Sebastian Bittrich, Adam Midlik, Mihaly Varadi, Sameer Velankar, Stephen K. Burley, Jasmine Y. Young, David Sehnal, Brinda Vallat: Describing and Sharing Molecular Visualizations Using the MolViewSpec Toolkit, Current Protocols, 2024; [10.1002/cpz1.1099](https://doi.org/10.1002/cpz1.1099)\n\nSee also the [RCSB citation policies](https://www.rcsb.org/pages/policies) for additional citation information.\n\n## Development\n\n\nThe molviewspec widget front-end code bundles it's JavaScript dependencies. After setting up Python,\nmake sure to install these dependencies locally:\n\n```sh\nnpm install\n```\n\nWhile developing, you can run the following in a separate terminal to automatically\nrebuild JavaScript as you make changes:\n\n```sh\nnpm run dev\n```\n\n\n### Creating a new release\n\n- update `__version__` in `__init__.py`\n- create a new release on GitHub, choose as tag 'v' + `__version__`; ie 'v0.0.3'\n- GitHub actions should automatically deploy to PyPi\n\n### Hot reloading\n\nTo enable anywidget hot reloading, you need to set the env var `ANYWIDGET_HMR` to 1. \n\nWindows:\n```bash\nset ANYWIDGET_HMR=1\njupyter lab\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhsmit%2Fipymolstar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjhsmit%2Fipymolstar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhsmit%2Fipymolstar/lists"}