$ show google-deepmind/alphafold3
AlphaFold3 is Google DeepMind's official command-line application for running AlphaFold 3 biomolecular structure prediction inference. The dominant character is a production-grade scientific application, though it is heavily intertwined with research data pipelines: it ingests a JSON job specification describing protein, RNA, DNA, and ligand chains, runs Jackhmmer/Nhmmer searches over large genetic databases, builds multiple sequence alignments, searches structural templates with HMMER, featurizes the input into JAX/Haiku tensors, samples structures with a diffusion model, and writes predicted structures as mmCIF files plus confidence JSON (pLDDT, PAE, pTM, ipTM). The codebase is not a training repository; it provides inference only and requires separately downloaded model parameters under restrictive legal terms. Architecturally, the system is a multi-stage pipeline driven by the `run_alphafold.py` entry point. Core modules include the data pipeline (`src/alphafold3/data/pipeline.py`), MSA/template tools (`src/alphafold3/data/tools/`), a structure representation layer (`src/alphafold3/structure/`), JAX geometric primitives (`src/alphafold3/jax/geometry/`), the neural network model (`src/alphafold3/model/`), and performance-critical C++ pybind11 extensions for mmCIF parsing, MSA feature extraction, and string/array operations. It depends on external binaries (Jackhmmer, Nhmmer, HMMER suite), RDKit for ligand conformer generation, JAX/Haiku for model execution, and ~630 GB of downloadable sequence and structure databases. The repository is actively maintained, with recent commits and CI running CPU-only data tests. Technical drift is low for a research release: dependencies are pinned via `pyproject.toml` and `uv.lock`, and active maintenance keeps it aligned with its ecosystem, though the C++ build, GPU-specific requirements, and external database URLs remain fragility points.
The LLM identified 5 files worth highlighting for reuse:
A decorator that turns ordinary dataclasses into JAX pytrees with named array fields. It enables elegant, vectorized geometric code and automatic tree manipulation. The pattern is generic and can be extracted into any JAX project needing immutable, nested data structures with pytree semantics.
A metaclass-driven configuration system that auto-coerces nested dictionaries into typed dataclass instances. It provides a clean, widely reusable way to define hierarchical configurations without manual parsing boilerplate. Used consistently across the model and pipeline, but isolated enough to extract.
A pandas-like immutable Table/Database abstraction with integer keys, foreign-key columns, filtering, concatenation, and topological ordering. It underpins the structure representation and is a well-crafted, general-purpose scientific tabular data pattern that could be reused outside structural biology.
Implements `sharded_apply` and `inference_subbatch`, utilities for running large JAX computations in memory-bounded shards while preserving mathematical semantics. This solves a recurring problem in deep learning inference: fitting large protein complexes into limited GPU memory. The pattern is directly reusable for other large-model JAX pipelines.
A hand-written C++ mmCIF tokenizer/parser with Python bindings that returns typed NumPy arrays. It is performant, self-contained, and addresses a common bottleneck in structural biology: parsing large mmCIF files. The C++/pybind11 pattern is reusable for any application needing fast, memory-efficient scientific file parsing.