Commit Graph

239 Commits

Author SHA1 Message Date
Augustin Zidek
02650a5ded Use --run_*=false instead of --norun_* in docs.
PiperOrigin-RevId: 886655698
Change-Id: If37e31d659c5b31856ce9bb6cb215b49bb7a96f8
2026-03-20 02:19:27 -07:00
Augustin Zidek
608edb684d Update to Tokamax 0.0.11 and JAX 0.9.1
PiperOrigin-RevId: 881449511
Change-Id: I581853a7c2609a2541f46d22901cc463d5b6b08a
2026-03-10 08:36:19 -07:00
Augustin Zidek
5f7eb57e22 Improve the error when components.cif is not found
PiperOrigin-RevId: 879668429
Change-Id: I7a6ea91c9ddc7696577e156787cb364d1ff79016
2026-03-06 09:15:59 -08:00
Augustin Zidek
e58932a036 Use the same license format in .h files as in .cc files
PiperOrigin-RevId: 878462983
Change-Id: I9480568ba1601306bcb1411e4403f5d6d30de579
2026-03-04 06:38:48 -08:00
Augustin Zidek
6daafb546f Remove unused utility functions
PiperOrigin-RevId: 875760003
Change-Id: I23d7759ddf0835394dbd6b6ab3c304fa52c6a9b1
2026-02-26 09:32:05 -08:00
James Spencer
1e9ece2cfb Respect LIBCIFPP_DATA_PATH if set, rather than attempt to find it.
This enables non-standard installs to find component.cif from libcifpp rather
than require increasingly elaborate heuristics to locate it.

PiperOrigin-RevId: 875098340
Change-Id: I7b186a9958e04628c65644aabfa88d977a86db13
2026-02-25 05:01:49 -08:00
Augustin Zidek
9e10da6725 Add CifDict.to_dict() method for faster serialisation
* Speeds up ccd_pickle_gen from 22.9 s to 19.9 s.

PiperOrigin-RevId: 874118133
Change-Id: I2692c09f8aa8b58a81d0bf3bdf83684934961a66
2026-02-23 09:41:10 -08:00
Augustin Zidek
203e93dfc6 Use const for iter/keys/values/items and release GIL for contains in KeyView
PiperOrigin-RevId: 874098884
Change-Id: I3d55627a3752809600e0c2babd067ead5d5a436b
2026-02-23 08:58:51 -08:00
Augustin Zidek
4ca8a65692 Document the discrepancy between AlphaFold 3 and AlphaFold Server in Known Issues
Big thanks to @stianale for reporting this in https://github.com/google-deepmind/alphafold3/issues/492.

PiperOrigin-RevId: 872892863
Change-Id: Ia24bb492daea44534be4ac743fb304bc72fe9741
2026-02-20 07:34:06 -08:00
Augustin Zidek
ea1667690e Update Docker build instructions for AlmaLinux/Rocky/RHEL users
Addresses https://github.com/google-deepmind/alphafold3/issues/612.

PiperOrigin-RevId: 872822931
Change-Id: Ibb4db9640805e4b59b68d93b13595224636a1af6
2026-02-20 03:41:05 -08:00
Augustin Zidek
c20f070859 Exit if any of the required programs is not installed
Thanks for the suggestion, @Ashutosh0x.

PiperOrigin-RevId: 872800291
Change-Id: If1266222844de98850b7ae4141e2f50001cc4d63
2026-02-20 02:25:13 -08:00
Augustin Zidek
703d5c8375 Make sharded Jackhmmer result merging more robust in case of e-value ties
E-values could be equal, but bit score might have higher resolution. Use that for tie brakes before resorting to the name.

