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.
What the default metrics configuration registers#
With its default AF3 oracle group, configs/metrics/all_metrics.yaml registers 53 metric,
oracle, pass-criterion and filter entries. Registered entries do not all run on every design:
most are gated by metrics_tags, and refolding metrics also depend on which refolds are available.
Select tags on the command line:
rfd4-generate \
inputs=design.json num_replicates=50 metrics_tags='[unconditional_refolding]'
Category |
Count |
Config |
|---|---|---|
Design and developability metrics, run inline before refolding |
22 |
|
Antibody contact metrics |
1 |
|
Structure prediction metrics |
1 |
|
Refolding metrics, design against refold or refold against refold |
8 |
|
Refolding oracles, the default AF3 variants |
4 |
|
Pass criteria |
11 |
|
Pre-oracle filters, which skip the oracle when a cheap check fails |
6 |
|
Selecting another oracle group or adding custom metrics changes this inventory. CDR torsion
naturalness is opt-in through inline_metrics/all_inline_metrics_with_cdr_torsion.yaml; it is not
part of the default count.
Additional metrics are available in the codebase and opt-in config groups, including TMol interface energies and atom-pair distance constraints. Enable an existing metric with a YAML entry, as in 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 uses the configured oracle: AF3 by default, or OpenFold3/AlphaFold 2 through
metrics/refolding_oracles=of3 or metrics/refolding_oracles=af2. Each needs its own runtime
and weights; see oracle setup. Search only needs an oracle when a configured reward
or continuation criterion uses refolding. Structure-only search
can score designs without a refolding runtime.
Pass metrics_tags during inference and metrics get computed right after each design. Results land
under <out_dir>/inference_metrics/ in per_example_metrics.csv (or a per-job CSV for
SLURM arrays), while structures go under <out_dir>/inference_samples/.
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, templated refolding and antibody pass criteria; CDR torsions require the opt-in config above |
|
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.
Was this page helpful?
Thanks for your feedback!
