| --- |
| title: MuSProt |
| emoji: 🧬 |
| colorFrom: blue |
| colorTo: gray |
| sdk: docker |
| app_port: 8501 |
| pinned: false |
| short_description: A multistate multimodal protein structure dataset |
| license: mit |
| --- |
| |
| # MuSProt |
|
|
| MuSProt is a multistate protein structure database with pairwise structural |
| comparisons, energy annotations, experimental metadata, and functional |
| annotations. |
|
|
| ## Space configuration |
|
|
| The Docker Space serves a React frontend and a MuSProt-only FastAPI backend. |
| The SQLite database is always opened in immutable read-only mode. |
|
|
| ```text |
| frontend/ React/Vite MuSProt explorer |
| backend/ MuSProt-only FastAPI API and bundled small assets |
| Dockerfile Hugging Face Docker Space build |
| ``` |
|
|
| Provide the database using one of these approaches: |
|
|
| 1. Mount or upload it to `/data/MuSProt.db`. |
| 2. Set `MUSPROT_DATASET_REPO` to a Hugging Face Dataset repository containing |
| `MuSProt.db`. |
|
|
| Recommended Dataset repository files: |
|
|
| ```text |
| MuSProt.db |
| MuSProt-node-lookup.db |
| musprot_summary.json |
| MuSProt_documentation.md |
| plots/ |
| ``` |
|
|
| Optional Space variables: |
|
|
| ```text |
| MUSPROT_DB_PATH=/data/MuSProt.db |
| MUSPROT_NODE_DB_PATH=/data/MuSProt-node-lookup.db |
| MUSPROT_SUMMARY_PATH=/data/musprot_summary.json |
| MUSPROT_DOCS_PATH=/data/MuSProt_documentation.md |
| MUSPROT_PLOTS_DIR=/data/plots |
| MUSPROT_DATASET_REPO=omaib/<dataset-repository> |
| MUSPROT_DATASET_REVISION=main |
| MUSPROT_DB_FILENAME=MuSProt.db |
| MUSPROT_PRELOAD_NODE_INDEX=0 |
| ``` |
|
|
| For a private Dataset repository, add `HF_TOKEN` as a Space secret. |
|
|
| ## Updating the database |
|
|
| When publishing a new `MuSProt.db`, regenerate the bundled summary sidecar: |
|
|
| ```bash |
| cd backend |
| python scripts/generate_summary.py /path/to/MuSProt.db -o assets/musprot_summary.json |
| ``` |
|
|
| The deployed application does not create indexes or modify the SQLite file. |
| Create any required indexes before uploading the database to the Dataset |
| repository. |
|
|
| ## Local verification |
|
|
| ```bash |
| cd frontend |
| npm ci |
| npm run build |
| |
| cd ../backend |
| MUSPROT_DB_PATH=/path/to/MuSProt.db \ |
| MUSPROT_FRONTEND_DIR=../frontend/build \ |
| uvicorn space_app:app --host 0.0.0.0 --port 8501 |
| ``` |
|
|