Cookbook¶
Recipes for getting things done with molforge. Each recipe answers a specific task-oriented question — "I want to do X, what do I write?" — and shows a complete, runnable example. The User guide covers concepts; this section covers concrete workflows.
If you want to...¶
| Task | Recipe |
|---|---|
| See the whole Identity layer in one script (design → reproduce) | End to end |
| Predict a structure from a sequence | Fold a sequence |
| Predict a protein + ligand or multi-chain complex | Multi-component cofolding |
| Dock a small molecule against a folded receptor | Fold then dock |
| Get a raw PDB ready for MD simulation | Prepare for MD |
| Run a short MD simulation and analyse it | MD and RMSD |
| Design sequences for a backbone, then validate by re-folding | Design then refold |
| Trace what produced an output across a multi-step workflow | Inspect provenance |
| Check a folded or docked structure for quality problems | Validate structures |
| Skip recomputing expensive engine calls you've already run | Caching results |
| Rank a series of analogs by binding affinity (MM/GBSA) | Rank binders with MM/GBSA |
| Rank analogs by rigorous relative affinity (FEP, via alchemlyb) | Rank binders with FEP |
| Compute an absolute binding free energy (ABFE, via alchemlyb) | Absolute binding free energy with FEP |
| Ingest, clean, dedup, and filter a set of small molecules | Work with small molecules |
| Fetch or search structures (RCSB/AlphaFold) and compounds (ChEMBL) | Fetch and search databases |
If you're choosing between options...¶
| Decision | Comparison |
|---|---|
| Which folding engine should I use? | Folding engines |
| Which docking engine should I use? | Docking engines |
| Which generative engine for what task? | Generative engines |
How these recipes work¶
Every recipe is structurally complete — real imports, real method signatures, real arguments — and will run as written if you have the dependencies for the engine it uses. Most recipes need optional extras:
- Folding via ESMFold needs
pip install "molforge[ml]", plustorchand a few GB of weights. - Docking via Vina needs the
vinaPython package and Open Babel. - MD via OpenMM needs
pip install "molforge[md,prep]"and a working OpenMM install.
Each recipe states its requirements at the top so you know what you're in for before you copy the code.
For shorter, more conceptual introductions, see the walkthroughs. For exhaustive worked examples that combine multiple engines, see the examples notebooks.