Metadata-Version: 2.2
Name: alphafold3-colabfold
Version: 3.1.8
License: 
                                          Apache License
                                    Version 2.0, January 2004
                                 http://www.apache.org/licenses/
         
            TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
         
            1. Definitions.
         
               "License" shall mean the terms and conditions for use, reproduction,
               and distribution as defined by Sections 1 through 9 of this document.
         
               "Licensor" shall mean the copyright owner or entity authorized by
               the copyright owner that is granting the License.
         
               "Legal Entity" shall mean the union of the acting entity and all
               other entities that control, are controlled by, or are under common
               control with that entity. For the purposes of this definition,
               "control" means (i) the power, direct or indirect, to cause the
               direction or management of such entity, whether by contract or
               otherwise, or (ii) ownership of fifty percent (50%) or more of the
               outstanding shares, or (iii) beneficial ownership of such entity.
         
               "You" (or "Your") shall mean an individual or Legal Entity
               exercising permissions granted by this License.
         
               "Source" form shall mean the preferred form for making modifications,
               including but not limited to software source code, documentation
               source, and configuration files.
         
               "Object" form shall mean any form resulting from mechanical
               transformation or translation of a Source form, including but
               not limited to compiled object code, generated documentation,
               and conversions to other media types.
         
               "Work" shall mean the work of authorship, whether in Source or
               Object form, made available under the License, as indicated by a
               copyright notice that is included in or attached to the work
               (an example is provided in the Appendix below).
         
               "Derivative Works" shall mean any work, whether in Source or Object
               form, that is based on (or derived from) the Work and for which the
               editorial revisions, annotations, elaborations, or other modifications
               represent, as a whole, an original work of authorship. For the purposes
               of this License, Derivative Works shall not include works that remain
               separable from, or merely link (or bind by name) to the interfaces of,
               the Work and Derivative Works thereof.
         
               "Contribution" shall mean any work of authorship, including
               the original version of the Work and any modifications or additions
               to that Work or Derivative Works thereof, that is intentionally
               submitted to Licensor for inclusion in the Work by the copyright owner
               or by an individual or Legal Entity authorized to submit on behalf of
               the copyright owner. For the purposes of this definition, "submitted"
               means any form of electronic, verbal, or written communication sent
               to the Licensor or its representatives, including but not limited to
               communication on electronic mailing lists, source code control systems,
               and issue tracking systems that are managed by, or on behalf of, the
               Licensor for the purpose of discussing and improving the Work, but
               excluding communication that is conspicuously marked or otherwise
               designated in writing by the copyright owner as "Not a Contribution."
         
               "Contributor" shall mean Licensor and any individual or Legal Entity
               on behalf of whom a Contribution has been received by Licensor and
               subsequently incorporated within the Work.
         
            2. Grant of Copyright License. Subject to the terms and conditions of
               this License, each Contributor hereby grants to You a perpetual,
               worldwide, non-exclusive, no-charge, royalty-free, irrevocable
               copyright license to reproduce, prepare Derivative Works of,
               publicly display, publicly perform, sublicense, and distribute the
               Work and such Derivative Works in Source or Object form.
         
            3. Grant of Patent License. Subject to the terms and conditions of
               this License, each Contributor hereby grants to You a perpetual,
               worldwide, non-exclusive, no-charge, royalty-free, irrevocable
               (except as stated in this section) patent license to make, have made,
               use, offer to sell, sell, import, and otherwise transfer the Work,
               where such license applies only to those patent claims licensable
               by such Contributor that are necessarily infringed by their
               Contribution(s) alone or by combination of their Contribution(s)
               with the Work to which such Contribution(s) was submitted. If You
               institute patent litigation against any entity (including a
               cross-claim or counterclaim in a lawsuit) alleging that the Work
               or a Contribution incorporated within the Work constitutes direct
               or contributory patent infringement, then any patent licenses
               granted to You under this License for that Work shall terminate
               as of the date such litigation is filed.
         
            4. Redistribution. You may reproduce and distribute copies of the
               Work or Derivative Works thereof in any medium, with or without
               modifications, and in Source or Object form, provided that You
               meet the following conditions:
         
               (a) You must give any other recipients of the Work or
                   Derivative Works a copy of this License; and
         
               (b) You must cause any modified files to carry prominent notices
                   stating that You changed the files; and
         
               (c) You must retain, in the Source form of any Derivative Works
                   that You distribute, all copyright, patent, trademark, and
                   attribution notices from the Source form of the Work,
                   excluding those notices that do not pertain to any part of
                   the Derivative Works; and
         
               (d) If the Work includes a "NOTICE" text file as part of its
                   distribution, then any Derivative Works that You distribute must
                   include a readable copy of the attribution notices contained
                   within such NOTICE file, excluding those notices that do not
                   pertain to any part of the Derivative Works, in at least one
                   of the following places: within a NOTICE text file distributed
                   as part of the Derivative Works; within the Source form or
                   documentation, if provided along with the Derivative Works; or,
                   within a display generated by the Derivative Works, if and
                   wherever such third-party notices normally appear. The contents
                   of the NOTICE file are for informational purposes only and
                   do not modify the License. You may add Your own attribution
                   notices within Derivative Works that You distribute, alongside
                   or as an addendum to the NOTICE text from the Work, provided
                   that such additional attribution notices cannot be construed
                   as modifying the License.
         
               You may add Your own copyright statement to Your modifications and
               may provide additional or different license terms and conditions
               for use, reproduction, or distribution of Your modifications, or
               for any such Derivative Works as a whole, provided Your use,
               reproduction, and distribution of the Work otherwise complies with
               the conditions stated in this License.
         
            5. Submission of Contributions. Unless You explicitly state otherwise,
               any Contribution intentionally submitted for inclusion in the Work
               by You to the Licensor shall be under the terms and conditions of
               this License, without any additional terms or conditions.
               Notwithstanding the above, nothing herein shall supersede or modify
               the terms of any separate license agreement you may have executed
               with Licensor regarding such Contributions.
         
            6. Trademarks. This License does not grant permission to use the trade
               names, trademarks, service marks, or product names of the Licensor,
               except as required for reasonable and customary use in describing the
               origin of the Work and reproducing the content of the NOTICE file.
         
            7. Disclaimer of Warranty. Unless required by applicable law or
               agreed to in writing, Licensor provides the Work (and each
               Contributor provides its Contributions) on an "AS IS" BASIS,
               WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
               implied, including, without limitation, any warranties or conditions
               of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
               PARTICULAR PURPOSE. You are solely responsible for determining the
               appropriateness of using or redistributing the Work and assume any
               risks associated with Your exercise of permissions under this License.
         
            8. Limitation of Liability. In no event and under no legal theory,
               whether in tort (including negligence), contract, or otherwise,
               unless required by applicable law (such as deliberate and grossly
               negligent acts) or agreed to in writing, shall any Contributor be
               liable to You for damages, including any direct, indirect, special,
               incidental, or consequential damages of any character arising as a
               result of this License or out of the use or inability to use the
               Work (including but not limited to damages for loss of goodwill,
               work stoppage, computer failure or malfunction, or any and all
               other commercial damages or losses), even if such Contributor
               has been advised of the possibility of such damages.
         
            9. Accepting Warranty or Additional Liability. While redistributing
               the Work or Derivative Works thereof, You may choose to offer,
               and charge a fee for, acceptance of support, warranty, indemnity,
               or other liability obligations and/or rights consistent with this
               License. However, in accepting such obligations, You may act only
               on Your own behalf and on Your sole responsibility, not on behalf
               of any other Contributor, and only if You agree to indemnify,
               defend, and hold each Contributor harmless for any liability
               incurred by, or claims asserted against, such Contributor by reason
               of your accepting any such warranty or additional liability.
         
            END OF TERMS AND CONDITIONS
         
            APPENDIX: How to apply the Apache License to your work.
         
               To apply the Apache License to your work, attach the following
               boilerplate notice, with the fields enclosed by brackets "[]"
               replaced with your own identifying information. (Don't include
               the brackets!)  The text should be enclosed in the appropriate
               comment syntax for the file format. We also recommend that a
               file or class name and description of purpose be included on the
               same "printed page" as the copyright notice for easier
               identification within third-party archives.
         
            Copyright [yyyy] [name of copyright owner]
         
            Licensed under the Apache License, Version 2.0 (the "License");
            you may not use this file except in compliance with the License.
            You may obtain a copy of the License at
         
                http://www.apache.org/licenses/LICENSE-2.0
         
            Unless required by applicable law or agreed to in writing, software
            distributed under the License is distributed on an "AS IS" BASIS,
            WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
            See the License for the specific language governing permissions and
            limitations under the License.
         