PiperOrigin-RevId: 870903887
Change-Id: I5c8648456c85ef4d1ff4dfeb15b459ba204184e3
2026-02-16 08:30:20 -08:00
Augustin Zidek
2761bf1cfc Use the logging name instead of the one from fold_input
PiperOrigin-RevId: 870860151
Change-Id: I1d4485e1e08c3ca790899c33190b989d103eaf56
2026-02-16 06:13:52 -08:00
Augustin Zidek
e2b8ffd6a7 Implement relevant improvements from #615
PiperOrigin-RevId: 868589660
Change-Id: Iac82ddf73f9f82118b935550afbe0ea13f6cd2eb
2026-02-11 03:27:47 -08:00
Augustin Zidek
ceb32296c7 Move CONTRIBUTING.md to the root directory
PiperOrigin-RevId: 867451876
Change-Id: Ibdaaee8902a1c1150e99225632300778c016f5f6
2026-02-09 00:41:32 -08:00
Augustin Zidek
ebfe70a27a Update Tokamax to 0.0.10
* Removes transitive TensorFlow dependency and others.
* Remove setuptools dependency which is no longer needed.
* Bump JAX to 0.8.2 (required by Tokamax).

PiperOrigin-RevId: 865449256
Change-Id: Iab74fa7ccf36db5c38e7c3d3d37e818a1d9d3952
2026-02-04 09:41:35 -08:00
Augustin Zidek
c13d928a34 Update RDKit to 2025.9.4
PiperOrigin-RevId: 865437867
Change-Id: Iaa116d661bb5743e285efcfe7115f8242f7c0db9
2026-02-04 09:15:20 -08:00
Augustin Zidek
cf4bb5bd9e Use UV_LINK_MODE=copy to prevent Docker build issues on some platforms
Relevant issues:
* https://github.com/google-deepmind/alphafold3/issues/603
* https://github.com/google-deepmind/alphafold3/issues/612

PiperOrigin-RevId: 865416421
Change-Id: Idaf8e531a62638bce5e0748f64a7ddc00b554677
2026-02-04 08:18:53 -08:00
Augustin Zidek
6b50e384d3 Add the glycan modeling paper in the list of community tools
Adapted from https://github.com/google-deepmind/alphafold3/pull/608/changes, thanks @chinchc.

PiperOrigin-RevId: 862720014
Change-Id: I021eef0b46158e8ce28e97d9172ba6e79ef3f30c
2026-01-29 07:03:17 -08:00
Augustin Zidek
22b9ab80d3 Make AlphaFold 3 uv setup compatible with aarch64
Addresses https://github.com/google-deepmind/alphafold3/issues/593.

PiperOrigin-RevId: 858480255
Change-Id: I7862b204300d137e367bbaaf31213f7164fdd8d1
2026-01-20 01:56:05 -08:00
Augustin Zidek
c7a1ad5c51 Add a documentation on model parameters
Addresses https://github.com/google-deepmind/alphafold3/issues/594.

PiperOrigin-RevId: 857083798
Change-Id: I1d8e42ab6e53075a2c05d70d10a14a8e686fa566
2026-01-16 04:04:09 -08:00
Augustin Zidek
f6032f0f6a Add a flag to compress large output files using zstandard
Inspired by https://github.com/google-deepmind/alphafold3/pull/544 (thank you @ntnn19), but with some differences:
1. Uses zstandard instead of gzip for faster compression times and better compression ratios.
2. Compresses only large files.
3. Doesn't compress already compressed files (distogram and embeddings).
4. Doesn't write large temporary files, compresses directly.

PiperOrigin-RevId: 856630504
Change-Id: I4413e26c9d2e8e4592c372dc675dcfa6044fc257
2026-01-15 06:11:23 -08:00
Augustin Zidek
8d0a8db07e Make everything past model_runner mandatory kwarg in process_fold_input
PiperOrigin-RevId: 856615431
Change-Id: I1e2a126e96e16dd2660f6e9fec9d9ffa02eeb7b2
2026-01-15 05:15:31 -08:00
Augustin Zidek
3e2bc0ce35 Add JAAG to community tools documentation
Addresses:
* https://github.com/google-deepmind/alphafold3/pull/583
* https://github.com/google-deepmind/alphafold3/issues/537
PiperOrigin-RevId: 856584357
Change-Id: Ifdd92878a01f30512381302cc0945cb454e9db1d
2026-01-15 03:22:36 -08:00
Augustin Zidek
8d37fc1cb9 Modernize setup, switch to Python 3.12, and migrate to uv
PiperOrigin-RevId: 856564478
Change-Id: I31af1c170846fb787235dfc03b3a6da0464f51be
2026-01-15 02:14:05 -08:00
Augustin Zidek
2f40800a3a Force the legacy git backend to prevent build errors with new git versions
PiperOrigin-RevId: 856186746
Change-Id: I447a4a3ab65674da75a908816208a6fe377232ed
2026-01-14 06:31:52 -08:00
Augustin Zidek
d7ab550d1b Update CONTRIBUTING.md with a policy for AI-generated code
PiperOrigin-RevId: 855264083
Change-Id: I0c6b826c2edf3a0939d03407cf6e9ddaf8d383f6
2026-01-12 09:37:49 -08:00
Augustin Zidek
b78e215394 Update tokamax dependency to version 0.0.8
* This fixes an issue with immutabledict dependency missing in previous versions of Tokamax.
* JAX and Haiku have to be updated as well.

