{"id":14959594,"url":"https://github.com/napoles-uach/stmol","last_synced_at":"2025-04-09T19:20:03.878Z","repository":{"id":38259976,"uuid":"283579634","full_name":"napoles-uach/stmol","owner":"napoles-uach","description":"This is the repository for the Stmol project, a Streamlit component that uses py3Dmol to render molecules.","archived":false,"fork":false,"pushed_at":"2023-12-06T15:50:28.000Z","size":11595,"stargazers_count":200,"open_issues_count":13,"forks_count":36,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-09T19:19:59.319Z","etag":null,"topics":["molecular","protein-structure","streamlit","visualization"],"latest_commit_sha":null,"homepage":"https://github.com/napoles-uach/stmol","language":"Python","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/napoles-uach.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","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":"2020-07-29T19:00:23.000Z","updated_at":"2025-04-02T13:57:51.000Z","dependencies_parsed_at":"2024-06-18T22:52:52.236Z","dependency_job_id":"d4668b3c-ff82-43fb-ac43-c3abfa3c893e","html_url":"https://github.com/napoles-uach/stmol","commit_stats":null,"previous_names":["napoles-uach/streamlit_3dmol"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/napoles-uach%2Fstmol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/napoles-uach%2Fstmol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/napoles-uach%2Fstmol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/napoles-uach%2Fstmol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/napoles-uach","download_url":"https://codeload.github.com/napoles-uach/stmol/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248094991,"owners_count":21046770,"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":["molecular","protein-structure","streamlit","visualization"],"created_at":"2024-09-24T13:20:11.150Z","updated_at":"2025-04-09T19:20:03.842Z","avatar_url":"https://github.com/napoles-uach.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stmol\n[ ![](https://img.shields.io/badge/Paper-Frontiers-red) ](https://www.frontiersin.org/articles/10.3389/fmolb.2022.990846/full)\\\nA component for building interactive molecular visualizations within Streamlit web-applications. It is designed to provide a state of the art visualizing and rendering 3D molecular structures for researchers, in a user-friendly manner.\n\n------------------------------\n## Note: Due to recent changes in the 3Dmol.js package, it is recomended to install py3DMol in the following way,\n```\npip install py3Dmol==2.0.0.post2\n```\n## Stmol features \n\n- An easy-to-use component for rendering interactive 3D molecular visualizations of protein and ligand structures within Streamlit web-apps\n- `stmol` can render protein and ligand structures with just a few lines of Python code by utilizing popular visualization libraries, currently Py3DMol and Speck. \n- On the user-end, `stmol` does not require expertise to interactively navigate. \n- On the developer-end, `stmol` can be easily integrated within structural bioinformatic and cheminformatic pipelines to provide a simple means for user-end researchers to advance biological studies and drug discovery efforts.\n------------------------------\n\n## Stmol installation\n\n`stmol` runs with traditional Python stack.\nTo install `stmol` from [pypi](https://pypi.org/project/stmol/), run this command in your terminal:\n\n``` console\npip install stmol==0.0.9\n```\n\nSince the end goal of `stmol` plugin, is to enable easy rendering of molecular structure within the streamlit applicaton, libraries such as \n[streamlit](https://github.com/streamlit/streamlit) and [py3Dmol](https://pypi.org/project/py3Dmol/) are crucial to work with. \nRun this command in your terminal to install the latest release of Streamlit,\n``` console\npip install streamlit\n```\nRun this command in your terminal to install the latest release of py3Dmol,\n``` console\npip install py3Dmol\n```\nA recent addition to `stmol` project, in a form of static HTML wrapper is the `speck_plot()` function, which helps in rendering [Speck](https://github.com/wwwtyro/speck) structures within the Streamlit web-application, is dependent on the following libraries, \n```console\nipyspeck(==0.6.1)\nipywidgets(==7.6.3)\nipython_genutils\n```\n\n-----------------\n\n## Quickstart\n\n##### 1. Protein visualization using `showmol()`function \n\n- **Using `py3Dmol object`**\n\nTo visualize any protein structure, all we need is the PDB ID of the protein.\n```python\nfrom stmol import showmol\nimport py3Dmol\n# 1A2C\n# Structure of thrombin inhibited by AERUGINOSIN298-A from a BLUE-GREEN ALGA\nxyzview = py3Dmol.view(query='pdb:1A2C') \nxyzview.setStyle({'cartoon':{'color':'spectrum'}})\nshowmol(xyzview, height = 500,width=800)\n```\n- **Using the `render_pdb()` function**\n\nThe `render_pdb()` function accepts any PDB ID and returns a py3Dmol object. \n```python\nfrom stmol import *\nshowmol(render_pdb(id = '1A2C'))\n```\n[![Quickstart-1](https://github.com/napoles-uach/stmol/blob/master/Resources/Quickstart-1.gif)](https://github.com/napoles-uach/stmol/blob/master/Resources/Quickstart-1.gif)\n\n##### 2. Labelling protein using `render_pdb_resn()`function \nInorder to mark the residues, we can use the `render_pdb_resn()` function, which in this example marks the *Alanine* [ALA] residues,\n```python\nshowmol(render_pdb_resn(viewer = render_pdb(id = '1A2C'),resn_lst = ['ALA',]))\n```\n[![Quickstart-2](https://github.com/napoles-uach/stmol/blob/master/Resources/Quickstart-2.png)](https://github.com/napoles-uach/stmol/blob/master/Resources/Quickstart-2.png)\n\n###### Refer to the documentation [here](https://napoles-uach-stmol-home-pom051.streamlitapp.com/Documentation) \n----------\n## Examples\nYou can find several `stmol` examples [here](https://napoles-uach-stmol-home-pom051.streamlitapp.com/Examples).\n\n### Browser support\n- Chrome, Edge, Firefox - [link](https://napoles-uach.github.io/stmol/)\n- Safari - [link](https://napoles-uach-stmol-home-pom051.streamlitapp.com)\n\n----------------\n## Dependencies\n- [py3Dmol](https://pypi.org/project/py3Dmol/) \n- [ipyspeck](https://pypi.org/project/ipyspeck/)\n- [ipywidgets](https://github.com/jupyter-widgets/ipywidgets)\n- [streamlit](https://github.com/streamlit/streamlit)\n- [ipython_genutils](https://github.com/ipython/ipython_genutils)\n-----------------\n\n## Contribution to the project\nWe appreciate contributions from the community! Every little bit helps, and credit will always be given. \n- **Reporting Bugs** - Report bugs at https://github.com/napoles-uach/stmol/issues\n- **Fix Bugs** - Look through the GitHub issues for bugs. Anything tagged with “bug” and “help wanted” is open to whoever wants to help with it.\n- **Implement Features** - Look through the GitHub issues for features. Anything tagged with “enhancement” and “help wanted” is open to whoever wants to implement it.\n- **Submit Feedback** - The best way to send feedback is to file an issue at https://github.com/napoles-uach/stmol/issues\n--------------\n## Authors\n- J. M. Nápoles-Duarte \u003cjnapoles@uach.mx\u003e\n- Avratanu Biswas \u003cavratanu.biswas@brc.hu\u003e\n- Mitchell I. Parker \u003cmip34@drexel.edu\u003e\n\n## Aknowledgments\nWe thank the authors of 3dmol.js and py3Dmol.\nNicholas Rego, David Koes, 3Dmol.js: molecular visualization with WebGL, Bioinformatics, Volume 31, Issue 8, 15 April 2015, Pages 1322–1324, https://doi.org/10.1093/bioinformatics/btu829\n\n## How to cite\nPlease include this citation if Stmol is used in an academic study:\n\nNápoles-Duarte JM, Biswas A, Parker MI, Palomares-Baez JP, Chávez-Rojo MA and Rodríguez-Valdez LM (2022) Stmol: A component for building interactive molecular visualizations within streamlit web-applications. Front. Mol. Biosci. 9:990846. doi: 10.3389/fmolb.2022.990846\n\nOr use the following bibtex format,\n```\n@ARTICLE{stmol,\n  \nAUTHOR={Nápoles-Duarte, J.M. and Biswas, Avratanu and Parker, Mitchell I. and Palomares-Baez, J.P. and Chávez-Rojo, M. A. and Rodríguez-Valdez, L. M.},   \n\t \nTITLE={Stmol: A component for building interactive molecular visualizations within streamlit web-applications},      \n\t\nJOURNAL={Frontiers in Molecular Biosciences},      \n\t\nVOLUME={9},           \n\t\nYEAR={2022},      \n\t  \nURL={https://www.frontiersin.org/articles/10.3389/fmolb.2022.990846},       \n\t\nDOI={10.3389/fmolb.2022.990846},      \n\t\nISSN={2296-889X},   \n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnapoles-uach%2Fstmol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnapoles-uach%2Fstmol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnapoles-uach%2Fstmol/lists"}