Overview
The post-processing module provides utilities for converting raw inference results into final output files, including mmCIF structures with metadata, confidence JSON files, and compressed outputs.ProcessedInferenceResult
Dataclass storing all processed outputs for a single inference result.Attributes
bytes
required
mmCIF file containing the predicted structure with full metadata and legal comments.
float
required
Mean 1D confidence score calculated from per-atom confidence values.
float
required
Overall ranking score extracted from inference metadata. Used to rank multiple predictions.
bytes
required
JSON file content with structure confidence summary metrics.
bytes
required
JSON file content with full structure confidence data including matrices.
bytes
required
Identifier of the model that produced this result.
Core Functions
post_process_inference_result
Converts raw inference result into processed outputs ready for file writing.model.InferenceResult
required
Raw inference result containing predicted structure and metadata.
- Adds metadata to mmCIF (version, timestamp, model ID)
- Adds legal comment header to mmCIF
- Computes 1D confidence from predicted structure
- Generates confidence summary JSON
- Generates full confidence data JSON
- Extracts ranking score from metadata
write_output
Writes all inference outputs to a directory.model.InferenceResult
required
Raw inference result from model.
os.PathLike[str] | str
required
Directory path where output files will be written.
str | None
Terms of use text to write to TERMS_OF_USE.md file.
str | None
Prefix for output files. If None, no prefix is used.
bool
default:false
Whether to compress CIF and full confidence JSON with Zstandard (.zst).
write_embeddings
Writes model embeddings to compressed NumPy archive.dict[str, np.ndarray]
required
Dictionary of embeddings from model. Typically contains:
single_embeddings: Per-token single representationpair_embeddings: Pairwise token representations
os.PathLike[str] | str
required
Directory where embeddings file will be written.
str | None
Prefix for output file. Creates
{name}_embeddings.npz or embeddings.npz.mmCIF Metadata
The post-processing module adds the following metadata to mmCIF files:- Version: AlphaFold 3 version and timestamp
- Model ID: Unique identifier for the model weights used
- Legal comment: Copyright and license information
- Method: Computational prediction method details
Confidence Metrics
Structure Confidence Summary
Includes high-level metrics:- Mean per-atom confidence (pLDDT)
- Per-chain confidence scores
- Interface confidence metrics
- Chain pair confidence
Structure Confidence Full Data
Includes detailed matrices:- PAE (Predicted Aligned Error): Expected error in predicted aligned positions
- PDE (Predicted Distance Error): Expected error in predicted distances
- Contact probabilities: Likelihood of residue-residue contacts
- Per-residue confidence: pLDDT scores for each residue
Usage Examples
Basic Output Writing
Compressed Output
Writing Embeddings
Manual Post-processing
Batch Processing Multiple Seeds
Output File Formats
mmCIF (.cif)
Standard crystallographic format containing:- Atomic coordinates
- B-factors (pLDDT values)
- Chain and residue annotations
- Metadata (method, version, model ID)