PiperOrigin-RevId: 854207701
Change-Id: I8c30856504f44e43e3a058e89b0866922ca56a5b
2026-01-09 08:39:58 -08:00
Augustin Zidek
a701815575 Upgrade GitHub Actions to the latest version (v6)
Thanks to salmanmkc@ who suggested this in https://github.com/google-deepmind/alphafold3/pull/571.

PiperOrigin-RevId: 854113440
Change-Id: Ib71810028c7492604978eb1c2f9e46d5f57486b5
2026-01-09 03:06:01 -08:00
Augustin Zidek
8eaae04e1d Add CONTRIBUTING.md
PiperOrigin-RevId: 854113365
Change-Id: I1a45e75f3138d848943e1442e1d0b1787f1f699f
2026-01-09 03:05:19 -08:00
Josh Abramson
3a09f049bf remove unused msa and template store code.
PiperOrigin-RevId: 839187236
Change-Id: I5144812d68e0525f3ea84f32a94d0f4ab89b43ec
2025-12-02 03:31:32 -08:00
Ryan Pachauri
389078218c Migrate AF3 to tokamax.gated_linear_unit and tokamax.dot_product_attention.
PiperOrigin-RevId: 838262306
Change-Id: I321a78b2a7d0d5cdeabe797c59b1e9c03e33780d
2025-11-29 19:03:26 -08:00
James Spencer
2e3703e82a fix support for sharded databases
PiperOrigin-RevId: 836803355
Change-Id: Icc263c4a1ca153da99a71a336e1150b351cc4d27
2025-11-25 14:01:34 -08:00
Akvile Zemgulyte
e850301268 Internal change
PiperOrigin-RevId: 833709597
Change-Id: Ib13795c7d9edb678f07b347c44edeb1319b5510f
2025-11-18 01:33:44 -08:00
Foromo Daniel Soromou
f3e86f27df Add safe_pickle module for secure loading of pickled data.
This module provides functions to load pickled data with enhanced security. It restricts unpickling to a small set of allowed builtin types. This mitigates risks associated with unpickling untrusted data while maintaining performance for AlphaFold 3's generated artifacts (which is 5x faster than json).

PiperOrigin-RevId: 827973163
Change-Id: I405ac3ebc0035df8bf6bf9c66b48e5894278b98f
2025-11-04 07:56:06 -08:00
Augustin Zidek
c0ab1c40f3 Include fully unresolved chains in Structure when going from mmCIF
PiperOrigin-RevId: 827517473
Change-Id: I4692df12aeaf95c7507b8b4371d0474327d0824c
2025-11-03 08:51:58 -08:00
Augustin Zidek
9ecec8d19e Handle CRLF line endings in CIF parsing
Addresses https://github.com/google-deepmind/alphafold3/issues/546#issuecomment-3472843608

