Tutorials¶
Hands-on guides that walk you through real-world protein modeling tasks with Molfun. Each tutorial is self-contained and includes runnable code.
Predict protein thermostability from sequence using a HeadOnly fine-tuning strategy. Load a CSV of sequences with stability labels, train, and evaluate with a scatter plot.
Beginner ~20 min
Fetch PDBbind affinity data, apply LoRA fine-tuning, and predict binding affinity (Kd/Ki). Compare LoRA against full fine-tuning on a real benchmark.
Intermediate ~30 min
Use the built-in kinases_human collection with PartialFinetune to refine predicted kinase structures using FAPE loss and evaluate structural quality.
Intermediate ~30 min
When you only have ~50 proteins, full fine-tuning overfits. Learn when to use LoRA vs HeadOnly, compare overfitting curves, and tune rank and alpha.
Beginner ~15 min
Compose models from scratch with ModelBuilder: choose embedders, transformer blocks, and structure modules. Train a fully custom architecture on structure prediction.
Advanced ~45 min
Set up WandB, Comet, or MLflow tracking in one line. Use CompositeTracker to log to multiple backends simultaneously and compare runs.
Beginner ~15 min
Define reproducible end-to-end workflows with Pipeline.from_yaml(). Fetch data, preprocess, train, and evaluate --- all from a single YAML recipe file.
Intermediate ~20 min
Learning Path¶
If you are new to Molfun, we recommend following the tutorials in this order:
graph LR
A["Stability Prediction<br/><small>HeadOnly basics</small>"] --> B["LoRA for Small Datasets<br/><small>PEFT fundamentals</small>"]
B --> C["Binding Affinity<br/><small>LoRA + real data</small>"]
C --> D["Kinase Refinement<br/><small>Partial fine-tune</small>"]
D --> E["Custom Architectures<br/><small>ModelBuilder</small>"]
F["Experiment Tracking<br/><small>Any time</small>"] -.-> A
G["YAML Pipelines<br/><small>After any tutorial</small>"] -.-> C
style A fill:#40a02b,stroke:#40a02b,color:#ffffff
style B fill:#40a02b,stroke:#40a02b,color:#ffffff
style C fill:#df8e1d,stroke:#df8e1d,color:#ffffff
style D fill:#df8e1d,stroke:#df8e1d,color:#ffffff
style E fill:#d20f39,stroke:#d20f39,color:#ffffff
style F fill:#209fb5,stroke:#209fb5,color:#ffffff
style G fill:#209fb5,stroke:#209fb5,color:#ffffff
Prerequisites
All tutorials assume you have Molfun installed. If you have not done so yet, follow the Installation guide first.