Requires-Python: >=3.12
Requires-Dist: dm-tree
Requires-Dist: ml_collections
Requires-Dist: etils[epath]
Requires-Dist: numpy
Requires-Dist: tqdm
Requires-Dist: zstandard
Provides-Extra: gcsfs
Requires-Dist: gcsfs; extra == "gcsfs"
Description-Content-Type: text/markdown

![header](docs/header.jpg)

# AlphaFold 3

This package provides an implementation of the inference pipeline of
AlphaFold 3. See below for how to access the model parameters. You may only use
AlphaFold 3 model parameters if received directly from Google. Use is subject to
these
[terms of use](https://github.com/google-deepmind/alphafold3/blob/main/WEIGHTS_TERMS_OF_USE.md).

Any publication that discloses findings arising from using this source code, the
model parameters or outputs produced by those should [cite](#citing-this-work)
the
[Accurate structure prediction of biomolecular interactions with AlphaFold 3](https://doi.org/10.1038/s41586-024-07487-w)
paper.

Please also refer to the Supplementary Information for a detailed description of
the method.

AlphaFold 3 is also available at
[alphafoldserver.com](https://alphafoldserver.com) for non-commercial use,
though with a more limited set of ligands and covalent modifications.

If you have any questions, please contact the AlphaFold team at
[alphafold@google.com](mailto:alphafold@google.com).

## Obtaining Model Parameters

This repository contains all necessary code for AlphaFold 3 inference. You can
download the AlphaFold 3 model parameters from
https://storage.googleapis.com/alphafold3/af3.bin.zst. Use is subject to these
[terms of use](https://github.com/google-deepmind/alphafold3/blob/main/WEIGHTS_TERMS_OF_USE.md).

## The models this fork runs

**16 model types**, and one `--model` flag decides which forward branches,
config shapes, sampler constants and input conventions are used. The same input
JSON drives all of them.

Two ENGINES live here. Everything in the first four groups rides the shared
AlphaFold 3 graph — a pair+single trunk into a diffusion sampler — so adding one
is a weight remap plus a branch. AlphaFold 2 shares neither end (MSA row/column
attention, and an IPA head over backbone frames) and runs as a sibling network
under `alphafold3.af2`, reached through the same CLI and the same output writer.
Check `model_registry.get(name).engine` rather than testing the name.

### AlphaFold 3 lineage

| `--model` | model | weights |
|---|---|---|
| `alphafold3` | AlphaFold 3 (Google DeepMind) | request from DeepMind |
| `openfold3` | [OpenFold3 preview-2](https://github.com/aqlaboratory/openfold3) (AlQuraishi Lab) | Apache 2.0 |
| `openbind0` | [OpenFold3 v0.5.0 "OpenBind"](https://github.com/aqlaboratory/openfold-3/releases/tag/v0.5.0) | Apache 2.0 |
| `intellifold2` | [IntelliFold-v2](https://huggingface.co/intelligenAI/intellifold) (IntelligenAI) | see upstream |

### Protenix family

Protenix publishes nine model types that differ only in counts and widths, so
`derive_dims` + `PROTENIX_FAMILY` make each one close to a one-liner. This fork
carried six of them and now runs **two**: `protenix2`, the flagship and the most
completely gated model here, and `protenix1`. `protenix05`,
`protenix1_20250630`, `protenix_mini` and `protenix_tiny` were removed on
2026-09-08 — they differed from these only by training run or by size, and
keeping them spread parity work across variants without adding coverage. The
machinery that made them one-liners is untouched, so re-adding one is still a
`sources.py` entry, a converter alias and a `MODELS` line.

| `--model` | model | weights |
|---|---|---|
| `protenix2` | [Protenix-v2](https://github.com/bytedance/Protenix) (ByteDance) | Apache 2.0 |
| `protenix1` | Protenix-v1 | Apache 2.0 |

### Other AF3-architecture models

| `--model` | model | weights |
|---|---|---|
| `boltz2` | [Boltz-2](https://github.com/jwohlwend/boltz) | MIT |
| `opendde` | [OpenDDE](https://huggingface.co/aurekaresearch/OpenDDE) (Aureka Research) | see upstream |
| `rosettafold3` | [RoseTTAFold3](https://files.ipd.uw.edu/pub/rf3/) (RosettaCommons) | see upstream |
| `chai1` | [chai-1](https://github.com/chaidiscovery/chai-lab) (Chai Discovery) | Apache 2.0 |

### ESMFold2 family — folds from ESM-C, not an MSA

Pair-only trunk conditioned on an ESM-C language model.

| `--model` | model | weights |
|---|---|---|
| `esmfold2` | [ESMFold2](https://huggingface.co/biohub/ESMFold2) (Arc / CZ Biohub) | MIT |
| `esmfold2_fast` | [ESMFold2-Fast](https://huggingface.co/biohub/ESMFold2-Fast) — half the trunk | MIT |
| `esmfold2_lm600m` | […-base600M-step1500k](https://huggingface.co/biohub/ESMFold2-Experimental-Fast-base600M-step1500k) — **ESM-C 600M** | MIT |
| `esmfold2_lm300m` | […-base300M-step1500k](https://huggingface.co/biohub/ESMFold2-Experimental-Fast-base300M-step1500k) — **ESM-C 300M** | MIT |

All but the last two condition on ESM-C 6B; those use the 600M and 300M towers
and cost 0.5 GB and 0.3 GB against 5.1. Upstream ships the "Experimental" line
for paper reproducibility rather than research use — its own card says to prefer
plain `esmfold2`. The language-model input is built outside the fold by
`alphafold3.model.esm` (tower, published int8 at 5.5 GB) plus a per-model shim
that ships with the weights. **Passing one variant another's tower reads corr
0.026 against native** — take the pairing from
`model_registry.ESMFOLD2_VARIANTS[name]['esmc']`. Given an MSA instead they fold
from that: 5CAJ reads 17.5 Å from a single sequence and 1.24 Å at MSA depth 256.
Supplying neither is the one broken configuration.

### AlphaFold 2 — a sibling network, not the AF3 graph

| `--model` | model | weights |
|---|---|---|
| `af2_ptm` | AlphaFold 2 monomer pTM (`params_model_*_ptm.npz`) | CC BY 4.0 |
| `af2_multimer` | AlphaFold 2 multimer v3 (`params_model_*_multimer_v3.npz`) | CC BY 4.0 |

DeepMind's own AlphaFold 2 parameters, read from `--model_dir` as
`params/params_model_*.npz` — nothing is converted or republished. Monomer and
multimer run on ONE graph: a monomer checkpoint is converted onto the multimer
network at load. **Protein only** — a fold input carrying a ligand, a nucleotide
or an inter-chain bond raises rather than silently folding the protein subset.
MSAs come from the AF3 data pipeline, chain pairing included, and the MSA
pipeline is the model's own: subsampling, the cluster/extra split, BERT masking
and clustering all run inside JAX under `--seed`, as they do upstream.

**Templates work on both paths.** A fold input carrying a template switches on
the template embedder and the template-trained parameter sets — no flag, the
input decides. Monomer templates exist only in `model_1` and `model_2`
upstream, and only those two are used when templates are requested. Template
residue types use AF2's `restype` alphabet, not the HHBLITS order the search
tools emit; feeding the wrong one is silent and costs about 1.2 Å.

`--num_recycles` and `--dropout` reach AF2 exactly as they reach AF3.

AF2 is measured single-seed at float32 with zero recycles, not best-of-5 at
config defaults like the AF3 lineage, so read the two AF2 numbers in
[Folds](#folds) against each other rather than against the rest.

## Parity status

This fork runs **16 model types**, and the question for every one is whether it
reproduces its own vendor's implementation rather than merely producing a
plausible structure. `PARITY.md` is the full record and `dev/oracles/HOLES.md`
tracks what is still open; this is the current state.

Parity is measured level by level, from the weights inwards to the fold:

| level | what it compares |
|---|---|
| **L0** | conversion coverage — every checkpoint tensor accounted for, both directions |
| **L1** | the trunk: z-init, pairformer, MSA module, template embedder, distogram |
| **L1r** | the trunk on a REAL input: the input embedder, and recycling |
| **L1x** | the same, on a COMPLEX — the cross-chain terms are constant on one chain |
| **L2** | diffusion conditioning, token transformer, atom encoder and decoder |
| **L3** | one full denoise step |
| **L4** | the confidence head: PAE, PDE, pLDDT, resolved |
| **L5** | an end-to-end fold, scored against an experimental structure |
| **L5af2** | AlphaFold 2, module by module, against DeepMind's own repository |
| **L6** | modality: RNA, DNA, ligands, complexes, modified residues |
| **L7** | the OUTPUT side: fold, write the mmCIF, parse it back, compare |
| **Lg** | is the model differentiable in the sequence? (the design path) |

### Current numbers (2026-09-14)

Every level has been driven to completion across every model it applies to, L6
and L1x included. Grading each comparison on correlation **and** `max|d|/rms`:

```
369 cells                        295 OK   1 SKIP   73 N/A   0 FAIL
346 comparisons in 167 logs
PARITY=304   CLOSE=14   FLOOR=17   DIAG=6   LOOSE=5   BAD=0
```

The one SKIP is a real hole: `boltz2` has no in-process L3 adapter, so its
denoise step is gated by injection (`L3.denoise_inject`) instead.

**DIAG** is `L1r` and only `L1r`. Every other row compares one module on a
bounded input, where `corr >= 0.99999` is the right bar; `L1r` is the whole
trunk on a real featurisation with ten recycles, where 48 blocks × 10 passes
amplify and a correlation below 1.0 is normal even when the fold is right —
6MRR reads 0.991 on the pair while folding to 0.70 Å in agreement with native.
It is read against its control case, not against a threshold. N/A means the
model does not have that module at all — `gate_applies.py` decides, from the
registry, so an empty cell can never quietly mean "not run".

AlphaFold 2 is graded separately, because none of L0-L4 applies to a sibling
network with no converter and no shared modules. **L5af2 is 18 gates, all
green**, and thirteen of them compare us to DeepMind's own repository rather
than to the port we inherited — the trunk end to end, the structure module as a
stack of eight fold iterations, extra-MSA, IPA, all five heads, all three
template paths and the MSA pipeline, on the monomer path and the multimer path
both. That oracle found three real divergences that comparing against a sibling
copy never could: a masked template distogram, BERT masking that was
implemented and never called (so the seed did nothing on a shallow MSA), and —
on the AF3 side — a confidence pairformer that never received the dropout flag.

`bash dev/oracles/run_all_parity.sh all` re-runs everything;
`dev/oracles/parity_audit.py <logdir>` grades it and
`dev/oracles/gate_applies.py <gate> <model>` answers whether an empty cell is a
hole or genuinely not applicable.

**FLOOR** is not a pass. It means the cell has no resolution left: perturbing the
gate's own input by 1e-6 moves its output further than our port differs, so the
number cannot be read. All 17 are the trunk pairformer on synthetic input, where
the stack is driven far outside its trained distribution — the shallower
`L1.trunk1` is the measurement that counts. A cell only earns FLOOR by measuring
it, so this cannot quietly excuse anything.

**Nothing is BAD.** The last cluster — 14 cells across the OpenFold3 lineage's
atom encoder, decoder and denoise — was a regression introduced by a terminal-atom
drop that MASKED atoms where the vendors REMOVE them, leaving a hole in the flat
atom axis that shifted every attention window after it and left the dropped atom
in the mmCIF to be written at the origin. Fixed on 2026-09-13; those cells went
from 1.21 Å per-atom back to 0.0002.

**The 5 LOOSE** are all confidence tails — `chai1`'s injected PAE/PDE logits,
`protenix2`'s PAE and PDE, `opendde`'s PDE — every one at corr ≥ 0.99994 with a
`max|d|/rms` of a few percent in the distribution's tail. `esmfold2_fast`'s PAE
and PDE, previously the 2 BAD, are understood the same way: native runs its
confidence pairformer's triangle multiplications under `autocast(bfloat16)`
while we run fp32, which costs ~0.5% per sub-module with bit-identical weights
on identical inputs.

### Folds

`6MRR` is best-of-5 CA-RMSD, de novo from a single sequence, 68 aa — the shared
regression gate, and the L5 row of the matrix above. It says how well a model
folds, not how faithfully it was ported; that is what L0-L4 measure.

| model | best Å | | model | best Å |
|---|---|---|---|---|
| `boltz2` | 0.459 | | `intellifold2` | 1.512 |
| `alphafold3` | 0.628 | | `esmfold2_lm600m` | 1.522 |
| `opendde` | 0.729 | | `openfold3` | 1.547 |
| `rosettafold3` | 0.967 | | `protenix1` | 1.555 |
| `protenix2` | 1.016 | | `openbind0` | 1.578 |
| `esmfold2_fast` | 1.182 | | `esmfold2_lm300m` | 1.687 |
| `esmfold2` | 1.330 | | `chai1` | 1.713 |

AlphaFold 2 runs single-seed at float32 with zero recycles rather than
best-of-5, so its numbers belong beside each other and not in the table above:
`af2_ptm` 1.712, `af2_multimer` 1.788.

Read these as a band, not a ranking. Several models are **nondeterministic run
to run on the same seed** — three runs of `rosettafold3` seed 0 give 0.968,
0.949 and 1.026, because one sample sits near a decision boundary — and
best-of-5 is a TAIL statistic, so a single number to three decimals is not a
gate. Two apparent regressions chased in 2026-09 were both one unlucky draw and
dissolved at 20 samples. For a real comparison use means over ≥ 20 samples
against native.

### Modality

| model | protein+ligand | complex | RNA | DNA | confidence |
|---|---|---|---|---|---|
| `intellifold2` | 0.301 / 0.881 | 0.92 | 1.621 | 1.95 | 90.4 / r .776 |
| `boltz2` | 0.385 / 0.907 | 0.92 | 1.419 | 1.59 | 96.9 / r .830 |
| `protenix2` | 2.497 / 1.147 | 1.02 | 2.062 | 2.21 | 92.7 / r .807 |
| `rosettafold3` | 0.464 / 0.889 | 1.12 | 1.143 | 2.67 | 85.2 / r .708 |
| `opendde` | 1.269 / 0.870 | 1.49 | 1.372 | 1.99 | 89.9 / r .635 |
| `chai1` | 0.335 / 0.993 | 1.57 | 1.648 | 1.89 | 78.9 / r .543 |
| `openfold3` | 0.348 / 0.894 | 1.60 | 1.441 | 2.22 | 83.2 / r .678 |

`r` is the column that matters for confidence: a constant head reads r ≈ 0
however plausible its mean looks. All seven predict error.
`esmfold2_lm600m` and `esmfold2_lm300m` ship no confidence head by design.

Every model is differentiable in the sequence — **16/16**, both engines, the
`Lg` level (`dev/oracles/grad_check.py`), which is what the design path needs.
The 24/24 this line used to claim counted a model list that has since lost the
four extra protenix variants; nothing ran the script, so nothing noticed.

### What is still open

Tracked in `dev/oracles/HOLES.md` with the next measurement named for each:

* ~~**`boltz2`'s denoise step**, 0.207 Å/atom~~ — **closed 2026-09-13**, and
  not by work aimed at it: the terminal-atom drop fix removed the atom instead
  of masking it, and the hole it had been leaving in the flat atom axis was
  what shifted every attention window. Now 0.0003 Å/atom at the highest-noise
  step and 0.0000 Å at the last one — both ends of the schedule are gated.
* **the protenix lineage's confidence** — **attributed 2026-09-13**, and not to
  what the last note guessed. It is `torch.cdist`: protenix feeds the raw
  distance to an unbinned linear, and cdist's float32 expansion of
  `||a-b||²` costs up to 1.6e-02 Å on these coordinates. Give native an exact
  distance and all six CLOSE and three LOOSE rows collapse — protenix2 pae
  2.30e-02 → 2.26e-04, opendde pde 1.58e-02 → 1.26e-04 — while `openfold3`,
  `openbind0` and `boltz2` are bit-unchanged. The earlier "native's own float32"
  story was tested directly (fp32 vs fp64 through the whole head) and is wrong
  by three orders.
* **`chai1`'s confidence**, two LOOSE rows — now has a **floor**, which the
  previous note said was impossible: `forward` is undefined on the TorchScript
  archive but `forward_256`…`forward_1024` are not, so native can be re-run.
  The head runs in **bfloat16** with float32 geometry. Native against its own
  capture reads 1.62e-02 (pae) where our gate reads 4.73e-02 — 2–3× the cell's
  own resolution, so bounded rather than explained.
* ~~three things no cell covers~~ — **closed 2026-09-13.**
  `L1b.msa_nonuniform` reached one adapter of fourteen and duplicated the
  uniform cell for the rest; given a mask that is actually non-uniform the
  OpenFold3 lineage failed it (corr 0.9855, `max|d|/rms` 7.7) because of3
  masks every transition's output and we did not. Fixed, and the membership of
  `MASK_TRANSITIONS` is now measured per model rather than inherited — though
  the divergence is dormant on our features, which was measured too.
  `real_trunk_parity.py` is now the `L1r` level: the input embedder, the trunk
  on a real featurisation, and recycling. `boltz2`'s template V2 was closed on
  2026-09-12 and the bullet was stale.
* **AlphaFold 2 against DeepMind**: the two whole-module cells are now built
  and green (`native_trunk`, `native_structure`); what remains is the monomer's
  TensorFlow row selection, which cannot be compared here (no tensorflow — we
  use multimer's gumbel argsort on both paths). Two deliberate differences, not
  unknowns: MSA sizes 512/1024 on both paths where stock is 512/5120 and
  508/2048, and 11 trunk passes where of3/boltz2 run 4.

### Getting the weights

You do not have to do anything. The first run of a model downloads its converted
weights from
[huggingface.co/sokrypton/af3-any-model](https://huggingface.co/sokrypton/af3-any-model)
and caches them; every run after that is offline.

```bash
python run_alphafold.py \
  --model=openfold3 \
  --json_path=fold_input.json \
  --output_dir=./output/
```

They land in `~/.cache/alphafold3/weights/<model>/`, or under `$AF3_WEIGHTS_DIR`
if you set it. `--model_dir` overrides both and skips the download entirely, which
is what you want for weights you converted or staged yourself. AlphaFold 3's own
parameters are the exception: they are not ours to redistribute, so `--model
alphafold3` needs `--model_dir` pointing at your own copy.

**Smaller downloads.** `--weights_precision int8` fetches the same weights stored
as 8-bit with a per-channel scale, expanded back when the model loads. This is a
storage format, not a compute one — inference is unchanged. Measured cost on
rosettafold3: within sampling noise on protein, ligand, RNA and a D/L peptide,
with stereochemistry unchanged.

`fp16` is the same idea at half precision, and it now exists for every model —
it had been an accepted flag with nothing published behind it, so
`--weights_precision fp16` was a 404 for all thirteen until 2026-09-16.

| `--model` | fp32 | fp16 | int8 |
|---|---|---|---|
| `chai1` | 1.20 GB | 0.60 GB | 0.27 GB |
| `protenix1` | 0.99 GB | 0.47 GB | 0.14 GB |
| `protenix2` | 1.33 GB | 0.61 GB | 0.19 GB |
| `rosettafold3` | 1.36 GB | 0.65 GB | 0.27 GB |
| `openfold3` | 1.37 GB | 0.68 GB | 0.27 GB |
| `openbind0` | 1.31 GB | 0.68 GB | 0.27 GB |
| `intellifold2` | 1.77 GB | 1.37 GB | 0.63 GB |
| `boltz2` | 1.88 GB | 0.94 GB | 0.36 GB |
| `opendde` | 2.47 GB | 0.94 GB | 0.35 GB |
| `esmfold2` | 0.87 GB | 0.43 GB | 0.18 GB |

Each precision caches to its own directory (`<model>-int8/`), so asking for one
never silently gets you the other, and switching back to a form you already have
is instant.

### Downloading the weights yourself

The repo is grouped by family and served over plain HTTPS, so nothing more than
`wget` is needed — useful for pre-staging a shared filesystem or an air-gapped
machine. A model's folder is its family, not its own name: the Protenix
releases share `protenix/`, the eight ESMFold2 releases share `esmfold2/`,
openbind0 sits with `openfold3/`, and the ESM2 and ESM-C towers are under `lm/`.
The four Protenix model types this fork dropped on 2026-09-08 (`protenix05`,
`protenix1_20250630`, `protenix_mini`, `protenix_tiny`) are still published
under `protenix/`; they are simply no longer reachable through `--model`.

```bash
BASE=https://huggingface.co/sokrypton/af3-any-model/resolve/main
mkdir -p params/openfold3
wget -P params/openfold3 $BASE/openfold3/openfold3.bin.zst   # or .int8.bin.zst

python run_alphafold.py --model=openfold3 --model_dir=params/openfold3 ...
```

Locally a model keeps a flat directory named after itself; only the published
layout is grouped. `--model_dir` therefore points at a directory holding
`<model>.bin.zst`, exactly as before.

Or with the Hugging Face CLI:

```bash
pip install huggingface_hub
hf download sokrypton/af3-any-model openfold3/openfold3.bin.zst \
  --local-dir params
```

### Converting the weights yourself

The published blobs are produced by `converters/`, and you can run it yourself
against a checkpoint you already trust. Conversion needs PyTorch; a run never
does.

```bash
# fetches the published checkpoint and converts it
python -m converters.convert --model openfold3 --out ./params/openfold3
```

Then run any model on the same input file:

```bash
python run_alphafold.py \
  --model=openfold3 \
  --model_dir=./params/openfold3 \
  --json_path=fold_input.json \
  --output_dir=./output/
```

### chai-1 needs ESM2 embeddings

Two of the models fold from a protein language model, and are a different model
without it: chai-1 from ESM2 3B, whose token embeddings are most of its token
feature stream (a natural protein folds to 5.70 Å without them where chai
reaches 0.642), and ESMFold2 from ESM-C, which is its alternative to an MSA
rather than an extra on top of one (a variant with no MSA encoder folds to
~14 Å without it).

Both towers are converted and run here, in jax, so one flag covers both. Which
tower is right is read from the model, not chosen on the command line —
ESMFold2's variants are trained against step-matched ESM-C snapshots:

```bash
python run_alphafold.py --model=chai1         --use_esm_embeddings ...
python run_alphafold.py --model=esmfold2_fast --use_esm_embeddings ...
```

The tower runs in-process and is downloaded on demand (2.4 GB for ESM2, 5.1 GB
for ESM-C 6B), which is why it is opt-in rather than the default. Running one of
these models without the flag warns, because the result is a different model
rather than a slightly worse one.

`python -m alphafold3.model.esm` also runs either tower standalone, if you want the hidden
states themselves rather than a fold.

### Cyclic chains

`--cyclic=A,B` (or `--cyclic=all`) makes those chains' relative-position
encoding wrap, so they have no N- or C-terminus. This is not an AlphaFold 3
feature — the input JSON has no way to say it — but the encoding is shared, so
**every model here honours it**. A chain left out is byte-identical to before.

The terms of use written beside a prediction follow the weights that made it,
not AlphaFold 3's. See [converters/README.md](converters/README.md) for what
each conversion involves and [OF3_AF3_PORTING_NOTES.md](OF3_AF3_PORTING_NOTES.md)
for the conventions that differ between these codebases and why.

## Installation and Running Your First Prediction

See the [installation documentation](docs/installation.md).

Once you have installed AlphaFold 3, you can test your setup using e.g. the
following input JSON file named `fold_input.json`:

```json
{
  "name": "2PV7",
  "sequences": [
    {
      "protein": {
        "id": ["A", "B"],
        "sequence": "GMRESYANENQFGFKTINSDIHKIVIVGGYGKLGGLFARYLRASGYPISILDREDWAVAESILANADVVIVSVPINLTLETIERLKPYLTENMLLADLTSVKREPLAKMLEVHTGAVLGLHPMFGADIASMAKQVVVRCDGRFPERYEWLLEQIQIWGAKIYQTNATEHDHNMTYIQALRHFSTFANGLHLSKQPINLANLLALSSPIYRLELAMIGRLFAQDAELYADIIMDKSENLAVIETLKQTYDEALTFFENNDRQGFIDAFHKVRDWFGDYSEQFLKESRQLLQQANDLKQG"
      }
    }
  ],
  "modelSeeds": [1],
  "dialect": "alphafold3",
  "version": 1
}
```

You can then run AlphaFold 3 using the following command:

```
docker run -it \
    --volume $HOME/af_input:/root/af_input \
    --volume $HOME/af_output:/root/af_output \
    --volume <MODEL_PARAMETERS_DIR>:/root/models \
    --volume <DATABASES_DIR>:/root/public_databases \
    --gpus all \
    alphafold3 \
    python run_alphafold.py \
    --json_path=/root/af_input/fold_input.json \
    --model_dir=/root/models \
    --output_dir=/root/af_output
```

There are various flags that you can pass to the `run_alphafold.py` command, to
list them all run `python run_alphafold.py --help`. Two fundamental flags that
control which parts AlphaFold 3 will run are:

*   `--run_data_pipeline` (defaults to `true`): whether to run the data
    pipeline, i.e. genetic and template search. This part is CPU-only, time
    consuming and could be run on a machine without a GPU.
*   `--run_inference` (defaults to `true`): whether to run the inference. This
    part requires a GPU.

## AlphaFold 3 Input

See the [input documentation](docs/input.md).

## AlphaFold 3 Output

See the [output documentation](docs/output.md).

## Performance

See the [performance documentation](docs/performance.md).

## Known Issues

Known issues are documented in the
[known issues documentation](docs/known_issues.md).

Please
[create an issue](https://github.com/google-deepmind/alphafold3/issues/new/choose)
if it is not already listed in [Known Issues](docs/known_issues.md) or in the
[issues tracker](https://github.com/google-deepmind/alphafold3/issues).

## Citing This Work

Any publication that discloses findings arising from using this source code, the
model parameters or outputs produced by those should cite:

```bibtex
@article{Abramson2024,
  author  = {Abramson, Josh and Adler, Jonas and Dunger, Jack and Evans, Richard and Green, Tim and Pritzel, Alexander and Ronneberger, Olaf and Willmore, Lindsay and Ballard, Andrew J. and Bambrick, Joshua and Bodenstein, Sebastian W. and Evans, David A. and Hung, Chia-Chun and O’Neill, Michael and Reiman, David and Tunyasuvunakool, Kathryn and Wu, Zachary and Žemgulytė, Akvilė and Arvaniti, Eirini and Beattie, Charles and Bertolli, Ottavia and Bridgland, Alex and Cherepanov, Alexey and Congreve, Miles and Cowen-Rivers, Alexander I. and Cowie, Andrew and Figurnov, Michael and Fuchs, Fabian B. and Gladman, Hannah and Jain, Rishub and Khan, Yousuf A. and Low, Caroline M. R. and Perlin, Kuba and Potapenko, Anna and Savy, Pascal and Singh, Sukhdeep and Stecula, Adrian and Thillaisundaram, Ashok and Tong, Catherine and Yakneen, Sergei and Zhong, Ellen D. and Zielinski, Michal and Žídek, Augustin and Bapst, Victor and Kohli, Pushmeet and Jaderberg, Max and Hassabis, Demis and Jumper, John M.},
  journal = {Nature},
  title   = {Accurate structure prediction of biomolecular interactions with AlphaFold 3},
  year    = {2024},
  volume  = {630},
  number  = {8016},
  pages   = {493–-500},
  doi     = {10.1038/s41586-024-07487-w}
}
```

## Acknowledgements

AlphaFold 3's release was made possible by the invaluable contributions of the
following people:

Andrew Cowie, Bella Hansen, Charlie Beattie, Chris Jones, Grace Margand,
Jacob Kelly, James Spencer, Josh Abramson, Kathryn Tunyasuvunakool, Kuba Perlin,
Lindsay Willmore, Max Bileschi, Molly Beck, Oleg Kovalevskiy,
Sebastian Bodenstein, Sukhdeep Singh, Tim Green, Toby Sargeant, Uchechi Okereke,
Yotam Doron, and Augustin Žídek (engineering lead).

We also extend our gratitude to our collaborators at Google and Isomorphic Labs.

AlphaFold 3 uses the following separate libraries and packages:

*   [abseil-cpp](https://github.com/abseil/abseil-cpp) and
    [abseil-py](https://github.com/abseil/abseil-py)
*   [Docker](https://www.docker.com)
*   [DSSP](https://github.com/PDB-REDO/dssp)
*   [HMMER Suite](https://github.com/EddyRivasLab/hmmer)
*   [Haiku](https://github.com/deepmind/dm-haiku)
*   [JAX](https://github.com/jax-ml/jax/)
*   [libcifpp](https://github.com/pdb-redo/libcifpp)
*   [NumPy](https://github.com/numpy/numpy)
*   [pybind11](https://github.com/pybind/pybind11) and
    [pybind11_abseil](https://github.com/pybind/pybind11_abseil)
*   [RDKit](https://github.com/rdkit/rdkit)
*   [Tokamax](https://github.com/openxla/tokamax)
*   [tqdm](https://github.com/tqdm/tqdm)

We thank all their contributors and maintainers!

### Running other models through this code

Everything under [The models this fork runs](#the-models-this-fork-runs) rests on work
by other people. First and most obviously the model authors, who trained and
released the weights — each is linked in that table, and each should be cited
alongside AlphaFold 3 if you use their model.

Beyond them, three whose code this borrows from directly:

*   **[Marielle Russo](https://github.com/maraxen)** —
    [plegadx](https://github.com/maraxen/plegadx), an Equinox/JAX
    re-implementation of RoseTTAFold3, Boltz, chai-1, IntelliFold and AlphaFold 3
    on a shared substrate, each validated against its vendor implementation. Its
    chai-1 diffusion modules were the op-level reference while ours was being
    debugged, and its sampler — replayed to 0.00015 Å under identical noise —
    independently confirmed two details we had derived separately: that the
    vendor loop runs `len(sigmas) - 1` iterations, and that it augments with a
    rotation *and* a translation each step. Its chai-1 trunk diverged in the same
    place ours did, which is its own kind of signpost.

*   **[ChoongHwanLee](https://github.com/chlee19990109-cloud)** — an independent
    Protenix → AlphaFold 3 port
    ([ColabFold, `colabfold2-protenix-proof`](https://github.com/chlee19990109-cloud/ColabFold/tree/colabfold2-protenix-proof)),
    built on this same Haiku graph. Two things here come straight from it. One is
    the padded-key attention mask, which protenix2 and opendde were missing. The
    other is the discipline of asserting that **every** checkpoint tensor is
    consumed exactly once — `dev/audit_coverage.py` is that check (dev-only, out of tree), and it
    found four dropped distogram biases, three LayerNorm offsets and a
    single-conditioner bias that eight ports' worth of correlation gates had all
    scored as passing. Independent agreement on the rest of the Protenix config
    is the strongest evidence either port has.

*   **[juliabuhmann](https://github.com/juliabuhmann)** — the OpenBind port
    ([PR #6](https://github.com/sokrypton/alphafold3/pull/6)). She found that
    OpenFold3's v0.5.0 weights revert two of the deviations this code compensates
    for, worked out which, and built the one-key checkpoint detection that tells
    the two releases apart without a version string. `--model openbind0` is her
    work, re-expressed for this branch's per-model registry.

*   **[Milot Mirdita](https://github.com/milot-mirdita)** —
    [ColabFold](https://github.com/sokrypton/ColabFold) and the public MMseqs2
    API. `src/alphafold3/data/msa_server.py` is adapted from ColabFold's
    `run_mmseqs2`, which is what lets this run with no local sequence database at
    all. The device-portability matrix in `run_alphafold.py` — which attention
    implementation and which XLA flags each GPU generation needs — also comes
    from ColabFold, where every row of it was paid for by a real failure.

## Get in Touch

If you have any questions not covered in this overview, please contact the
AlphaFold team at alphafold@google.com.

We would love to hear your feedback and understand how AlphaFold 3 has been
useful in your research. Share your stories with us at
[alphafold@google.com](mailto:alphafold@google.com).

## Licence and Disclaimer

This is not an officially supported Google product.

Copyright 2024 DeepMind Technologies Limited.

### AlphaFold 3 Source Code and Model Parameters

AlphaFold 3 source code is licensed under the Apache License, Version 2.0 (the
"License"); you may not use its source code except in compliance with the
License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0.

The AlphaFold 3 model parameters are made available under the
[AlphaFold 3 Model Parameters Terms of Use](https://github.com/google-deepmind/alphafold3/blob/main/WEIGHTS_TERMS_OF_USE.md)
(the "Terms"); you may not use these except in compliance with the Terms. You
may obtain a copy of the Terms at
[https://github.com/google-deepmind/alphafold3/blob/main/WEIGHTS_TERMS_OF_USE.md](https://github.com/google-deepmind/alphafold3/blob/main/WEIGHTS_TERMS_OF_USE.md).

Unless required by applicable law, AlphaFold 3 and its output are distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied. You are solely responsible for determining the appropriateness of
using AlphaFold 3, or using or distributing its source code or output, and
assume any and all risks associated with such use or distribution and your
exercise of rights and obligations under the relevant terms. Output are
predictions with varying levels of confidence and should be interpreted
carefully. Use discretion before relying on, publishing, downloading or
otherwise using the AlphaFold 3 Assets.

AlphaFold 3 and its output are for theoretical modeling only. They are not
intended, validated, or approved for clinical use. You should not use the
AlphaFold 3 or its output for clinical purposes or rely on them for medical or
other professional advice. Any content regarding those topics is provided for
informational purposes only and is not a substitute for advice from a qualified
professional. See the relevant terms for the specific language governing
permissions and limitations under the terms.

### Third-party Software

Use of the third-party software, libraries or code referred to in the
[Acknowledgements](#acknowledgements) section above may be governed by separate
terms and conditions or license provisions. Your use of the third-party
software, libraries or code is subject to any such terms and you should check
that you can comply with any applicable restrictions or terms and conditions
before use.

### Mirrored and Reference Databases

The following databases have been: (1) mirrored by Google DeepMind; and (2) in
part, included with the inference code package for testing purposes, and are
available with reference to the following:

*   [BFD](https://bfd.mmseqs.com/) (modified), by Steinegger M. and Söding J.,
    modified by Google DeepMind, available under a
    [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/deed.en).
    See the Methods section of the
    [AlphaFold proteome paper](https://www.nature.com/articles/s41586-021-03828-1)
    for details.
*   [PDB](https://wwpdb.org) (unmodified), by H.M. Berman et al., available free
    of all copyright restrictions and made fully and freely available for both
    non-commercial and commercial use under
    [CC0 1.0 Universal (CC0 1.0) Public Domain Dedication](https://creativecommons.org/publicdomain/zero/1.0/).
*   [MGnify: v2022\_05](https://ftp.ebi.ac.uk/pub/databases/metagenomics/peptide_database/2022_05/README.txt)
    (unmodified), by Mitchell AL et al., available free of all copyright
    restrictions and made fully and freely available for both non-commercial and
    commercial use under
    [CC0 1.0 Universal (CC0 1.0) Public Domain Dedication](https://creativecommons.org/publicdomain/zero/1.0/).
*   [UniProt: 2021\_04](https://www.uniprot.org/) (unmodified), by The UniProt
    Consortium, available under a
    [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/deed.en).
*   [UniRef90: 2022\_05](https://www.uniprot.org/) (unmodified) by The UniProt
    Consortium, available under a
    [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/deed.en).
*   [NT: 2023\_02\_23](https://www.ncbi.nlm.nih.gov/nucleotide/) (modified) See
    the Supplementary Information of the
    [AlphaFold 3 paper](https://nature.com/articles/s41586-024-07487-w) for
    details.
*   [RFam: 14\_4](https://rfam.org/) (modified), by I. Kalvari et al., available
    free of all copyright restrictions and made fully and freely available for
    both non-commercial and commercial use under
    [CC0 1.0 Universal (CC0 1.0) Public Domain Dedication](https://creativecommons.org/publicdomain/zero/1.0/).
    See the Supplementary Information of the
    [AlphaFold 3 paper](https://nature.com/articles/s41586-024-07487-w) for
    details.
*   [RNACentral: 21\_0](https://rnacentral.org/) (modified), by The RNAcentral
    Consortium available free of all copyright restrictions and made fully and
    freely available for both non-commercial and commercial use under
    [CC0 1.0 Universal (CC0 1.0) Public Domain Dedication](https://creativecommons.org/publicdomain/zero/1.0/).
    See the Supplementary Information of the
    [AlphaFold 3 paper](https://nature.com/articles/s41586-024-07487-w) for
    details.