PiperOrigin-RevId: 827414127
Change-Id: I355409bf40d2869dd5fec638a7fe626677535d19
2025-11-03 03:13:24 -08:00
Augustin Zidek
aed6e82cb1 Add an option to make entity IDs unique in structure.concat
PiperOrigin-RevId: 826028193
Change-Id: I8af72087770fafa68135093d0c0fa55d6cbd03f2
2025-10-30 07:46:51 -07:00
Augustin Zidek
805adc3863 Add option to run Jackhmmer/Nhmmer genetic search in sharded mode (10-30x faster)
PiperOrigin-RevId: 825546064
Change-Id: Ib421e47bb9ca7eea512c49a532e7e995a0f5721f
2025-10-29 07:55:10 -07:00
Augustin Zidek
46fe3f0f60 Add documentation for pre-computing and reusing MSA and templates
PiperOrigin-RevId: 825092403
Change-Id: Idfeb86387ad3e83f5742cfa19e18f6faf3530315
2025-10-28 10:09:19 -07:00
Augustin Zidek
9c183c8234 Make the ordering of the performance documentation more logical
PiperOrigin-RevId: 824606495
Change-Id: Ie4e8558a95e4ddf43f2bb7486e025322f4b6860c
2025-10-27 11:35:17 -07:00
Augustin Zidek
ec65897c60 Make unnecessarily public attributes private in tool wrappers
PiperOrigin-RevId: 823539582
Change-Id: I846566acfd7fc089fabb1c83775f1cf55bc3bc4f
2025-10-24 08:27:09 -07:00
Augustin Zidek
b77e80447f Increase ranking score upper bound tolerance
PiperOrigin-RevId: 822163464
Change-Id: I93b48804b98463a2d447c2fa043bdeeef873080a
2025-10-21 09:56:51 -07:00
Benjamin Chetioui
cf404610b5 Explicitly set backend='triton' in pallas_call invocations.
This change is being made because the default backend for `pallas_call` is changing. Explicitly setting `backend='triton'` ensures that these calls continue to use the Triton backend, maintaining current behavior.

PiperOrigin-RevId: 822019610
Change-Id: I7ba83894fcd960d424502335c8b904d76c88a733
2025-10-21 02:26:33 -07:00
Augustin Zidek
c9121bf646 Improve error message when testing expected scores
PiperOrigin-RevId: 821539922
Change-Id: Iec34e6d220c5de3fcae77117ab86bbdbe871ad0e
2025-10-20 01:28:22 -07:00
Augustin Zidek
3c89cc7b89 Improve error message and consistency of ordering
PiperOrigin-RevId: 820694312
Change-Id: I6b04514b1f838c49bf5dca1e138e1d6b2ff81139
2025-10-17 08:06:15 -07:00
Augustin Zidek
142e4bc6e5 Fix residue mapping bug in _maybe_add_missing_scheme_tables
PiperOrigin-RevId: 817086740
Change-Id: Ib4a74efd410ec25f0cd92b6d6ffa23f684e660fb
2025-10-09 02:29:51 -07:00
DeepMind
03a6c295e5 Return b factors and occupancy from to_res_arrays()
Change to_res_arrays() to return a ResArrays dataclass which contains [num_res, num_atoms, *] shaped arrays for all atom-level data in a Structure.

PiperOrigin-RevId: 814245949
Change-Id: I38abeec96c8d4ed97a06964e6c7b7fc74f37f97d
2025-10-02 08:31:47 -07:00
Augustin Zidek
a8ecdb2d7a Cache the underlying CCD dictionary instead of the whole CCD object.
* Enables removal of the chemical_components.cached_ccd function.
* If there are multiple custom CCDs (tiny in comparison to the full CCD) in a single run, this will consume only O(1) RAM instead of O(num_inputs).

Addresses:
* https://github.com/google-deepmind/alphafold3/pull/514
* https://github.com/google-deepmind/alphafold3/issues/509
PiperOrigin-RevId: 804321599
Change-Id: I484f851ce79cd6b1c5c31bf70b6cd945791f8b66
2025-09-08 01:44:10 -07:00
Augustin Zidek
85a03ec086 Use the CPU count available to the process instead of total CPU count
Addresses https://github.com/google-deepmind/alphafold3/issues/513

PiperOrigin-RevId: 803078244
Change-Id: I6446deac260f13ad08873d1c464e65444c099283
2025-09-04 10:20:38 -07:00