Views
No views yet

venv1python -m venv .venv
2source .venv/bin/activateconda / mamba1mamba create -n stoic-env python=3.10 -y
2mamba activate stoic-env1git clone https://github.com/PickyBinders/stoic.git
2cd stoic
3python -m pip install --upgrade pip
4python -m pip install -e .python -m pip install git+https://github.com/PickyBinders/stoic.gitNote: The first inference run requires internet connection to download model weights from Hugging Face. Next runs reuse cached files from~/.cache/huggingface, so offline usage works once the model is cached.
stoic_predict_stoichiometry command supports:1usage: stoic_predict_stoichiometry [-h]
2 [--sequences SEQ [SEQ ...] | --input-path INPUT_PATH]
3 [--model MODEL]
4 [--top-n TOP_N]
5 [--return-residue-weights]
6 [--max-inference-seq-len MAX_INFERENCE_SEQ_LEN]
7 [--output-dir OUTPUT_DIR]
8 [--device DEVICE]
9
10options:
11 -h, --help show this help message and exit
12 --sequences SEQ [SEQ ...]
13 Protein sequences (one per unique chain)
14 --input-path INPUT_PATH
15 Path to a FASTA file or a directory with FASTA files
16 --model MODEL HuggingFace model name or local path (default: PickyBinders/stoic)
17 --top-n TOP_N Number of top stoichiometry candidates (default: 3)
18 --return-residue-weights
19 Return residue weights and save residue-level predictions
20 --max-inference-seq-len MAX_INFERENCE_SEQ_LEN
21 Maximum sequence length for full-length inference
22 --output-dir OUTPUT_DIR
23 Output directory for predictions and AF3 JSON files
24 --device DEVICE Device to use, e.g. cuda or cpu (default: auto-detect)1stoic_predict_stoichiometry \
2 --sequences "SENECA" "VIRTVS" \
3 --top-n 31stoic_predict_stoichiometry \
2 --input-path path/to/complex.fasta \
3 --top-n 31stoic_predict_stoichiometry \
2 --input-path path/to/fasta_dir \
3 --top-n 3 \
4 --output-dir stoic_predictions<fasta_stem>.json, <fasta_stem>_af3_input.json, and optional residue predictions).--output-dir is provided:results.jsonaf3_input.jsonresidue_predictions.pkl (if --return-residue-weights)<complex_name>.json<complex_name>_af3_input.json<complex_name>_residue_predictions.pkl (if --return-residue-weights)1from stoic.predict_stoichiometry import predict_stoichiometry
2
3results = predict_stoichiometry(
4 sequences=["SENECA", "VIRTVS"], # or FASTA path / FASTA dir path
5 model_name="PickyBinders/stoic",
6 top_n=3,
7)
8print(results)1import torch
2from stoic.model import Stoic
3
4
5device = "cuda" if torch.cuda.is_available() else "cpu"
6model = Stoic.from_pretrained("PickyBinders/stoic")
7model.eval().to(device)
8pred = model.predict_stoichiometry(["SENECA", "VIRTVS"], top_n=3)
9print(pred)1@article{litvinov2026stoic,
2 title = {Stoic: Fast and accurate protein stoichiometry prediction},
3 author = {Litvinov, Daniil and Pantolini, Lorenzo and {\v{S}}krinjar, Peter and Tauriello, Gerardo and McCafferty, Caitlyn L and Engel, Benjamin D and Schwede, Torsten and Durairaj, Janani},
4 journal = {bioRxiv},
5 year = {2026},
6 doi = {10.64898/2026.03.13.711535},
7 url = {https://www.biorxiv.org/content/10.64898/2026.03.13.711535v1}
8}