Proto is not affiliated with Google DeepMind. This toolkit is open source and builds on the implementation produced by this organization. Product names, logos, and trademarks are the property of their respective owners.
Background
AlphaFold2 (Jumper et al., 2021) predicts a protein’s 3D structure from its amino-acid sequence, and was introduced at the CASP14 structure-prediction assessment in 2020. AF2 takes a multiple-sequence alignment (MSA) as a primary input. The MSA carries an evolutionary signal: residues that lie close together in the folded structure tend to mutate in a correlated way across related proteins. AF2 reads these covariation patterns to infer which parts of the chain are in contact. Because the signal comes from the alignment itself, accuracy scales with the depth and diversity of the MSA, and proteins with few detectable homologs are harder to fold. Internally, AlphaFold2 maintains two representations: an MSA representation and a pairwise representation over residue pairs. The Evoformer network repeatedly exchanges information between the two, using attention together with triangle-based updates on the pairwise representation that enforce geometric consistency among the inferred residue-residue distances. A structure module then turns these representations into an explicit 3D model, placing each residue as a rigid backbone frame with its own position and orientation. This whole process is recycled through the network several times, each pass refining the previous prediction. Along with the coordinates, AlphaFold2 emits two calibrated confidence measures: the per-residue predicted local distance difference test (pLDDT), which scores the model’s confidence in each residue’s local structure, and the predicted aligned error (PAE), which estimates the expected error in one residue’s position when the structure is aligned on another. This toolkit runs the original AlphaFold2 model through the ColabDesign JAX implementation rather than the full DeepMind or ColabFold pipeline. There is no template-search stage, and multiple-sequence alignments are optional: they can be generated by a ColabFold search, supplied precomputed, or skipped to run in single-sequence mode. Beyond folding, the same model exposes a per-residue gradient, which gradient-based binder-design methods use to optimize a binder sequence against a frozen target.Learning Resources
- AlphaFold: a solution to a 50-year-old grand challenge in biology (Google DeepMind) - a general-audience blog post explaining the protein-folding problem and how AlphaFold2 approaches it, published alongside the CASP14 result.
Tools
AlphaFold2 Structure Prediction (alphafold2-prediction)
Predicts the 3D structure of one or more protein chains. Each input complex (a single chain, or several chains folded together) is run through the ColabDesign AlphaFold2 model, returning a predicted Structure per complex with confidence metrics: per-residue pLDDT, pTM, interface pTM for multi-chain complexes, and predicted aligned error.API Reference
Input: AlphaFold2Input
Input: AlphaFold2Input
StructurePredictionInput. Each complex can contain one or more protein chains.ComplexMSAs (per-chain MSAs keyed by chain index); paired=True marks rows taxonomy-aligned across chains. Populated by preprocess() or supplied directly.Config: AlphaFold2Config
Config: AlphaFold2Config
num_ensemble_models > 1; set one or the other. Default: 1.model_num; when ensembling, models are selected from the full pool (models 1 through N). Range: 1-5. Default: 1.BaseConfig. Default: False."cuda", "cpu"). Inherited from StructurePredictionConfig. Default: "cuda".None waits indefinitely.BaseToolOutput.approx_equal), and the seed participates in cache keys. When None, cacheable seed-sensitive tools skip cache until seeded.False.MSAStructurePredictionConfig. Default: True.use_msa=True. Inherited from MSAStructurePredictionConfig. Default: None.MSAStructurePredictionConfig. Default: True.Output: AlphaFold2Output
Output: AlphaFold2Output
AlphaFold2Metrics instance on .metrics.structures item)| Metric | Type | Range | Availability |
|---|---|---|---|
avg_plddt | float | 0.0 to 1.0 | always |
ptm | float | 0.0 to 1.0 | always |
iptm | float | 0.0 to 1.0 | multi-chain input only |
avg_pae | float | ≥ 0.0 | always |
pae | list[list[float]] | ≥ 0.0 | when include_pae_matrix=True |
Applications
This tool folds a protein sequence into a 3D model for structural analysis, docking, or as input to downstream structure tools. Running it on a multi-chain complex additionally estimates how confidently the chains are placed relative to each other through the interface pTM and PAE, which is informative for assessing predicted protein-protein interfaces.Usage Tips
use_msadefaults toTrue. An MSA is then generated by a ColabFold search for each protein chain; set itFalsefor single-sequence prediction (faster, usually lower accuracy), or attach precomputed MSAs to the input to skip the search.model_numandnum_ensemble_modelsare mutually exclusive.model_num(default1) selects one of AlphaFold2’s five trained parameter sets;num_ensemble_modelsruns several and averages them for higher accuracy at higher cost. Setting both raises an error.- Confidence is reported as pLDDT, pTM, ipTM, and PAE. Average pLDDT (0 to 1) is the primary per-structure quality metric; ipTM is populated only for multi-chain complexes. Set
include_pae_matrixto attach the full per-residue PAE matrix. - Protein sequences only. DNA, RNA, and ligands are not supported;
Xis allowed for unknown residues.
AlphaFold2 Gradient (alphafold2-gradient)
Scores and differentiates a binder against a frozen target structure. Given a target-plus-binder template, it runs AlphaFold2 (through ColabDesign’s binder-design path) on the binder against the fixed target and returns the design loss, the predicted Structure, and, by default, the gradient of the loss with respect to the binder sequence logits.API Reference
Input: AlphaFold2GradientInput
Input: AlphaFold2GradientInput
Structure object, or a dict in the shape produced by Structure.model_dump(mode='json').Config: AlphaFold2GradientConfig
Config: AlphaFold2GradientConfig
False.["C", "W"])."last" matches Germinal’s VHH default; "average" averages across recycles; "sample" picks one uniformly; "first" uses only recycle 0.Available options: last, sample, average, firstprep_inputs.prep_inputs.prep_inputs."base" (upstream ColabDesign) or "germinal" (Germinal fork with alpha, bias, framework contacts, extension losses).Available options: base, germinalFalse for forward-only scoring (returns gradient=None).len(logits).True is coerced to 1 and False to 0.None waits indefinitely.BaseToolOutput.approx_equal), and the seed participates in cache keys. When None, cacheable seed-sensitive tools skip cache until seeded.Output: AlphaFold2GradientOutput
Output: AlphaFold2GradientOutput
b_factor_type=PLDDT means Structure.per_residue_plddt normalizes them to [0, 1].None when compute_gradient=False.| Metric | Type | Range | Availability |
|---|---|---|---|
avg_plddt | float | 0.0 to 1.0 | always |
ptm | float | 0.0 to 1.0 | always |
iptm | float | 0.0 to 1.0 | multi-chain input only |
avg_pae | float | ≥ 0.0 | always |
pae | list[list[float]] | ≥ 0.0 | when include_pae_matrix=True |
Applications
This tool supplies the loss and gradient signal that gradient-based binder-design methods optimize against a chosen target. Withcompute_gradient=False it instead provides forward-only scoring of a candidate binder (loss, metrics, and predicted structure) for ranking or filtering.Usage Tips
- Use this for protein binder objectives, not ligand generation. The input binder is an amino-acid chain and the returned losses describe a predicted protein-protein interface. For small-molecule compounds, choose chemistry-aware ligand tools instead.
- One binder configuration per call; this tool is not an optimization loop. It evaluates a single binder against the fixed target. Drive it from a binder-design optimizer, or call it repeatedly, to actually design a binder.
compute_gradientdefaults toTrue. It runs a forward and backward pass and returns the gradient with respect to the binder logits; set itFalsefor forward-only scoring (gradient=None). The loss, metrics, and predicted structure are identical in both modes.backendselects the loss set."base"(the default) uses the upstream ColabDesign losses;"germinal"adds the Germinal fork’s alpha, bias, framework-contact, and extension losses.starting_binder_seqis only valid with"germinal".target_hotspotfocuses the design on chosen target residues. Supply comma-separated residue indices on the target to bias the binder toward a specific epitope;loss_weights(only the validated keys) tunes the objective terms.
Toolkit Notes
These apply to every AlphaFold2 tool in this toolkit (alphafold2-prediction, alphafold2-gradient).
- Requires a GPU. Both tools run AlphaFold2 through a JAX backend and need an NVIDIA GPU; CPU execution is not practical.
- Runs the original AlphaFold2 through ColabDesign, not the full DeepMind pipeline. There is no template-search stage; multiple-sequence alignments are optional and are used only by
alphafold2-prediction. num_recycles(default3) applies to both tools. Each recycling iteration refines the structure; raising it improves accuracy at higher runtime.

Google DeepMind