https://github.com/avrabyt/st-speckmol
  
  
    Streamlit Component for creating Speck molecular structures within Streamlit Web app. 
    https://github.com/avrabyt/st-speckmol
  
bioinformatics molecules pdb python streamlit streamlit-component visualization
        Last synced: 7 months ago 
        JSON representation
    
Streamlit Component for creating Speck molecular structures within Streamlit Web app.
- Host: GitHub
- URL: https://github.com/avrabyt/st-speckmol
- Owner: avrabyt
- License: mit
- Created: 2022-05-19T15:20:34.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-16T18:35:11.000Z (over 1 year ago)
- Last Synced: 2025-03-24T10:12:11.345Z (7 months ago)
- Topics: bioinformatics, molecules, pdb, python, streamlit, streamlit-component, visualization
- Language: Python
- Homepage: https://hellostspeckmol.streamlitapp.com
- Size: 74 MB
- Stars: 31
- Watchers: 1
- Forks: 15
- Open Issues: 4
- 
            Metadata Files:
            - Readme: README.md
- License: LICENSE
 
Awesome Lists containing this project
README
          # Stspeckmol
A Streamlit Component for creating Speck molecular structures within Streamlit Web app.
[](https://pypi.org/project/st-speckmol/)
[](https://pepy.tech/project/st-speckmol)
[](https://pepy.tech/project/st-speckmol)
[](https://hellostspeckmol.streamlitapp.com)


[](https://doi.org/10.5281/zenodo.11205344)
## Installation 
```console
pip install st-speckmol
```
to upgrade use,
```console
pip install --upgrade st-speckmol
```
>:warning: https://github.com/avrabyt/st-speckmol/issues/20 In case of `ModuleNotFoundError: No module named 'ipython_genutils'` :
>```console
> pip install ipython_genutils
>```
> **Future release of st-speckmol, will support this module natively.**
## Example
Try the app, for different examples. 
[](https://hellostspeckmol.streamlitapp.com)
## Quickstart
``` python
import streamlit as st
import glob
from st_speckmol import speck_plot
# Example files path
ex_files = glob.glob("examples/*.xyz")
with st.sidebar:
    example_xyz = st.selectbox("Select a molecule",ex_files)
    f = open(example_xyz,"r")
    example_xyz = f.read()
res = speck_plot(example_xyz)
```

## Video tutorial
  See the tutorial video
[](https://youtu.be/jUh923Z4fuk)
[Blog Post](https://medium.com/@avra42/how-to-build-molecular-structures-visualizing-web-application-using-python-and-streamlit-5ec9da86550c) 
## Scientfic usage
To cite any scientific usage, please refer to the following citation:
```
@software{Biswas_2024,
  author = {Avratanu Biswas},
  title = {st-speckmol},
  version = {v0.0.6.1},
  doi = {10.5281/zenodo.11205344},
  url = {https://github.com/avrabyt/st-speckmol},
  date = {2024-05-16}
}
```
For additional assistance, feel free to reach out to me directly.
## Related library - [Stmol](https://github.com/napoles-uach/stmol) 
During the development of the related library [Stmol](https://github.com/napoles-uach/stmol), we introduced the convenient `speck_plot()` function, allowing seamless integration of both libraries. 
> ℹ️
> The complete integration of StSpeckmol **has not yet been finalized**, and any additional (or recently implemented) functionalities like `add_speck_param` will exclusively be accessible through this library."
```python
# Installation of Stmol
pip install stmol==0.0.9
# Import Speck plot
from stmol import speck_plot
```
## References
[Speck Online](http://wwwtyro.github.io/speck/)
[Speck Python package](https://pypi.org/project/ipyspeck/)
[Example-Source](https://github.com/wwwtyro/speck/tree/gh-pages/static/samples)
[Stmol](https://github.com/napoles-uach/stmol)