streamlit-molstar
Mol* (/'molstar/) is a modern web-based open-source toolkit for visualisation and analysis of large-scale molecular data.
Install
pip install streamlit-molstar
Usage
Show Molecule
Protein with Traj
import streamlit as st
from streamlit_molstar import st_molstar, st_molstar_rcsb, st_molstar_remote
#st_molstar_rcsb('1LOL', key='xx')
#st_molstar_remote("https://files.rcsb.org/view/1LOL.cif", key='sds')
#st_molstar('examples/complex.pdb',key='3')
st_molstar('examples/complex.pdb', 'examples/complex.xtc', key='4')
Protein & Pocket
Select pocket from local protein (pockets predicted using p2rank)
import streamlit as st
from streamlit_molstar.pocket import select_pocket_from_local_protein
selected = select_pocket_from_local_protein("examples/pocket/protein.pdb", prank_home='/Users/wfluo/Downloads/p2rank_2.4/')
if selected:
protein_file_path, pocket = selected
st.write('Protein Path: ', protein_file_path)
st.write('Selected Pocket: ', pocket)
Select pocket from uploaded protein (pockets predicted using p2rank)
import streamlit as st
from streamlit_molstar import st_molstar, st_molstar_rcsb, st_molstar_remote
selected = select_pocket_from_upload_protein(prank_home='/Users/wfluo/Downloads/p2rank_2.4/')
if selected:
protein_file_path, pocket = selected
st.write('Protein Path: ', protein_file_path)
st.write('Selected Pocket: ', pocket)
Show Pockets
import streamlit as st
from streamlit_molstar import st_molstar_pockets
st_molstar_pockets(protein_file_path, structure_file_path, pockets_file_path)
Docking
Show docking result with ground truth
import streamlit as st
from streamlit_molstar.docking import st_molstar_docking
st_molstar_docking('examples/docking/2zy1_protein.pdb',
'examples/docking/docking.2zy1.0.sdf', gt_ligand_file_path='examples/docking/2zy1_ligand.sdf', key="5", height=240)
Auto files
import streamlit as st
from streamlit_molstar.auto import st_molstar_auto
import streamlit as st
st.set_page_config(layout="wide")
st.write("from remote url")
files = ["https://files.rcsb.org/download/3PTB.pdb", "https://files.rcsb.org/download/1LOL.pdb"]
st_molstar_auto(files, key="6", height="320px")
st.write("from local file")
files = ['examples/7bcq.pdb', "examples/7bcq.mrc"]
st_molstar_auto(files, key="7", height="320px")
Metadata
Release files for streamlit-molstar 0.4.21
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| streamlit-molstar-0.4.21.tar.gz | 35.2 MB | Without provenance | Details for streamlit-molstar-0.4.21.tar.gz |
Release files / streamlit-molstar-0.4.21.tar.gz
| Download URL | streamlit-molstar-0.4.21.tar.gz |
|---|---|
| Size | 35.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
65ebbc554e163455685dd96e39ca503e7c2af76bab7a61ccce25e43fae0f1b40
|
|
BLAKE2b-256 checksum How to use checksums |
1d41c7a6939e9c400ba9874dfd8abbfcae17d8e8228cc43a4370098577319c11
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.12
|
Security for streamlit-molstar 0.4.21
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.