Evaluate with metrics#
You should not have to hand parse output CIFs. You can reconstruct the unindexed mapping, or work out which chain an inserted region came from, or measure how closely a design followed its coordinate conditioning, all by reading raw CIF fields. Do that only when nothing else works. Turn on the metric that already computes it and let the pipeline run it. Metrics that run in the pipeline can also drive reward guided search, which finds good designs on far less compute than generating everything and filtering afterwards.
For what each metric family actually measures, how binder and target selections resolve, and where in a run a metric can stop further work, see Metrics. The metrics reference lists all of them, what each outputs, and the tag that turns it on. For the refolding family specifically — the oracle, the AF3/OF3 setup it needs, and how a design can carry more than one refold — see the refolding guide.
How many metrics ship enabled#
configs/metrics/all_metrics.yaml already registers 46 metrics, oracles, pass criteria and
filters, and
they run automatically. No code, no new config files. Most sit behind one or more metrics_tags,
so you turn one on by passing a tag on the command line.
rfd4-generate \
inputs=design.json num_replicates=50 metrics_tags='[unconditional_refolding]'
Here is what is wired in.
Category |
Count |
Config |
|---|---|---|
Design metrics, run inline before refolding |
21 |
|
Structure prediction metrics |
1 |
|
Refolding metrics, design against refold or refold against refold |
7 |
|
Refolding oracles, the AF3 variants |
4 |
|
Pass criteria |
10 |
|
Pre-oracle filters, which skip the oracle when a cheap check fails |
6 |
|
Another 7 metric classes already live in the codebase without a default config. They cover TMol interface ddG, H-bonds and electrostatics, an atom pair distance constraint used for catalytic geometry, a QM ligand interaction energy, charge complementarity, and a few others. Turning one on takes no Python, just a few lines of YAML, exactly like the worked example. See Ready-made but opt-in.
Write a new Metric subclass only when none of the existing metrics cover what you need. See Writing your
own.
Running metrics inline#
Note
Refolding metrics and reward guided search both use the AF3 oracle, which runs only inside an apptainer container or a native install, configured through the cluster env files. See the Developer Guide. Plain generation needs none of it. For oracle setup, the task specific tags below, and how a design can carry more than one refold, see the refolding guide.
Pass metrics_tags during inference and metrics get computed right after each design. Results land
in per_example_metrics.csv next to the CIF files.
The metrics reference covers every metric that ships enabled, what it outputs, and which tag turns it on. See the custom metrics guide for how to layer your own config on top of an existing metric.
metrics_tags takes a Hydra style list, so pass it bracketed and quoted.
# Single tag
rfd4-generate \
inputs=design.json num_replicates=50 metrics_tags='[unconditional_refolding]'
# Multiple tags
rfd4-generate \
inputs=design.json num_replicates=50 metrics_tags='[ppi_refolding,hotspot_conditioning]'
Tag |
Activates |
|---|---|
|
AF3 refolding plus pLDDT and scRMSD for unconditional generation |
|
AF3 refolding, target templating and interface metrics for protein binder design |
|
Antibody contacts and CDR torsions, templated refolding, and antibody pass criteria |
|
AF3 refolding plus motif RMSD for motif scaffolding and enzyme design |
|
AF3 refolding plus binding metrics for small molecule binder design |
|
AF3 refolding for enzyme (MCSA) active site benchmarks |
|
Hotspot obedience metrics, needs hotspot input |
|
Motif coordinate RMSD metrics |
|
RASA adherence metrics |
|
Interchain interaction adherence and counts, covering H-bonds, π-stacking, π-cation, salt bridges, hydrophobic contacts and metal coordination |
A metric that needs a tag gets skipped silently when the tag is absent. The table above is a shortlist. The metrics reference covers everything that ships enabled plus every metric class that is ready made but opt in.
Running metrics offline on a folder of structures#
See Running metrics offline on a folder of structures for scoring
structures you already have with evaluate.py, task_csv, and concatenating multi-job results.
