Showing preview only (7,779K chars total). Download the full file or copy to clipboard to get everything.
Repository: google-deepmind/alphafold3
Branch: main
Commit: 608edb684db9
Files: 186
Total size: 7.4 MB
Directory structure:
gitextract_op0f7t9l/
├── .github/
│ └── workflows/
│ └── ci.yaml
├── CMakeLists.txt
├── CONTRIBUTING.md
├── LICENSE
├── OUTPUT_TERMS_OF_USE.md
├── README.md
├── WEIGHTS_PROHIBITED_USE_POLICY.md
├── WEIGHTS_TERMS_OF_USE.md
├── docker/
│ ├── Dockerfile
│ ├── dockerignore
│ └── jackhmmer_seq_limit.patch
├── docs/
│ ├── community_tools.md
│ ├── contributing.md
│ ├── input.md
│ ├── installation.md
│ ├── known_issues.md
│ ├── metadata_antibody_antigen.csv
│ ├── metadata_antibody_antigen.md
│ ├── model_parameters.md
│ ├── output.md
│ └── performance.md
├── fetch_databases.sh
├── legal/
│ ├── WEIGHTS_PROHIBITED_USE_POLICY-Bahasa-Indonesia.md
│ ├── WEIGHTS_PROHIBITED_USE_POLICY-Espanol-Latinoamerica.md
│ ├── WEIGHTS_PROHIBITED_USE_POLICY-Francais-Canada.md
│ ├── WEIGHTS_PROHIBITED_USE_POLICY-Portugues-Brazil.md
│ ├── WEIGHTS_TERMS_OF_USE-Bahasa-Indonesia.md
│ ├── WEIGHTS_TERMS_OF_USE-Espanol-Latinoamerica.md
│ ├── WEIGHTS_TERMS_OF_USE-Francais-Canada.md
│ └── WEIGHTS_TERMS_OF_USE-Portugues-Brazil.md
├── pyproject.toml
├── run_alphafold.py
├── run_alphafold_data_test.py
├── run_alphafold_test.py
└── src/
└── alphafold3/
├── __init__.py
├── build_data.py
├── common/
│ ├── base_config.py
│ ├── folding_input.py
│ ├── resources.py
│ ├── safe_pickle.py
│ └── testing/
│ └── data.py
├── constants/
│ ├── atom_types.py
│ ├── chemical_component_sets.py
│ ├── chemical_components.py
│ ├── converters/
│ │ ├── ccd_pickle_gen.py
│ │ └── chemical_component_sets_gen.py
│ ├── mmcif_names.py
│ ├── periodic_table.py
│ ├── residue_names.py
│ └── side_chains.py
├── cpp.cc
├── data/
│ ├── cpp/
│ │ ├── msa_profile_pybind.cc
│ │ └── msa_profile_pybind.h
│ ├── featurisation.py
│ ├── msa.py
│ ├── msa_config.py
│ ├── msa_features.py
│ ├── msa_identifiers.py
│ ├── parsers.py
│ ├── pipeline.py
│ ├── structure_stores.py
│ ├── template_realign.py
│ ├── templates.py
│ └── tools/
│ ├── hmmalign.py
│ ├── hmmbuild.py
│ ├── hmmsearch.py
│ ├── jackhmmer.py
│ ├── msa_tool.py
│ ├── nhmmer.py
│ ├── rdkit_utils.py
│ ├── shards.py
│ └── subprocess_utils.py
├── jax/
│ └── geometry/
│ ├── __init__.py
│ ├── rigid_matrix_vector.py
│ ├── rotation_matrix.py
│ ├── struct_of_array.py
│ ├── utils.py
│ └── vector.py
├── model/
│ ├── atom_layout/
│ │ └── atom_layout.py
│ ├── components/
│ │ ├── haiku_modules.py
│ │ ├── mapping.py
│ │ └── utils.py
│ ├── confidence_types.py
│ ├── confidences.py
│ ├── data3.py
│ ├── data_constants.py
│ ├── feat_batch.py
│ ├── features.py
│ ├── merging_features.py
│ ├── mkdssp_pybind.cc
│ ├── mkdssp_pybind.h
│ ├── mmcif_metadata.py
│ ├── model.py
│ ├── model_config.py
│ ├── msa_pairing.py
│ ├── network/
│ │ ├── atom_cross_attention.py
│ │ ├── confidence_head.py
│ │ ├── diffusion_head.py
│ │ ├── diffusion_transformer.py
│ │ ├── distogram_head.py
│ │ ├── evoformer.py
│ │ ├── featurization.py
│ │ ├── modules.py
│ │ ├── noise_level_embeddings.py
│ │ └── template_modules.py
│ ├── params.py
│ ├── pipeline/
│ │ ├── inter_chain_bonds.py
│ │ ├── pipeline.py
│ │ └── structure_cleaning.py
│ ├── post_processing.py
│ ├── protein_data_processing.py
│ └── scoring/
│ ├── alignment.py
│ ├── chirality.py
│ ├── covalent_bond_cleaning.py
│ └── scoring.py
├── parsers/
│ └── cpp/
│ ├── cif_dict.pyi
│ ├── cif_dict_lib.cc
│ ├── cif_dict_lib.h
│ ├── cif_dict_pybind.cc
│ ├── cif_dict_pybind.h
│ ├── fasta_iterator.pyi
│ ├── fasta_iterator_lib.cc
│ ├── fasta_iterator_lib.h
│ ├── fasta_iterator_pybind.cc
│ ├── fasta_iterator_pybind.h
│ ├── msa_conversion.pyi
│ ├── msa_conversion_pybind.cc
│ └── msa_conversion_pybind.h
├── scripts/
│ ├── copy_to_ssd.sh
│ └── gcp_mount_ssd.sh
├── structure/
│ ├── __init__.py
│ ├── bioassemblies.py
│ ├── bonds.py
│ ├── chemical_components.py
│ ├── cpp/
│ │ ├── aggregation.pyi
│ │ ├── aggregation_pybind.cc
│ │ ├── aggregation_pybind.h
│ │ ├── membership.pyi
│ │ ├── membership_pybind.cc
│ │ ├── membership_pybind.h
│ │ ├── mmcif_altlocs.cc
│ │ ├── mmcif_altlocs.h
│ │ ├── mmcif_atom_site.pyi
│ │ ├── mmcif_atom_site_pybind.cc
│ │ ├── mmcif_atom_site_pybind.h
│ │ ├── mmcif_layout.h
│ │ ├── mmcif_layout.pyi
│ │ ├── mmcif_layout_lib.cc
│ │ ├── mmcif_layout_pybind.cc
│ │ ├── mmcif_layout_pybind.h
│ │ ├── mmcif_struct_conn.h
│ │ ├── mmcif_struct_conn.pyi
│ │ ├── mmcif_struct_conn_lib.cc
│ │ ├── mmcif_struct_conn_pybind.cc
│ │ ├── mmcif_struct_conn_pybind.h
│ │ ├── mmcif_utils.pyi
│ │ ├── mmcif_utils_pybind.cc
│ │ ├── mmcif_utils_pybind.h
│ │ ├── string_array.pyi
│ │ ├── string_array_pybind.cc
│ │ └── string_array_pybind.h
│ ├── mmcif.py
│ ├── parsing.py
│ ├── sterics.py
│ ├── structure.py
│ ├── structure_tables.py
│ ├── table.py
│ └── test_utils.py
├── test_data/
│ ├── alphafold_run_outputs/
│ │ ├── run_alphafold_test_output_bucket_1024.pkl
│ │ └── run_alphafold_test_output_bucket_default.pkl
│ ├── featurised_example.json
│ ├── featurised_example.pkl
│ ├── miniature_databases/
│ │ ├── bfd-first_non_consensus_sequences__subsampled_1000.fasta
│ │ ├── mgy_clusters__subsampled_1000.fa
│ │ ├── nt_rna_2023_02_23_clust_seq_id_90_cov_80_rep_seq__subsampled_1000.fasta
│ │ ├── pdb_mmcif/
│ │ │ ├── 5y2e.cif
│ │ │ ├── 6s61.cif
│ │ │ ├── 6ydw.cif
│ │ │ └── 7rye.cif
│ │ ├── pdb_seqres_2022_09_28__subsampled_1000.fasta
│ │ ├── rfam_14_4_clustered_rep_seq__subsampled_1000.fasta
│ │ ├── rnacentral_active_seq_id_90_cov_80_linclust__subsampled_1000.fasta
│ │ ├── uniprot_all__subsampled_1000.fasta
│ │ └── uniref90__subsampled_1000.fasta
│ └── model_config.json
└── version.py
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/workflows/ci.yaml
================================================
name: Continuous Integration
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
name: "build ${{ matrix.name-prefix }} (py ${{ matrix.python-version }} on ${{ matrix.os }})"
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- name-prefix: "all tests"
python-version: '3.12'
os: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install dependencies
run: sudo apt-get install -y hmmer
- name: Install Python dependencies
run: uv sync --frozen --all-groups
- name: Build data
run: uv run build_data
- name: Run CPU-only tests
run: uv run python run_alphafold_data_test.py
================================================
FILE: CMakeLists.txt
================================================
# Copyright 2024 DeepMind Technologies Limited
#
# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a copy of
# this license, visit https://creativecommons.org/licenses/by-nc-sa/4.0/
#
# To request access to the AlphaFold 3 model parameters, follow the process set
# out at https://github.com/google-deepmind/alphafold3. You may only use these
# if received directly from Google. Use is subject to terms of use available at
# https://github.com/google-deepmind/alphafold3/blob/main/WEIGHTS_TERMS_OF_USE.md
cmake_minimum_required(VERSION 3.28)
# This forces Git to use the 'files' backend for all FetchContent operations.
# This fixes libcifpp and dssp incompatibility with newer git versions.
set(ENV{GIT_CONFIG_PARAMETERS} "'init.defaultRefFormat=files'")
project(
"${SKBUILD_PROJECT_NAME}"
LANGUAGES CXX
VERSION "${SKBUILD_PROJECT_VERSION}")
include(FetchContent)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
set(ABSL_PROPAGATE_CXX_STD ON)
# Remove support for scan deps, which is only useful when using C++ modules.
unset(CMAKE_CXX_SCANDEP_SOURCE)
FetchContent_Declare(
abseil-cpp
GIT_REPOSITORY https://github.com/abseil/abseil-cpp
GIT_TAG d7aaad83b488fd62bd51c81ecf16cd938532cc0a # 20240116.2
EXCLUDE_FROM_ALL)
FetchContent_Declare(
pybind11
GIT_REPOSITORY https://github.com/pybind/pybind11
GIT_TAG 2e0815278cb899b20870a67ca8205996ef47e70f # v2.12.0
EXCLUDE_FROM_ALL)
FetchContent_Declare(
pybind11_abseil
GIT_REPOSITORY https://github.com/pybind/pybind11_abseil
GIT_TAG bddf30141f9fec8e577f515313caec45f559d319 # HEAD @ 2024-08-07
EXCLUDE_FROM_ALL)
FetchContent_Declare(
cifpp
GIT_REPOSITORY https://github.com/pdb-redo/libcifpp
GIT_TAG ac98531a2fc8daf21131faa0c3d73766efa46180 # v7.0.3
# Don't `EXCLUDE_FROM_ALL` as necessary for build_data.
)
FetchContent_Declare(
dssp
GIT_REPOSITORY https://github.com/PDB-REDO/dssp
GIT_TAG 57560472b4260dc41f457706bc45fc6ef0bc0f10 # v4.4.7
EXCLUDE_FROM_ALL)
FetchContent_MakeAvailable(pybind11 abseil-cpp pybind11_abseil cifpp dssp)
find_package(
Python3
COMPONENTS Interpreter Development NumPy
REQUIRED)
include_directories(${PYTHON_INCLUDE_DIRS})
include_directories(src/)
file(GLOB_RECURSE cpp_srcs src/alphafold3/*.cc)
list(FILTER cpp_srcs EXCLUDE REGEX ".*\(_test\|_main\|_benchmark\).cc$")
add_compile_definitions(NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION)
pybind11_add_module(cpp ${cpp_srcs})
target_link_libraries(
cpp
PRIVATE absl::check
absl::flat_hash_map
absl::node_hash_map
absl::strings
absl::status
absl::statusor
absl::log
pybind11_abseil::absl_casters
Python3::NumPy
dssp::dssp
cifpp::cifpp)
target_compile_definitions(cpp PRIVATE VERSION_INFO=${PROJECT_VERSION})
install(TARGETS cpp LIBRARY DESTINATION alphafold3)
install(
FILES LICENSE
OUTPUT_TERMS_OF_USE.md
WEIGHTS_PROHIBITED_USE_POLICY.md
WEIGHTS_TERMS_OF_USE.md
DESTINATION alphafold3)
================================================
FILE: CONTRIBUTING.md
================================================
# How to Contribute
We welcome small patches related to bug fixes and documentation, but we do not
plan to make any major changes to this repository.
## AI Generated Code
We welcome the use of AI tools for the generation of code, documentation and/or
Pull Request (PR) description as long as:
1. It has been transparently labelled as such. Make sure to declare it in the
PR message.
2. You have manually reviewed the code before sending the PR.
3. The change has been manually tested. We might ask you to fold a certain
input to check correctness of the PR.
Please do not submit AI generated PRs where test results have been hallucinated.
## Contributor License Agreement
Contributions to this project must be accompanied by a Contributor License
Agreement. You (or your employer) retain the copyright to your contribution,
this simply gives us permission to use and redistribute your contributions as
part of the project. Head over to <https://cla.developers.google.com/> to see
your current agreements on file or to sign a new one.
You generally only need to submit a CLA once, so if you've already submitted one
(even if it was for a different project), you probably don't need to do it
again.
## Code reviews
All submissions, including submissions by project members, require review. We
use GitHub pull requests for this purpose. Consult
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
information on using pull requests.
================================================
FILE: LICENSE
================================================
Attribution-NonCommercial-ShareAlike 4.0 International
=======================================================================
Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related
information available on an "as-is" basis. Creative Commons gives no
warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the
fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and
conditions that creators and other rights holders may use to share
original works of authorship and other material subject to copyright
and certain other rights specified in the public license below. The
following considerations are for informational purposes only, are not
exhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are
intended for use by those authorized to give the public
permission to use material in ways otherwise restricted by
copyright and certain other rights. Our licenses are
irrevocable. Licensors should read and understand the terms
and conditions of the license they choose before applying it.
Licensors should also secure all rights necessary before
applying our licenses so that the public can reuse the
material as expected. Licensors should clearly mark any
material not subject to the license. This includes other CC-
licensed material, or material used under an exception or
limitation to copyright. More considerations for licensors:
wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public
licenses, a licensor grants the public permission to use the
licensed material under specified terms and conditions. If
the licensor's permission is not necessary for any reason--for
example, because of any applicable exception or limitation to
copyright--then that use is not regulated by the license. Our
licenses grant only permissions under copyright and certain
other rights that a licensor has authority to grant. Use of
the licensed material may still be restricted for other
reasons, including because others have copyright or other
rights in the material. A licensor may make special requests,
such as asking that all changes be marked or described.
Although not required by our licenses, you are encouraged to
respect those requests where reasonable. More considerations
for the public:
wiki.creativecommons.org/Considerations_for_licensees
=======================================================================
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
Public License
By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution-NonCommercial-ShareAlike 4.0 International Public License
("Public License"). To the extent this Public License may be
interpreted as a contract, You are granted the Licensed Rights in
consideration of Your acceptance of these terms and conditions, and the
Licensor grants You such rights in consideration of benefits the
Licensor receives from making the Licensed Material available under
these terms and conditions.
Section 1 -- Definitions.
a. Adapted Material means material subject to Copyright and Similar
Rights that is derived from or based upon the Licensed Material
and in which the Licensed Material is translated, altered,
arranged, transformed, or otherwise modified in a manner requiring
permission under the Copyright and Similar Rights held by the
Licensor. For purposes of this Public License, where the Licensed
Material is a musical work, performance, or sound recording,
Adapted Material is always produced where the Licensed Material is
synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright
and Similar Rights in Your contributions to Adapted Material in
accordance with the terms and conditions of this Public License.
c. BY-NC-SA Compatible License means a license listed at
creativecommons.org/compatiblelicenses, approved by Creative
Commons as essentially the equivalent of this Public License.
d. Copyright and Similar Rights means copyright and/or similar rights
closely related to copyright including, without limitation,
performance, broadcast, sound recording, and Sui Generis Database
Rights, without regard to how the rights are labeled or
categorized. For purposes of this Public License, the rights
specified in Section 2(b)(1)-(2) are not Copyright and Similar
Rights.
e. Effective Technological Measures means those measures that, in the
absence of proper authority, may not be circumvented under laws
fulfilling obligations under Article 11 of the WIPO Copyright
Treaty adopted on December 20, 1996, and/or similar international
agreements.
f. Exceptions and Limitations means fair use, fair dealing, and/or
any other exception or limitation to Copyright and Similar Rights
that applies to Your use of the Licensed Material.
g. License Elements means the license attributes listed in the name
of a Creative Commons Public License. The License Elements of this
Public License are Attribution, NonCommercial, and ShareAlike.
h. Licensed Material means the artistic or literary work, database,
or other material to which the Licensor applied this Public
License.
i. Licensed Rights means the rights granted to You subject to the
terms and conditions of this Public License, which are limited to
all Copyright and Similar Rights that apply to Your use of the
Licensed Material and that the Licensor has authority to license.
j. Licensor means the individual(s) or entity(ies) granting rights
under this Public License.
k. NonCommercial means not primarily intended for or directed towards
commercial advantage or monetary compensation. For purposes of
this Public License, the exchange of the Licensed Material for
other material subject to Copyright and Similar Rights by digital
file-sharing or similar means is NonCommercial provided there is
no payment of monetary compensation in connection with the
exchange.
l. Share means to provide material to the public by any means or
process that requires permission under the Licensed Rights, such
as reproduction, public display, public performance, distribution,
dissemination, communication, or importation, and to make material
available to the public including in ways that members of the
public may access the material from a place and at a time
individually chosen by them.
m. Sui Generis Database Rights means rights other than copyright
resulting from Directive 96/9/EC of the European Parliament and of
the Council of 11 March 1996 on the legal protection of databases,
as amended and/or succeeded, as well as other essentially
equivalent rights anywhere in the world.
n. You means the individual or entity exercising the Licensed Rights
under this Public License. Your has a corresponding meaning.
Section 2 -- Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License,
the Licensor hereby grants You a worldwide, royalty-free,
non-sublicensable, non-exclusive, irrevocable license to
exercise the Licensed Rights in the Licensed Material to:
a. reproduce and Share the Licensed Material, in whole or
in part, for NonCommercial purposes only; and
b. produce, reproduce, and Share Adapted Material for
NonCommercial purposes only.
2. Exceptions and Limitations. For the avoidance of doubt, where
Exceptions and Limitations apply to Your use, this Public
License does not apply, and You do not need to comply with
its terms and conditions.
3. Term. The term of this Public License is specified in Section
6(a).
4. Media and formats; technical modifications allowed. The
Licensor authorizes You to exercise the Licensed Rights in
all media and formats whether now known or hereafter created,
and to make technical modifications necessary to do so. The
Licensor waives and/or agrees not to assert any right or
authority to forbid You from making technical modifications
necessary to exercise the Licensed Rights, including
technical modifications necessary to circumvent Effective
Technological Measures. For purposes of this Public License,
simply making modifications authorized by this Section 2(a)
(4) never produces Adapted Material.
5. Downstream recipients.
a. Offer from the Licensor -- Licensed Material. Every
recipient of the Licensed Material automatically
receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this
Public License.
b. Additional offer from the Licensor -- Adapted Material.
Every recipient of Adapted Material from You
automatically receives an offer from the Licensor to
exercise the Licensed Rights in the Adapted Material
under the conditions of the Adapter's License You apply.
c. No downstream restrictions. You may not offer or impose
any additional or different terms or conditions on, or
apply any Effective Technological Measures to, the
Licensed Material if doing so restricts exercise of the
Licensed Rights by any recipient of the Licensed
Material.
6. No endorsement. Nothing in this Public License constitutes or
may be construed as permission to assert or imply that You
are, or that Your use of the Licensed Material is, connected
with, or sponsored, endorsed, or granted official status by,
the Licensor or others designated to receive attribution as
provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not
licensed under this Public License, nor are publicity,
privacy, and/or other similar personality rights; however, to
the extent possible, the Licensor waives and/or agrees not to
assert any such rights held by the Licensor to the limited
extent necessary to allow You to exercise the Licensed
Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this
Public License.
3. To the extent possible, the Licensor waives any right to
collect royalties from You for the exercise of the Licensed
Rights, whether directly or through a collecting society
under any voluntary or waivable statutory or compulsory
licensing scheme. In all other cases the Licensor expressly
reserves any right to collect such royalties, including when
the Licensed Material is used other than for NonCommercial
purposes.
Section 3 -- License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the
following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified
form), You must:
a. retain the following if it is supplied by the Licensor
with the Licensed Material:
i. identification of the creator(s) of the Licensed
Material and any others designated to receive
attribution, in any reasonable manner requested by
the Licensor (including by pseudonym if
designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of
warranties;
v. a URI or hyperlink to the Licensed Material to the
extent reasonably practicable;
b. indicate if You modified the Licensed Material and
retain an indication of any previous modifications; and
c. indicate the Licensed Material is licensed under this
Public License, and include the text of, or the URI or
hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any
reasonable manner based on the medium, means, and context in
which You Share the Licensed Material. For example, it may be
reasonable to satisfy the conditions by providing a URI or
hyperlink to a resource that includes the required
information.
3. If requested by the Licensor, You must remove any of the
information required by Section 3(a)(1)(A) to the extent
reasonably practicable.
b. ShareAlike.
In addition to the conditions in Section 3(a), if You Share
Adapted Material You produce, the following conditions also apply.
1. The Adapter's License You apply must be a Creative Commons
license with the same License Elements, this version or
later, or a BY-NC-SA Compatible License.
2. You must include the text of, or the URI or hyperlink to, the
Adapter's License You apply. You may satisfy this condition
in any reasonable manner based on the medium, means, and
context in which You Share Adapted Material.
3. You may not offer or impose any additional or different terms
or conditions on, or apply any Effective Technological
Measures to, Adapted Material that restrict exercise of the
rights granted under the Adapter's License You apply.
Section 4 -- Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
to extract, reuse, reproduce, and Share all or a substantial
portion of the contents of the database for NonCommercial purposes
only;
b. if You include all or a substantial portion of the database
contents in a database in which You have Sui Generis Database
Rights, then the database in which You have Sui Generis Database
Rights (but not its individual contents) is Adapted Material,
including for purposes of Section 3(b); and
c. You must comply with the conditions in Section 3(a) if You Share
all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
c. The disclaimer of warranties and limitation of liability provided
above shall be interpreted in a manner that, to the extent
possible, most closely approximates an absolute disclaimer and
waiver of all liability.
Section 6 -- Term and Termination.
a. This Public License applies for the term of the Copyright and
Similar Rights licensed here. However, if You fail to comply with
this Public License, then Your rights under this Public License
terminate automatically.
b. Where Your right to use the Licensed Material has terminated under
Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided
it is cured within 30 days of Your discovery of the
violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any
right the Licensor may have to seek remedies for Your violations
of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the
Licensed Material under separate terms or conditions or stop
distributing the Licensed Material at any time; however, doing so
will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
License.
Section 7 -- Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different
terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the
Licensed Material not stated herein are separate from and
independent of the terms and conditions of this Public License.
Section 8 -- Interpretation.
a. For the avoidance of doubt, this Public License does not, and
shall not be interpreted to, reduce, limit, restrict, or impose
conditions on any use of the Licensed Material that could lawfully
be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is
deemed unenforceable, it shall be automatically reformed to the
minimum extent necessary to make it enforceable. If the provision
cannot be reformed, it shall be severed from this Public License
without affecting the enforceability of the remaining terms and
conditions.
c. No term or condition of this Public License will be waived and no
failure to comply consented to unless expressly agreed to by the
Licensor.
d. Nothing in this Public License constitutes or may be interpreted
as a limitation upon, or waiver of, any privileges and immunities
that apply to the Licensor or You, including from the legal
processes of any jurisdiction or authority.
=======================================================================
Creative Commons is not a party to its public
licenses. Notwithstanding, Creative Commons may elect to apply one of
its public licenses to material it publishes and in those instances
will be considered the “Licensor.” The text of the Creative Commons
public licenses is dedicated to the public domain under the CC0 Public
Domain Dedication. Except for the limited purpose of indicating that
material is shared under a Creative Commons public license or as
otherwise permitted by the Creative Commons policies published at
creativecommons.org/policies, Creative Commons does not authorize the
use of the trademark "Creative Commons" or any other trademark or logo
of Creative Commons without its prior written consent including,
without limitation, in connection with any unauthorized modifications
to any of its public licenses or any other arrangements,
understandings, or agreements concerning use of licensed material. For
the avoidance of doubt, this paragraph does not form part of the
public licenses.
Creative Commons may be contacted at creativecommons.org.
================================================
FILE: OUTPUT_TERMS_OF_USE.md
================================================
# ALPHAFOLD 3 OUTPUT TERMS OF USE
Last Modified: 2024-11-09
By using AlphaFold 3 Output (as defined below), without having agreed to
[AlphaFold 3 Model Parameters Terms of Use](https://github.com/google-deepmind/alphafold3/blob/main/WEIGHTS_TERMS_OF_USE.md),
you agree to be bound by these AlphaFold 3 Output Terms of Use between you (or
your organization, as applicable) and Google LLC (these "**Terms**").
If you are using Output on behalf of an organization, you confirm you are
authorized either explicitly or implicitly to agree to, and are agreeing to,
these Terms as an employee on behalf of, or otherwise on behalf of, your
organization.
If you have agreed to
[AlphaFold 3 Model Parameters Terms of Use](https://github.com/google-deepmind/alphafold3/blob/main/WEIGHTS_TERMS_OF_USE.md),
your use of Output are governed by those terms. **If you have not agreed to
[AlphaFold 3 Model Parameters Terms of Use](https://github.com/google-deepmind/alphafold3/blob/main/WEIGHTS_TERMS_OF_USE.md)
and do not agree to these Terms, do not use Output or permit any third party to
do so on your behalf.**
When we say "**you**", we mean the individual or organization using Output. When
we say "**we**", "**us**" or "**Google**", we mean the entities that belong to
the Google group of companies, which means Google LLC and its affiliates.
## Key Definitions
As used in these Terms:
"**AlphaFold 3**" means the AlphaFold 3 Code and Model Parameters.
"**AlphaFold 3 Code**" means the AlphaFold 3 source code: (a) identified at
[public GitHub repo](https://github.com/google-deepmind/alphafold3/), or such
other location in which we may make it available from time to time, regardless
of the source that it was obtained from; and (b) made available by Google to
organizations for their use in accordance with the
[AlphaFold 3 Model Parameters Terms of Use](https://github.com/google-deepmind/alphafold3/blob/main/WEIGHTS_TERMS_OF_USE.md)
(not these Terms) together with (i) modifications to that code, (ii) works based
on that code, or (iii) other code or machine learning model which incorporates,
in full or in part, that code.
"**Model Parameters**" means the trained model weights and parameters made
available by Google to organizations (at its sole discretion) for their use in
accordance with the
[AlphaFold 3 Model Parameters Terms of Use](https://github.com/google-deepmind/alphafold3/blob/main/WEIGHTS_TERMS_OF_USE.md)
(not these Terms), together with (a) modifications to those weights and
parameters, (b) works based on those weights and parameters, or (c) other code
or machine learning model which incorporates, in full or in part, those weights
and parameters.
"**Output**" means the structure predictions and all related information
provided by AlphaFold 3, together with any visual representations, computational
predictions, descriptions, modifications, copies, or adaptations that are
substantially derived from Output.
## Use restrictions
[AlphaFold 3](https://blog.google/technology/ai/google-deepmind-isomorphic-alphafold-3-ai-model/)
belongs to us. Output are made available free of charge, for non-commercial use
only, in accordance with the following use restrictions. You must not use nor
allow others to use Output:
1. **On behalf of a commercial organization or in connection with any
commercial activities, including research on behalf of commercial
organizations.**
1. This means that only non-commercial organizations (*i.e.*, universities,
non-profit organizations and research institutes, educational,
journalism and government bodies) may use Output for their
non-commercial activities. Output are not available for use by any other
types of organization, even if conducting non-commercial work.
2. If you are a researcher affiliated with a non-commercial organization,
provided **you are not a commercial organisation or acting on behalf of
a commercial organisation**, you can use Output for your non-commercial
affiliated research.
3. You must not share Output with any commercial organization. The only
exception is making Output publicly available (including, indirectly, to
commercial organizations) via a scientific publication or open source
release or using these to support journalism, each of which are
permitted.
2. **To misinform, misrepresent or mislead**, including:
1. providing false or inaccurate information in relation to your access to
or use of Output;
2. misrepresenting your relationship with Google - including by using
Google’s trademarks, trade names, logos or suggesting endorsement by
Google without Google’s permission to do so - nothing in these Terms
grants such permission;
3. misrepresenting the origin of Output;
4. distributing misleading claims of expertise or capability, or engaging
in the unauthorized or unlicensed practice of any profession,
particularly in sensitive areas (*e.g.*, health); or
5. making decisions in domains that affect material or individual rights or
well-being (*e.g.*, healthcare).
3. **To perform, promote or facilitate dangerous, illegal or malicious
activities**, including:
1. promoting or facilitating the sale of, or providing instructions for
synthesizing or accessing, illegal substances, goods or services;
2. abusing, harming, interfering, or disrupting any services, including
generating or distributing content for deceptive or fraudulent
activities or malware;
3. generating or distributing any content that infringes, misappropriates,
or otherwise violates any individual’s or entity’s rights (including,
but not limited to rights in copyrighted content); or
4. attempting to circumvent these Terms.
4. **To train or create machine learning models or related technology for
biomolecular structure prediction similar to AlphaFold 3 as made available
by Google ("Derived Models"),** including via distillation or other
methods**.** For the avoidance of doubt, the use restrictions set out in
these Terms would apply in full to any Derived Models created in breach of
these Terms.
5. **Without providing conspicuous notice that published or distributed Output
is provided under and subject to these Terms and of any modifications you
make to Output.**
1. This means if you remove, or cause to be removed (for example by using
third-party software), these Terms, or any notice of these Terms, from
Output, you must ensure further distribution or publication is
accompanied by a copy of the
[AlphaFold 3 Output Terms of Use](https://github.com/google-deepmind/alphafold3/blob/main/OUTPUT_TERMS_OF_USE.md)
and a "*Legally Binding Terms of Use*" text file that contains the
following notice:
"*By using this information, you agree to AlphaFold 3 Output Terms of
Use found at
https://github.com/google-deepmind/alphafold3/blob/main/OUTPUT_TERMS_OF_USE.md.*
*To request access to the AlphaFold 3 model parameters, follow the
process set out at https://github.com/google-deepmind/alphafold3. You
may only use these if received directly from Google. Use is subject to
terms of use available at
https://github.com/google-deepmind/alphafold3/blob/main/WEIGHTS_TERMS_OF_USE.md.*"
2. You must not include any additional or different terms that conflict
with the
[AlphaFold 3 Output Terms of Use](https://github.com/google-deepmind/alphafold3/blob/main/OUTPUT_TERMS_OF_USE.md).
6. **Distribute Output, or disclose findings arising from using AlphaFold 3
without citing our paper:** [Abramson, J et al. Accurate structure
prediction of biomolecular interactions with AlphaFold 3. *Nature*
(2024)](https://www.nature.com/articles/s41586-024-07487-w). For the
avoidance of doubt, this is an additional requirement to the notice
requirements set out above.
We grant you a non-exclusive, royalty-free, revocable, non-transferable and
non-sublicensable (except as expressly permitted in these Terms) license to any
intellectual property rights we have in Output to the extent necessary for these
purposes. You agree that your right to use and share Output is subject to your
compliance with these Terms. If you breach these Terms, Google reserves the
right to request that you delete and cease use or sharing of Output in your
possession or control and prohibit you from using the AlphaFold 3 Assets
(including as made available via
[AlphaFold Server](https://alphafoldserver.com/about)). You agree to immediately
comply with any such request.
## Disclaimers
Nothing in these Terms restricts any rights that cannot be restricted under
applicable law or limits Google’s responsibilities except as allowed by
applicable law.
**Output are provided on an "as is" basis, without warranties or conditions of
any kind, either express or implied, including 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
distributing any of the Output and assume any and all risks associated with your
use or distribution of any Output and your exercise of rights and obligations
under these Terms. You and anyone you share Output with are solely responsible
for these and their subsequent uses.**
**Output are predictions with varying levels of confidence and should be
interpreted carefully. Use discretion before relying on, publishing, downloading
or otherwise using Output.**
**Output are for theoretical modeling only. These are not intended, validated,
or approved for clinical use. You should not use these 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.**
## Liabilities
To the extent allowed by applicable law, you will indemnify Google and its
directors, officers, employees, and contractors for any third-party legal
proceedings (including actions by government authorities) arising out of or
relating to your unlawful use of Output or violation of these Terms. This
indemnity covers any liability or expense arising from claims, losses, damages,
judgments, fines, litigation costs, and legal fees, except to the extent a
liability or expense is caused by Google's breach, negligence, or willful
misconduct. If you are legally exempt from certain responsibilities, including
indemnification, then those responsibilities don’t apply to you under these
terms.
In no circumstances will Google be responsible for any indirect, special,
incidental, exemplary, consequential, or punitive damages, or lost profits of
any kind, even if Google has been advised of the possibility of such damages.
Google’s total, aggregate liability for all claims arising out of or in
connection with these Terms or Output, including for its own negligence, is
limited to $500.
## Governing law and disputes
These Terms will be governed by the laws of the State of California. The state
or federal courts of Santa Clara County, California shall have exclusive
jurisdiction of any dispute arising out of these Terms.
Given the nature of scientific research, it may take some time for any breach of
these Terms to become apparent. To the extent allowed by applicable law, any
legal claims relating to these Terms or Output can be initiated until the later
of (a) the cut-off date under applicable law for bringing the legal claim; or
(b) two years from the date you or Google (as applicable) became aware, or
should reasonably have become aware, of the facts giving rise to that claim. You
will not argue limitation, time bar, delay, waiver or the like in an attempt to
bar an action filed within that time period, and neither will we.
All rights not specifically and expressly granted to you by these Terms are
reserved to Google. No delay, act or omission by Google in exercising any right
or remedy will be deemed a waiver of any breach of these Terms and Google
expressly reserves any and all rights and remedies available under these Terms
or at law or in equity or otherwise, including the remedy of injunctive relief
against any threatened or actual breach of these Terms without the necessity of
proving actual damages.
## Miscellaneous
Google may update these Terms (1) to reflect changes in how it does business,
(2) for legal, regulatory or security reasons, or (3) to prevent abuse or harm.
The version of these Terms that were effective on the date the relevant Output
was generated will apply to your use of that Output.
If it turns out that a particular provision of these Terms is not valid or
enforceable, this will not affect any other provisions.
================================================
FILE: README.md
================================================

# 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. To
request access to the AlphaFold 3 model parameters, please complete
[this form](https://forms.gle/svvpY4u2jsHEwWYS6). Access will be granted at
Google DeepMind’s sole discretion. We will aim to respond to requests within 2–3
business days. 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).
## 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!
## 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
The AlphaFold 3 source code is licensed under the Creative Commons
Attribution-Non-Commercial ShareAlike International License, Version 4.0
(CC-BY-NC-SA 4.0) (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
[https://github.com/google-deepmind/alphafold3/blob/main/LICENSE](https://github.com/google-deepmind/alphafold3/blob/main/LICENSE).
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.
================================================
FILE: WEIGHTS_PROHIBITED_USE_POLICY.md
================================================
# ALPHAFOLD 3 MODEL PARAMETERS PROHIBITED USE POLICY
Last Modified: 2024-11-09
AlphaFold 3 can help you accelerate scientific research by predicting the 3D
structure of biological molecules. Google makes the AlphaFold Assets available
free of charge for certain non-commercial uses in accordance with the
restrictions set out below. This policy uses the same defined terms as the
[AlphaFold 3 Model Parameters Terms of Use](https://github.com/google-deepmind/alphafold3/blob/main/WEIGHTS_TERMS_OF_USE.md).
**You must not access or use nor allow others to access or use the AlphaFold 3
Assets:**
1. **On behalf of a commercial organization or in connection with any
commercial activities, including research on behalf of commercial
organizations.**
1. This means that only non-commercial organizations (*i.e.*, universities,
non-profit organizations and research institutes, educational,
journalism and government bodies) may use the AlphaFold 3 Assets for
their non-commercial activities. The AlphaFold 3 Assets are not
available for any other types of organization, even if conducting
non-commercial work.
2. If you are a researcher affiliated with a non-commercial organization,
provided **you are not a commercial organisation or acting on behalf of
a commercial organisation,** you can use the AlphaFold 3 Assets for your
non-commercial affiliated research.
3. You must not share the AlphaFold 3 Assets with any commercial
organization or use the AlphaFold 3 Assets in a manner that will grant a
commercial organization any rights in these. The only exception is
making Output publicly available (including indirectly to commercial
organizations) via a scientific publication or open source release or
using it to support journalism, each of which is permitted.
2. **To misinform, misrepresent or mislead**, including:
1. providing false or inaccurate information in relation to your access to
or use of AlphaFold 3 or Output, including accessing or using the Model
Parameters on behalf of an organization without telling us or submitting
a request to access the Model Parameters where Google has prohibited
your use of AlphaFold 3 in full or in part (including as made available
via [AlphaFold Server](https://alphafoldserver.com/about));
2. misrepresenting your relationship with us, including by using Google’s
trademarks, trade names, logos or suggesting endorsement by Google
without Google’s permission to do so - nothing in the Terms grants such
permission;
3. misrepresenting the origin of AlphaFold 3 in full or in part;
4. distributing misleading claims of expertise or capability, or engaging
in the unauthorized or unlicensed practice of any profession,
particularly in sensitive areas (*e.g.*, health); or
5. to make decisions in domains that affect material or individual rights
or well-being (*e.g.*, healthcare).
3. **To perform, promote or facilitate dangerous, illegal or malicious
activities**, including:
1. promoting or facilitating the sale of, or providing instructions for
synthesizing or accessing, illegal substances, goods or services;
2. abusing, harming, interfering, or disrupting any services, including
generating or distributing content for deceptive or fraudulent
activities or malware;
3. generating or distributing any content, including Output, that
infringes, misappropriates, or otherwise violates any individual's or
entity's rights (including, but not limited to rights in copyrighted
content); or
4. attempting to circumvent, or intentionally causing (directly or
indirectly) AlphaFold 3 to act in a manner that contravenes the Terms.
**You must not nor allow others to:**
1. **Use Output to train or create machine learning models or related
technology for biomolecular structure prediction similar to AlphaFold 3
("Derived Models"),** including via distillation or other methods. For the
avoidance of doubt, the use restrictions set out in the Terms would apply in
full to any Derived Models created in breach of the Terms.
2. **Distribute Output without providing conspicuous notice that what you
Distribute is provided under and subject to the
[AlphaFold 3 Output Terms of Use](https://github.com/google-deepmind/alphafold3/blob/main/OUTPUT_TERMS_OF_USE.md)
and of any modifications you make.**
1. This means if you remove, or cause to be removed (for example by using
third-party software), the notices and terms we provide when you
generate Output using AlphaFold 3, you must ensure any further
Distribution of Output is accompanied by a copy of the
[AlphaFold 3 Output Terms of Use](https://github.com/google-deepmind/alphafold3/blob/main/OUTPUT_TERMS_OF_USE.md)
and a "Legally Binding Terms of Use" text file that contains the
following notice:
"*By using this information, you agree to AlphaFold 3 Output Terms of
Use found at
https://github.com/google-deepmind/alphafold3/blob/main/OUTPUT_TERMS_OF_USE.md.*
*To request access to the AlphaFold 3 model parameters, follow the
process set out at https://github.com/google-deepmind/alphafold3. You
may only use these if received directly from Google. Use is subject to
terms of use available at
https://github.com/google-deepmind/alphafold3/blob/main/WEIGHTS_TERMS_OF_USE.md.*"
2. You must not include any additional or different terms that conflict
with the
[AlphaFold 3 Output Terms of Use](https://github.com/google-deepmind/alphafold3/blob/main/OUTPUT_TERMS_OF_USE.md).
3. **Distribute Output, or disclose findings arising from using AlphaFold 3
without citing our paper:** [Abramson, J et al. Accurate structure
prediction of biomolecular interactions with AlphaFold 3. *Nature*
(2024)](https://www.nature.com/articles/s41586-024-07487-w). For the
avoidance of doubt, this is an additional requirement to the notice
requirements set out above.
4. **Circumvent access restrictions relating to the Model Parameters, including
utilising, sharing or making available the Model Parameters when you have
not been expressly authorized to do so by Google.** Google will grant access
to the Model Parameters to either:
1. you for your individual use on behalf of your organization, in which
case you cannot share your copy of Model Parameters with anyone else; or
2. an authorized representative of your organization, with full legal
authority to bind that organization to these Terms in which case you may
share that organization’s copy of the Model Parameters with employees,
consultants, contractors and agents of the organization as authorized by
that representative.
================================================
FILE: WEIGHTS_TERMS_OF_USE.md
================================================
# ALPHAFOLD 3 MODEL PARAMETERS TERMS OF USE
Last Modified: 2024-11-09
[AlphaFold 3](https://blog.google/technology/ai/google-deepmind-isomorphic-alphafold-3-ai-model/)
is an AI model developed by [Google DeepMind](https://deepmind.google/) and
[Isomorphic Labs](https://www.isomorphiclabs.com/). It generates 3D structure
predictions of biological molecules, providing model confidence for the
structure predictions. We make the trained model parameters and output generated
using those available free of charge for certain non-commercial uses, in
accordance with these terms of use and the
[AlphaFold 3 Model Parameters Prohibited Use Policy](https://github.com/google-deepmind/alphafold3/blob/main/WEIGHTS_PROHIBITED_USE_POLICY.md).
**Key things to know when using the AlphaFold 3 model parameters and output**
1. The AlphaFold 3 model parameters and output are **only** available for
non-commercial use by, or on behalf of, non-commercial organizations
(*i.e.*, universities, non-profit organizations and research institutes,
educational, journalism and government bodies). If you are a researcher
affiliated with a non-commercial organization, provided **you are not a
commercial organisation or acting on behalf of a commercial organisation,**
this means you can use these for your non-commercial affiliated research.
2. You **must not** use nor allow others to use:
1. AlphaFold 3 model parameters or output in connection with **any
commercial activities, including research** **on behalf of commercial
organizations;** or
2. AlphaFold 3 output to **train machine learning models** or related
technology for **biomolecular structure prediction** similar to
AlphaFold 3.
3. You ***must not* publish or share AlphaFold 3 model parameters**, except
sharing these within your organization in accordance with these Terms.
4. You ***can* publish, share and adapt AlphaFold 3 *output*** in accordance
with these Terms, including the requirements to provide clear notice of any
modifications you make and that ongoing use of AlphaFold 3 output and
derivatives are subject to the
[AlphaFold 3 Output Terms of Use](https://github.com/google-deepmind/alphafold3/blob/main/OUTPUT_TERMS_OF_USE.md).
By using, reproducing, modifying, performing, distributing or displaying any
portion or element of the Model Parameters (as defined below) or otherwise
accepting the terms of this agreement, you agree to be bound by (1) these terms
of use, and (2) the
[AlphaFold 3 Model Parameters Prohibited Use Policy](https://github.com/google-deepmind/alphafold3/blob/main/WEIGHTS_PROHIBITED_USE_POLICY.md)
which is incorporated herein by reference (together, the "**Terms**"), in each
case (a) as modified from time to time in accordance with the Terms, and (b)
between you and (i) if you are from a country in the European Economic Area or
Switzerland, Google Ireland Limited, or (ii) otherwise, Google LLC.
You confirm you are authorized either explicitly or implicitly to enter, and are
entering, into the Terms as an employee on behalf of, or otherwise on behalf of,
your organization.
Please read these Terms carefully. They establish what you can expect from us as
you access and use the AlphaFold 3 Assets (as defined below), and what Google
expects from you. When we say "**you**", we mean the individual or organization
using the AlphaFold 3 Assets. When we say "**we**", "**us**" or "**Google**", we
mean the entities that belong to the Google group of companies, which means
Google LLC and its affiliates.
## 1. Key Definitions
As used in these Terms:
"**AlphaFold 3**" means: (a) the AlphaFold 3 source code made available
[here](https://github.com/google-deepmind/alphafold3/) and licensed under the
terms of the Creative Commons Attribution-NonCommercial-Sharealike 4.0
International (CC-BY-NC-SA 4.0) license and any derivative source code, and (b)
Model Parameters.
"**AlphaFold 3 Assets**" means the Model Parameters and Output.
"**Distribution**" or "**Distribute**" means any transmission, publication, or
other sharing of Output publicly or to any other person.
"**Model Parameters**" means the trained model weights and parameters made
available by Google to organizations (at its sole discretion) for their use in
accordance with these Terms, together with (a) modifications to those weights
and parameters, (b) works based on those weights and parameters, or (c) other
code or machine learning models which incorporate, in full or in part, those
weights and parameters.
"**Output**" means the structure predictions and all ancillary and related
information provided by AlphaFold 3 or using the Model Parameters, together with
any visual representations, computational predictions, descriptions,
modifications, copies, or adaptations that are substantially derived from
Output.
"**Including"** means "**including without limitation**".
## 2. Accessing and using the AlphaFold 3 Assets
Subject to your compliance with the Terms, including the
[AlphaFold 3 Model Parameters Prohibited Use Policy](https://github.com/google-deepmind/alphafold3/blob/main/WEIGHTS_PROHIBITED_USE_POLICY.md),
you may access, use and modify the AlphaFold 3 Assets and Distribute the Output
as set out in these Terms. We grant you a non-exclusive, royalty-free,
revocable, non-transferable and non-sublicensable (except as expressly permitted
in these Terms) license to any intellectual property rights we have in the
AlphaFold Assets to the extent necessary for these purposes. In order to verify
your access and use of AlphaFold 3, we may from time-to-time ask for additional
information from you, including verification of your name, organization, and
other identifying information.
By accessing, using, or modifying the AlphaFold 3 Assets, Distributing Output,
or requesting to access the Model Parameters, you represent and warrant that (a)
you have full power and authority to enter into these Terms (including being of
sufficient age of consent), (b) Google has never previously terminated your
access and right to use AlphaFold 3 (including as made available via
[AlphaFold Server](https://alphafoldserver.com/about)) due to your breach of
applicable terms of use, (c) entering into or performing your rights and
obligations under these Terms will not violate any agreement you have with a
third party or any third-party rights, (d) any information provided by you to
Google in relation to AlphaFold 3, including (where applicable) in order to
request access to the Model Parameters, is correct and current, and (e) you are
not (i) resident of a embargoed country, (ii) ordinarily resident in a US
embargoed country, or (iii) otherwise prohibited by applicable export controls
and sanctions programs from accessing, using, or modifying the AlphaFold 3
Assets.
If you choose to give Google feedback, such as suggestions to improve AlphaFold
3, you undertake any such information is non-confidential and non-proprietary,
and Google may act on your feedback without obligation to you.
## 3. Use Restrictions
You must not use any of the AlphaFold 3 Assets:
1. for the restricted uses set forth in the
[AlphaFold 3 Model Parameters Prohibited Use Policy](https://github.com/google-deepmind/alphafold3/blob/main/WEIGHTS_PROHIBITED_USE_POLICY.md);
or
2. in violation of applicable laws and regulations.
To the maximum extent permitted by law and without limiting any of our other
rights, Google reserves the right to revoke your right to use, and (to the
extent feasible) restrict usage of any of the AlphaFold 3 Assets that Google
reasonably believes is in violation of these Terms.
## 4. Generated Output
Although you must comply with these Terms when using the AlphaFold 3 Assets, we
will not claim ownership in original Output you generate using AlphaFold 3.
However, you acknowledge that AlphaFold 3 may generate the same or similar
Output for multiple users, including Google, and we reserve all our rights in
this respect.
## 5. Changes to the AlphaFold 3 Assets or these Terms
Google may add or remove functionalities or features of the AlphaFold 3 Assets
at any time and may stop offering access to the AlphaFold 3 Assets altogether.
Google may update these Terms and the access mechanism for the Model Parameters
at any time. We'll post any modifications to the Terms
[in the AlphaFold 3 GitHub repository](https://github.com/google-deepmind/alphafold3).
Changes will generally become effective 14 days after they are posted. However,
changes addressing functionality or made for legal reasons will be effective
immediately.
You should review the Terms whenever we update them or you use the AlphaFold 3
Assets. If you do not agree to any modifications to the Terms, you must stop
using the AlphaFold 3 Assets immediately.
## 6. Suspending or terminating your right to use the AlphaFold 3 Assets
Google may at any time suspend or terminate your right to use and, as applicable
access to, the AlphaFold 3 Assets because of, among other reasons, your failure
to fully comply with the Terms. If Google suspends or terminates your right to
access or use the AlphaFold 3 Assets, you must immediately delete and cease use
and Distribution of all copies of the AlphaFold 3 Assets in your possession or
control and are prohibited from using the AlphaFold 3 Assets, including by
submitting an application to use the Model Parameters. Google will endeavour to
give you reasonable notice prior to any such suspension or termination, but no
notice or prior warning will be given if the suspension or termination is for
your failure to fully comply with the Terms or other serious grounds.
Of course, you are always free to stop using the AlphaFold 3 Assets. If you do
stop using these, we would appreciate knowing why (via
[alphafold@google.com](mailto:alphafold@google.com)) so that we can continue to
improve our technologies.
## 7. Confidentiality
You agree not to disclose or make available Google Confidential Information to
anyone without our prior written consent. "**Google Confidential Information**"
means (a) the AlphaFold 3 Model Parameters and all software, technology and
documentation relating to AlphaFold 3, except for the AlphaFold 3 source code,
and (b) any other information made available by Google that is marked
confidential or would normally be considered confidential under the
circumstances in which it is presented. Google Confidential Information does not
include (a) information that you already knew prior to your access to, or use
of, the AlphaFold 3 Assets (including via
[AlphaFold Server](https://alphafoldserver.com/about)), (b) that becomes public
through no fault of yours (for example, your breach of the Terms), (c) that was
independently developed by you without reference to Google Confidential
Information, or (d) that was lawfully given to you by a third party (without
your or their breach of the Terms).
## 8. Disclaimers
Nothing in the Terms restricts any rights that cannot be restricted under
applicable law or limits Google's responsibilities except as allowed by
applicable law.
**AlphaFold 3 and Output are provided on an "as is" basis, without warranties or
conditions of any kind, either express or implied, including 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 AlphaFold 3, or using or distributing Output, and
assume any and all risks associated with such use or distribution and your
exercise of rights and obligations under these Terms. You and anyone you share
Output with are solely responsible for these and their subsequent uses.**
**Output are predictions with varying levels of confidence and should be
interpreted carefully. Use discretion before relying on, publishing, downloading
or otherwise using AlphaFold 3.**
**AlphaFold 3 and Outputs are for theoretical modeling only. They are not
intended, validated, or approved for clinical use. You should not use AlphaFold
3 or 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.**
## 9. Liabilities
To the extent allowed by applicable law, you will indemnify Google and its
directors, officers, employees, and contractors for any third-party legal
proceedings (including actions by government authorities) arising out of or
relating to your unlawful use of the AlphaFold 3 Assets or violation of the
Terms. This indemnity covers any liability or expense arising from claims,
losses, damages, judgments, fines, litigation costs, and legal fees, except to
the extent a liability or expense is caused by Google's breach, negligence, or
willful misconduct. If you are legally exempt from certain responsibilities,
including indemnification, then those responsibilities do not apply to you under
the Terms.
In no circumstances will Google be responsible for any indirect, special,
incidental, exemplary, consequential, or punitive damages, or lost profits of
any kind in connection with the Terms or the AlphaFold 3 Assets, even if Google
has been advised of the possibility of such damages. Google's total aggregate
liability for all claims arising out of or in connection with the Terms or the
AlphaFold 3 Assets, including for its own negligence, is limited to $500.
## 10. Miscellaneous
By law, you have certain rights that cannot be limited by a contract like the
Terms. The Terms are in no way intended to restrict those rights.
The Terms are our entire agreement relating to your use of the AlphaFold 3
Assets and supersede any prior or contemporaneous agreements on that subject.
If it turns out that a particular provision of the Terms is not enforceable, the
balance of the Terms will remain in full force and effect.
## 11. Disputes
California law will govern all disputes arising out of or relating to the Terms
or in connection to the AlphaFold 3 Assets. These disputes will be resolved
exclusively in the federal or state courts of Santa Clara County, California,
USA and you and Google consent to personal jurisdiction in those courts. To the
extent that applicable local law prevents certain disputes from being resolved
in a California court, you and Google can file those disputes in your local
courts. If applicable local law prevents your local court from applying
California law to resolve these disputes, then these disputes will be governed
by the applicable local laws of your country, state, or other place of
residence. If you are using the AlphaFold 3 Assets on behalf of a government
organization other than US federal government organizations (where the foregoing
provisions shall apply to the extent permitted by federal law), these Terms will
be silent regarding governing law and courts.
Given the nature of scientific research, it may take some time for any breach of
the Terms to become apparent. To protect you, Google and the AlphaFold 3 Assets,
to the extent allowed by applicable law you agree that:
1. any legal claims relating to the Terms or the AlphaFold 3 Assets can be
initiated until the later of:
1. the cut-off date under applicable law for bringing the legal claim; or
2. two years from the date you or Google (as applicable) became aware, or
should reasonably have become aware, of the facts giving rise to that
claim; and
2. you will not argue limitation, time bar, delay, waiver, or the like in an
attempt to bar an action filed within that time period, and neither will
Google.
All rights not specifically and expressly granted to you by the Terms are
reserved to Google. No delay, act or omission by Google in exercising any right
or remedy will be deemed a waiver of any breach of the Terms and Google
expressly reserves any and all rights and remedies available under the Terms or
at law or in equity or otherwise, including the remedy of injunctive relief
against any threatened or actual breach of the Terms without the necessity of
proving actual damages.
================================================
FILE: docker/Dockerfile
================================================
# Copyright 2024 DeepMind Technologies Limited
#
# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a copy of
# this license, visit https://creativecommons.org/licenses/by-nc-sa/4.0/
#
# To request access to the AlphaFold 3 model parameters, follow the process set
# out at https://github.com/google-deepmind/alphafold3. You may only use these
# if received directly from Google. Use is subject to terms of use available at
# https://github.com/google-deepmind/alphafold3/blob/main/WEIGHTS_TERMS_OF_USE.md
FROM nvidia/cuda:12.6.3-base-ubuntu24.04
# Some RUN statements are combined together to make Docker build run faster.
# Get latest package listing, install python, git, wget, compilers and libs.
# * git is required for pyproject.toml toolchain's use of CMakeLists.txt.
# * gcc, g++, make are required for compiling HMMER and AlphaFold 3 libaries.
# * zlib is a required dependency of AlphaFold 3.
RUN DEBIAN_FRONTEND=noninteractive \
apt-get update --quiet \
&& apt-get install --yes --quiet python3.12 python3.12-dev \
&& apt-get install --yes --quiet git wget gcc g++ make zlib1g-dev zstd
# Install uv from the official repository. The version is pinned for
# reproducibility.
COPY --from=ghcr.io/astral-sh/uv:0.9.24 /uv /uvx /bin/
# UV_COMPILE_BYTECODE=1 speeds up future container starts.
# UV_PROJECT_ENVIRONMENT explicitly sets the virtual environment location.
ENV UV_COMPILE_BYTECODE=1
ENV UV_PROJECT_ENVIRONMENT=/alphafold3_venv
RUN uv venv $UV_PROJECT_ENVIRONMENT
ENV PATH="/hmmer/bin:/alphafold3_venv/bin:$PATH"
# Install HMMER. Do so before copying the source code, so that docker can cache
# the image layer containing HMMER. Alternatively, you could also install it
# using `apt-get install hmmer` instead of bulding it from source, but we want
# to have control over the exact version of HMMER and also apply the sequence
# limit patch. Also note that eddylab.org unfortunately doesn't support HTTPS
# and the tar file published on GitHub is explicitly not recommended to be used
# for building from source.
# Download, check hash, and extract the HMMER source code.
RUN mkdir /hmmer_build /hmmer ; \
wget http://eddylab.org/software/hmmer/hmmer-3.4.tar.gz --directory-prefix /hmmer_build ; \
(cd /hmmer_build && echo "ca70d94fd0cf271bd7063423aabb116d42de533117343a9b27a65c17ff06fbf3 hmmer-3.4.tar.gz" | sha256sum --check) && \
(cd /hmmer_build && tar zxf hmmer-3.4.tar.gz && rm hmmer-3.4.tar.gz)
# Apply the --seq_limit patch to HMMER.
COPY docker/jackhmmer_seq_limit.patch /hmmer_build/
RUN (cd /hmmer_build && patch -p0 < jackhmmer_seq_limit.patch)
# Build HMMER.
RUN (cd /hmmer_build/hmmer-3.4 && ./configure --prefix /hmmer) ; \
(cd /hmmer_build/hmmer-3.4 && make -j) ; \
(cd /hmmer_build/hmmer-3.4 && make install) ; \
(cd /hmmer_build/hmmer-3.4/easel && make install) ; \
rm -R /hmmer_build
# Copy the AlphaFold 3 source code from the local machine to the container and
# set the working directory to there.
COPY . /app/alphafold
WORKDIR /app/alphafold
# Install the exact dependency tree using uv and cache the build artifacts.
# --frozen: do not update the lockfile during build.
# --all-groups: install development/test dependencies defined in pyproject.toml.
# --no-editable: install as a static package.
# If using this as a recipe for local installation, we recommend removing the
# --frozen and --no-editable flags.
RUN --mount=type=cache,target=/root/.cache/uv \
UV_LINK_MODE=copy uv sync --frozen --all-groups --no-editable
# Build chemical components database (this binary was installed by uv sync).
RUN uv run build_data
# To work around a known XLA issue causing the compilation time to greatly
# increase, the following environment variable setting XLA flags must be enabled
# when running AlphaFold 3. Note that if using CUDA capability 7 GPUs, it is
# necessary to set the following XLA_FLAGS value instead:
# ENV XLA_FLAGS="--xla_disable_hlo_passes=custom-kernel-fusion-rewriter"
# (no need to disable gemm in that case as it is not supported for such GPU).
ENV XLA_FLAGS="--xla_gpu_enable_triton_gemm=false"
# Memory settings used for folding up to 5,120 tokens on A100 80 GB.
ENV XLA_PYTHON_CLIENT_PREALLOCATE=true
ENV XLA_CLIENT_MEM_FRACTION=0.95
CMD ["uv", "run", "python3", "run_alphafold.py"]
================================================
FILE: docker/dockerignore
================================================
dockerignore
Dockerfile
================================================
FILE: docker/jackhmmer_seq_limit.patch
================================================
--- hmmer-3.4/src/jackhmmer.c
+++ hmmer-3.4/src/jackhmmer.c
@@ -73,6 +73,7 @@ static ESL_OPTIONS options[] = {
{ "--noali", eslARG_NONE, FALSE, NULL, NULL, NULL, NULL, NULL, "don't output alignments, so output is smaller", 2 },
{ "--notextw", eslARG_NONE, NULL, NULL, NULL, NULL, NULL, "--textw", "unlimit ASCII text output line width", 2 },
{ "--textw", eslARG_INT, "120", NULL, "n>=120", NULL, NULL, "--notextw", "set max width of ASCII text output lines", 2 },
+ { "--seq_limit", eslARG_INT, NULL, NULL, NULL, NULL, NULL, "--seq_limit", "if set, truncate all hits after this value is reached", 2 },
/* Control of scoring system */
{ "--popen", eslARG_REAL, "0.02", NULL, "0<=x<0.5",NULL, NULL, NULL, "gap open probability", 3 },
{ "--pextend", eslARG_REAL, "0.4", NULL, "0<=x<1", NULL, NULL, NULL, "gap extend probability", 3 },
@@ -298,6 +299,7 @@ output_header(FILE *ofp, ESL_GETOPTS *go
if (esl_opt_IsUsed(go, "--noali") && fprintf(ofp, "# show alignments in output: no\n") < 0) ESL_EXCEPTION_SYS(eslEWRITE, "write failed");
if (esl_opt_IsUsed(go, "--notextw") && fprintf(ofp, "# max ASCII text line length: unlimited\n") < 0) ESL_EXCEPTION_SYS(eslEWRITE, "write failed");
if (esl_opt_IsUsed(go, "--textw") && fprintf(ofp, "# max ASCII text line length: %d\n", esl_opt_GetInteger(go, "--textw")) < 0) ESL_EXCEPTION_SYS(eslEWRITE, "write failed");
+ if (esl_opt_IsUsed(go, "--seq_limit") && fprintf(ofp, "# set max sequence hits to return: %d\n", esl_opt_GetInteger(go, "--seq_limit")) < 0) ESL_EXCEPTION_SYS(eslEWRITE, "write failed");
if (esl_opt_IsUsed(go, "--popen") && fprintf(ofp, "# gap open probability: %f\n", esl_opt_GetReal (go, "--popen")) < 0) ESL_EXCEPTION_SYS(eslEWRITE, "write failed");
if (esl_opt_IsUsed(go, "--pextend") && fprintf(ofp, "# gap extend probability: %f\n", esl_opt_GetReal (go, "--pextend")) < 0) ESL_EXCEPTION_SYS(eslEWRITE, "write failed");
if (esl_opt_IsUsed(go, "--mx") && fprintf(ofp, "# subst score matrix (built-in): %s\n", esl_opt_GetString (go, "--mx")) < 0) ESL_EXCEPTION_SYS(eslEWRITE, "write failed");
@@ -674,6 +676,13 @@ serial_master(ESL_GETOPTS *go, struct cf
/* Print the results. */
p7_tophits_SortBySortkey(info->th);
p7_tophits_Threshold(info->th, info->pli);
+ /* Limit the number of hits if specified. */
+ if (esl_opt_IsOn(go, "--seq_limit"))
+ {
+ int seq_limit = esl_opt_GetInteger(go, "--seq_limit");
+ info->th->N = ESL_MIN(info->th->N, seq_limit);
+ }
+
p7_tophits_CompareRanking(info->th, kh, &nnew_targets);
p7_tophits_Targets(ofp, info->th, info->pli, textw); if (fprintf(ofp, "\n\n") < 0) ESL_EXCEPTION_SYS(eslEWRITE, "write failed");
p7_tophits_Domains(ofp, info->th, info->pli, textw); if (fprintf(ofp, "\n\n") < 0) ESL_EXCEPTION_SYS(eslEWRITE, "write failed");
================================================
FILE: docs/community_tools.md
================================================
# Community Tools
## JAAG: a JSON input file Assembler for AlphaFold 3 (with Glycan Integration)
JAAG is a lightweight, web-based GUI tool that helps generate AlphaFold 3 input
JSON files with integrated glycan support. It automates the creation of correct
glycan syntax (including `bondedAtomPairs` + CCD), reducing manual errors when
preparing glycoprotein or glycan–protein complexes.
* Web app: https://biofgreat.org/JAAG
* Source code: https://github.com/chinchc/JAAG
* Paper: https://doi.org/10.1093/glycob/cwaf083
Note: JAAG is compatible with standalone AlphaFold 3, but not with the AlphaFold
3 server.
## Modeling glycans with AlphaFold 3: capabilities, caveats, and limitations
Paper on modeling glycans (and other ligands) with AF3 that modeled and assessed
major glycan classes and provides:
* Step-by-step tutorial for building ligand inputs (applicable beyond glycans)
* Ready-to-run scripts for each glycan class
* Comprehensive CCD table for all SNFG monosaccharides
* Discussion of caveats and limitations of AF3
* Full AF3 inputs/outputs archived on ModelArchive for reproducibility
Useful resource if your AF3 ligand models appear stereochemically off.
* Paper: https://doi.org/10.1093/glycob/cwaf048
* ModelArchive: https://doi.org/10.5452/ma-af3glycan
================================================
FILE: docs/contributing.md
================================================
# How to Contribute
We welcome small patches related to bug fixes and documentation, but we do not
plan to make any major changes to this repository.
## Before You Begin
### Sign Our Contributor License Agreement
Contributions to this project must be accompanied by a
[Contributor License Agreement](https://cla.developers.google.com/about) (CLA).
You (or your employer) retain the copyright to your contribution; this simply
gives us permission to use and redistribute your contributions as part of the
project.
If you or your current employer have already signed the Google CLA (even if it
was for a different project), you probably don't need to do it again.
Visit <https://cla.developers.google.com/> to see your current agreements or to
sign a new one.
### Review Our Community Guidelines
This project follows
[Google's Open Source Community Guidelines](https://opensource.google/conduct/).
## Contribution Process
We won't accept pull requests directly, but if you send one, we will review it.
If we send a fix based on your pull request, we will make sure to credit you in
the release notes.
================================================
FILE: docs/input.md
================================================
# AlphaFold 3 Input
## Specifying Input Files
You can provide inputs to `run_alphafold.py` in one of two ways:
- Single input file: Use the `--json_path` flag followed by the path to a
single JSON file.
- Multiple input files: Use the `--input_dir` flag followed by the path to a
directory of JSON files.
## Input Format
AlphaFold 3 uses a custom JSON input format differing from the
[AlphaFold Server JSON input format](https://github.com/google-deepmind/alphafold/tree/main/server).
See [below](#alphafold-server-json-compatibility) for more information.
The custom AlphaFold 3 format allows:
* Specifying protein, RNA, and DNA chains, including modified residues.
* Specifying custom multiple sequence alignment (MSA) for protein and RNA
chains.
* Specifying custom structural templates for protein chains.
* Specifying ligands using
[Chemical Component Dictionary (CCD)](https://www.wwpdb.org/data/ccd) codes.
* Specifying ligands using SMILES.
* Specifying ligands by defining them using the CCD mmCIF format and supplying
them via the [user-provided CCD](#user-provided-ccd).
* Specifying covalent bonds between entities.
* Specifying multiple random seeds.
## AlphaFold Server JSON Compatibility
The [AlphaFold Server](https://alphafoldserver.com/) uses a separate
[JSON format](https://github.com/google-deepmind/alphafold/tree/main/server)
from the one used here in the AlphaFold 3 codebase. In particular, the JSON
format used in the AlphaFold 3 codebase offers more flexibility and control in
defining custom ligands, branched glycans, and covalent bonds between entities.
We provide a converter in `run_alphafold.py` which automatically detects the
input JSON format, denoted `dialect` in the converter code. The converter
denotes the AlphaFoldServer JSON as `alphafoldserver`, and the JSON format
defined here in the AlphaFold 3 codebase as `alphafold3`. If the detected input
JSON format is `alphafoldserver`, then the converter will translate that into
the JSON format `alphafold3`.
### Multiple Inputs
The top-level of the `alphafoldserver` JSON format is a list, allowing
specification of multiple inputs in a single JSON. In contrast, the `alphafold3`
JSON format requires exactly one input per JSON file. Specifying multiple inputs
in a single `alphafoldserver` JSON is fully supported.
Note that the converter distinguishes between `alphafoldserver` and `alphafold3`
JSON formats by checking if the top-level of the JSON is a list or not. In
particular, if you pass in a `alphafoldserver`-style JSON without a top-level
list, then this is considered incorrect and `run_alphafold.py` will raise an
error.
### Glycans
If the JSON in `alphafoldserver` format specifies glycans, the converter will
raise an error. This is because translating glycans specified in the
`alphafoldserver` format to the `alphafold3` format is not currently supported.
### Random Seeds
The `alphafoldserver` JSON format allows users to specify `"modelSeeds": []`, in
which case a seed is chosen randomly for the user. On the other hand, the
`alphafold3` format requires users to specify a seed.
The converter will choose a seed randomly if `"modelSeeds": []` is set when
translating from `alphafoldserver` JSON format to `alphafold3` JSON format. If
seeds are specified in the `alphafoldserver` JSON format, then those will be
preserved in the translation to the `alphafold3` JSON format.
### Ions
While AlphaFold Server treats ions and ligands as different entity types in the
JSON format, AlphaFold 3 treats ions as ligands. Therefore, to specify e.g. a
magnesium ion, one would specify it as an entity of type `ligand` with
`ccdCodes: ["MG"]`.
### Sequence IDs
The `alphafold3` JSON format requires the user to specify a unique identifier
(`id`) for each entity. On the other hand, the `alphafoldserver` does not allow
specification of an `id` for each entity. Thus, the converter automatically
assigns one.
The converter iterates through the list provided in the `sequences` field of the
`alphafoldserver` JSON format, assigning an `id` to each entity using the
following order ("reverse spreadsheet style"):
```
A, B, ..., Z, AA, BA, CA, ..., ZA, AB, BB, CB, ..., ZB, ...
```
For any entity with `count > 1`, an `id` is assigned arbitrarily to each "copy"
of the entity.
## Top-level Structure
The top-level structure of the input JSON is:
```json
{
"name": "Job name goes here",
"modelSeeds": [1, 2], # At least one seed required.
"sequences": [
{"protein": {...}},
{"rna": {...}},
{"dna": {...}},
{"ligand": {...}}
],
"bondedAtomPairs": [...], # Optional.
"userCCD": "...", # Optional, mutually exclusive with userCCDPath.
"userCCDPath": "...", # Optional, mutually exclusive with userCCD.
"dialect": "alphafold3", # Required.
"version": 4 # Required.
}
```
The fields specify the following:
* `name: str`: The name of the job. A sanitised version of this name is used
for naming the output files.
* `modelSeeds: list[int]`: A list of integer random seeds. The pipeline and
the model will be invoked with each of the seeds in the list. I.e. if you
provide *n* random seeds, you will get *n* predicted structures, each with
the respective random seed. You must provide at least one random seed.
* `sequences: list[Protein | RNA | DNA | Ligand]`: A list of sequence
dictionaries, each defining a molecular entity, see below.
* `bondedAtomPairs: list[Bond]`: An optional list of covalently bonded atoms.
These can link atoms within an entity, or across two entities. See more
below.
* `userCCD: str`: An optional string with user-provided chemical components
dictionary. This is an expert mode for providing custom molecules when
SMILES is not sufficient. This should also be used when you have a custom
molecule that needs to be bonded with other entities - SMILES can't be used
in such cases since it doesn't give the possibility of uniquely naming all
atoms. It can also be used to provide a reference conformer for cases where
RDKit fails to generate a conformer. See more below.
* `userCCDPath: str`: An optional path to a file that contains the
user-provided chemical components dictionary instead of providing it inline
using the `userCCD` field. The path can be either absolute, or relative to
the input JSON path. The file must be in the
[CCD mmCIF format](https://www.wwpdb.org/data/ccd#mmcifFormat), and could be
either plain text, or compressed using gzip, xz, or zstd.
* `dialect: str`: The dialect of the input JSON. This must be set to
`alphafold3`. See
[AlphaFold Server JSON Compatibility](#alphafold-server-json-compatibility)
for more information.
* `version: int`: The version of the input JSON. This must be set to 1 or 2.
See
[AlphaFold Server JSON Compatibility](#alphafold-server-json-compatibility)
and [versions](#versions) below for more information.
## Versions
The top-level `version` field (for the `alphafold3` dialect) can be either `1`,
`2`, or `3`. The following features have been added in respective versions:
* `1`: the initial AlphaFold 3 input format.
* `2`: added the option of specifying external MSA and templates using newly
added fields `unpairedMsaPath`, `pairedMsaPath`, and `mmcifPath`.
* `3`: added the option of specifying external user-provided CCD using newly
added field `userCCDPath`.
* `4`: added the option of specifying textual `description` of protein chains,
RNA chains, DNA chains, or ligands.
## Sequences
The `sequences` section specifies the protein chains, RNA chains, DNA chains,
and ligands. Every entity in `sequences` must have a unique ID. IDs don't have
to be sorted alphabetically.
### Protein
Specifies a single protein chain.
```json
{
"protein": {
"id": "A",
"sequence": "PVLSCGEWQL",
"modifications": [
{"ptmType": "HY3", "ptmPosition": 1},
{"ptmType": "P1L", "ptmPosition": 5}
],
"description": ..., # Optional.
"unpairedMsa": ..., # Mutually exclusive with unpairedMsaPath.
"unpairedMsaPath": ..., # Mutually exclusive with unpairedMsa.
"pairedMsa": ..., # Mutually exclusive with pairedMsaPath.
"pairedMsaPath": ..., # Mutually exclusive with pairedMsa.
"templates": [...]
}
}
```
The fields specify the following:
* `id: str | list[str]`: An uppercase letter or multiple letters specifying
the unique IDs for each copy of this protein chain. The IDs are then also
used in the output mmCIF file. Specifying a list of IDs (e.g. `["A", "B",
"C"]`) implies a homomeric chain with multiple copies.
* `sequence: str`: The amino-acid sequence, specified as a string that uses
the 1-letter standard amino acid codes.
* `modifications: list[ProteinModification]`: An optional list of
post-translational modifications. Each modification is specified using its
CCD code and 1-based residue position. In the example above, we see that the
first residue won't be a proline (`P`) but instead `HY3`.
* `description: str`: An optional textual description of this chain. This
field will is only used in the JSON format and serves as a comment
describing this chain.
* `unpairedMsa: str`: An optional multiple sequence alignment for this chain.
This is specified using the A3M format (equivalent to the FASTA format, but
also allows gaps denoted by the hyphen `-` character). See more details
below.
* `unpairedMsaPath: str`: An optional path to a file that contains the
multiple sequence alignment for this chain instead of providing it inline
using the `unpairedMsa` field. The path can be either absolute, or relative
to the input JSON path. The file must be in the A3M format, and could be
either plain text, or compressed using gzip, xz, or zstd.
* `pairedMsa: str`: We recommend *not* using this optional field and using the
`unpairedMsa` for the purposes of pairing. See more details below.
* `pairedMsaPath: str`: An optional path to a file that contains the multiple
sequence alignment for this chain instead of providing it inline using the
`pairedMsa` field. The path can be either absolute, or relative to the input
JSON path. The file must be in the A3M format, and could be either plain
text, or compressed using gzip, xz, or zstd.
* `templates: list[Template]`: An optional list of structural templates. See
more details below.
### RNA
Specifies a single RNA chain.
```json
{
"rna": {
"id": "A",
"sequence": "AGCU",
"modifications": [
{"modificationType": "2MG", "basePosition": 1},
{"modificationType": "5MC", "basePosition": 4}
],
"description": ..., # Optional.
"unpairedMsa": ..., # Mutually exclusive with unpairedMsaPath.
"unpairedMsaPath": ... # Mutually exclusive with unpairedMsa.
}
}
```
The fields specify the following:
* `id: str | list[str]`: An uppercase letter or multiple letters specifying
the unique IDs for each copy of this RNA chain. The IDs are then also used
in the output mmCIF file. Specifying a list of IDs (e.g. `["A", "B", "C"]`)
implies a homomeric chain with multiple copies.
* `sequence: str`: The RNA sequence, specified as a string using only the
letters `A`, `C`, `G`, `U`.
* `modifications: list[RnaModification]`: An optional list of modifications.
Each modification is specified using its CCD code and 1-based base position.
* `description: str`: An optional textual description of this chain. This
field will is only used in the JSON format and serves as a comment
describing this chain.
* `unpairedMsa: str`: An optional multiple sequence alignment for this chain.
This is specified using the A3M format. See more details below.
* `unpairedMsaPath: str`: An optional path to a file that contains the
multiple sequence alignment for this chain instead of providing it inline
using the `unpairedMsa` field. The path can be either absolute, or relative
to the input JSON path. The file must be in the A3M format, and could be
either plain text, or compressed using gzip, xz, or zstd.
### DNA
Specifies a single DNA chain.
```json
{
"dna": {
"id": "A",
"sequence": "GACCTCT",
"modifications": [
{"modificationType": "6OG", "basePosition": 1},
{"modificationType": "6MA", "basePosition": 2}
],
"description": ... # Optional.
}
}
```
The fields specify the following:
* `id: str | list[str]`: An uppercase letter or multiple letters specifying
the unique IDs for each copy of this DNA chain. The IDs are then also used
in the output mmCIF file. Specifying a list of IDs (e.g. `["A", "B", "C"]`)
implies a homomeric chain with multiple copies.
* `sequence: str`: The DNA sequence, specified as a string using only the
letters `A`, `C`, `G`, `T`.
* `modifications: list[DnaModification]`: An optional list of modifications.
Each modification is specified using its CCD code and 1-based base position.
* `description: str`: An optional textual description of this chain. This
field will is only used in the JSON format and serves as a comment
describing this chain.
### Ligands
Specifies a single ligand. Ligands can be specified using 3 different formats:
1. [CCD code(s)](https://www.wwpdb.org/data/ccd). This is the easiest way to
specify ligands. Supports specifying covalent bonds to other entities. CCD
from 2022-09-28 is used. If multiple CCD codes are specified, you may want
to specify a bond between these and/or a bond to some other entity. See the
[bonds](#bonds) section below.
2. [SMILES string](https://en.wikipedia.org/wiki/Simplified_Molecular_Input_Line_Entry_System).
This enables specifying ligands that are not in CCD. If using SMILES, you
cannot specify covalent bonds to other entities as these rely on specific
atom names - see the next option for what to use for this case.
3. User-provided CCD + custom ligand codes. This enables specifying ligands not
in CCD, while also supporting specification of covalent bonds to other
entities and backup reference coordinates for when RDKit fails to generate a
conformer. This offers the most flexibility, but also requires careful
attention to get all of the details right.
```json
{
"ligand": {
"id": ["G", "H", "I"],
"ccdCodes": ["ATP"],
"description": ... # Optional.
}
},
{
"ligand": {
"id": "J",
"ccdCodes": ["LIG-1337"],
"description": ... # Optional.
}
},
{
"ligand": {
"id": "K",
"smiles": "CC(=O)OC1C[NH+]2CCC1CC2",
"description": ... # Optional.
}
}
```
The fields specify the following:
* `id: str | list[str]`: An uppercase letter (or multiple letters) specifying
the unique ID of this ligand. This ID is then also used in the output mmCIF
file. Specifying a list of IDs (e.g. `["A", "B", "C"]`) implies a ligand
that has multiple copies.
* `ccdCodes: list[str]`: An optional list of CCD codes. These could be either
standard CCD codes, or custom codes pointing to the
[user-provided CCD](#user-provided-ccd).
* `smiles: str`: An optional string defining the ligand using a SMILES string.
The SMILES string must be correctly JSON-escaped.
* `description: str`: An optional textual description of this chain. This
field will is only used in the JSON format and serves as a comment
describing this ligand.
Each ligand may be specified using CCD codes or SMILES but not both, i.e. for a
given ligand, the `ccdCodes` and `smiles` fields are mutually exclusive.
#### SMILES string JSON escaping
The SMILES string must be correctly JSON-escaped, in particular the backslash
character must be escaped as two backslashes, otherwise the JSON parser will
fail with a `JSONDecodeError`. For instance, the following SMILES string
`CCC[C@@H](O)CC\C=C\C=C\C#CC#C\C=C\CO` has to be specified as:
```json
{
"ligand": {
"id": "A",
"smiles": "CCC[C@@H](O)CC\\C=C\\C=C\\C#CC#C\\C=C\\CO"
}
}
```
You can JSON-escape the SMILES string using the
[`jq`](https://github.com/jqlang/jq) command-line tool which should be easily
installable on most Linux systems:
```bash
jq -R . <<< 'CCC[C@@H](O)CC\C=C\C=C\C#CC#C\C=C\CO' # Replace with your SMILES.
```
Alternatively, you can use this Python code:
```python
import json
smiles = r'CCC[C@@H](O)CC\C=C\C=C\C#CC#C\C=C\CO' # Replace with your SMILES.
print(json.dumps(smiles))
```
#### Reference structure construction with SMILES
For some ligands and some random seeds, RDKit might fail to generate a
conformer, indicated by the `Failed to construct RDKit reference structure`
error message. In this case, you can either provide a reference structure for
the ligand using the [user-provided CCD Format](#user-provided-ccd-format), or
try increasing the number of RDKit conformer iterations using the
`--conformer_max_iterations=...` flag.
### Ions
Ions are treated as ligands, e.g. a magnesium ion would simply be a ligand with
`ccdCodes: ["MG"]`.
## Multiple Sequence Alignment
Protein and RNA chains allow setting a custom Multiple Sequence Alignment (MSA).
If not set, the data pipeline will automatically build MSAs for protein and RNA
entities using Jackhmmer/Nhmmer search over genetic databases as described in
the paper.
### RNA Multiple Sequence Alignment
RNA `unpairedMsa` can be either:
1. Unset (or set explicitly to `null`). AlphaFold 3 will build MSA for this RNA
chain automatically. This is the recommended option.
2. Set to an empty string (`""`). AlphaFold 3 won't build the MSA for this RNA
chain and the MSA input to the model will be just the RNA chain (equivalent
to running MSA-free for this RNA chain).
3. Set to a non-empty A3M string. AlphaFold 3 will use the provided MSA for
this RNA chain.
### Protein Multiple Sequence Alignment
For protein chains, the situation is slightly more complicated due to paired and
unpaired MSA (see [MSA Pairing](#msa-pairing) below for more details).
The following combinations are valid for a given protein chain:
1. Both `unpairedMsa` and `pairedMsa` fields are unset (or set explicitly to
`null`), AlphaFold 3 will build both MSAs automatically. This is the
recommended option.
2. The `unpairedMsa` is set to to a non-empty A3M string, `pairedMsa` set to an
empty string (`""`). AlphaFold 3 won't build MSA, will use the `unpairedMsa`
as is and run `pairedMSA`-free.
3. The `pairedMsa` is set to to a non-empty A3M string, `unpairedMsa` set to an
empty string (`""`). AlphaFold 3 won't build MSA, will use the `pairedMsa`
and run `unpairedMSA`-free. **This option is not recommended**, see
[MSA Pairing](#msa-pairing) below.
4. Both `unpairedMsa` and `pairedMsa` fields are set to an empty string (`""`).
AlphaFold 3 will not build the MSA and the MSA input to the model will be
just the query sequence (equivalent to running completely MSA-free).
5. Both `unpairedMsa` and `pairedMsa` fields are set to a custom non-empty A3M
string, AlphaFold 3 will use the provided MSA instead of building one as
part of the data pipeline. This is considered an expert option.
Note that both `unpairedMsa` and `pairedMsa` have to either be *both* set (i.e.
non-`null`), or both unset (i.e. both `null`, explicitly or implicitly).
Typically, when setting `unpairedMsa`, you will set the `pairedMsa` to an empty
string (`""`). For example this will run the protein chain A with the given MSA,
but without any templates (template-free):
```json
{
"protein": {
"id": "A",
"sequence": ...,
"unpairedMsa": "The A3M you want to run with",
"pairedMsa": "",
"templates": []
}
}
```
When setting your own MSA, you have to make sure that:
1. The MSA is in the A3M format. This means adhering to the FASTA format while
also allowing lowercase characters denoting inserted residues and hyphens
(`-`) denoting gaps in sequences.
2. The first sequence is exactly equal to the query sequence.
3. If all insertions are removed from MSA hits (i.e. all lowercase letters are
removed), all sequences have exactly the same length as the query (they form
an exact rectangular matrix).
### MSA Pairing
MSA pairing matters only when folding multiple chains (multimers), since we need
to find a way to concatenate MSAs for the individual chains along the sequence
dimension. If done naively, by simply concatenating the individual MSA matrices
along the sequence dimension and padding so that all MSAs have the same depth,
one can end up with rows in the concatenated MSA that are formed by sequences
from different organisms.
It may be desirable to ensure that across multiple chains, sequences in the MSA
that are from the same organism end up in the same MSA row. AlphaFold 3
internally achieves this by looking for the UniProt organism ID in the
`pairedMsa` and pairing sequences based on this information.
We recommend users do the pairing manually or use the output of an appropriate
software and then provide the MSA using only the `unpairedMsa` field. This
method gives exact control over the placement of each sequence in the MSA, as
opposed to relying on name-matching post-processing heuristics used for
`pairedMsa`.
When setting `unpairedMsa` manually, the `pairedMsa` must be explicitly set to
an empty string (`""`).
Make sure to run with `--resolve_msa_overlaps=false`. This prevents
deduplication of the unpaired MSA within each chain against the paired MSA
sequences. Even if you set `pairedMsa` to an empty string, the query sequence(s)
will still be added in there and the deduplication procedure could destroy the
carefully crafted sequence positioning in the unpaired MSA.
For instance, if there are two chains `DEEP` and `MIND` which we want to be
paired on organism A and C, we can achieve it as follows:
```txt
> query
DEEP
> match 1 (organism A)
D--P
> match 2 (organism B)
DD-P
> match 3 (organism C)
DD-P
```
```txt
> query
MIND
> match 1 (organism A)
M--D
> Empty hit to make sure pairing is achieved
----
> match 2 (organism C)
MIN-
```
The resulting MSA when chains are concatenated will then be:
```txt
> query
DEEPMIND
> match 1 + match 1
D--PM--D
> match 2 + padding
DD-P----
> match 3 + match 2
DD-PMIN-
```
## Structural Templates
Structural templates can be specified only for protein chains:
```json
"templates": [
{
"mmcif": ..., # Mutually exclusive with mmcifPath.
"mmcifPath": ..., # Mutually exclusive with mmcif.
"queryIndices": [0, 1, 2, 4, 5, 6],
"templateIndices": [0, 1, 2, 3, 4, 8]
}
]
```
The fields specify the following:
* `mmcif: str`: A string containing the single chain protein structural
template in the mmCIF format.
* `mmcifPath: str`: An optional path to a file that contains the mmCIF with
the structural template instead of providing it inline using the `mmcifPath`
field. The path can be either absolute, or relative to the input JSON path.
The file must be in the mmCIF format, and could be either plain text, or
compressed using gzip, xz, or zstd.
* `queryIndices: list[int]`: O-based indices in the query sequence, defining
the mapping from query residues to template residues.
* `templateIndices: list[int]`: O-based indices in the template sequence,
specifying the mapping from query residues to template residues defined in
the mmCIF file. Note that unresolved mmCIF residues must be taken into
account when specifying template indices.
A template is specified as an mmCIF string containing a single chain with the
structural template together with a 0-based mapping that maps query residue
indices to the template residue indices. The mapping is specified using two
lists of the same length. E.g. to express a mapping `{0: 0, 1: 2, 2: 5, 3: 6}`,
you would specify the two indices lists as:
```json
"queryIndices": [0, 1, 2, 3],
"templateIndices": [0, 2, 5, 6]
```
Note that mmCIFs can have residues with missing atom coordinates (present in
residue tables but missing in the `_atom_site` table) – these must be taken into
account when specifying template indices. E.g. to align residues 4–7 in a
template with unresolved residues 1, 2, 3 and resolved residues 4, 5, 6, 7, you
need to set the template indices to 3, 4, 5, 6 (since 0-based indexing is used).
An example of a protein with unresolved residues 1–20 can be found here:
https://www.rcsb.org/structure/8UXY.
You can provide multiple structural templates. Note that if an mmCIF containing
more than one chain is provided, you will get an error since it is not possible
to determine which of the chains should be used as the template.
You can run template-free (but still run genetic search and build MSA) by
setting templates to `[]` and either explicitly setting both `unpairedMsa` and
`pairedMsa` to `null`:
```json
"protein": {
"id": "A",
"sequence": ...,
"pairedMsa": null,
"unpairedMsa": null,
"templates": []
}
```
Or you can simply fully omit them:
```json
"protein": {
"id": "A",
"sequence": ...,
"templates": []
}
```
You can also run with pre-computed MSA, but let AlphaFold 3 search for
templates. This can be achieved by setting `unpairedMsa` and `pairedMsa`, but
keeping templates unset (or set to `null`). The profile given as an input to
Hmmsearch when searching for templates will be built from the provided
`unpairedMsa`:
```json
"protein": {
"id": "A",
"sequence": ...,
"unpairedMsa": ...,
"pairedMsa": ...,
"templates": null
}
```
Or you can simply fully omit the `templates` field thus setting it implicitly to
`null`:
```json
"protein": {
"id": "A",
"sequence": ...,
"unpairedMsa": ...,
"pairedMsa": ...,
}
```
## Bonds
To manually specify covalent bonds, use the `bondedAtomPairs` field. This is
intended for modelling covalent ligands, and for defining multi-CCD ligands
(e.g. glycans). Defining covalent bonds between or within polymer entities is
not currently supported.
Bonds are specified as pairs of (source atom, destination atom), with each atom
being uniquely addressed using 3 fields:
* **Entity ID** (`str`): this corresponds to the `id` field for that entity.
* **Residue ID** (`int`): this is 1-based residue index *within* the chain.
For single-residue ligands, this is simply set to 1.
* **Atom name** (`str`): this is the unique atom name *within* the given
residue. The atom name for protein/RNA/DNA residues or CCD ligands can be
looked up in the CCD for the given chemical component. This also explains
why SMILES ligands don't support bonds: there is no atom name that could be
used to define the bond. This shortcoming can be addressed by using the
user-provided CCD format (see below).
The example below shows two bonds:
```json
"bondedAtomPairs": [
[["A", 145, "SG"], ["L", 1, "C04"]],
[["J", 1, "O6"], ["J", 2, "C1"]]
]
```
The first bond is between chain A, residue 145, atom SG and chain L, residue 1,
atom C04. This is a typical example for a covalent ligand. The second bond is
between chain J, residue 1, atom O6 and chain J, residue 2, atom C1. This bond
is within the same entity and is a typical example when defining a glycan.
All bonds are implicitly assumed to be covalent bonds. Other bond types are not
supported.
### Defining Glycans
Glycans are bound to a protein residue, and they are typically formed of
multiple chemical components. To define a glycan, define a new ligand with all
of the chemical components of the glycan. Then define a bond that links the
glycan to the protein residue, and all bonds that are within the glycan between
its individual chemical components.
For example, to define the following glycan composed of 4 components (CMP1,
CMP2, CMP3, CMP4) bound to an asparagine in a protein chain A:
```
⋮
ALA CMP4
| |
ASN ―― CMP1 ―― CMP2
| |
ALA CMP3
⋮
```
You will need to specify:
1. Protein chain A.
2. Ligand chain B with the 4 components.
3. Bonds ASN-CMP1, CMP1-CMP2, CMP2-CMP3, CMP2-CMP4.
## User-provided CCD
There are two approaches to model a custom ligand not defined in the CCD:
1. If the ligand is not bonded to other entities, it can be defined using a
[SMILES string](https://en.wikipedia.org/wiki/Simplified_Molecular_Input_Line_Entry_System).
2. If it is bonded to other entities, or to be able to customise relevant
features (such as bond orders, atom names and ideal coordinates used when
conformer generation fails), it is necessary to define that particular
ligand using the
[CCD mmCIF format](https://www.wwpdb.org/data/ccd#mmcifFormat).
Note that if a full CCD mmCIF is provided, any SMILES string input as part of
that mmCIF is ignored.
Once defined, this ligand needs to be assigned a name that doesn't clash with
existing CCD ligand names (e.g. `LIG-1`). Avoid underscores (`_`) in the name,
as it could cause issues in the mmCIF format.
The newly defined ligand can then be used as a standard CCD ligand using its
custom name, and bonds can be linked to it using its named atom scheme.
### Conformer Generation
The data pipeline attempts to generate a conformer for ligands using RDKit. The
`Mol` used to generate the conformer is constructed either from the information
provided in the CCD mmCIF, or from the SMILES string if that is the only
information provided.
If conformer generation fails, the model will fall back to using the ideal
coordinates in the CCD mmCIF if these are provided. If they are not provided,
the model will use the reference coordinates if the last modification date given
in the CCD mmCIF is prior to the training cutoff date. If no coordinates can be
found in this way, all conformer coordinates are set to zero and the model will
output `NaN` (`null` in the output JSON) confidences for the ligand.
Note that sometimes conformer generation failures can be resolved by
increasinging the number of RDKit conformer iterations using the
`--conformer_max_iterations=...` flag.
### User-provided CCD Format
The user-provided CCD must be passed either:
* In the `userCCD` field (in the root of the input JSON) as a string. Note
that JSON doesn't allow newlines within strings, so newline characters
(`\n`) must be used to delimit lines. Single rather than double quotes
should also be used around strings like the chemical formula.
* In the `userCCDPath` field, as a path to a file that contains the
user-provided chemical components dictionary. The path can be either
absolute, or relative to the input JSON path. The file must be in the
[CCD mmCIF format](https://www.wwpdb.org/data/ccd#mmcifFormat), and could be
either plain text, or compressed using gzip, xz, or zstd.
The main pieces of information used are the atom names and elements, bonds, and
also the ideal coordinates (`pdbx_model_Cartn_{x,y,z}_ideal`) which essentially
serve as a structural template for the ligand if RDKit fails to generate
conformers for that ligand.
The user-provided CCD can also be used to redefine standard chemical components
in the CCD. This can be useful if you need to redefine the ideal coordinates.
Below is an example user-provided CCD redefining component X7F, which serves to
illustrate the required sections. For readability purposes, newlines have not
been replaced by `\n`.
```
data_MY-X7F
#
_chem_comp.id MY-X7F
_chem_comp.name '5,8-bis(oxidanyl)naphthalene-1,4-dione'
_chem_comp.type non-polymer
_chem_comp.formula 'C10 H6 O4'
_chem_comp.mon_nstd_parent_comp_id ?
_chem_comp.pdbx_synonyms ?
_chem_comp.formula_weight 190.152
#
loop_
_chem_comp_atom.comp_id
_chem_comp_atom.atom_id
_chem_comp_atom.type_symbol
_chem_comp_atom.charge
_chem_comp_atom.pdbx_leaving_atom_flag
_chem_comp_atom.pdbx_model_Cartn_x_ideal
_chem_comp_atom.pdbx_model_Cartn_y_ideal
_chem_comp_atom.pdbx_model_Cartn_z_ideal
MY-X7F C02 C 0 N -1.418 -1.260 0.018
MY-X7F C03 C 0 N -0.665 -2.503 -0.247
MY-X7F C04 C 0 N 0.677 -2.501 -0.235
MY-X7F C05 C 0 N 1.421 -1.257 0.043
MY-X7F C06 C 0 N 0.706 0.032 0.008
MY-X7F C07 C 0 N -0.706 0.030 -0.004
MY-X7F C08 C 0 N -1.397 1.240 -0.037
MY-X7F C10 C 0 N -0.685 2.443 -0.057
MY-X7F C11 C 0 N 0.679 2.445 -0.045
MY-X7F C12 C 0 N 1.394 1.243 -0.013
MY-X7F O01 O 0 N -2.611 -1.301 0.247
MY-X7F O09 O 0 N -2.752 1.249 -0.049
MY-X7F O13 O 0 N 2.750 1.257 -0.001
MY-X7F O14 O 0 N 2.609 -1.294 0.298
MY-X7F H1 H 0 N -1.199 -3.419 -0.452
MY-X7F H2 H 0 N 1.216 -3.416 -0.429
MY-X7F H3 H 0 N -1.221 3.381 -0.082
MY-X7F H4 H 0 N 1.212 3.384 -0.062
MY-X7F H5 H 0 N -3.154 1.271 0.830
MY-X7F H6 H 0 N 3.151 1.241 -0.880
#
loop_
_chem_comp_bond.atom_id_1
_chem_comp_bond.atom_id_2
_chem_comp_bond.value_order
_chem_comp_bond.pdbx_aromatic_flag
O01 C02 DOUB N
O09 C08 SING N
C02 C03 SING N
C02 C07 SING N
C03 C04 DOUB N
C08 C07 DOUB Y
C08 C10 SING Y
C07 C06 SING Y
C10 C11 DOUB Y
C04 C05 SING N
C06 C05 SING N
C06 C12 DOUB Y
C11 C12 SING Y
C05 O14 DOUB N
C12 O13 SING N
C03 H1 SING N
C04 H2 SING N
C10 H3 SING N
C11 H4 SING N
O09 H5 SING N
O13 H6 SING N
#
```
### Mandatory fields
Parsing the user-provided CCD needs only a subset of the fields that CCD uses.
The mandatory fields are described below. Refer to
[CCD documentation](https://www.wwpdb.org/data/ccd#mmcifFormat) for more
detailed explanation of each field. Note that not all of these fields are input
to the model, but they are necessary for the data pipeline to run – see the
[Model input fields](#model-input-fields) section below.
**Singular fields (containing just a single value)**
* `_chem_comp.id`: The ID of the component. Must match the `_data` record and
must not contain special CIF characters (like `_` or `#`).
* `_chem_comp.name`: Optional full name of the component. If unknown, set to
`?`.
* `_chem_comp.type`: Type of the component, typically `non-polymer`.
* `_chem_comp.formula`: Optional component formula. If unknown, set to `?`.
* `_chem_comp.mon_nstd_parent_comp_id`: Optional parent component ID. If
unknown, set to `?`.
* `_chem_comp.pdbx_synonyms`: Optional synonym IDs. If unknown, set to `?`.
* `_chem_comp.formula_weight`: Optional weight of the component. If unknown,
set to `?`.
**Per-atom fields (containing one record per atom)**
* `_chem_comp_atom.comp_id`: Component ID.
* `_chem_comp_atom.atom_id`: Atom ID.
* `_chem_comp_atom.type_symbol`: Atom element type.
* `_chem_comp_atom.charge`: Atom charge.
* `_chem_comp_atom.pdbx_leaving_atom_flag`: Optional flag determining whether
this is a leaving atom. If unset, assumed to be no (`N`) for all atoms.
* `_chem_comp_atom.pdbx_model_Cartn_x_ideal`: Ideal x coordinate.
* `_chem_comp_atom.pdbx_model_Cartn_y_ideal`: Ideal y coordinate.
* `_chem_comp_atom.pdbx_model_Cartn_z_ideal`: Ideal z coordinate.
**Per-bond fields (containing one record per bond)**
* `_chem_comp_bond.atom_id_1`: The ID of the first of the two atoms that
define the bond.
* `_chem_comp_bond.atom_id_2`: The ID of the second of the two atoms that
define the bond.
* `_chem_comp_bond.value_order`: The bond order of the chemical bond
associated with the specified atoms.
* `_chem_comp_bond.pdbx_aromatic_flag`: Whether the bond is aromatic.
### Model input fields
The following fields are used to generate input for the model:
* `_chem_comp_atom.atom_id`: Atom ID.
* `_chem_comp_atom.type_symbol`: Atom element type.
* `_chem_comp_atom.charge`: Atom charge.
* `_chem_comp_atom.pdbx_model_Cartn_x_ideal`: Ideal x coordinate. Only used if
conformer generation fails.
* `_chem_comp_atom.pdbx_model_Cartn_y_ideal`: Ideal y coordinate. Only used if
conformer generation fails.
* `_chem_comp_atom.pdbx_model_Cartn_z_ideal`: Ideal z coordinate. Only used if
conformer generation fails.
* `_chem_comp_bond.atom_id_1`: The ID of the first of the two atoms that
define the bond.
* `_chem_comp_bond.atom_id_2`: The ID of the second of the two atoms that
define the bond.
## Full Example
An example illustrating all the aspects of the input format is provided below.
Note that AlphaFold 3 won't run this input out of the box as it abbreviates
certain fields and the sequences are not biologically meaningful.
```json
{
"name": "Hello fold",
"modelSeeds": [10, 42],
"sequences": [
{
"protein": {
"id": "A",
"sequence": "PVLSCGEWQL",
"modifications": [
{"ptmType": "HY3", "ptmPosition": 1},
{"ptmType": "P1L", "ptmPosition": 5}
],
"description": "10-residue protein with 2 modifications",
"unpairedMsa": ...,
"pairedMsa": ""
}
},
{
"protein": {
"id": "B",
"sequence": "RPACQLW",
"templates": [
{
"mmcif": ...,
"queryIndices": [0, 1, 2, 4, 5, 6],
"templateIndices": [0, 1, 2, 3, 4, 8]
}
]
}
},
{
"dna": {
"id": "C",
"sequence": "GACCTCT",
"modifications": [
{"modificationType": "6OG", "basePosition": 1},
{"modificationType": "6MA", "basePosition": 2}
]
}
},
{
"rna": {
"id": "E",
"sequence": "AGCU",
"modifications": [
{"modificationType": "2MG", "basePosition": 1},
{"modificationType": "5MC", "basePosition": 4}
],
"unpairedMsa": ...
}
},
{
"ligand": {
"id": ["F", "G", "H"],
"ccdCodes": ["ATP"]
}
},
{
"ligand": {
"id": "I",
"ccdCodes": ["NAG", "FUC"]
}
},
{
"ligand": {
"id": "Z",
"smiles": "CC(=O)OC1C[NH+]2CCC1CC2"
}
}
],
"bondedAtomPairs": [
[["A", 1, "CA"], ["G", 1, "CHA"]],
[["I", 1, "O6"], ["I", 2, "C1"]]
],
"userCCD": ...,
"dialect": "alphafold3",
"version": 4
}
```
================================================
FILE: docs/installation.md
================================================
# Installation and Running Your First Prediction
You will need a machine running Linux; AlphaFold 3 does not support other
operating systems. Full installation requires up to 1 TB of disk space to keep
genetic databases (SSD storage is recommended) and an NVIDIA GPU with Compute
Capability 8.0 or greater (GPUs with more memory can predict larger protein
structures). We have verified that inputs with up to 5,120 tokens can fit on a
single NVIDIA A100 80 GB, or a single NVIDIA H100 80 GB. We have verified
numerical accuracy on both NVIDIA A100 and H100 GPUs.
Especially for long targets, the genetic search stage can consume a lot of RAM –
we recommend running with at least 64 GB of RAM.
We provide installation instructions for a machine with an NVIDIA A100 80 GB GPU
and a clean Ubuntu 22.04 LTS installation, and expect that these instructions
should aid others with different setups. If you are installing locally outside
of a Docker container, please ensure CUDA, cuDNN, and JAX are correctly
installed; the
[JAX installation documentation](https://jax.readthedocs.io/en/latest/installation.html#nvidia-gpu)
is a useful reference for this case. Please note that the Docker container
requires that the host machine has CUDA 12.6 installed.
The instructions provided below describe how to:
1. Provision a machine on GCP.
1. Install Docker.
1. Install NVIDIA drivers for an A100.
1. Obtain genetic databases.
1. Obtain model parameters.
1. Build the AlphaFold 3 Docker container or Singularity image.
## Provisioning a Machine
Clean Ubuntu images are available on Google Cloud, AWS, Azure, and other major
platforms.
Using an existing Google Cloud project, we provisioned a new machine:
* We recommend using `--machine-type a2-ultragpu-1g` but feel free to use
`--machine-type a2-highgpu-1g` for smaller predictions.
* If desired, replace `--zone us-central1-a` with a zone that has quota for
the machine you have selected. See
[gpu-regions-zones](https://cloud.google.com/compute/docs/gpus/gpu-regions-zones).
```sh
gcloud compute instances create alphafold3 \
--machine-type a2-ultragpu-1g \
--zone us-central1-a \
--image-family ubuntu-2204-lts \
--image-project ubuntu-os-cloud \
--maintenance-policy TERMINATE \
--boot-disk-size 1000 \
--boot-disk-type pd-balanced
```
This provisions a bare Ubuntu 22.04 LTS image on an
[A2 Ultra](https://cloud.google.com/compute/docs/accelerator-optimized-machines#a2-vms)
machine with 12 CPUs, 170 GB RAM, 1 TB disk and NVIDIA A100 80 GB GPU attached.
We verified the following installation steps from this point.
## Installing Docker
These instructions are for rootless Docker.
### Installing Docker on Host
Note these instructions only apply to Ubuntu 22.04 LTS images, see above.
Add Docker's official GPG key. Official Docker instructions are
[here](https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository).
The commands we ran are:
```sh
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
```
Add the repository to apt sources:
```sh
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo docker run hello-world
```
### Enabling Rootless Docker
Official Docker instructions are
[here](https://docs.docker.com/engine/security/rootless/#distribution-specific-hint).
The commands we ran are:
```sh
sudo apt-get install -y uidmap systemd-container
sudo machinectl shell $(whoami)@ /bin/bash -c 'dockerd-rootless-setuptool.sh install && sudo loginctl enable-linger $(whoami) && DOCKER_HOST=unix:///run/user/1001/docker.sock docker context use rootless'
```
## Installing GPU Support
### Installing NVIDIA Drivers
Official Ubuntu instructions are
[here](https://documentation.ubuntu.com/server/how-to/graphics/install-nvidia-drivers/).
The commands we ran are:
```sh
sudo apt-get -y install alsa-utils ubuntu-drivers-common
sudo ubuntu-drivers install
sudo nvidia-smi --gpu-reset
nvidia-smi # Check that the drivers are installed.
```
Accept the "Pending kernel upgrade" dialog if it appears.
You will need to reboot the instance with `sudo reboot now` to reset the GPU if
you see the following warning:
```text
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver.
Make sure that the latest NVIDIA driver is installed and running.
```
Proceed only if `nvidia-smi` has a sensible output.
### Installing NVIDIA Support for Docker
Official NVIDIA instructions are
[here](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html).
The commands we ran are:
```sh
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
&& curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
sudo apt-get update
sudo apt-get install -y nvidia-container-toolkit
nvidia-ctk runtime configure --runtime=docker --config=$HOME/.config/docker/daemon.json
systemctl --user restart docker
sudo nvidia-ctk config --set nvidia-container-cli.no-cgroups --in-place
```
Check that your container can see the GPU:
```sh
docker run --rm --gpus all nvidia/cuda:12.6.0-base-ubuntu22.04 nvidia-smi
```
Example output:
```text
Mon Nov 11 12:00:00 2024
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.120 Driver Version: 550.120 CUDA Version: 12.6 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA A100-SXM4-80GB Off | 00000000:00:05.0 Off | 0 |
| N/A 34C P0 51W / 400W | 1MiB / 81920MiB | 0% Default |
| | | Disabled |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| No running processes found |
+-----------------------------------------------------------------------------------------+
```
## Obtaining AlphaFold 3 Source Code
Install `git` and download the AlphaFold 3 repository:
```sh
git clone https://github.com/google-deepmind/alphafold3.git
```
## Obtaining Genetic Databases
This step requires `wget` and `zstd` to be installed on your machine. On
Debian-based systems install them by running `sudo apt install wget zstd`.
AlphaFold 3 needs multiple genetic (sequence) protein and RNA databases to run:
* [BFD small](https://bfd.mmseqs.com/)
* [MGnify](https://www.ebi.ac.uk/metagenomics/)
* [PDB](https://www.rcsb.org/) (structures in the mmCIF format)
* [PDB seqres](https://www.rcsb.org/)
* [UniProt](https://www.uniprot.org/uniprot/)
* [UniRef90](https://www.uniprot.org/help/uniref)
* [NT](https://www.ncbi.nlm.nih.gov/nucleotide/)
* [RFam](https://rfam.org/)
* [RNACentral](https://rnacentral.org/)
We provide a bash script `fetch_databases.sh` that can be used to download and
set up all of these databases. This process takes around 45 minutes when not
installing on local SSD. We recommend running the following in a `screen` or
`tmux` session as downloading and decompressing the databases takes some time.
```sh
cd alphafold3 # Navigate to the directory with cloned AlphaFold 3 repository.
./fetch_databases.sh [<DB_DIR>]
```
This script downloads the databases from a mirror hosted on GCS, with all
versions being the same as used in the AlphaFold 3 paper, to the directory
`<DB_DIR>`. If not specified, the default `<DB_DIR>` is
`$HOME/public_databases`.
:ledger: **Note: The download directory `<DB_DIR>` should *not* be a
subdirectory in the AlphaFold 3 repository directory.** If it is, the Docker
build will be slow as the large databases will be copied during the image
creation.
:ledger: **Note: The total download size for the full databases is around 252 GB
and the total size when unzipped is 630 GB. Please make sure you have sufficient
hard drive space, bandwidth, and time to download. We recommend using an SSD for
better genetic search performance.**
:ledger: **Note: If the download directory and datasets don't have full read and
write permissions, it can cause errors with the MSA tools, with opaque
(external) error messages. Please ensure the required permissions are applied,
e.g. with the `sudo chmod 755 --recursive <DB_DIR>` command.**
Once the script has finished, you should have the following directory structure:
```sh
mmcif_files/ # Directory containing ~200k PDB mmCIF files.
bfd-first_non_consensus_sequences.fasta
mgy_clusters_2022_05.fa
nt_rna_2023_02_23_clust_seq_id_90_cov_80_rep_seq.fasta
pdb_seqres_2022_09_28.fasta
rfam_14_9_clust_seq_id_90_cov_80_rep_seq.fasta
rnacentral_active_seq_id_90_cov_80_linclust.fasta
uniprot_all_2021_04.fa
uniref90_2022_05.fa
```
Optionally, after the script finishes, you may want copy databases to an SSD.
You can use theses two scripts:
* `src/scripts/gcp_mount_ssd.sh [<SSD_MOUNT_PATH>]` Mounts and formats an
unmounted GCP SSD drive to the specified path. It will skip the either step
if the disk is either already formatted or already mounted. The default
`<SSD_MOUNT_PATH>` is `/mnt/disks/ssd`.
* `src/scripts/copy_to_ssd.sh [<DB_DIR>] [<SSD_DB_DIR>]` this will copy as
many files that it can fit on to the SSD. The default `<DB_DIR>` is
`$HOME/public_databases`, and must match the path used in the
`fetch_databases.sh` command above, and the default `<SSD_DB_DIR>` is
`/mnt/disks/ssd/public_databases`.
## Obtaining Model Parameters
To request access to the AlphaFold 3 model parameters, please complete
[this form](https://forms.gle/svvpY4u2jsHEwWYS6). Access will be granted at
Google DeepMind’s sole discretion. We will aim to respond to requests within 2–3
business days. 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).
Once access has been granted, download the model parameters to a directory of
your choosing, referred to as `<MODEL_PARAMETERS_DIR>` in the following
instructions. As with the databases, this should *not* be a subdirectory in the
AlphaFold 3 repository directory.
## Building the Docker Container That Will Run AlphaFold 3
Then, build the Docker container. This builds a container with all the right
python dependencies:
```sh
docker build -t alphafold3 -f docker/Dockerfile .
```
If you hit `No file descriptors available (os error 24)` on systems like
AlmaLinux/Rocky/RHEL, you need to manually expand the file descriptor limits
during the build by appending `--ulimit nofile=65535:65535`:
```sh
docker build --ulimit nofile=65535:65535 -t alphafold3 -f docker/Dockerfile .
```
Create an input JSON file, using either the example in the
[README](https://github.com/google-deepmind/alphafold3?tab=readme-ov-file#installation-and-running-your-first-prediction)
or a
[custom input](https://github.com/google-deepmind/alphafold3/blob/main/docs/input.md),
and place it in a directory, e.g. `$HOME/af_input`. You can now run AlphaFold 3!
```sh
docker run -it \
--volume $HOME/af_input:/root/af_input \
--volume $HOME/af_output:/root/af_output \
--volume <MODEL_PARAMETERS_DIR>:/root/models \
--volume <DB_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
```
where `$HOME/af_input` is the directory containing the input JSON file;
`$HOME/af_output` is the directory where the output will be written to; and
`<DB_DIR>` and `<MODEL_PARAMETERS_DIR>` are the directories containing the
databases and model parameters. The values of these directories must match the
directories used in previous steps for downloading databases and model weights,
and for the input file.
:ledger: Note: You may also need to create the output directory,
`$HOME/af_output` directory before running the `docker` command and make it and
the input directory writable from the docker container, e.g. by running `chmod
755 $HOME/af_input $HOME/af_output`. In most cases `docker` and
`run_alphafold.py` will create the output directory if it does not exist.
:ledger: **Note: In the example above the databases have been placed on the
persistent disk, which is slow.** If you want better genetic and template search
performance, make sure all databases are placed on a local SSD.
If you have some databases on an SSD in the `<SSD_DB_DIR>` directory and some
databases on a slower disk in the `<DB_DIR>` directory, you can mount both
directories and specify `db_dir` multiple times. This will enable the fast
access to databases with a fallback to the larger, slower disk:
```sh
docker run -it \
--volume $HOME/af_input:/root/af_input \
--volume $HOME/af_output:/root/af_output \
--volume <MODEL_PARAMETERS_DIR>:/root/models \
--volume <SSD_DB_DIR>:/root/public_databases \
--volume <DB_DIR>:/root/public_databases_fallback \
--gpus all \
alphafold3 \
python run_alphafold.py \
--json_path=/root/af_input/fold_input.json \
--model_dir=/root/models \
--db_dir=/root/public_databases \
--db_dir=/root/public_databases_fallback \
--output_dir=/root/af_output
```
If you get an error like the following, make sure the models and data are in the
paths (flags named `--volume` above) in the correct locations.
```
docker: Error response from daemon: error while creating mount source path '/srv/alphafold3_data/models': mkdir /srv/alphafold3_data/models: permission denied.
```
`run_alphafold.py` supports many flags for controlling performance, running on
multiple input files, specifying external binary paths, and more. See
```sh
docker run alphafold3 python run_alphafold.py --help
```
for more information.
## Running Using Singularity Instead of Docker
You may prefer to run AlphaFold 3 within Singularity. You'll still need to
*build* the Singularity image from the Docker container. Afterwards, you will
not have to depend on Docker (at structure prediction time).
### Install Singularity
Official Singularity instructions are
[here](https://docs.sylabs.io/guides/3.3/user-guide/installation.html). The
commands we ran are:
```sh
wget https://github.com/sylabs/singularity/releases/download/v4.2.1/singularity-ce_4.2.1-jammy_amd64.deb
sudo dpkg --install singularity-ce_4.2.1-jammy_amd64.deb
sudo apt-get install -f
```
### Build the Singularity Container From the Docker Image
After building the *Docker* container above with `docker build -t`, start a
local Docker registry and upload your image `alphafold3` to it. Singularity's
instructions are [here](https://github.com/apptainer/singularity/issues/1537).
The commands we ran are:
```sh
docker run -d -p 5000:5000 --restart=always --name registry registry:2
docker tag alphafold3 localhost:5000/alphafold3
docker push localhost:5000/alphafold3
```
Then build the Singularity container:
```sh
SINGULARITY_NOHTTPS=1 singularity build alphafold3.sif docker://localhost:5000/alphafold3:latest
```
You can confirm your build by starting a shell and inspecting the environment.
For example, you may want to ensure the Singularity image can access your GPU.
You may want to restart your computer if you have issues with this.
```sh
singularity exec --nv alphafold3.sif sh -c 'nvidia-smi'
```
You can now run AlphaFold 3!
```sh
singularity exec --nv alphafold3.sif <<args>>
```
For example:
```sh
singularity exec \
--nv \
--bind $HOME/af_input:/root/af_input \
--bind $HOME/af_output:/root/af_output \
--bind <MODEL_PARAMETERS_DIR>:/root/models \
--bind <DB_DIR>:/root/public_databases \
alphafold3.sif \
python run_alphafold.py \
--json_path=/root/af_input/fold_input.json \
--model_dir=/root/models \
--db_dir=/root/public_databases \
--output_dir=/root/af_output
```
Or with some databases on SSD in location `<SSD_DB_DIR>`:
```sh
singularity exec \
--nv \
--bind $HOME/af_input:/root/af_input \
--bind $HOME/af_output:/root/af_output \
--bind <MODEL_PARAMETERS_DIR>:/root/models \
--bind <SSD_DB_DIR>:/root/public_databases \
--bind <DB_DIR>:/root/public_databases_fallback \
alphafold3.sif \
python run_alphafold.py \
--json_path=/root/af_input/fold_input.json \
--model_dir=/root/models \
--db_dir=/root/public_databases \
--db_dir=/root/public_databases_fallback \
--output_dir=/root/af_output
```
================================================
FILE: docs/known_issues.md
================================================
# Known Issues
## Numerical performance for CUDA Capability 7.x GPUs
All CUDA Capability 7.x GPUs (e.g. V100) produce obviously bad output, with lots
of clashing residues (the clashes cause a ranking score of -99 or lower), unless
the environment variable `XLA_FLAGS` is set to include
`--xla_disable_hlo_passes=custom-kernel-fusion-rewriter`.
## Incorrect handling of two-letter atoms in SMILES ligands
Between commits https://github.com/google-deepmind/alphafold3/commit/f8df1c7 and
https://github.com/google-deepmind/alphafold3/commit/4e4023c, AlphaFold 3
handled incorrectly any two-letter atoms (e.g. Cl, Br) in ligands defined using
SMILES strings.
## MSA discrepancy between AlphaFold 3 and AlphaFold Server
### The root cause of the problem
The released AlphaFold 3 and AlphaFold Server use the same model weights and
equivalent featurisation and model code. However, the way they run genetic
search is slightly different. The released AlphaFold 3 searches each database in
one go, while AlphaFold Server has a sharded version of each database (split
into multiple smaller FASTA files) and searches all of the shards in parallel.
The results of these parallel searches are then merged together at the end.
The discrepancy is caused by a different (deeper) MSA on AlphaFold Server in
some cases. We discovered that the issue is caused by running sharded Jackhmmer
in AlphaFold Server without the `--domZ` flag (has to be set together with the
`--Z` flag and set to the same value) which means that effectively the AlphaFold
Server is running with roughly 100× more permissive `--domE` filter. This means
more sequences are sometimes included in the MSA.
We are keeping behaviour unchanged in both the released AlphaFold 3 and in the
AlphaFold Server, however, we are giving users with local installs an option to
replicate AlphaFold Server behaviour locally. In our large scale tests the
difference did not matter, it is only very specific inputs that get better
accuracy with the deeper MSA.
See https://github.com/google-deepmind/alphafold3/issues/492 for an example
input where a protein-DNA complex gets significantly higher ipTM and pTM with
AlphaFold Server compared to a local run.
### Replicating AlphaFold Server behaviour locally
If you want to replicate AlphaFold Server behaviour (i.e. better folding
accuracy in some cases), you can increase the value of the Jackhmmer/Nhmmer
`--domE` flag by 100× compared to its default value.
Alternatively, you can run the sharded MSA search while not setting the `--domZ`
value – you would have to modify the code to do it. We added support for
searching against sharded databases in AlphaFold 3 in
https://github.com/google-deepmind/alphafold3/commit/805adc3863841d83d631ccd18136ad58ce3ecb34
and the way to run AlphaFold 3 with sharded databases is documented in
https://github.com/google-deepmind/alphafold3/blob/main/docs/performance.md#sharded-genetic-databases.
It can provide 10–30× speedup (potentially even more, depending on hardware) of
the genetic search.
In general, we recommend experimenting with MSA if you are seeing a prediction
with low predicted confidence. Typically adding more *relevant* sequences in the
MSA will increase AlphaFold prediction accuracy and model confidence scores.
================================================
FILE: docs/metadata_antibody_antigen.csv
================================================
pdb_id,chain_id_1,chain_id_2,cluster_key_chain_1,cluster_key_chain_2,interface_cluster_key
7fci,A,B,5581,5964,5581|5964
7fci,A,C,5581,17640,17640|5581
7mnl,A,C,8677,17640,17640|8677
7n0a,A,B,33602,5964,33602|5964
7n0a,A,C,33602,17640,17640|33602
7ox1,A,G,17640,41184,17640|41184
7ox1,B,G,5964,41184,41184|5964
7ox2,A,C,17640,41184,17640|41184
7ox2,B,C,5964,41184,41184|5964
7ox3,A,C,5964,41184,41184|5964
7ox3,B,C,17640,41184,17640|41184
7ox4,A,C,17640,41184,17640|41184
7ox4,B,C,5964,41184,41184|5964
7q6c,A,B,15496,17640,15496|17640
7q6c,A,D,15496,5964,15496|5964
7r58,A,B,30790,17640,17640|30790
7r58,A,C,30790,5964,30790|5964
7ru6,A,B,7068,17640,17640|7068
7sbd,A,C,17640,20692,17640|20692
7sbd,B,C,5964,20692,20692|5964
7sbg,A,C,17640,20692,17640|20692
7sbg,B,C,5964,20692,20692|5964
7sjo,A,F,7390,17640,17640|7390
7sjo,A,I,7390,5964,5964|7390
7sjo,B,G,7390,17640,17640|7390
7sjo,B,H,7390,5964,5964|7390
7sjo,C,D,7390,17640,17640|7390
7sjo,C,E,7390,5964,5964|7390
7sk3,A,C,45640,5964,45640|5964
7sk3,A,D,45640,17640,17640|45640
7sk3,A,E,45640,5964,45640|5964
7sk3,A,F,45640,17640,17640|45640
7sk4,A,C,45640,5964,45640|5964
7sk4,A,D,45640,17640,17640|45640
7sk4,A,E,45640,5964,45640|5964
7sk4,A,F,45640,17640,17640|45640
7sk5,A,B,45640,17640,17640|45640
7sk5,A,D,45640,5964,45640|5964
7sk6,A,C,45640,5964,45640|5964
7sk6,A,D,45640,17640,17640|45640
7sk7,A,C,45640,5964,45640|5964
7sk7,A,D,45640,17640,17640|45640
7sk8,A,C,45640,5964,45640|5964
7sk8,A,D,45640,17640,17640|45640
7sk8,A,E,45640,5964,45640|5964
7sk8,A,F,45640,17640,17640|45640
7sk9,A,B,45640,17640,17640|45640
7sk9,A,C,45640,5964,45640|5964
7st8,A,C,17640,41188,17640|41188
7st8,B,C,5964,41188,41188|5964
7t6x,E,H,5964,24273,24273|5964
7t82,A,C,9703,5964,5964|9703
7t82,A,D,9703,17640,17640|9703
7t9m,A,C,17640,13210,13210|17640
7t9m,B,C,5964,13210,13210|5964
7t9n,A,D,5964,13210,13210|5964
7t9n,B,D,17640,13210,13210|17640
7tuf,A,B,22549,17640,17640|22549
7tuf,A,C,22549,5964,22549|5964
7tuf,A,E,22549,17640,17640|22549
7tuf,B,D,17640,22549,17640|22549
7tuf,D,E,22549,17640,17640|22549
7tuf,D,F,22549,5964,22549|5964
7tug,A,B,22549,17640,17640|22549
7tug,A,C,22549,5964,22549|5964
7u8c,A,B,20081,17640,17640|20081
7u8c,A,C,20081,5964,20081|5964
7u8g,A,C,29632,17640,17640|29632
7u8g,A,D,29632,5964,29632|5964
7uih,A,B,11223,5964,11223|5964
7uih,A,C,11223,17640,11223|17640
7uih,A,D,11223,5964,11223|5964
7uih,A,E,11223,17640,11223|17640
7um3,A,E,17640,33649,17640|33649
7um3,B,E,5964,33649,33649|5964
7ura,A,B,44530,5964,44530|5964
7ura,A,C,44530,17640,17640|44530
7urc,A,B,44530,5964,44530|5964
7urc,A,C,44530,17640,17640|44530
7urd,A,C,44530,5964,44530|5964
7urd,A,D,44530,17640,17640|44530
7ure,A,B,44530,5964,44530|5964
7ure,A,C,44530,17640,17640|44530
7uvf,A,C,23558,17640,17640|23558
7uvf,A,D,23558,5964,23558|5964
7uvf,B,E,23558,5964,23558|5964
7uvf,B,F,23558,17640,17640|23558
7vad,A,B,5581,17640,17640|5581
7vad,A,C,5581,5964,5581|5964
7vae,A,B,5581,17640,17640|5581
7vae,A,C,5581,5964,5581|5964
7vaf,A,C,17640,5581,17640|5581
7vaf,B,C,5964,5581,5581|5964
7vag,A,B,5581,17640,17640|5581
7vag,A,C,5581,5964,5581|5964
7vgr,A,E,5964,33673,33673|5964
7vgr,A,F,5964,33673,33673|5964
7vgr,B,E,17640,33673,17640|33673
7vgr,B,F,17640,33673,17640|33673
7vgr,C,E,5964,33673,33673|5964
7vgr,C,F,5964,33673,33673|5964
7vgr,D,E,17640,33673,17640|33673
7vgr,D,F,17640,33673,17640|33673
7vgs,A,B,33673,5964,33673|5964
7vgs,A,C,33673,17640,17640|33673
7vgs,A,E,33673,5964,33673|5964
7vgs,B,D,5964,33673,33673|5964
7vgs,D,E,33673,5964,33673|5964
7vgs,D,F,33673,17640,17640|33673
7vn9,A,C,17640,20046,17640|20046
7vn9,B,C,5964,20046,20046|5964
7vng,A,B,20046,17640,17640|20046
7vng,A,C,20046,5964,20046|5964
7w71,A,E,24335,17640,17640|24335
7w71,A,F,24335,5964,24335|5964
7wsi,A,B,5581,17640,17640|5581
7wsi,A,C,5581,5964,5581|5964
7xq8,A,B,26372,5964,26372|5964
7xq8,C,D,26372,5964,26372|5964
7zlg,A,D,17640,29547,17640|29547
7zlg,C,D,5964,29547,29547|5964
7zlh,A,D,17640,29547,17640|29547
7zlh,C,D,5964,29547,29547|5964
7zli,A,D,17640,29547,17640|29547
7zli,C,D,5964,29547,29547|5964
7zlj,A,D,17640,29547,17640|29547
7zlj,C,D,5964,29547,29547|5964
7zwi,A,C,7003,5964,5964|7003
7zxf,A,C,7003,5964,5964|7003
7zxf,A,E,7003,5964,5964|7003
7zxg,A,C,7003,5964,5964|7003
7zxk,A,F,26707,5964,26707|5964
7zxk,A,G,26707,17640,17640|26707
7zyi,A,B,5581,17640,17640|5581
7zyi,A,C,5581,5964,5581|5964
8cz5,A,B,24059,17640,17640|24059
8cz5,A,C,24059,5964,24059|5964
8dcy,A,C,17640,23342,17640|23342
8dcy,B,C,5964,23342,23342|5964
8ddk,A,C,17640,23342,17640|23342
8ddk,B,C,5964,23342,23342|5964
8djk,A,E,15456,17640,15456|17640
8djk,B,D,15455,5964,15455|5964
8djk,B,E,15455,17640,15455|17640
8djm,A,E,15456,17640,15456|17640
8djm,B,D,15455,5964,15455|5964
8djm,B,E,15455,17640,15455|17640
8dke,A,B,13979,17640,13979|17640
8dke,A,C,13979,5964,13979|5964
8dki,A,B,13979,17640,13979|17640
8dki,A,C,13979,5964,13979|5964
8dkm,A,C,17640,13979,13979|17640
8dkm,B,C,5964,13979,13979|5964
8dkw,A,C,17640,13979,13979|17640
8dkw,B,C,5964,13979,13979|5964
8dkx,A,C,17640,13979,13979|17640
8dkx,B,C,5964,13979,13979|5964
8hii,A,B,21158,17640,17640|21158
8hii,A,D,21158,5964,21158|5964
8hij,A,B,21158,17640,17640|21158
8hij,A,D,21158,5964,21158|5964
8hik,A,B,21158,17640,17640|21158
8hik,A,D,21158,5964,21158|5964
7so7,A,F,3006,5964,3006|5964
7xy8,A,C,2517,17640,17640|2517
7xy8,A,E,2517,5964,2517|5964
================================================
FILE: docs/metadata_antibody_antigen.md
================================================
# Metadata for Antibody-Antigen pairs used to create figure 5a
Figure 5a in the AlphaFold 3 paper was created using 71 antibody–antigen
complexes, containing 166 antibody–antigen interfaces spanning 65 interface
clusters. Scores were averaged within each interface cluster then across
clusters. Note that the first bioassembly is used in all cases.
We provide metadata for these complexes and the associated clusters in this CSV
file:
https://github.com/google-deepmind/alphafold3/blob/main/docs/metadata_antibody_antigen.csv
================================================
FILE: docs/model_parameters.md
================================================
# Model Parameters
AlphaFold 3 layer names, shapes, and dtypes are documented in the table below.
This can be used for example to generate random parameters for AlphaFold 3
performance optimisation on new accelerators without having to obtain the
official parameters. It is important to not generate zero-only parameters for
performance optimisations as accelerators often have shortcuts for zero-only
arguments (e.g. `0 * tensor` can be optimised to a no-op).
Producing random parameters could be done similarly to the following snippet:
```py
from alphafold3.model import params
import numpy as np
import zstandard
parameters = ... # Data from the parameters schema.
with zstandard.open('random_weights.bin.zst', 'wb') as compressed:
for scope_name, shape, dtype in parameters:
if scope_name == '__meta__:__identifier__':
# The identifier can be all zeros.
arr = np.zeros(shape=shape, dtype=dtype)
else:
# Do not use all-zero params, instead sample uniformly between -1 and 1.
arr = np.random.uniform(low=-1, high=1, size=shape).astype(dtype)
scope_name = scope_name.split(':')
compressed.write(params.encode_record(*scope_name, arr))
```
## Parameters Schema
```
name=__meta__:__identifier__ dtype=uint8 shape=(64,)
name=diffuser/~/diffusion_head/diffusion_atom_features_layer_norm:scale dtype=float32 shape=(128,)
name=diffuser/~/diffusion_head/diffusion_atom_features_to_position_update:weights dtype=float32 shape=(128, 3)
name=diffuser/~/diffusion_head/diffusion_atom_positions_to_features:weights dtype=float32 shape=(3, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_decoder/__layer_stack_with_per_layer/diffusion_atom_transformer_decoderadaptive_zero_cond:bias dtype=float32 shape=(3, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_decoder/__layer_stack_with_per_layer/diffusion_atom_transformer_decoderadaptive_zero_cond:weights dtype=float32 shape=(3, 128, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_decoder/__layer_stack_with_per_layer/diffusion_atom_transformer_decoderffw_adaptive_zero_cond:bias dtype=float32 shape=(3, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_decoder/__layer_stack_with_per_layer/diffusion_atom_transformer_decoderffw_adaptive_zero_cond:weights dtype=float32 shape=(3, 128, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_decoder/__layer_stack_with_per_layer/diffusion_atom_transformer_decoderffw_single_cond_bias:weights dtype=float32 shape=(3, 128, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_decoder/__layer_stack_with_per_layer/diffusion_atom_transformer_decoderffw_single_cond_layer_norm:scale dtype=float32 shape=(3, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_decoder/__layer_stack_with_per_layer/diffusion_atom_transformer_decoderffw_single_cond_scale:bias dtype=float32 shape=(3, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_decoder/__layer_stack_with_per_layer/diffusion_atom_transformer_decoderffw_single_cond_scale:weights dtype=float32 shape=(3, 128, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_decoder/__layer_stack_with_per_layer/diffusion_atom_transformer_decoderffw_transition1:weights dtype=float32 shape=(3, 128, 512)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_decoder/__layer_stack_with_per_layer/diffusion_atom_transformer_decoderffw_transition2:weights dtype=float32 shape=(3, 256, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_decoder/__layer_stack_with_per_layer/diffusion_atom_transformer_decodergating_query:weights dtype=float32 shape=(3, 128, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_decoder/__layer_stack_with_per_layer/diffusion_atom_transformer_decoderk_projection:weights dtype=float32 shape=(3, 128, 4, 32)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_decoder/__layer_stack_with_per_layer/diffusion_atom_transformer_decoderksingle_cond_bias:weights dtype=float32 shape=(3, 128, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_decoder/__layer_stack_with_per_layer/diffusion_atom_transformer_decoderksingle_cond_layer_norm:scale dtype=float32 shape=(3, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_decoder/__layer_stack_with_per_layer/diffusion_atom_transformer_decoderksingle_cond_scale:bias dtype=float32 shape=(3, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_decoder/__layer_stack_with_per_layer/diffusion_atom_transformer_decoderksingle_cond_scale:weights dtype=float32 shape=(3, 128, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_decoder/__layer_stack_with_per_layer/diffusion_atom_transformer_decoderq_projection:bias dtype=float32 shape=(3, 4, 32)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_decoder/__layer_stack_with_per_layer/diffusion_atom_transformer_decoderq_projection:weights dtype=float32 shape=(3, 128, 4, 32)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_decoder/__layer_stack_with_per_layer/diffusion_atom_transformer_decoderqsingle_cond_bias:weights dtype=float32 shape=(3, 128, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_decoder/__layer_stack_with_per_layer/diffusion_atom_transformer_decoderqsingle_cond_layer_norm:scale dtype=float32 shape=(3, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_decoder/__layer_stack_with_per_layer/diffusion_atom_transformer_decoderqsingle_cond_scale:bias dtype=float32 shape=(3, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_decoder/__layer_stack_with_per_layer/diffusion_atom_transformer_decoderqsingle_cond_scale:weights dtype=float32 shape=(3, 128, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_decoder/__layer_stack_with_per_layer/diffusion_atom_transformer_decodertransition2:weights dtype=float32 shape=(3, 128, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_decoder/__layer_stack_with_per_layer/diffusion_atom_transformer_decoderv_projection:weights dtype=float32 shape=(3, 128, 4, 32)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_decoder/pair_input_layer_norm:scale dtype=float32 shape=(16,)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_decoder/pair_logits_projection:weights dtype=float32 shape=(16, 3, 4)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_encoder/__layer_stack_with_per_layer/diffusion_atom_transformer_encoderadaptive_zero_cond:bias dtype=float32 shape=(3, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_encoder/__layer_stack_with_per_layer/diffusion_atom_transformer_encoderadaptive_zero_cond:weights dtype=float32 shape=(3, 128, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_encoder/__layer_stack_with_per_layer/diffusion_atom_transformer_encoderffw_adaptive_zero_cond:bias dtype=float32 shape=(3, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_encoder/__layer_stack_with_per_layer/diffusion_atom_transformer_encoderffw_adaptive_zero_cond:weights dtype=float32 shape=(3, 128, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_encoder/__layer_stack_with_per_layer/diffusion_atom_transformer_encoderffw_single_cond_bias:weights dtype=float32 shape=(3, 128, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_encoder/__layer_stack_with_per_layer/diffusion_atom_transformer_encoderffw_single_cond_layer_norm:scale dtype=float32 shape=(3, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_encoder/__layer_stack_with_per_layer/diffusion_atom_transformer_encoderffw_single_cond_scale:bias dtype=float32 shape=(3, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_encoder/__layer_stack_with_per_layer/diffusion_atom_transformer_encoderffw_single_cond_scale:weights dtype=float32 shape=(3, 128, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_encoder/__layer_stack_with_per_layer/diffusion_atom_transformer_encoderffw_transition1:weights dtype=float32 shape=(3, 128, 512)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_encoder/__layer_stack_with_per_layer/diffusion_atom_transformer_encoderffw_transition2:weights dtype=float32 shape=(3, 256, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_encoder/__layer_stack_with_per_layer/diffusion_atom_transformer_encodergating_query:weights dtype=float32 shape=(3, 128, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_encoder/__layer_stack_with_per_layer/diffusion_atom_transformer_encoderk_projection:weights dtype=float32 shape=(3, 128, 4, 32)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_encoder/__layer_stack_with_per_layer/diffusion_atom_transformer_encoderksingle_cond_bias:weights dtype=float32 shape=(3, 128, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_encoder/__layer_stack_with_per_layer/diffusion_atom_transformer_encoderksingle_cond_layer_norm:scale dtype=float32 shape=(3, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_encoder/__layer_stack_with_per_layer/diffusion_atom_transformer_encoderksingle_cond_scale:bias dtype=float32 shape=(3, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_encoder/__layer_stack_with_per_layer/diffusion_atom_transformer_encoderksingle_cond_scale:weights dtype=float32 shape=(3, 128, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_encoder/__layer_stack_with_per_layer/diffusion_atom_transformer_encoderq_projection:bias dtype=float32 shape=(3, 4, 32)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_encoder/__layer_stack_with_per_layer/diffusion_atom_transformer_encoderq_projection:weights dtype=float32 shape=(3, 128, 4, 32)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_encoder/__layer_stack_with_per_layer/diffusion_atom_transformer_encoderqsingle_cond_bias:weights dtype=float32 shape=(3, 128, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_encoder/__layer_stack_with_per_layer/diffusion_atom_transformer_encoderqsingle_cond_layer_norm:scale dtype=float32 shape=(3, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_encoder/__layer_stack_with_per_layer/diffusion_atom_transformer_encoderqsingle_cond_scale:bias dtype=float32 shape=(3, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_encoder/__layer_stack_with_per_layer/diffusion_atom_transformer_encoderqsingle_cond_scale:weights dtype=float32 shape=(3, 128, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_encoder/__layer_stack_with_per_layer/diffusion_atom_transformer_encodertransition2:weights dtype=float32 shape=(3, 128, 128)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_encoder/__layer_stack_with_per_layer/diffusion_atom_transformer_encoderv_projection:weights dtype=float32 shape=(3, 128, 4, 32)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_encoder/pair_input_layer_norm:scale dtype=float32 shape=(16,)
name=diffuser/~/diffusion_head/diffusion_atom_transformer_encoder/pair_logits_projection:weights dtype=float32 shape=(16, 3, 4)
name=diffuser/~/diffusion_head/diffusion_embed_pair_distances_1:weights dtype=float32 shape=(1, 16)
name=diffuser/~/diffusion_head/diffusion_embed_pair_distances:weights dtype=float32 shape=(1, 16)
name=diffuser/~/diffusion_head/diffusion_embed_pair_offsets_1:weights dtype=float32 shape=(3, 16)
name=diffuser/~/diffusion_head/diffusion_embed_pair_offsets_valid:weights dtype=float32 shape=(1, 16)
name=diffuser/~/diffusion_head/diffusion_embed_pair_offsets:weights dtype=float32 shape=(3, 16)
name=diffuser/~/diffusion_head/diffusion_embed_ref_atom_name:weights dtype=float32 shape=(256, 128)
name=diffuser/~/diffusion_head/diffusion_embed_ref_charge:weights dtype=float32 shape=(1, 128)
name=diffuser/~/diffusion_head/diffusion_embed_ref_element:weights dtype=float32 shape=(128, 128)
name=diffuser/~/diffusion_head/diffusion_embed_ref_mask:weights dtype=float32 shape=(1, 128)
name=diffuser/~/diffusion_head/diffusion_embed_ref_pos:weights dtype=float32 shape=(3, 128)
name=diffuser/~/diffusion_head/diffusion_embed_trunk_pair_cond:weights dtype=float32 shape=(128, 16)
name=diffuser/~/diffusion_head/diffusion_embed_trunk_single_cond:weights dtype=float32 shape=(384, 128)
name=diffuser/~/diffusion_head/diffusion_lnorm_trunk_pair_cond:scale dtype=float32 shape=(128,)
name=diffuser/~/diffusion_head/diffusion_lnorm_trunk_single_cond:scale dtype=float32 shape=(384,)
name=diffuser/~/diffusion_head/diffusion_pair_mlp_1:weights dtype=float32 shape=(16, 16)
name=diffuser/~/diffusion_head/diffusion_pair_mlp_2:weights dtype=float32 shape=(16, 16)
name=diffuser/~/diffusion_head/diffusion_pair_mlp_3:weights dtype=float32 shape=(16, 16)
name=diffuser/~/diffusion_head/diffusion_project_atom_features_for_aggr:weights dtype=float32 shape=(128, 768)
name=diffuser/~/diffusion_head/diffusion_project_token_features_for_broadcast:weights dtype=float32 shape=(768, 128)
name=diffuser/~/diffusion_head/diffusion_single_to_pair_cond_col_1:weights dtype=float32 shape=(128, 16)
name=diffuser/~/diffusion_head/diffusion_single_to_pair_cond_col:weights dtype=float32 shape=(128, 16)
name=diffuser/~/diffusion_head/diffusion_single_to_pair_cond_row_1:weights dtype=float32 shape=(128, 16)
name=diffuser/~/diffusion_head/diffusion_single_to_pair_cond_row:weights dtype=float32 shape=(128, 16)
name=diffuser/~/diffusion_head/noise_embedding_initial_norm:scale dtype=float32 shape=(256,)
name=diffuser/~/diffusion_head/noise_embedding_initial_projection:weights dtype=float32 shape=(256, 384)
name=diffuser/~/diffusion_head/output_norm:scale dtype=float32 shape=(768,)
name=diffuser/~/diffusion_head/pair_cond_initial_norm:scale dtype=float32 shape=(267,)
name=diffuser/~/diffusion_head/pair_cond_initial_projection:weights dtype=float32 shape=(267, 128)
name=diffuser/~/diffusion_head/pair_transition_0ffw_layer_norm:offset dtype=float32 shape=(128,)
name=diffuser/~/diffusion_head/pair_transition_0ffw_layer_norm:scale dtype=float32 shape=(128,)
name=diffuser/~/diffusion_head/pair_transition_0ffw_transition1:weights dtype=float32 shape=(128, 512)
name=diffuser/~/diffusion_head/pair_transition_0ffw_transition2:weights dtype=float32 shape=(256, 128)
name=diffuser/~/diffusion_head/pair_transition_1ffw_layer_norm:offset dtype=float32 shape=(128,)
name=diffuser/~/diffusion_head/pair_transition_1ffw_layer_norm:scale dtype=float32 shape=(128,)
name=diffuser/~/diffusion_head/pair_transition_1ffw_transition1:weights dtype=float32 shape=(128, 512)
name=diffuser/~/diffusion_head/pair_transition_1ffw_transition2:weights dtype=float32 shape=(256, 128)
name=diffuser/~/diffusion_head/single_cond_embedding_norm:scale dtype=float32 shape=(384,)
name=diffuser/~/diffusion_head/single_cond_embedding_projection:weights dtype=float32 shape=(384, 768)
name=diffuser/~/diffusion_head/single_cond_initial_norm:scale dtype=float32 shape=(831,)
name=diffuser/~/diffusion_head/single_cond_initial_projection:weights dtype=float32 shape=(831, 384)
name=diffuser/~/diffusion_head/single_transition_0ffw_layer_norm:offset dtype=float32 shape=(384,)
name=diffuser/~/diffusion_head/single_transition_0ffw_layer_norm:scale dtype=float32 shape=(384,)
name=diffuser/~/diffusion_head/single_transition_0ffw_transition1:weights dtype=float32 shape=(384, 1536)
name=diffuser/~/diffusion_head/single_transition_0ffw_transition2:weights dtype=float32 shape=(768, 384)
name=diffuser/~/diffusion_head/single_transition_1ffw_layer_norm:offset dtype=float32 shape=(384,)
name=diffuser/~/diffusion_head/single_transition_1ffw_layer_norm:scale dtype=float32 shape=(384,)
name=diffuser/~/diffusion_head/single_transition_1ffw_transition1:weights dtype=float32 shape=(384, 1536)
name=diffuser/~/diffusion_head/single_transition_1ffw_transition2:weights dtype=float32 shape=(768, 384)
name=diffuser/~/diffusion_head/transformer/__layer_stack_with_per_layer/__layer_stack_with_per_layer/transformeradaptive_zero_cond:bias dtype=float32 shape=(6, 4, 768)
name=diffuser/~/diffusion_head/transformer/__layer_stack_with_per_layer/__layer_stack_with_per_layer/transformeradaptive_zero_cond:weights dtype=float32 shape=(6, 4, 384, 768)
name=diffuser/~/diffusion_head/transformer/__layer_stack_with_per_layer/__layer_stack_with_per_layer/transformerffw_adaptive_zero_cond:bias dtype=float32 shape=(6, 4, 768)
name=diffuser/~/diffusion_head/transformer/__layer_stack_with_per_layer/__layer_stack_with_per_layer/transformerffw_adaptive_zero_cond:weights dtype=float32 shape=(6, 4, 384, 768)
name=diffuser/~/diffusion_head/transformer/__layer_stack_with_per_layer/__layer_stack_with_per_layer/transformerffw_single_cond_bias:weights dtype=float32 shape=(6, 4, 384, 768)
name=diffuser/~/diffusion_head/transformer/__layer_stack_with_per_layer/__layer_stack_with_per_layer/transformerffw_single_cond_layer_norm:scale dtype=float32 shape=(6, 4, 384)
name=diffuser/~/diffusion_head/transformer/__layer_stack_with_per_layer/__layer_stack_with_per_layer/transformerffw_single_cond_scale:bias dtype=float32 shape=(6, 4, 768)
name=diffuser/~/diffusion_head/transformer/__layer_stack_with_per_layer/__layer_stack_with_per_layer/transformerffw_single_cond_scale:weights dtype=float32 shape=(6, 4, 384, 768)
name=diffuser/~/diffusion_head/transformer/__layer_stack_with_per_layer/__layer_stack_with_per_layer/transformerffw_transition1:weights dtype=float32 shape=(6, 4, 768, 3072)
name=diffuser/~/diffusion_head/transformer/__layer_stack_with_per_layer/__layer_stack_with_per_layer/transformerffw_transition2:weights dtype=float32 shape=(6, 4, 1536, 768)
name=diffuser/~/diffusion_head/transformer/__layer_stack_with_per_layer/__layer_stack_with_per_layer/transformergating_query:weights dtype=float32 shape=(6, 4, 768, 768)
name=diffuser/~/diffusion_head/transformer/__layer_stack_with_per_layer/__layer_stack_with_per_layer/transformerk_projection:weights dtype=float32 shape=(6, 4, 768, 16, 48)
name=diffuser/~/diffusion_head/transformer/__layer_stack_with_per_layer/__layer_stack_with_per_layer/transformerq_projection:bias dtype=float32 shape=(6, 4, 16, 48)
name=diffuser/~/diffusion_head/transformer/__layer_stack_with_per_layer/__layer_stack_with_per_layer/transformerq_projection:weights dtype=float32 shape=(6, 4, 768, 16, 48)
name=diffuser/~/diffusion_head/transformer/__layer_stack_with_per_layer/__layer_stack_with_per_layer/transformersingle_cond_bias:weights dtype=float32 shape=(6, 4, 384, 768)
name=diffuser/~/diffusion_head/transformer/__layer_stack_with_per_layer/__layer_stack_with_per_layer/transformersingle_cond_layer_norm:scale dtype=float32 shape=(6, 4, 384)
name=diffuser/~/diffusion_head/transformer/__layer_stack_with_per_layer/__layer_stack_with_per_layer/transformersingle_cond_scale:bias dtype=float32 shape=(6, 4, 768)
name=diffuser/~/diffusion_head/transformer/__layer_stack_with_per_layer/__layer_stack_with_per_layer/transformersingle_cond_scale:weights dtype=float32 shape=(6, 4, 384, 768)
name=diffuser/~/diffusion_head/transformer/__layer_stack_with_per_layer/__layer_stack_with_per_layer/transformertransition2:weights dtype=float32 shape=(6, 4, 768, 768)
name=diffuser/~/diffusion_head/transformer/__layer_stack_with_per_layer/__layer_stack_with_per_layer/transformerv_projection:weights dtype=float32 shape=(6, 4, 768, 16, 48)
name=diffuser/~/diffusion_head/transformer/__layer_stack_with_per_layer/pair_logits_projection:weights dtype=float32 shape=(6, 128, 4, 16)
name=diffuser/~/diffusion_head/transformer/pair_input_layer_norm:scale dtype=float32 shape=(128,)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/pair_attention1/act_norm:offset dtype=float32 shape=(4, 128)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/pair_attention1/act_norm:scale dtype=float32 shape=(4, 128)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/pair_attention1/gating_query:weights dtype=bfloat16 shape=(4, 128, 128)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/pair_attention1/k_projection:weights dtype=bfloat16 shape=(4, 4, 32, 128)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/pair_attention1/output_projection:weights dtype=bfloat16 shape=(4, 128, 128)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/pair_attention1/pair_bias_projection:weights dtype=bfloat16 shape=(4, 128, 4)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/pair_attention1/q_projection:weights dtype=bfloat16 shape=(4, 4, 32, 128)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/pair_attention1/v_projection:weights dtype=bfloat16 shape=(4, 128, 4, 32)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/pair_attention2/act_norm:offset dtype=float32 shape=(4, 128)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/pair_attention2/act_norm:scale dtype=float32 shape=(4, 128)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/pair_attention2/gating_query:weights dtype=bfloat16 shape=(4, 128, 128)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/pair_attention2/k_projection:weights dtype=bfloat16 shape=(4, 4, 32, 128)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/pair_attention2/output_projection:weights dtype=bfloat16 shape=(4, 128, 128)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/pair_attention2/pair_bias_projection:weights dtype=bfloat16 shape=(4, 128, 4)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/pair_attention2/q_projection:weights dtype=bfloat16 shape=(4, 4, 32, 128)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/pair_attention2/v_projection:weights dtype=bfloat16 shape=(4, 128, 4, 32)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/pair_transition/input_layer_norm:offset dtype=float32 shape=(4, 128)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/pair_transition/input_layer_norm:scale dtype=float32 shape=(4, 128)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/pair_transition/transition1:weights dtype=bfloat16 shape=(4, 128, 1024)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/pair_transition/transition2:weights dtype=bfloat16 shape=(4, 512, 128)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/single_attention_gating_query:weights dtype=bfloat16 shape=(4, 384, 384)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/single_attention_k_projection:weights dtype=bfloat16 shape=(4, 384, 16, 24)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/single_attention_layer_norm:offset dtype=float32 shape=(4, 384)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/single_attention_layer_norm:scale dtype=float32 shape=(4, 384)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/single_attention_q_projection:bias dtype=bfloat16 shape=(4, 16, 24)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/single_attention_q_projection:weights dtype=bfloat16 shape=(4, 384, 16, 24)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/single_attention_transition2:weights dtype=bfloat16 shape=(4, 384, 384)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/single_attention_v_projection:weights dtype=bfloat16 shape=(4, 384, 16, 24)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/single_pair_logits_norm:offset dtype=float32 shape=(4, 128)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/single_pair_logits_norm:scale dtype=float32 shape=(4, 128)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/single_pair_logits_projection:weights dtype=bfloat16 shape=(4, 128, 16)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/single_transition/input_layer_norm:offset dtype=float32 shape=(4, 384)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/single_transition/input_layer_norm:scale dtype=float32 shape=(4, 384)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/single_transition/transition1:weights dtype=bfloat16 shape=(4, 384, 3072)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/single_transition/transition2:weights dtype=bfloat16 shape=(4, 1536, 384)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/triangle_multiplication_incoming/center_norm:offset dtype=float32 shape=(4, 128)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/triangle_multiplication_incoming/center_norm:scale dtype=float32 shape=(4, 128)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/triangle_multiplication_incoming/gate:weights dtype=bfloat16 shape=(4, 128, 256)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/triangle_multiplication_incoming/gating_linear:weights dtype=bfloat16 shape=(4, 128, 128)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/triangle_multiplication_incoming/left_norm_input:offset dtype=float32 shape=(4, 128)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/triangle_multiplication_incoming/left_norm_input:scale dtype=float32 shape=(4, 128)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/triangle_multiplication_incoming/output_projection:weights dtype=bfloat16 shape=(4, 128, 128)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/triangle_multiplication_incoming/projection:weights dtype=bfloat16 shape=(4, 128, 256)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/triangle_multiplication_outgoing/center_norm:offset dtype=float32 shape=(4, 128)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/triangle_multiplication_outgoing/center_norm:scale dtype=float32 shape=(4, 128)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/triangle_multiplication_outgoing/gate:weights dtype=bfloat16 shape=(4, 128, 256)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/triangle_multiplication_outgoing/gating_linear:weights dtype=bfloat16 shape=(4, 128, 128)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/triangle_multiplication_outgoing/left_norm_input:offset dtype=float32 shape=(4, 128)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/triangle_multiplication_outgoing/left_norm_input:scale dtype=float32 shape=(4, 128)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/triangle_multiplication_outgoing/output_projection:weights dtype=bfloat16 shape=(4, 128, 128)
name=diffuser/confidence_head/__layer_stack_no_per_layer/confidence_pairformer/triangle_multiplication_outgoing/projection:weights dtype=bfloat16 shape=(4, 128, 256)
name=diffuser/confidence_head/~_embed_features/distogram_feat_project:weights dtype=bfloat16 shape=(39, 128)
name=diffuser/confidence_head/~_embed_features/left_target_feat_project:weights dtype=bfloat16 shape=(447, 128)
name=diffuser/confidence_head/~_embed_features/right_target_feat_project:weights dtype=bfloat16 shape=(447, 128)
name=diffuser/confidence_head/experimentally_resolved_ln:offset dtype=float32 shape=(384,)
name=diffuser/confidence_head/experimentally_resolved_ln:scale dtype=float32 shape=(384,)
name=diffuser/confidence_head/experimentally_resolved_logits:weights dtype=float32 shape=(384, 24, 2)
name=diffuser/confidence_head/left_half_distance_logits:weights dtype=float32 shape=(128, 64)
name=diffuser/confidence_head/logits_ln:offset dtype=float32 shape=(128,)
name=diffuser/confidence_head/logits_ln:scale dtype=float32 shape=(128,)
name=diffuser/confidence_head/pae_logits_ln:offset dtype=float32 shape=(128,)
name=diffuser/confidence_head/pae_logits_ln:scale dtype=float32 shape=(128,)
name=diffuser/confidence_head/pae_logits:weights dtype=float32 shape=(128, 64)
name=diffuser/confidence_head/plddt_logits_ln:offset dtype=float32 shape=(384,)
name=diffuser/confidence_head/plddt_logits_ln:scale dtype=float32 shape=(384,)
name=diffuser/confidence_head/plddt_logits:weights dtype=float32 shape=(384, 24, 50)
name=diffuser/distogram_head/half_logits:weights dtype=float32 shape=(128, 64)
name=diffuser/evoformer_conditioning_atom_transformer_encoder/__layer_stack_with_per_layer/evoformer_conditioning_atom_transformer_encoderadaptive_zero_cond:bias dtype=float32 shape=(3, 128)
name=diffuser/evoformer_conditioning_atom_transformer_encoder/__layer_stack_with_per_layer/evoformer_conditioning_atom_transformer_encoderadaptive_zero_cond:weights dtype=float32 shape=(3, 128, 128)
name=diffuser/evoformer_conditioning_atom_transformer_encoder/__layer_stack_with_per_layer/evoformer_conditioning_atom_transformer_encoderffw_adaptive_zero_cond:bias dtype=float32 shape=(3, 128)
name=diffuser/evoformer_conditioning_atom_transformer_encoder/__layer_stack_with_per_layer/evoformer_conditioning_atom_transformer_encoderffw_adaptive_zero_cond:weights dtype=float32 shape=(3, 128, 128)
name=diffuser/evoformer_conditioning_atom_transformer_encoder/__layer_stack_with_per_layer/evoformer_conditioning_atom_transformer_encoderffw_single_cond_bias:weights dtype=float32 shape=(3, 128, 128)
name=diffuser/evoformer_conditioning_atom_transformer_encoder/__layer_stack_with_per_layer/evoformer_conditioning_atom_transformer_encoderffw_single_cond_layer_norm:scale dtype=float32 shape=(3, 128)
name=diffuser/evoformer_conditioning_atom_transformer_encoder/__layer_stack_with_per_layer/evoformer_conditioning_atom_transformer_encoderffw_single_cond_scale:bias dtype=float32 shape=(3, 128)
name=diffuser/evoformer_conditioning_atom_transformer_encoder/__layer_stack_with_per_layer/evoformer_conditioning_atom_transformer_encoderffw_single_cond_scale:weights dtype=float32 shape=(3, 128, 128)
name=diffuser/evoformer_conditioning_atom_transformer_encoder/__layer_stack_with_per_layer/evoformer_conditioning_atom_transformer_encoderffw_transition1:weights dtype=float32 shape=(3, 128, 512)
name=diffuser/evoformer_conditioning_atom_transformer_encoder/__layer_stack_with_per_layer/evoformer_conditioning_atom_transformer_encoderffw_transition2:weights dtype=float32 shape=(3, 256, 128)
name=diffuser/evoformer_conditioning_atom_transformer_encoder/__layer_stack_with_per_layer/evoformer_conditioning_atom_transformer_encodergating_query:weights dtype=float32 shape=(3, 128, 128)
name=diffuser/evoformer_conditioning_atom_transformer_encoder/__layer_stack_with_per_layer/evoformer_conditioning_atom_transformer_encoderk_projection:weights dtype=float32 shape=(3, 128, 4, 32)
name=diffuser/evoformer_conditioning_atom_transformer_encoder/__layer_stack_with_per_layer/evoformer_conditioning_atom_transformer_encoderksingle_cond_bias:weights dtype=float32 shape=(3, 128, 128)
name=diffuser/evoformer_conditioning_atom_transformer_encoder/__layer_stack_with_per_layer/evoformer_conditioning_atom_transformer_encoderksingle_cond_layer_norm:scale dtype=float32 shape=(3, 128)
name=diffuser/evoformer_conditioning_atom_transformer_encoder/__layer_stack_with_per_layer/evoformer_conditioning_atom_transformer_encoderksingle_cond_scale:bias dtype=float32 shape=(3, 128)
name=diffuser/evoformer_conditioning_atom_transformer_encoder/__layer_stack_with_per_layer/evoformer_conditioning_atom_transformer_encoderksingle_cond_scale:weights dtype=float32 shape=(
gitextract_op0f7t9l/
├── .github/
│ └── workflows/
│ └── ci.yaml
├── CMakeLists.txt
├── CONTRIBUTING.md
├── LICENSE
├── OUTPUT_TERMS_OF_USE.md
├── README.md
├── WEIGHTS_PROHIBITED_USE_POLICY.md
├── WEIGHTS_TERMS_OF_USE.md
├── docker/
│ ├── Dockerfile
│ ├── dockerignore
│ └── jackhmmer_seq_limit.patch
├── docs/
│ ├── community_tools.md
│ ├── contributing.md
│ ├── input.md
│ ├── installation.md
│ ├── known_issues.md
│ ├── metadata_antibody_antigen.csv
│ ├── metadata_antibody_antigen.md
│ ├── model_parameters.md
│ ├── output.md
│ └── performance.md
├── fetch_databases.sh
├── legal/
│ ├── WEIGHTS_PROHIBITED_USE_POLICY-Bahasa-Indonesia.md
│ ├── WEIGHTS_PROHIBITED_USE_POLICY-Espanol-Latinoamerica.md
│ ├── WEIGHTS_PROHIBITED_USE_POLICY-Francais-Canada.md
│ ├── WEIGHTS_PROHIBITED_USE_POLICY-Portugues-Brazil.md
│ ├── WEIGHTS_TERMS_OF_USE-Bahasa-Indonesia.md
│ ├── WEIGHTS_TERMS_OF_USE-Espanol-Latinoamerica.md
│ ├── WEIGHTS_TERMS_OF_USE-Francais-Canada.md
│ └── WEIGHTS_TERMS_OF_USE-Portugues-Brazil.md
├── pyproject.toml
├── run_alphafold.py
├── run_alphafold_data_test.py
├── run_alphafold_test.py
└── src/
└── alphafold3/
├── __init__.py
├── build_data.py
├── common/
│ ├── base_config.py
│ ├── folding_input.py
│ ├── resources.py
│ ├── safe_pickle.py
│ └── testing/
│ └── data.py
├── constants/
│ ├── atom_types.py
│ ├── chemical_component_sets.py
│ ├── chemical_components.py
│ ├── converters/
│ │ ├── ccd_pickle_gen.py
│ │ └── chemical_component_sets_gen.py
│ ├── mmcif_names.py
│ ├── periodic_table.py
│ ├── residue_names.py
│ └── side_chains.py
├── cpp.cc
├── data/
│ ├── cpp/
│ │ ├── msa_profile_pybind.cc
│ │ └── msa_profile_pybind.h
│ ├── featurisation.py
│ ├── msa.py
│ ├── msa_config.py
│ ├── msa_features.py
│ ├── msa_identifiers.py
│ ├── parsers.py
│ ├── pipeline.py
│ ├── structure_stores.py
│ ├── template_realign.py
│ ├── templates.py
│ └── tools/
│ ├── hmmalign.py
│ ├── hmmbuild.py
│ ├── hmmsearch.py
│ ├── jackhmmer.py
│ ├── msa_tool.py
│ ├── nhmmer.py
│ ├── rdkit_utils.py
│ ├── shards.py
│ └── subprocess_utils.py
├── jax/
│ └── geometry/
│ ├── __init__.py
│ ├── rigid_matrix_vector.py
│ ├── rotation_matrix.py
│ ├── struct_of_array.py
│ ├── utils.py
│ └── vector.py
├── model/
│ ├── atom_layout/
│ │ └── atom_layout.py
│ ├── components/
│ │ ├── haiku_modules.py
│ │ ├── mapping.py
│ │ └── utils.py
│ ├── confidence_types.py
│ ├── confidences.py
│ ├── data3.py
│ ├── data_constants.py
│ ├── feat_batch.py
│ ├── features.py
│ ├── merging_features.py
│ ├── mkdssp_pybind.cc
│ ├── mkdssp_pybind.h
│ ├── mmcif_metadata.py
│ ├── model.py
│ ├── model_config.py
│ ├── msa_pairing.py
│ ├── network/
│ │ ├── atom_cross_attention.py
│ │ ├── confidence_head.py
│ │ ├── diffusion_head.py
│ │ ├── diffusion_transformer.py
│ │ ├── distogram_head.py
│ │ ├── evoformer.py
│ │ ├── featurization.py
│ │ ├── modules.py
│ │ ├── noise_level_embeddings.py
│ │ └── template_modules.py
│ ├── params.py
│ ├── pipeline/
│ │ ├── inter_chain_bonds.py
│ │ ├── pipeline.py
│ │ └── structure_cleaning.py
│ ├── post_processing.py
│ ├── protein_data_processing.py
│ └── scoring/
│ ├── alignment.py
│ ├── chirality.py
│ ├── covalent_bond_cleaning.py
│ └── scoring.py
├── parsers/
│ └── cpp/
│ ├── cif_dict.pyi
│ ├── cif_dict_lib.cc
│ ├── cif_dict_lib.h
│ ├── cif_dict_pybind.cc
│ ├── cif_dict_pybind.h
│ ├── fasta_iterator.pyi
│ ├── fasta_iterator_lib.cc
│ ├── fasta_iterator_lib.h
│ ├── fasta_iterator_pybind.cc
│ ├── fasta_iterator_pybind.h
│ ├── msa_conversion.pyi
│ ├── msa_conversion_pybind.cc
│ └── msa_conversion_pybind.h
├── scripts/
│ ├── copy_to_ssd.sh
│ └── gcp_mount_ssd.sh
├── structure/
│ ├── __init__.py
│ ├── bioassemblies.py
│ ├── bonds.py
│ ├── chemical_components.py
│ ├── cpp/
│ │ ├── aggregation.pyi
│ │ ├── aggregation_pybind.cc
│ │ ├── aggregation_pybind.h
│ │ ├── membership.pyi
│ │ ├── membership_pybind.cc
│ │ ├── membership_pybind.h
│ │ ├── mmcif_altlocs.cc
│ │ ├── mmcif_altlocs.h
│ │ ├── mmcif_atom_site.pyi
│ │ ├── mmcif_atom_site_pybind.cc
│ │ ├── mmcif_atom_site_pybind.h
│ │ ├── mmcif_layout.h
│ │ ├── mmcif_layout.pyi
│ │ ├── mmcif_layout_lib.cc
│ │ ├── mmcif_layout_pybind.cc
│ │ ├── mmcif_layout_pybind.h
│ │ ├── mmcif_struct_conn.h
│ │ ├── mmcif_struct_conn.pyi
│ │ ├── mmcif_struct_conn_lib.cc
│ │ ├── mmcif_struct_conn_pybind.cc
│ │ ├── mmcif_struct_conn_pybind.h
│ │ ├── mmcif_utils.pyi
│ │ ├── mmcif_utils_pybind.cc
│ │ ├── mmcif_utils_pybind.h
│ │ ├── string_array.pyi
│ │ ├── string_array_pybind.cc
│ │ └── string_array_pybind.h
│ ├── mmcif.py
│ ├── parsing.py
│ ├── sterics.py
│ ├── structure.py
│ ├── structure_tables.py
│ ├── table.py
│ └── test_utils.py
├── test_data/
│ ├── alphafold_run_outputs/
│ │ ├── run_alphafold_test_output_bucket_1024.pkl
│ │ └── run_alphafold_test_output_bucket_default.pkl
│ ├── featurised_example.json
│ ├── featurised_example.pkl
│ ├── miniature_databases/
│ │ ├── bfd-first_non_consensus_sequences__subsampled_1000.fasta
│ │ ├── mgy_clusters__subsampled_1000.fa
│ │ ├── nt_rna_2023_02_23_clust_seq_id_90_cov_80_rep_seq__subsampled_1000.fasta
│ │ ├── pdb_mmcif/
│ │ │ ├── 5y2e.cif
│ │ │ ├── 6s61.cif
│ │ │ ├── 6ydw.cif
│ │ │ └── 7rye.cif
│ │ ├── pdb_seqres_2022_09_28__subsampled_1000.fasta
│ │ ├── rfam_14_4_clustered_rep_seq__subsampled_1000.fasta
│ │ ├── rnacentral_active_seq_id_90_cov_80_linclust__subsampled_1000.fasta
│ │ ├── uniprot_all__subsampled_1000.fasta
│ │ └── uniref90__subsampled_1000.fasta
│ └── model_config.json
└── version.py
SYMBOL INDEX (1231 symbols across 128 files)
FILE: run_alphafold.py
function make_model_config (line 381) | def make_model_config(
class ModelRunner (line 401) | class ModelRunner:
method __init__ (line 404) | def __init__(
method model_params (line 415) | def model_params(self) -> hk.Params:
method _model (line 420) | def _model(
method run_inference (line 433) | def run_inference(
method extract_inference_results (line 455) | def extract_inference_results(
method extract_embeddings (line 468) | def extract_embeddings(
method extract_distogram (line 483) | def extract_distogram(
class ResultsForSeed (line 494) | class ResultsForSeed:
function predict_structure (line 513) | def predict_structure(
function write_fold_input_json (line 588) | def write_fold_input_json(
function write_outputs (line 600) | def write_outputs(
function replace_db_dir (line 670) | def replace_db_dir(path_with_db_dir: str, db_dirs: Sequence[str]) -> str:
function process_fold_input (line 691) | def process_fold_input(
function process_fold_input (line 708) | def process_fold_input(
function process_fold_input (line 724) | def process_fold_input(
function main (line 832) | def main(_):
FILE: run_alphafold_data_test.py
function _output (line 49) | def _output(name: str):
function _hash_data (line 55) | def _hash_data(x: Any, /) -> str:
function _ (line 62) | def _(x: bytes, /) -> str:
function _ (line 67) | def _(x: jax.Array) -> str:
function _ (line 72) | def _(x: np.ndarray) -> str:
function _ (line 79) | def _(_: structure.Structure) -> str:
function _ (line 84) | def _(_: atom_layout.AtomLayout) -> str:
function _generate_diff (line 88) | def _generate_diff(actual: str, expected: str) -> str:
class DataPipelineTest (line 100) | class DataPipelineTest(parameterized.TestCase):
method setUp (line 103) | def setUp(self):
method compare_golden (line 180) | def compare_golden(self, result_path: str) -> None:
method test_config (line 194) | def test_config(self):
method test_featurisation (line 203) | def test_featurisation(self):
method test_write_input_json (line 226) | def test_write_input_json(self):
method test_process_fold_input_runs_only_data_pipeline (line 238) | def test_process_fold_input_runs_only_data_pipeline(self):
method test_replace_db_dir (line 256) | def test_replace_db_dir(self, num_db_dirs: int) -> None:
FILE: run_alphafold_test.py
function _output (line 46) | def _output(name: str):
function _generate_diff (line 54) | def _generate_diff(actual: str, expected: str) -> str:
class InferenceTest (line 66) | class InferenceTest(parameterized.TestCase):
method setUp (line 69) | def setUp(self):
method test_model_inference (line 156) | def test_model_inference(self):
method test_process_fold_input_runs_only_inference (line 177) | def test_process_fold_input_runs_only_inference(self):
method test_inference (line 200) | def test_inference(self, bucket, seed):
FILE: src/alphafold3/build_data.py
function build_data (line 23) | def build_data():
FILE: src/alphafold3/common/base_config.py
function _strip_optional (line 25) | def _strip_optional(t: type[Any]) -> type[Any]:
class _Autocreate (line 37) | class _Autocreate:
method __init__ (line 39) | def __init__(self, **defaults: Any):
function autocreate (line 43) | def autocreate(**defaults: Any) -> Any:
function _clone_field (line 48) | def _clone_field(
class ConfigMeta (line 65) | class ConfigMeta(type):
method __new__ (line 68) | def __new__(mcs, name, bases, classdict):
class BaseConfig (line 128) | class BaseConfig(metaclass=ConfigMeta):
method _coercable_fields (line 140) | def _coercable_fields(self) -> Mapping[str, tuple[type['BaseConfig'], ...
method as_dict (line 143) | def as_dict(self) -> Mapping[str, Any]:
FILE: src/alphafold3/common/folding_input.py
function _validate_keys (line 46) | def _validate_keys(actual: Collection[str], expected: Collection[str]):
function _read_file (line 52) | def _read_file(path: pathlib.Path, json_path: pathlib.Path | None) -> str:
class Template (line 86) | class Template:
method __init__ (line 91) | def __init__(self, *, mmcif: str, query_to_template_map: Mapping[int, ...
method query_to_template_map (line 105) | def query_to_template_map(self) -> Mapping[int, int]:
method mmcif (line 109) | def mmcif(self) -> str:
method __hash__ (line 112) | def __hash__(self) -> int:
method __eq__ (line 115) | def __eq__(self, other: Self) -> bool:
class ProteinChain (line 123) | class ProteinChain:
method __init__ (line 136) | def __init__(
method id (line 187) | def id(self) -> str:
method sequence (line 191) | def sequence(self) -> str:
method ptms (line 202) | def ptms(self) -> Sequence[tuple[str, int]]:
method description (line 206) | def description(self) -> str | None:
method paired_msa (line 210) | def paired_msa(self) -> str | None:
method unpaired_msa (line 214) | def unpaired_msa(self) -> str | None:
method templates (line 218) | def templates(self) -> Sequence[Template] | None:
method __len__ (line 221) | def __len__(self) -> int:
method __eq__ (line 224) | def __eq__(self, other: Self) -> bool:
method __hash__ (line 235) | def __hash__(self) -> int:
method hash_without_id (line 246) | def hash_without_id(self) -> int:
method from_alphafoldserver_dict (line 258) | def from_alphafoldserver_dict(
method from_dict (line 298) | def from_dict(
method to_dict (line 389) | def to_dict(
method to_ccd_sequence (line 420) | def to_ccd_sequence(self) -> Sequence[str]:
method fill_missing_fields (line 430) | def fill_missing_fields(self) -> Self:
class RnaChain (line 443) | class RnaChain:
method __init__ (line 454) | def __init__(
method id (line 494) | def id(self) -> str:
method sequence (line 498) | def sequence(self) -> str:
method modifications (line 509) | def modifications(self) -> Sequence[tuple[str, int]]:
method description (line 513) | def description(self) -> str | None:
method unpaired_msa (line 517) | def unpaired_msa(self) -> str | None:
method __len__ (line 520) | def __len__(self) -> int:
method __eq__ (line 523) | def __eq__(self, other: Self) -> bool:
method __hash__ (line 532) | def __hash__(self) -> int:
method hash_without_id (line 541) | def hash_without_id(self) -> int:
method from_alphafoldserver_dict (line 551) | def from_alphafoldserver_dict(
method from_dict (line 564) | def from_dict(
method to_dict (line 612) | def to_dict(
method to_ccd_sequence (line 629) | def to_ccd_sequence(self) -> Sequence[str]:
method fill_missing_fields (line 639) | def fill_missing_fields(self) -> Self:
class DnaChain (line 649) | class DnaChain:
method __init__ (line 654) | def __init__(
method id (line 687) | def id(self) -> str:
method sequence (line 691) | def sequence(self) -> str:
method description (line 702) | def description(self) -> str | None:
method __len__ (line 705) | def __len__(self) -> int:
method __eq__ (line 708) | def __eq__(self, other: Self) -> bool:
method __hash__ (line 716) | def __hash__(self) -> int:
method modifications (line 721) | def modifications(self) -> Sequence[tuple[str, int]]:
method hash_without_id (line 724) | def hash_without_id(self) -> int:
method from_alphafoldserver_dict (line 729) | def from_alphafoldserver_dict(
method from_dict (line 742) | def from_dict(
method to_dict (line 762) | def to_dict(
method to_ccd_sequence (line 778) | def to_ccd_sequence(self) -> Sequence[str]:
class Ligand (line 790) | class Ligand:
method __post_init__ (line 809) | def __post_init__(self):
method __len__ (line 822) | def __len__(self) -> int:
method hash_without_id (line 828) | def hash_without_id(self) -> int:
method from_alphafoldserver_dict (line 833) | def from_alphafoldserver_dict(
method from_dict (line 847) | def from_dict(
method to_dict (line 882) | def to_dict(
function _sample_rng_seed (line 896) | def _sample_rng_seed() -> int:
function _validate_user_ccd_keys (line 902) | def _validate_user_ccd_keys(keys: Sequence[str], component_name: str) ->...
class Input (line 932) | class Input:
method __post_init__ (line 961) | def __post_init__(self):
method protein_chains (line 992) | def protein_chains(self) -> Sequence[ProteinChain]:
method rna_chains (line 996) | def rna_chains(self) -> Sequence[RnaChain]:
method dna_chains (line 1000) | def dna_chains(self) -> Sequence[DnaChain]:
method ligands (line 1004) | def ligands(self) -> Sequence[Ligand]:
method sanitised_name (line 1007) | def sanitised_name(self) -> str:
method from_alphafoldserver_fold_job (line 1014) | def from_alphafoldserver_fold_job(cls, fold_job: Mapping[str, Any]) ->...
method from_json (line 1103) | def from_json(
method from_mmcif (line 1254) | def from_mmcif(cls, mmcif_str: str, ccd: chemical_components.Ccd) -> S...
method to_structure (line 1365) | def to_structure(self, ccd: chemical_components.Ccd) -> structure.Stru...
method to_json (line 1436) | def to_json(self) -> str:
method fill_missing_fields (line 1471) | def fill_missing_fields(self) -> Self:
method with_multiple_seeds (line 1481) | def with_multiple_seeds(self, num_seeds: int) -> Self:
function load_fold_inputs_from_path (line 1494) | def load_fold_inputs_from_path(json_path: pathlib.Path) -> Iterator[Input]:
function load_fold_inputs_from_dir (line 1523) | def load_fold_inputs_from_dir(input_dir: pathlib.Path) -> Iterator[Input]:
FILE: src/alphafold3/common/resources.py
function filename (line 29) | def filename(name: str | os.PathLike[str]) -> str:
function open_resource (line 44) | def open_resource(
function open_resource (line 51) | def open_resource(
function open_resource (line 57) | def open_resource(
function get_resource_dir (line 70) | def get_resource_dir(path: str | os.PathLike[str]) -> os.PathLike[str]:
function walk (line 74) | def walk(path: str) -> Iterator[tuple[str, list[str], list[str]]]:
FILE: src/alphafold3/common/safe_pickle.py
class _RestrictedUnpickler (line 42) | class _RestrictedUnpickler(pickle.Unpickler):
method find_class (line 45) | def find_class(self, module: str, name: str) -> Any:
function load (line 52) | def load(file_obj: BinaryIO) -> Any:
FILE: src/alphafold3/common/testing/data.py
class Data (line 20) | class Data:
method __init__ (line 23) | def __init__(self, data_dir: os.PathLike[str] | str):
method path (line 31) | def path(self, data_name: str | os.PathLike[str] | None = None) -> str:
method load (line 48) | def load(
method load (line 54) | def load(
method load (line 59) | def load(
FILE: src/alphafold3/constants/chemical_components.py
function _load_ccd_pickle_cached (line 29) | def _load_ccd_pickle_cached(
class Ccd (line 37) | class Ccd(Mapping[str, Mapping[str, Sequence[str]]]):
method __init__ (line 48) | def __init__(
method __getitem__ (line 75) | def __getitem__(self, key: str) -> Mapping[str, Sequence[str]]:
method __contains__ (line 78) | def __contains__(self, key: str) -> bool:
method __iter__ (line 81) | def __iter__(self) -> Iterator[str]:
method __len__ (line 84) | def __len__(self) -> int:
method __hash__ (line 87) | def __hash__(self) -> int:
method get (line 90) | def get(
method items (line 95) | def items(self) -> ItemsView[str, Mapping[str, Sequence[str]]]:
method values (line 98) | def values(self) -> ValuesView[Mapping[str, Sequence[str]]]:
method keys (line 101) | def keys(self) -> KeysView[str]:
class ComponentInfo (line 106) | class ComponentInfo:
function mmcif_to_info (line 117) | def mmcif_to_info(mmcif: Mapping[str, Sequence[str]]) -> ComponentInfo:
function component_name_to_info (line 172) | def component_name_to_info(ccd: Ccd, res_name: str) -> ComponentInfo | N...
function type_symbol (line 179) | def type_symbol(ccd: Ccd, res_name: str, atom_name: str) -> str:
FILE: src/alphafold3/constants/converters/ccd_pickle_gen.py
function main (line 22) | def main(argv: Sequence[str]) -> None:
FILE: src/alphafold3/constants/converters/chemical_component_sets_gen.py
function find_ions_and_glycans_in_ccd (line 29) | def find_ions_and_glycans_in_ccd(
function main (line 61) | def main(argv: Sequence[str]) -> None:
FILE: src/alphafold3/constants/mmcif_names.py
function is_standard_polymer_type (line 118) | def is_standard_polymer_type(chain_type: str) -> bool:
function guess_polymer_type (line 130) | def guess_polymer_type(chain_residues: Sequence[str]) -> str:
function fix_non_standard_polymer_res (line 176) | def fix_non_standard_polymer_res(*, res_name: str, chain_type: str) -> str:
FILE: src/alphafold3/constants/periodic_table.py
class Element (line 21) | class Element:
FILE: src/alphafold3/constants/residue_names.py
function letters_three_to_one (line 234) | def letters_three_to_one(restype: str, *, default: str) -> str:
FILE: src/alphafold3/cpp.cc
type alphafold3 (line 25) | namespace alphafold3 {
function PYBIND11_MODULE (line 29) | PYBIND11_MODULE(cpp, m) {
FILE: src/alphafold3/data/cpp/msa_profile_pybind.cc
function ComputeMsaProfile (line 22) | py::array_t<double> ComputeMsaProfile(
type alphafold3 (line 72) | namespace alphafold3 {
function RegisterModuleMsaProfile (line 74) | void RegisterModuleMsaProfile(pybind11::module m) {
FILE: src/alphafold3/data/cpp/msa_profile_pybind.h
function namespace (line 16) | namespace alphafold3 {
FILE: src/alphafold3/data/featurisation.py
function validate_fold_input (line 24) | def validate_fold_input(fold_input: folding_input.Input):
function featurise_input (line 38) | def featurise_input(
FILE: src/alphafold3/data/msa.py
class Error (line 28) | class Error(Exception):
function _featurize (line 32) | def _featurize(seq: str, chain_poly_type: str) -> str | list[int]:
function sequences_are_feature_equivalent (line 42) | def sequences_are_feature_equivalent(
class Msa (line 52) | class Msa:
method __init__ (line 55) | def __init__(
method from_multiple_msas (line 113) | def from_multiple_msas(
method from_multiple_a3ms (line 156) | def from_multiple_a3ms(
method from_a3m (line 199) | def from_a3m(
method from_empty (line 229) | def from_empty(cls, query_sequence: str, chain_poly_type: str) -> Self:
method depth (line 240) | def depth(self) -> int:
method __repr__ (line 243) | def __repr__(self) -> str:
method to_a3m (line 246) | def to_a3m(self) -> str:
method featurize (line 254) | def featurize(self) -> MutableMapping[str, np.ndarray]:
function get_msa_tool (line 287) | def get_msa_tool(
function get_msa (line 318) | def get_msa(
FILE: src/alphafold3/data/msa_config.py
function _validate_chain_poly_type (line 19) | def _validate_chain_poly_type(chain_poly_type: str) -> None:
class DatabaseConfig (line 28) | class DatabaseConfig:
class JackhmmerConfig (line 36) | class JackhmmerConfig:
class NhmmerConfig (line 69) | class NhmmerConfig:
class RunConfig (line 102) | class RunConfig:
method __post_init__ (line 117) | def __post_init__(self):
class HmmsearchConfig (line 125) | class HmmsearchConfig:
class TemplateToolConfig (line 143) | class TemplateToolConfig:
method __post_init__ (line 151) | def __post_init__(self):
class TemplateFilterConfig (line 156) | class TemplateFilterConfig:
method no_op_filter (line 167) | def no_op_filter(cls) -> Self:
class TemplatesConfig (line 180) | class TemplatesConfig:
FILE: src/alphafold3/data/msa_features.py
function extract_msa_features (line 71) | def extract_msa_features(
function extract_species_ids (line 181) | def extract_species_ids(msa_descriptions: Sequence[str]) -> Sequence[str]:
FILE: src/alphafold3/data/msa_identifiers.py
class Identifiers (line 46) | class Identifiers:
function _parse_sequence_identifier (line 50) | def _parse_sequence_identifier(msa_sequence_identifier: str) -> Identifi...
function _extract_sequence_identifier (line 70) | def _extract_sequence_identifier(description: str) -> str | None:
function get_identifiers (line 79) | def get_identifiers(description: str) -> Identifiers:
FILE: src/alphafold3/data/parsers.py
function lazy_parse_fasta_string (line 23) | def lazy_parse_fasta_string(fasta_string: str) -> Iterable[tuple[str, st...
function parse_fasta (line 49) | def parse_fasta(fasta_string: str) -> tuple[Sequence[str], Sequence[str]]:
function convert_a3m_to_stockholm (line 64) | def convert_a3m_to_stockholm(a3m: str, max_seqs: int | None = None) -> str:
function convert_stockholm_to_a3m (line 104) | def convert_stockholm_to_a3m(
FILE: src/alphafold3/data/pipeline.py
function _get_protein_templates (line 30) | def _get_protein_templates(
function _get_protein_msa_and_templates (line 71) | def _get_protein_msa_and_templates(
function _get_rna_msa (line 156) | def _get_rna_msa(
class DataPipelineConfig (line 204) | class DataPipelineConfig:
class DataPipeline (line 292) | class DataPipeline:
method __init__ (line 295) | def __init__(self, data_pipeline_config: DataPipelineConfig):
method process_protein_chain (line 457) | def process_protein_chain(
method process_rna_chain (line 546) | def process_rna_chain(
method process (line 576) | def process(self, fold_input: folding_input.Input) -> folding_input.In...
FILE: src/alphafold3/data/structure_stores.py
class NotFoundError (line 20) | class NotFoundError(KeyError):
class StructureStore (line 24) | class StructureStore:
method __init__ (line 27) | def __init__(
method _tar_members (line 52) | def _tar_members(self) -> Mapping[str, tarfile.TarInfo]:
method get_mmcif_str (line 61) | def get_mmcif_str(self, target_name: str) -> str:
method target_names (line 92) | def target_names(self) -> Sequence[str]:
FILE: src/alphafold3/data/template_realign.py
class AlignmentError (line 16) | class AlignmentError(Exception):
function realign_hit_to_structure (line 20) | def realign_hit_to_structure(
function _remap_to_struc_seq (line 107) | def _remap_to_struc_seq(
FILE: src/alphafold3/data/templates.py
class _Polymer (line 62) | class _Polymer:
function _encode_restype (line 89) | def _encode_restype(
class Error (line 145) | class Error(Exception):
class HitDateError (line 149) | class HitDateError(Error):
class InvalidTemplateError (line 153) | class InvalidTemplateError(Error):
class Hit (line 158) | class Hit:
method query_to_hit_mapping (line 193) | def query_to_hit_mapping(self) -> Mapping[int, int]:
method matching_sequence (line 241) | def matching_sequence(self) -> str:
method output_templates_sequence (line 249) | def output_templates_sequence(self) -> str:
method length_ratio (line 257) | def length_ratio(self) -> float:
method align_ratio (line 262) | def align_ratio(self) -> float:
method is_valid (line 267) | def is_valid(self) -> bool:
method full_name (line 278) | def full_name(self) -> str:
method __post_init__ (line 282) | def __post_init__(self):
method keep (line 302) | def keep(
function _filter_hits (line 362) | def _filter_hits(
class Templates (line 397) | class Templates:
method __init__ (line 405) | def __init__(
method from_seq_and_a3m (line 430) | def from_seq_and_a3m(
method from_hmmsearch_a3m (line 486) | def from_hmmsearch_a3m(
method query_sequence (line 573) | def query_sequence(self) -> str:
method hits (line 577) | def hits(self) -> tuple[Hit, ...]:
method query_release_date (line 581) | def query_release_date(self) -> datetime.date | None:
method num_hits (line 585) | def num_hits(self) -> int:
method release_date_cutoff (line 589) | def release_date_cutoff(self) -> datetime.date:
method __repr__ (line 598) | def __repr__(self) -> str:
method filter (line 601) | def filter(
method get_hits_with_structures (line 644) | def get_hits_with_structures(
method featurize (line 662) | def featurize(
method structures (line 721) | def structures(self) -> Iterator[structure.Structure]:
function _parse_hit_description (line 755) | def _parse_hit_description(description: str) -> tuple[str, str, int, int...
function _parse_hit_metadata (line 773) | def _parse_hit_metadata(
function get_polymer_features (line 820) | def get_polymer_features(
function _get_ligand_features (line 897) | def _get_ligand_features(
function package_template_features (line 923) | def package_template_features(
function _resolve_path (line 948) | def _resolve_path(path: os.PathLike[str] | str) -> str:
function run_hmmsearch_with_a3m (line 959) | def run_hmmsearch_with_a3m(
FILE: src/alphafold3/data/tools/hmmalign.py
function _to_a3m (line 21) | def _to_a3m(sequences: Sequence[str], name_prefix: str = 'sequence') -> ...
class Hmmalign (line 28) | class Hmmalign:
method __init__ (line 31) | def __init__(self, binary_path: str):
method align_sequences (line 46) | def align_sequences(
method align (line 59) | def align(
method align_sequences_to_profile (line 113) | def align_sequences_to_profile(self, profile: str, sequences_a3m: str)...
FILE: src/alphafold3/data/tools/hmmbuild.py
class Hmmbuild (line 22) | class Hmmbuild(object):
method __init__ (line 25) | def __init__(
method build_profile_from_sto (line 52) | def build_profile_from_sto(self, sto: str, model_construction='fast') ...
method build_profile_from_a3m (line 70) | def build_profile_from_a3m(self, a3m: str) -> str:
method _build_profile (line 89) | def _build_profile(
FILE: src/alphafold3/data/tools/hmmsearch.py
class Hmmsearch (line 22) | class Hmmsearch(object):
method __init__ (line 25) | def __init__(
method query_with_hmm (line 97) | def query_with_hmm(self, hmm: str) -> str:
method query_with_a3m (line 134) | def query_with_a3m(self, a3m_in: str) -> str:
method query_with_sto (line 142) | def query_with_sto(
FILE: src/alphafold3/data/tools/jackhmmer.py
class Jackhmmer (line 29) | class Jackhmmer(msa_tool.MsaTool):
method __init__ (line 32) | def __init__(
method query (line 138) | def query(self, target_sequence: str) -> msa_tool.MsaToolResult:
method _query_db_shard (line 189) | def _query_db_shard(
function _merge_jackhmmer_results (line 276) | def _merge_jackhmmer_results(
FILE: src/alphafold3/data/tools/msa_tool.py
class MsaToolResult (line 18) | class MsaToolResult:
class MsaTool (line 35) | class MsaTool(Protocol):
method query (line 38) | def query(self, target_sequence: str) -> MsaToolResult:
FILE: src/alphafold3/data/tools/nhmmer.py
class Nhmmer (line 35) | class Nhmmer(msa_tool.MsaTool):
method __init__ (line 38) | def __init__(
method query (line 139) | def query(self, target_sequence: str) -> msa_tool.MsaToolResult:
method _query_db_shard (line 191) | def _query_db_shard(
function _merge_nhmmer_results (line 295) | def _merge_nhmmer_results(
FILE: src/alphafold3/data/tools/rdkit_utils.py
class MolFromMmcifError (line 42) | class MolFromMmcifError(Exception):
class UnsupportedMolBondError (line 46) | class UnsupportedMolBondError(Exception):
function _populate_atoms_in_mol (line 50) | def _populate_atoms_in_mol(
function _populate_bonds_in_mol (line 104) | def _populate_bonds_in_mol(
function sanitize_mol (line 131) | def sanitize_mol(mol, sort_alphabetically, remove_hydrogens) -> rd_chem....
function _add_conformer_to_mol (line 143) | def _add_conformer_to_mol(mol, conformer, force_parse) -> rd_chem.Mol:
function mol_from_ccd_cif (line 155) | def mol_from_ccd_cif(
function mol_to_ccd_cif (line 245) | def mol_to_ccd_cif(
function _format_atom_name (line 350) | def _format_atom_name(atom_name: str, atom_type: str) -> str:
function parse_atom_data (line 384) | def parse_atom_data(
function parse_bond_data (line 405) | def parse_bond_data(
function _parse_ideal_conformer (line 430) | def _parse_ideal_conformer(mol_cif: cif_dict.CifDict) -> rd_chem.Conformer:
function sort_atoms_by_name (line 460) | def sort_atoms_by_name(mol: rd_chem.Mol) -> rd_chem.Mol:
function assign_atom_names_from_graph (line 477) | def assign_atom_names_from_graph(
function get_random_conformer (line 525) | def get_random_conformer(
FILE: src/alphafold3/data/tools/shards.py
class ShardSpec (line 42) | class ShardSpec:
function parse_shard_spec (line 48) | def parse_shard_spec(path: str) -> ShardSpec | None:
function get_sharded_paths (line 77) | def get_sharded_paths(shard_spec: str) -> Sequence[str] | None:
FILE: src/alphafold3/data/tools/subprocess_utils.py
function create_query_fasta_file (line 22) | def create_query_fasta_file(sequence: str, path: str, linewidth: int = 80):
function check_binary_exists (line 33) | def check_binary_exists(path: str, name: str) -> None:
function jackhmmer_seq_limit_supported (line 39) | def jackhmmer_seq_limit_supported(jackhmmer_path: str) -> bool:
function run (line 53) | def run(
FILE: src/alphafold3/jax/geometry/rigid_matrix_vector.py
function _compute_covariance_matrix (line 30) | def _compute_covariance_matrix(
class Rigid3Array (line 100) | class Rigid3Array:
method __matmul__ (line 106) | def __matmul__(self, other: Self) -> Self:
method inverse (line 111) | def inverse(self) -> Self:
method apply_to_point (line 117) | def apply_to_point(self, point: vector.Vec3Array) -> vector.Vec3Array:
method apply_inverse_to_point (line 121) | def apply_inverse_to_point(self, point: vector.Vec3Array) -> vector.Ve...
method compose_rotation (line 126) | def compose_rotation(self, other_rotation: rotation_matrix.Rot3Array) ...
method identity (line 134) | def identity(cls, shape: Any, dtype: jnp.dtype = jnp.float32) -> Self:
method scale_translation (line 141) | def scale_translation(self, factor: Float) -> Self:
method to_array (line 145) | def to_array(self):
method from_array (line 151) | def from_array(cls, array):
method from_array4x4 (line 157) | def from_array4x4(cls, array: jnp.ndarray) -> Self:
method from_point_alignment (line 172) | def from_point_alignment(
method __getstate__ (line 217) | def __getstate__(self):
method __setstate__ (line 220) | def __setstate__(self, state):
FILE: src/alphafold3/jax/geometry/rotation_matrix.py
function make_matrix_svd_factors (line 32) | def make_matrix_svd_factors() -> np.ndarray:
function largest_evec (line 69) | def largest_evec(m):
function largest_evec_jvp (line 74) | def largest_evec_jvp(primals, tangents):
class Rot3Array (line 109) | class Rot3Array:
method inverse (line 124) | def inverse(self) -> Self:
method apply_to_point (line 132) | def apply_to_point(self, point: vector.Vec3Array) -> vector.Vec3Array:
method apply_inverse_to_point (line 140) | def apply_inverse_to_point(self, point: vector.Vec3Array) -> vector.Ve...
method __matmul__ (line 144) | def __matmul__(self, other: Self) -> Self:
method identity (line 152) | def identity(cls, shape: Any, dtype: jnp.dtype = jnp.float32) -> Self:
method from_two_vectors (line 159) | def from_two_vectors(cls, e0: vector.Vec3Array, e1: vector.Vec3Array) ...
method from_array (line 182) | def from_array(cls, array: jnp.ndarray) -> Self:
method to_array (line 188) | def to_array(self) -> jnp.ndarray:
method from_quaternion (line 200) | def from_quaternion(
method from_svd (line 228) | def from_svd(cls, mat: jnp.ndarray, use_quat_formula: bool = True) -> ...
method random_uniform (line 278) | def random_uniform(cls, key, shape, dtype=jnp.float32) -> Self:
method __getstate__ (line 284) | def __getstate__(self):
method __setstate__ (line 287) | def __setstate__(self, state):
FILE: src/alphafold3/jax/geometry/struct_of_array.py
function get_item (line 18) | def get_item(instance, key):
function get_shape (line 33) | def get_shape(instance):
function get_len (line 44) | def get_len(instance):
function get_dtype (line 54) | def get_dtype(instance):
function replace (line 79) | def replace(instance, **kwargs):
function post_init (line 83) | def post_init(instance):
function flatten (line 134) | def flatten(instance):
function make_metadata_class (line 150) | def make_metadata_class(cls):
function get_fields (line 163) | def get_fields(cls_or_instance, filterfn, return_values=False):
function get_array_fields (line 174) | def get_array_fields(cls, return_values=False):
function get_metadata_fields (line 182) | def get_metadata_fields(cls, return_values=False):
class StructOfArray (line 190) | class StructOfArray:
method __init__ (line 193) | def __init__(self, same_dtype=True):
method __call__ (line 196) | def __call__(self, cls):
FILE: src/alphafold3/jax/geometry/utils.py
function unstack (line 19) | def unstack(value: jnp.ndarray, axis: int = -1) -> list[jnp.ndarray]:
function angdiff (line 26) | def angdiff(alpha: jnp.ndarray, beta: jnp.ndarray) -> jnp.ndarray:
function weighted_mean (line 33) | def weighted_mean(
FILE: src/alphafold3/jax/geometry/vector.py
class Vec3Array (line 29) | class Vec3Array:
method __post_init__ (line 46) | def __post_init__(self):
method __add__ (line 57) | def __add__(self, other: Self) -> Self:
method __sub__ (line 60) | def __sub__(self, other: Self) -> Self:
method __mul__ (line 63) | def __mul__(self, other: Float) -> Self:
method __rmul__ (line 66) | def __rmul__(self, other: Float) -> Self:
method __truediv__ (line 69) | def __truediv__(self, other: Float) -> Self:
method __neg__ (line 72) | def __neg__(self) -> Self:
method __pos__ (line 75) | def __pos__(self) -> Self:
method cross (line 78) | def cross(self, other: Self) -> Self:
method dot (line 85) | def dot(self, other: Self) -> Float:
method norm (line 89) | def norm(self, epsilon: float = 1e-6) -> Float:
method norm2 (line 97) | def norm2(self):
method normalized (line 100) | def normalized(self, epsilon: float = 1e-6) -> Self:
method zeros (line 105) | def zeros(cls, shape, dtype=jnp.float32):
method to_array (line 113) | def to_array(self) -> jnp.ndarray:
method from_array (line 117) | def from_array(cls, array):
method __getstate__ (line 120) | def __getstate__(self):
method __setstate__ (line 126) | def __setstate__(self, state):
function square_euclidean_distance (line 133) | def square_euclidean_distance(
function dot (line 155) | def dot(vector1: Vec3Array, vector2: Vec3Array) -> Float:
function cross (line 159) | def cross(vector1: Vec3Array, vector2: Vec3Array) -> Float:
function norm (line 163) | def norm(vector: Vec3Array, epsilon: float = 1e-6) -> Float:
function normalized (line 167) | def normalized(vector: Vec3Array, epsilon: float = 1e-6) -> Vec3Array:
function euclidean_distance (line 171) | def euclidean_distance(
function dihedral_angle (line 191) | def dihedral_angle(
function random_gaussian_vector (line 220) | def random_gaussian_vector(shape, key, dtype=jnp.float32) -> Vec3Array:
FILE: src/alphafold3/model/atom_layout/atom_layout.py
class AtomLayout (line 37) | class AtomLayout:
method __post_init__ (line 76) | def __post_init__(self):
method __getitem__ (line 99) | def __getitem__(self, key: NumpyIndex) -> 'AtomLayout':
method __eq__ (line 113) | def __eq__(self, other: 'AtomLayout') -> bool:
method copy_and_pad_to (line 138) | def copy_and_pad_to(self, shape: tuple[int, ...]) -> 'AtomLayout':
method to_array (line 184) | def to_array(self) -> np.ndarray:
method from_array (line 212) | def from_array(cls, arr: np.ndarray) -> 'AtomLayout':
method shape (line 231) | def shape(self) -> tuple[int, ...]:
class Residues (line 236) | class Residues:
method __post_init__ (line 260) | def __post_init__(self):
method __getitem__ (line 278) | def __getitem__(self, key: NumpyIndex) -> 'Residues':
method __eq__ (line 294) | def __eq__(self, other: 'Residues') -> bool:
method shape (line 301) | def shape(self) -> tuple[int, ...]:
class GatherInfo (line 306) | class GatherInfo:
method __post_init__ (line 327) | def __post_init__(self):
method __getitem__ (line 335) | def __getitem__(self, key: NumpyIndex) -> 'GatherInfo':
method shape (line 343) | def shape(self) -> tuple[int, ...]:
method as_np_or_jnp (line 346) | def as_np_or_jnp(self, xnp: types.ModuleType) -> 'GatherInfo':
method as_dict (line 353) | def as_dict(
method from_dict (line 365) | def from_dict(
function fill_in_optional_fields (line 379) | def fill_in_optional_fields(
function guess_deprotonation (line 428) | def guess_deprotonation(residues: Residues) -> Residues:
function atom_layout_from_structure (line 455) | def atom_layout_from_structure(
function residues_from_structure (line 504) | def residues_from_structure(
function get_link_drop_atoms (line 636) | def get_link_drop_atoms(
function get_bonded_atoms (line 685) | def get_bonded_atoms(
function make_flat_atom_layout (line 737) | def make_flat_atom_layout(
function compute_gather_idxs (line 866) | def compute_gather_idxs(
function convert (line 906) | def convert(
function make_structure (line 976) | def make_structure(
function _assert_all_arrays_have_same_shape (line 1065) | def _assert_all_arrays_have_same_shape(
FILE: src/alphafold3/model/components/haiku_modules.py
class LayerNorm (line 41) | class LayerNorm(hk.LayerNorm):
method __init__ (line 53) | def __init__(
method __call__ (line 82) | def __call__(self, x: jnp.ndarray) -> jnp.ndarray:
function haiku_linear_get_params (line 115) | def haiku_linear_get_params(
class Linear (line 188) | class Linear(hk.Module):
method __init__ (line 199) | def __init__(
method __call__ (line 244) | def __call__(self, inputs: jnp.ndarray) -> jnp.ndarray:
function _get_initializer_scale (line 318) | def _get_initializer_scale(initializer_name, input_shape):
FILE: src/alphafold3/model/components/mapping.py
function _maybe_slice (line 31) | def _maybe_slice(array, i, slice_size, axis):
function _maybe_get_size (line 40) | def _maybe_get_size(array, axis):
function _expand_axes (line 47) | def _expand_axes(axes, values, name="sharded_apply"):
function sharded_map (line 55) | def sharded_map(
function _set_docstring (line 87) | def _set_docstring(docstr: str) -> Callable[[T], T]:
function sharded_apply (line 97) | def sharded_apply(
function inference_subbatch (line 217) | def inference_subbatch(
FILE: src/alphafold3/model/components/utils.py
function remove_invalidly_typed_feats (line 26) | def remove_invalidly_typed_feats(
function bfloat16_getter (line 37) | def bfloat16_getter(next_getter, value, context):
function bfloat16_context (line 46) | def bfloat16_context():
function mask_mean (line 51) | def mask_mean(mask, value, axis=None, keepdims=False, eps=1e-10):
FILE: src/alphafold3/model/confidence_types.py
class StructureConfidenceFullEncoder (line 24) | class StructureConfidenceFullEncoder(json.JSONEncoder):
method __init__ (line 27) | def __init__(self, **kwargs):
method encode (line 30) | def encode(self, o: 'StructureConfidenceFull'):
function _dump_json (line 60) | def _dump_json(data: Any, indent: int | None = None) -> str:
class ConfidenceCategory (line 72) | class ConfidenceCategory(enum.Enum):
method from_char (line 81) | def from_char(cls, char: str) -> Self:
method to_char (line 96) | def to_char(self) -> str:
method from_confidence_score (line 108) | def from_confidence_score(cls, confidence: float) -> Self:
class AtomConfidence (line 121) | class AtomConfidence:
method __post_init__ (line 129) | def __post_init__(self):
method from_inference_result (line 138) | def from_inference_result(
method from_json (line 167) | def from_json(cls, json_string: str) -> Self:
method to_json (line 176) | def to_json(self) -> str:
class StructureConfidenceSummary (line 186) | class StructureConfidenceSummary:
method from_inference_result (line 212) | def from_inference_result(
method from_json (line 231) | def from_json(cls, json_string: str) -> Self:
method to_json (line 235) | def to_json(self) -> str:
class StructureConfidenceFull (line 249) | class StructureConfidenceFull:
method from_inference_result (line 260) | def from_inference_result(
method from_json (line 295) | def from_json(cls, json_string: str) -> Self:
method to_json (line 299) | def to_json(self) -> str:
FILE: src/alphafold3/model/confidences.py
function windowed_solvent_accessible_area (line 53) | def windowed_solvent_accessible_area(cif: str, window: int = 25) -> np.n...
function fraction_disordered (line 90) | def fraction_disordered(
function has_clash (line 131) | def has_clash(
function get_ranking_score (line 185) | def get_ranking_score(
function rank_metric (line 200) | def rank_metric(
function weighted_mean (line 230) | def weighted_mean(mask, value, axis):
function pde_single (line 234) | def pde_single(
function chain_pair_pde (line 290) | def chain_pair_pde(
function weighted_nanmean (line 324) | def weighted_nanmean(
function chain_pair_pae (line 346) | def chain_pair_pae(
function reduce_chain_pair (line 413) | def reduce_chain_pair(
function pae_metrics (line 476) | def pae_metrics(
function get_iptm_xchain (line 554) | def get_iptm_xchain(chain_pair_iptm: np.ndarray) -> np.ndarray:
function predicted_tm_score (line 570) | def predicted_tm_score(
function chain_pairwise_predicted_tm_scores (line 625) | def chain_pairwise_predicted_tm_scores(
FILE: src/alphafold3/model/data3.py
function get_profile_features (line 26) | def get_profile_features(
function fix_template_features (line 41) | def fix_template_features(
function empty_template_features (line 92) | def empty_template_features(num_res: int) -> FeatureDict:
function _get_timestamp (line 115) | def _get_timestamp(date_str: str):
FILE: src/alphafold3/model/feat_batch.py
class Batch (line 20) | class Batch:
method num_res (line 36) | def num_res(self) -> int:
method from_data_dict (line 40) | def from_data_dict(cls, batch: features.BatchDict) -> Self:
method as_data_dict (line 62) | def as_data_dict(self) -> features.BatchDict:
FILE: src/alphafold3/model/features.py
class PaddingShapes (line 51) | class PaddingShapes:
function _pad_to (line 59) | def _pad_to(
function _unwrap (line 95) | def _unwrap(obj):
class Chains (line 104) | class Chains:
function _compute_asym_entity_and_sym_id (line 118) | def _compute_asym_entity_and_sym_id(
function tokenizer (line 163) | def tokenizer(
class MSA (line 402) | class MSA:
method compute_features (line 416) | def compute_features(
method index_msa_rows (line 662) | def index_msa_rows(self, indices: xnp_ndarray) -> Self:
method from_data_dict (line 675) | def from_data_dict(cls, batch: BatchDict) -> Self:
method as_data_dict (line 686) | def as_data_dict(self) -> BatchDict:
class Templates (line 705) | class Templates:
method compute_features (line 716) | def compute_features(
method from_data_dict (line 850) | def from_data_dict(cls, batch: BatchDict) -> Self:
method as_data_dict (line 858) | def as_data_dict(self) -> BatchDict:
function _reduce_template_features (line 873) | def _reduce_template_features(
class TokenFeatures (line 892) | class TokenFeatures:
method compute_features (line 919) | def compute_features(
method from_data_dict (line 996) | def from_data_dict(cls, batch: BatchDict) -> Self:
method as_data_dict (line 1014) | def as_data_dict(self) -> BatchDict:
class PredictedStructureInfo (line 1041) | class PredictedStructureInfo:
method compute_features (line 1048) | def compute_features(
method from_data_dict (line 1089) | def from_data_dict(cls, batch: BatchDict) -> Self:
method as_data_dict (line 1095) | def as_data_dict(self) -> BatchDict:
class PolymerLigandBondInfo (line 1110) | class PolymerLigandBondInfo:
method compute_features (line 1119) | def compute_features(
method from_data_dict (line 1204) | def from_data_dict(cls, batch: BatchDict) -> Self:
method as_data_dict (line 1214) | def as_data_dict(self) -> BatchDict:
class LigandLigandBondInfo (line 1233) | class LigandLigandBondInfo:
method compute_features (line 1239) | def compute_features(
method from_data_dict (line 1313) | def from_data_dict(cls, batch: BatchDict) -> Self:
method as_data_dict (line 1320) | def as_data_dict(self) -> BatchDict:
class PseudoBetaInfo (line 1336) | class PseudoBetaInfo:
method compute_features (line 1342) | def compute_features(
method from_data_dict (line 1435) | def from_data_dict(cls, batch: BatchDict) -> Self:
method as_data_dict (line 1442) | def as_data_dict(self) -> BatchDict:
function random_rotation (line 1466) | def random_rotation(random_state: np.random.RandomState) -> np.ndarray:
function random_augmentation (line 1477) | def random_augmentation(
function _get_reference_positions_from_ccd_cif (line 1492) | def _get_reference_positions_from_ccd_cif(
function get_reference (line 1531) | def get_reference(
class RefStructure (line 1658) | class RefStructure:
method compute_features (line 1675) | def compute_features(
method from_data_dict (line 1794) | def from_data_dict(cls, batch: BatchDict) -> Self:
method as_data_dict (line 1804) | def as_data_dict(self) -> BatchDict:
class ConvertModelOutput (line 1823) | class ConvertModelOutput:
method compute_features (line 1834) | def compute_features(
method from_data_dict (line 1860) | def from_data_dict(cls, batch: BatchDict) -> Self:
method as_data_dict (line 1872) | def as_data_dict(self) -> BatchDict:
class AtomCrossAtt (line 1891) | class AtomCrossAtt:
method compute_features (line 1901) | def compute_features(
method from_data_dict (line 2001) | def from_data_dict(cls, batch: BatchDict) -> Self:
method as_data_dict (line 2020) | def as_data_dict(self) -> BatchDict:
class Frames (line 2042) | class Frames:
method compute_features (line 2048) | def compute_features(
method from_data_dict (line 2153) | def from_data_dict(cls, batch: BatchDict) -> Self:
method as_data_dict (line 2156) | def as_data_dict(self) -> BatchDict:
FILE: src/alphafold3/model/merging_features.py
function _pad_features_to_max (line 33) | def _pad_features_to_max(feat_name: str, chains: list[BatchDict], axis: ...
function merge_msa_features (line 64) | def merge_msa_features(feat_name: str, chains: list[BatchDict]) -> np.nd...
function merge_paired_and_unpaired_msa (line 78) | def merge_paired_and_unpaired_msa(example: BatchDict) -> BatchDict:
FILE: src/alphafold3/model/mkdssp_pybind.cc
type alphafold3 (line 24) | namespace alphafold3 {
function RegisterModuleMkdssp (line 27) | void RegisterModuleMkdssp(pybind11::module m) {
FILE: src/alphafold3/model/mkdssp_pybind.h
function namespace (line 17) | namespace alphafold3 {
FILE: src/alphafold3/model/mmcif_metadata.py
function add_metadata_to_mmcif (line 47) | def add_metadata_to_mmcif(
function add_legal_comment (line 216) | def add_legal_comment(cif: str) -> str:
FILE: src/alphafold3/model/model.py
class InferenceResult (line 45) | class InferenceResult:
function get_predicted_structure (line 70) | def get_predicted_structure(
function create_target_feat_embedding (line 143) | def create_target_feat_embedding(
function _compute_ptm (line 174) | def _compute_ptm(
function _compute_chain_pair_iptm (line 196) | def _compute_chain_pair_iptm(
class Model (line 216) | class Model(hk.Module):
class HeadsConfig (line 219) | class HeadsConfig(base_config.BaseConfig):
class Config (line 224) | class Config(base_config.BaseConfig):
method __init__ (line 232) | def __init__(self, config: Config, name: str = 'diffuser'):
method _sample_diffusion (line 241) | def _sample_diffusion(
method __call__ (line 263) | def __call__(
method get_inference_result (line 347) | def get_inference_result(
FILE: src/alphafold3/model/model_config.py
class GlobalConfig (line 22) | class GlobalConfig(base_config.BaseConfig):
FILE: src/alphafold3/model/msa_pairing.py
function _align_species (line 31) | def _align_species(
function create_paired_features (line 78) | def create_paired_features(
function deduplicate_unpaired_sequences (line 210) | def deduplicate_unpaired_sequences(
function choose_paired_unpaired_msa_crop_sizes (line 238) | def choose_paired_unpaired_msa_crop_sizes(
function remove_all_gapped_rows_from_all_seqs (line 283) | def remove_all_gapped_rows_from_all_seqs(
FILE: src/alphafold3/model/network/atom_cross_attention.py
class AtomCrossAttEncoderConfig (line 25) | class AtomCrossAttEncoderConfig(base_config.BaseConfig):
function _per_atom_conditioning (line 34) | def _per_atom_conditioning(
class AtomCrossAttEncoderOutput (line 100) | class AtomCrossAttEncoderOutput:
function atom_cross_att_encoder (line 117) | def atom_cross_att_encoder(
class AtomCrossAttDecoderConfig (line 354) | class AtomCrossAttDecoderConfig(base_config.BaseConfig):
function atom_cross_att_decoder (line 361) | def atom_cross_att_decoder(
FILE: src/alphafold3/model/network/confidence_head.py
function _safe_norm (line 25) | def _safe_norm(x, keepdims, axis, eps=1e-8):
class ConfidenceHead (line 29) | class ConfidenceHead(hk.Module):
class PAEConfig (line 32) | class PAEConfig(base_config.BaseConfig):
class Config (line 36) | class Config(base_config.BaseConfig):
method __init__ (line 53) | def __init__(
method _embed_features (line 63) | def _embed_features(
method __call__ (line 92) | def __call__(
method _get_tmscore_adjusted_pae (line 272) | def _get_tmscore_adjusted_pae(
FILE: src/alphafold3/model/network/diffusion_head.py
function random_rotation (line 33) | def random_rotation(key):
function random_augmentation (line 44) | def random_augmentation(
function noise_schedule (line 79) | def noise_schedule(t, smin=0.0004, smax=160.0, p=7):
class ConditioningConfig (line 86) | class ConditioningConfig(base_config.BaseConfig):
class SampleConfig (line 92) | class SampleConfig(base_config.BaseConfig):
class DiffusionHead (line 101) | class DiffusionHead(hk.Module):
class Config (line 104) | class Config(
method __init__ (line 123) | def __init__(
method _conditioning (line 134) | def _conditioning(
method __call__ (line 202) | def __call__(
function sample (line 297) | def sample(
FILE: src/alphafold3/model/network/diffusion_transformer.py
function adaptive_layernorm (line 23) | def adaptive_layernorm(x, single_cond, name):
function adaptive_zero_init (line 54) | def adaptive_zero_init(
function transition_block (line 78) | def transition_block(
class SelfAttentionConfig (line 114) | class SelfAttentionConfig(base_config.BaseConfig):
function self_attention (line 120) | def self_attention(
class Transformer (line 180) | class Transformer(hk.Module):
class Config (line 183) | class Config(base_config.BaseConfig):
method __init__ (line 190) | def __init__(
method __call__ (line 200) | def __call__(
class CrossAttentionConfig (line 257) | class CrossAttentionConfig(base_config.BaseConfig):
function cross_attention (line 263) | def cross_attention(
class CrossAttTransformer (line 331) | class CrossAttTransformer(hk.Module):
class Config (line 334) | class Config(base_config.BaseConfig):
method __init__ (line 339) | def __init__(
method __call__ (line 349) | def __call__(
FILE: src/alphafold3/model/network/distogram_head.py
class DistogramHead (line 28) | class DistogramHead(hk.Module):
class Config (line 31) | class Config(base_config.BaseConfig):
method __init__ (line 36) | def __init__(
method __call__ (line 46) | def __call__(
FILE: src/alphafold3/model/network/evoformer.py
class Evoformer (line 30) | class Evoformer(hk.Module):
class PairformerConfig (line 33) | class PairformerConfig(modules.PairFormerIteration.Config): # pytype:...
class Config (line 37) | class Config(base_config.BaseConfig):
method __init__ (line 67) | def __init__(
method _relative_encoding (line 77) | def _relative_encoding(
method _seq_pair_embedding (line 94) | def _seq_pair_embedding(
method _embed_bonds (line 120) | def _embed_bonds(
method _embed_template_pair (line 171) | def _embed_template_pair(
method _embed_process_msa (line 200) | def _embed_process_msa(
method __call__ (line 243) | def __call__(
FILE: src/alphafold3/model/network/featurization.py
function _grid_keys (line 23) | def _grid_keys(key, shape):
function _padding_consistent_rng (line 44) | def _padding_consistent_rng(f):
function gumbel_argsort_sample_idx (line 81) | def gumbel_argsort_sample_idx(
function create_msa_feat (line 111) | def create_msa_feat(msa: features.MSA) -> jax.Array:
function truncate_msa_batch (line 131) | def truncate_msa_batch(msa: features.MSA, num_msa: int) -> features.MSA:
function create_target_feat (line 136) | def create_target_feat(
function create_relative_encoding (line 168) | def create_relative_encoding(
function shuffle_msa (line 251) | def shuffle_msa(
FILE: src/alphafold3/model/network/modules.py
function get_shard_size (line 27) | def get_shard_size(
class TransitionBlock (line 41) | class TransitionBlock(hk.Module):
class Config (line 44) | class Config(base_config.BaseConfig):
method __init__ (line 48) | def __init__(
method __call__ (line 55) | def __call__(self, act, broadcast_dim=0):
class MSAAttention (line 87) | class MSAAttention(hk.Module):
class Config (line 90) | class Config(base_config.BaseConfig):
method __init__ (line 93) | def __init__(
method __call__ (line 100) | def __call__(self, act, mask, pair_act):
class GridSelfAttention (line 131) | class GridSelfAttention(hk.Module):
class Config (line 134) | class Config(base_config.BaseConfig):
method __init__ (line 137) | def __init__(
method _attention (line 151) | def _attention(
method __call__ (line 199) | def __call__(self, act, pair_mask):
class TriangleMultiplication (line 245) | class TriangleMultiplication(hk.Module):
class Config (line 248) | class Config(base_config.BaseConfig):
method __init__ (line 252) | def __init__(
method __call__ (line 259) | def __call__(self, act, mask):
class OuterProductMean (line 334) | class OuterProductMean(hk.Module):
class Config (line 337) | class Config(base_config.BaseConfig):
method __init__ (line 341) | def __init__(
method __call__ (line 354) | def __call__(self, act, mask):
class PairFormerIteration (line 415) | class PairFormerIteration(hk.Module):
class Config (line 418) | class Config(base_config.BaseConfig):
method __init__ (line 434) | def __init__(
method __call__ (line 447) | def __call__(
class EvoformerIteration (line 535) | class EvoformerIteration(hk.Module):
class Config (line 538) | class Config(base_config.BaseConfig):
method __init__ (line 555) | def __init__(
method __call__ (line 565) | def __call__(self, activations, masks):
FILE: src/alphafold3/model/network/noise_level_embeddings.py
function noise_embeddings (line 135) | def noise_embeddings(sigma_scaled_noise_level: jnp.ndarray) -> jnp.ndarray:
FILE: src/alphafold3/model/network/template_modules.py
class DistogramFeaturesConfig (line 27) | class DistogramFeaturesConfig(base_config.BaseConfig):
function dgram_from_positions (line 37) | def dgram_from_positions(positions, config: DistogramFeaturesConfig):
function make_backbone_rigid (line 67) | def make_backbone_rigid(
class TemplateEmbedding (line 109) | class TemplateEmbedding(hk.Module):
class Config (line 112) | class Config(base_config.BaseConfig):
method __init__ (line 120) | def __init__(
method __call__ (line 130) | def __call__(
class SingleTemplateEmbedding (line 208) | class SingleTemplateEmbedding(hk.Module):
method __init__ (line 211) | def __init__(
method __call__ (line 221) | def __call__(
FILE: src/alphafold3/model/params.py
class RecordError (line 31) | class RecordError(Exception):
function encode_record (line 35) | def encode_record(scope: str, name: str, arr: np.ndarray) -> bytes:
function _read_record (line 53) | def _read_record(stream: IO[bytes]) -> tuple[str, str, np.ndarray] | None:
function read_records (line 80) | def read_records(stream: IO[bytes]) -> Iterator[tuple[str, str, np.ndarr...
class _MultiFileIO (line 86) | class _MultiFileIO(io.RawIOBase):
method __init__ (line 89) | def __init__(self, files: list[pathlib.Path]):
method _abs_to_rel (line 106) | def _abs_to_rel(self, pos: int) -> tuple[int, int]:
method close (line 110) | def close(self):
method closed (line 113) | def closed(self) -> bool:
method fileno (line 116) | def fileno(self) -> int:
method readable (line 119) | def readable(self) -> bool:
method tell (line 122) | def tell(self) -> int:
method seek (line 125) | def seek(self, pos: int, whence: int = os.SEEK_SET, /):
method readinto (line 138) | def readinto(self, b: bytearray | memoryview) -> int:
function open_for_reading (line 154) | def open_for_reading(model_files: list[pathlib.Path], is_compressed: bool):
function _match_model (line 162) | def _match_model(
function select_model_files (line 174) | def select_model_files(
function get_model_haiku_params (line 201) | def get_model_haiku_params(model_dir: pathlib.Path) -> hk.Params:
FILE: src/alphafold3/model/pipeline/inter_chain_bonds.py
class BondAtomArrays (line 28) | class BondAtomArrays(NamedTuple):
function _get_bond_atom_arrays (line 37) | def _get_bond_atom_arrays(
function get_polymer_ligand_and_ligand_ligand_bonds (line 51) | def get_polymer_ligand_and_ligand_ligand_bonds(
function _remove_multi_bonds (line 103) | def _remove_multi_bonds(
function get_ligand_ligand_bonds (line 126) | def get_ligand_ligand_bonds(
function get_polymer_ligand_bonds (line 162) | def get_polymer_ligand_bonds(
function get_bond_layout (line 202) | def get_bond_layout(
FILE: src/alphafold3/model/pipeline/pipeline.py
function calculate_bucket_size (line 33) | def calculate_bucket_size(
class NanDataError (line 64) | class NanDataError(Exception):
class TotalNumResOutOfRangeError (line 68) | class TotalNumResOutOfRangeError(Exception):
class MmcifNumChainsError (line 72) | class MmcifNumChainsError(Exception):
class WholePdbPipeline (line 76) | class WholePdbPipeline:
class Config (line 79) | class Config(base_config.BaseConfig):
method __init__ (line 151) | def __init__(self, *, config: Config):
method process_item (line 159) | def process_item(
FILE: src/alphafold3/model/pipeline/structure_cleaning.py
function _get_leaving_atom_mask (line 27) | def _get_leaving_atom_mask(
function clean_structure (line 68) | def clean_structure(
function create_empty_output_struc_and_layout (line 294) | def create_empty_output_struc_and_layout(
FILE: src/alphafold3/model/post_processing.py
class ProcessedInferenceResult (line 26) | class ProcessedInferenceResult:
function post_process_inference_result (line 48) | def post_process_inference_result(
function write_output (line 90) | def write_output(
function write_embeddings (line 128) | def write_embeddings(
FILE: src/alphafold3/model/protein_data_processing.py
function _make_restype_rigidgroup_dense_atom_idx (line 29) | def _make_restype_rigidgroup_dense_atom_idx():
function _make_restype_pseudobeta_idx (line 76) | def _make_restype_pseudobeta_idx():
function _make_aatype_dense_atom_to_atom37 (line 105) | def _make_aatype_dense_atom_to_atom37():
FILE: src/alphafold3/model/scoring/alignment.py
function transform_ls (line 16) | def transform_ls(
function align (line 52) | def align(
function deviations_from_coords (line 96) | def deviations_from_coords(
function rmsd_from_coords (line 125) | def rmsd_from_coords(
FILE: src/alphafold3/model/scoring/chirality.py
function _find_chiral_centres (line 24) | def _find_chiral_centres(mol: rd_chem.Mol) -> dict[str, str]:
function _chiral_match (line 49) | def _chiral_match(mol1: rd_chem.Mol, mol2: rd_chem.Mol) -> bool:
function _mol_from_ligand_struc (line 71) | def _mol_from_ligand_struc(
function _maybe_mol_from_ccd (line 118) | def _maybe_mol_from_ccd(res_name: str) -> rd_chem.Mol | None:
function compare_chirality (line 140) | def compare_chirality(
FILE: src/alphafold3/model/scoring/covalent_bond_cleaning.py
class ResIdMapping (line 24) | class ResIdMapping:
function _count_symmetric_chains (line 29) | def _count_symmetric_chains(struc: structure.Structure) -> Mapping[str, ...
function has_nonsymmetric_bonds_on_symmetric_polymer_chains (line 45) | def has_nonsymmetric_bonds_on_symmetric_polymer_chains(
function _has_non_polymer_ligand_ptm_bonds (line 69) | def _has_non_polymer_ligand_ptm_bonds(
function _combine_polymer_ligand_ptm_chains (line 89) | def _combine_polymer_ligand_ptm_chains(
function _has_only_single_bond_from_each_chain (line 167) | def _has_only_single_bond_from_each_chain(
function _get_polymer_and_ligand_chain_ids_and_types (line 179) | def _get_polymer_and_ligand_chain_ids_and_types(
function _get_polymer_dim (line 202) | def _get_polymer_dim(polymer_ligand_bonds: atom_layout.AtomLayout) -> int:
function _has_multiple_ligands_bonded_to_one_polymer (line 223) | def _has_multiple_ligands_bonded_to_one_polymer(polymer_ligand_bonds):
function _has_multiple_polymers_bonded_to_one_ligand (line 234) | def _has_multiple_polymers_bonded_to_one_ligand(polymer_ligand_bonds):
function _sort_polymer_ligand_bonds_by_polymer_chain_and_res_id (line 246) | def _sort_polymer_ligand_bonds_by_polymer_chain_and_res_id(
FILE: src/alphafold3/model/scoring/scoring.py
function pseudo_beta_fn (line 21) | def pseudo_beta_fn(
FILE: src/alphafold3/parsers/cpp/cif_dict.pyi
class CifDict (line 17) | class CifDict:
class ItemView (line 18) | class ItemView:
method __iter__ (line 19) | def __iter__(self) -> Iterator[tuple[str, list[str]]]: ...
method __len__ (line 20) | def __len__(self) -> int: ...
class KeyView (line 22) | class KeyView:
method __contains__ (line 24) | def __contains__(self, key: str) -> bool: ...
method __contains__ (line 26) | def __contains__(self, key: object) -> bool: ...
method __iter__ (line 27) | def __iter__(self) -> Iterator[str]: ...
method __len__ (line 28) | def __len__(self) -> int: ...
class ValueView (line 30) | class ValueView:
method __iter__ (line 31) | def __iter__(self) -> Iterator[list[str]]: ...
method __len__ (line 32) | def __len__(self) -> int: ...
method __init__ (line 34) | def __init__(self, d: dict[str, Iterable[str]]) -> None: ...
method copy_and_update (line 35) | def copy_and_update(self, d: dict[str, Iterable[str]]) -> CifDict: ...
method extract_loop_as_dict (line 36) | def extract_loop_as_dict(self, prefix: str, index: str) -> dict:
method extract_loop_as_list (line 59) | def extract_loop_as_list(self, prefix: str) -> list:
method get (line 82) | def get(self, key: str, default_value: _T = ...) -> list[str] | _T: ...
method get_array (line 83) | def get_array(
method get_data_name (line 108) | def get_data_name(self) -> str: ...
method items (line 109) | def items(self) -> CifDict.ItemView: ...
method keys (line 110) | def keys(self) -> CifDict.KeyView: ...
method to_string (line 111) | def to_string(self) -> str: ...
method to_dict (line 112) | def to_dict(self) -> dict[str, list[str]]: ...
method value_length (line 113) | def value_length(self, key: str) -> int: ...
method values (line 114) | def values(self) -> CifDict.ValueView: ...
method __bool__ (line 115) | def __bool__(self) -> bool: ...
method __contains__ (line 116) | def __contains__(self, key: str) -> bool: ...
method __getitem__ (line 117) | def __getitem__(self, key: str) -> list[str]: ...
method __getstate__ (line 118) | def __getstate__(self) -> tuple: ...
method __iter__ (line 119) | def __iter__(self) -> Iterator[str]: ...
method __len__ (line 120) | def __len__(self) -> int: ...
method __setstate__ (line 121) | def __setstate__(self, state: tuple) -> None: ...
function tokenize (line 123) | def tokenize(cif_string: str) -> list[str]: ...
function split_line (line 124) | def split_line(line: str) -> list[str]: ...
function from_string (line 125) | def from_string(mmcif_string: str | bytes) -> CifDict: ...
function parse_multi_data_cif (line 126) | def parse_multi_data_cif(cif_string: str | bytes) -> dict[str, CifDict]:...
FILE: src/alphafold3/parsers/cpp/cif_dict_lib.cc
type alphafold3 (line 40) | namespace alphafold3 {
function IsQuote (line 43) | bool IsQuote(const char symbol) { return symbol == '\'' || symbol == '...
function IsWhitespace (line 44) | bool IsWhitespace(const char symbol) { return symbol == ' ' || symbol ...
function SplitLineInline (line 47) | bool SplitLineInline(absl::string_view line,
function TokenizeInternal (line 111) | absl::StatusOr<std::vector<absl::string_view>> TokenizeInternal(
function IsTrivialToken (line 158) | bool IsTrivialToken(const absl::string_view value) {
function IsMultiLineToken (line 170) | bool IsMultiLineToken(const absl::string_view value) {
function GetEscapeQuote (line 185) | absl::string_view GetEscapeQuote(const absl::string_view value) {
function RecordIndex (line 231) | int RecordIndex(absl::string_view record) {
type RecordOrder (line 241) | struct RecordOrder {
function AtomSiteIndex (line 275) | size_t AtomSiteIndex(absl::string_view atom_site) {
type AtomSiteOrder (line 280) | struct AtomSiteOrder {
class Column (line 288) | class Column {
method Column (line 290) | Column(absl::string_view key, const std::vector<std::string>* values)
method key (line 313) | absl::string_view key() const { return key_; }
method max_value_length (line 317) | int max_value_length() const { return max_value_length_; }
method has_newlines (line 319) | bool has_newlines(size_t index) const {
method quote (line 323) | absl::string_view quote(size_t index) const {
type GroupedKeys (line 340) | struct GroupedKeys {
function CheckLoopColumnSizes (line 346) | absl::Status CheckLoopColumnSizes(int num_loop_keys, int num_loop_valu...
function Tokenize (line 682) | absl::StatusOr<std::vector<std::string>> Tokenize(
function SplitLine (line 692) | absl::StatusOr<std::vector<absl::string_view>> SplitLine(
function ParseMultiDataCifDict (line 702) | absl::StatusOr<absl::flat_hash_map<std::string, CifDict>> ParseMultiDa...
FILE: src/alphafold3/parsers/cpp/cif_dict_lib.h
function namespace (line 28) | namespace alphafold3 {
FILE: src/alphafold3/parsers/cpp/cif_dict_pybind.cc
type alphafold3 (line 42) | namespace alphafold3 {
function GatherArray (line 47) | bool GatherArray(size_t num_dims, npy_intp* shape_array, npy_intp* str...
function Gather (line 96) | bool Gather(PyObject* gather, absl::Span<const std::string> values,
function PyObject (line 192) | PyObject* ConvertStrings(PyObject* gather, PyArray_Descr* type,
function PyObject (line 239) | inline PyObject* Convert(PyObject* gather, PyArray_Descr* type,
function PyObject (line 273) | PyObject* CifDictGetArray(const CifDict& self, absl::string_view key,
function RegisterModuleCifDict (line 371) | void RegisterModuleCifDict(pybind11::module m) {
FILE: src/alphafold3/parsers/cpp/cif_dict_pybind.h
function namespace (line 16) | namespace alphafold3 {
FILE: src/alphafold3/parsers/cpp/fasta_iterator.pyi
class FastaFileIterator (line 11) | class FastaFileIterator:
method __init__ (line 12) | def __init__(self, fasta_path: str) -> None: ...
method __iter__ (line 13) | def __iter__(self) -> FastaFileIterator: ...
method __next__ (line 14) | def __next__(self) -> tuple[str,str]: ...
class FastaStringIterator (line 16) | class FastaStringIterator:
method __init__ (line 17) | def __init__(self, fasta_string: str | bytes) -> None: ...
method __iter__ (line 18) | def __iter__(self) -> FastaStringIterator: ...
method __next__ (line 19) | def __next__(self) -> tuple[str,str]: ...
function parse_fasta (line 21) | def parse_fasta(fasta_string: str | bytes) -> list[str]: ...
function parse_fasta_include_descriptions (line 22) | def parse_fasta_include_descriptions(fasta_string: str | bytes) -> tuple...
FILE: src/alphafold3/parsers/cpp/fasta_iterator_lib.cc
type alphafold3 (line 27) | namespace alphafold3 {
function ParseFasta (line 31) | std::vector<std::string> ParseFasta(absl::string_view fasta_string) {
function ParseFastaIncludeDescriptions (line 48) | std::pair<std::vector<std::string>, std::vector<std::string>>
FILE: src/alphafold3/parsers/cpp/fasta_iterator_lib.h
function namespace (line 25) | namespace alphafold3 {
FILE: src/alphafold3/parsers/cpp/fasta_iterator_pybind.cc
type alphafold3 (line 21) | namespace alphafold3 {
function T (line 27) | T ValueOrThrowValueError(absl::StatusOr<T> value) {
class PythonFastaStringIterator (line 73) | class PythonFastaStringIterator : public FastaStringIterator {
method PythonFastaStringIterator (line 75) | explicit PythonFastaStringIterator(py::object fasta_string)
function RegisterModuleFastaIterator (line 85) | void RegisterModuleFastaIterator(pybind11::module m) {
FILE: src/alphafold3/parsers/cpp/fasta_iterator_pybind.h
function namespace (line 16) | namespace alphafold3 {
FILE: src/alphafold3/parsers/cpp/msa_conversion.pyi
function align_sequence_to_gapless_query (line 20) | def align_sequence_to_gapless_query(
function convert_a3m_to_stockholm (line 26) | def convert_a3m_to_stockholm(a3m_sequences: Iterable[str]) -> list[str]:...
FILE: src/alphafold3/parsers/cpp/msa_conversion_pybind.cc
function ConvertA3MToStockholm (line 27) | std::vector<std::string> ConvertA3MToStockholm(
function AlignSequenceToGaplessQuery (line 83) | std::string AlignSequenceToGaplessQuery(absl::string_view sequence,
type alphafold3 (line 150) | namespace alphafold3 {
function RegisterModuleMsaConversion (line 152) | void RegisterModuleMsaConversion(pybind11::module m) {
FILE: src/alphafold3/parsers/cpp/msa_conversion_pybind.h
function namespace (line 16) | namespace alphafold3 {
FILE: src/alphafold3/structure/bioassemblies.py
class Operation (line 23) | class Operation:
method apply_to_coords (line 29) | def apply_to_coords(self, coords: np.ndarray) -> np.ndarray:
class Transform (line 35) | class Transform:
method apply_to_coords (line 50) | def apply_to_coords(self, coords: np.ndarray) -> np.ndarray:
function _get_operation (line 57) | def _get_operation(oper_data: Mapping[str, str]) -> Operation:
class MissingBioassemblyDataError (line 71) | class MissingBioassemblyDataError(Exception):
class BioassemblyData (line 75) | class BioassemblyData:
method __init__ (line 108) | def __init__(
method from_mmcif (line 145) | def from_mmcif(cls, cif: mmcif.Mmcif) -> Self:
method assembly_ids (line 188) | def assembly_ids(self) -> Sequence[str]:
method asym_id_by_assembly_chain_id (line 191) | def asym_id_by_assembly_chain_id(self, assembly_id: str) -> Mapping[st...
method assembly_chain_ids_by_asym_id (line 198) | def assembly_chain_ids_by_asym_id(
method get_default_assembly_id (line 209) | def get_default_assembly_id(self) -> str:
method get_assembly_info (line 216) | def get_assembly_info(self, assembly_id: str) -> Mapping[str, str]:
method get_transforms (line 222) | def get_transforms(self, assembly_id: str) -> Sequence[Transform]:
method to_mmcif_dict (line 269) | def to_mmcif_dict(self) -> Mapping[str, Sequence[str]]:
method rename_label_asym_ids (line 283) | def rename_label_asym_ids(
FILE: src/alphafold3/structure/bonds.py
class Bonds (line 24) | class Bonds(table.Table):
method make_empty (line 45) | def make_empty(cls) -> Self:
method get_atom_indices (line 54) | def get_atom_indices(
method restrict_to_atoms (line 80) | def restrict_to_atoms(self, atom_key: np.ndarray) -> Self:
method to_mmcif_dict_from_atom_arrays (line 88) | def to_mmcif_dict_from_atom_arrays(
function concat_with_atom_keys (line 166) | def concat_with_atom_keys(
FILE: src/alphafold3/structure/chemical_components.py
class ChemCompEntry (line 25) | class ChemCompEntry:
method __post_init__ (line 40) | def __post_init__(self):
method extends (line 45) | def extends(self, other: Self) -> bool:
method rdkit_mol (line 56) | def rdkit_mol(self) -> rd_chem.Mol:
class MissingChemicalComponentsDataError (line 66) | class MissingChemicalComponentsDataError(Exception):
class ChemicalComponentsData (line 71) | class ChemicalComponentsData:
method from_mmcif (line 82) | def from_mmcif(
method to_mmcif_dict (line 134) | def to_mmcif_dict(self) -> Mapping[str, Sequence[str]]:
function _value_is_missing (line 156) | def _value_is_missing(value: str) -> bool:
function get_data_for_ccd_components (line 160) | def get_data_for_ccd_components(
function populate_missing_ccd_data (line 187) | def populate_missing_ccd_data(
function get_all_atoms_in_entry (line 233) | def get_all_atoms_in_entry(
function get_res_atom_names (line 281) | def get_res_atom_names(ccd: chemical_components.Ccd, res_name: str) -> s...
FILE: src/alphafold3/structure/cpp/aggregation.pyi
function indices_grouped_by_value (line 13) | def indices_grouped_by_value(values: Sequence[int]) -> dict[int, list[in...
FILE: src/alphafold3/structure/cpp/aggregation_pybind.cc
function IndicesGroupedByValue (line 25) | absl::flat_hash_map<int64_t, std::vector<int64_t>> IndicesGroupedByValue(
type alphafold3 (line 46) | namespace alphafold3 {
function RegisterModuleAggregation (line 48) | void RegisterModuleAggregation(py::module m) {
FILE: src/alphafold3/structure/cpp/aggregation_pybind.h
function namespace (line 16) | namespace alphafold3 {
FILE: src/alphafold3/structure/cpp/membership.pyi
function isin (line 14) | def isin(
FILE: src/alphafold3/structure/cpp/membership_pybind.cc
function IsIn (line 26) | py::array_t<bool> IsIn(const py::array_t<int64_t, py::array::c_style>& a...
type alphafold3 (line 75) | namespace alphafold3 {
function RegisterModuleMembership (line 77) | void RegisterModuleMembership(pybind11::module m) {
FILE: src/alphafold3/structure/cpp/membership_pybind.h
function namespace (line 16) | namespace alphafold3 {
FILE: src/alphafold3/structure/cpp/mmcif_altlocs.cc
type alphafold3 (line 29) | namespace alphafold3 {
function OccupancyToFloat (line 32) | float OccupancyToFloat(absl::string_view occupancy) {
function AtomEquiv (line 40) | bool AtomEquiv(absl::string_view lhs, absl::string_view rhs) {
function GroupBy (line 66) | void GroupBy(absl::Span<const std::string> values, std::size_t start,
function ProcessAltLocGroupsWhole (line 81) | void ProcessAltLocGroupsWhole(std::size_t alt_loc_start,
function ProcessAltLocGroupPartial (line 169) | void ProcessAltLocGroupPartial(
function ResolveMmcifAltLocs (line 202) | std::vector<std::uint64_t> ResolveMmcifAltLocs(
FILE: src/alphafold3/structure/cpp/mmcif_altlocs.h
function namespace (line 22) | namespace alphafold3 {
FILE: src/alphafold3/structure/cpp/mmcif_atom_site.pyi
function get_internal_to_author_chain_id_map (line 15) | def get_internal_to_author_chain_id_map(
function get_or_infer_type_symbol (line 20) | def get_or_infer_type_symbol(
FILE: src/alphafold3/structure/cpp/mmcif_atom_site_pybind.cc
type alphafold3 (line 24) | namespace alphafold3 {
function GetOrInferTypeSymbol (line 31) | py::list GetOrInferTypeSymbol(const CifDict& mmcif,
function GetInternalToAuthorChainIdMap (line 53) | absl::flat_hash_map<absl::string_view, absl::string_view>
function RegisterModuleMmcifAtomSite (line 75) | void RegisterModuleMmcifAtomSite(pybind11::module m) {
FILE: src/alphafold3/structure/cpp/mmcif_atom_site_pybind.h
function namespace (line 16) | namespace alphafold3 {
FILE: src/alphafold3/structure/cpp/mmcif_layout.h
function namespace (line 25) | namespace alphafold3 {
FILE: src/alphafold3/structure/cpp/mmcif_layout.pyi
class MmcifLayout (line 13) | class MmcifLayout:
method atom_range (line 14) | def atom_range(self, residue_index: int) -> tuple[int, int]: ...
method chain_starts (line 15) | def chain_starts(self) -> list[int]: ...
method chains (line 16) | def chains(self) -> list[int]: ...
method model_offset (line 17) | def model_offset(self) -> int: ...
method num_atoms (line 18) | def num_atoms(self) -> int: ...
method num_chains (line 19) | def num_chains(self) -> int: ...
method num_models (line 20) | def num_models(self) -> int: ...
method num_residues (line 21) | def num_residues(self) -> int: ...
method residue_range (line 22) | def residue_range(self, chain_index: int) -> tuple[int, int]: ...
method residue_starts (line 23) | def residue_starts(self) -> list[int]: ...
method residues (line 24) | def residues(self) -> list[int]: ...
function from_mmcif (line 26) | def from_mmcif(mmcif: cif_dict.CifDict, model_id: str = ...) -> MmcifLay...
FILE: src/alphafold3/structure/cpp/mmcif_layout_lib.cc
type alphafold3 (line 30) | namespace alphafold3 {
FILE: src/alphafold3/structure/cpp/mmcif_layout_pybind.cc
type alphafold3 (line 16) | namespace alphafold3 {
function RegisterModuleMmcifLayout (line 20) | void RegisterModuleMmcifLayout(pybind11::module m) {
FILE: src/alphafold3/structure/cpp/mmcif_layout_pybind.h
function namespace (line 16) | namespace alphafold3 {
FILE: src/alphafold3/structure/cpp/mmcif_struct_conn.h
function namespace (line 21) | namespace alphafold3 {
FILE: src/alphafold3/structure/cpp/mmcif_struct_conn.pyi
function get_bond_atom_indices (line 13) | def get_bond_atom_indices(mmcif_dict: cif_dict.CifDict, model_id: str) -...
FILE: src/alphafold3/structure/cpp/mmcif_struct_conn_lib.cc
type alphafold3 (line 29) | namespace alphafold3 {
type AtomId (line 33) | struct AtomId {
method H (line 42) | H AbslHashValue(H h, const AtomId& m) {
function AreSameSize (line 54) | bool AreSameSize(const C& c, const Cs&... cs) {
type ColumnSpec (line 58) | struct ColumnSpec {
class AtomColumns (line 66) | class AtomColumns {
method Create (line 68) | static absl::StatusOr<AtomColumns> Create(const CifDict& mmcif,
method size (line 100) | inline std::size_t size() const { return size_; }
method GetNormalizedAltId (line 102) | absl::string_view GetNormalizedAltId(const std::size_t index) const {
method AtomId (line 112) | AtomId GetAtom(const std::size_t index) const {
method GetAtomString (line 120) | std::string GetAtomString(const std::size_t index) const {
method AtomColumns (line 136) | AtomColumns(StringArrayRef chain_id, StringArrayRef res_id_1,
function FillInBondsForAtom (line 157) | absl::Status FillInBondsForAtom(const BondIndexByAtom& bond_index_by_a...
function HasAllColumns (line 175) | bool HasAllColumns(const CifDict& mmcif, const ColumnSpec& columns) {
function GetBondAtomIndices (line 240) | absl::StatusOr<std::pair<BondAtomIndices, BondAtomIndices>> GetBondAto...
FILE: src/alphafold3/structure/cpp/mmcif_struct_conn_pybind.cc
type alphafold3 (line 21) | namespace alphafold3 {
function RegisterModuleMmcifStructConn (line 53) | void RegisterModuleMmcifStructConn(pybind11::module m) {
FILE: src/alphafold3/structure/cpp/mmcif_struct_conn_pybind.h
function namespace (line 16) | namespace alphafold3 {
FILE: src/alphafold3/structure/cpp/mmcif_utils.pyi
function filter (line 19) | def filter(
function fix_residues (line 29) | def fix_residues(
function read_layout (line 40) | def read_layout(
function selected_ligand_residue_mask (line 45) | def selected_ligand_residue_mask(
function selected_polymer_residue_mask (line 63) | def selected_polymer_residue_mask(
FILE: src/alphafold3/structure/cpp/mmcif_utils_pybind.cc
type alphafold3 (line 45) | namespace alphafold3 {
type PyObjectDeleter (line 49) | struct PyObjectDeleter {
function Indexer (line 59) | Indexer MakeIndex(StringArrayRef col) {
function AreSameSize (line 70) | bool AreSameSize(C c, const Cs&... cs) {
type AtomSiteLoop (line 76) | struct AtomSiteLoop {
method AtomSiteLoop (line 77) | explicit AtomSiteLoop(const CifDict& cif_dict)
type EntityLoop (line 116) | struct EntityLoop {
method EntityLoop (line 117) | explicit EntityLoop(const CifDict& cif_dict)
type EntityPolyLoop (line 131) | struct EntityPolyLoop {
method EntityPolyLoop (line 132) | explicit EntityPolyLoop(const CifDict& cif_dict)
function SelectChains (line 148) | absl::flat_hash_set<absl::string_view> SelectChains(const CifDict& mmcif,
class ProcessResidue (line 227) | class ProcessResidue {
method ProcessResidue (line 229) | explicit ProcessResidue(const char* residue)
method IsResidue (line 231) | bool IsResidue(PyObject* residue) {
method ArePyObjectsEqual (line 235) | static bool ArePyObjectsEqual(PyObject* lhs, PyObject* rhs) {
type Position3 (line 251) | struct Position3 {
function DistanceSquared (line 257) | float DistanceSquared(Position3 v1, Position3 v2) {
class FixArginine (line 264) | class FixArginine : public ProcessResidue {
method FixArginine (line 266) | FixArginine()
method Fix (line 275) | void Fix(absl::Span<PyObject*> atom_ids, absl::Span<const float> ato...
function MmcifLayout (line 347) | inline MmcifLayout ReadMmcifLayout(const CifDict& mmcif,
function MmcifFilter (line 358) | py::tuple MmcifFilter( //
function MmcifFixResidues (line 429) | void MmcifFixResidues( //
function SelectedPolymerResidueMask (line 474) | std::vector<bool> SelectedPolymerResidueMask(
function SelectedLigandResidueMask (line 523) | std::pair<std::vector<bool>, std::vector<bool>> SelectedLigandResidueM...
function RegisterModuleMmcifUtils (line 727) | void RegisterModuleMmcifUtils(pybind11::module m) {
FILE: src/alphafold3/structure/cpp/mmcif_utils_pybind.h
function namespace (line 16) | namespace alphafold3 {
FILE: src/alphafold3/structure/cpp/string_array.pyi
function format_float_array (line 17) | def format_float_array(
function isin (line 22) | def isin(
function remap (line 31) | def remap(
function remap (line 40) | def remap(
function remap_multiple (line 47) | def remap_multiple(
FILE: src/alphafold3/structure/cpp/string_array_pybind.cc
function PyObject (line 41) | PyObject* RemapNumpyArrayObjects(PyObject* array, PyObject* mapping,
function FormatFloatArray (line 131) | std::vector<std::string> FormatFloatArray(absl::Span<const float> values,
function IsIn (line 143) | py::array_t<bool> IsIn(
function RemapMultipleArrays (line 174) | py::array RemapMultipleArrays(
type alphafold3 (line 290) | namespace alphafold3 {
function RegisterModuleStringArray (line 292) | void RegisterModuleStringArray(pybind11::module m) {
FILE: src/alphafold3/structure/cpp/string_array_pybind.h
function namespace (line 16) | namespace alphafold3 {
FILE: src/alphafold3/structure/mmcif.py
function int_id_to_str_id (line 40) | def int_id_to_str_id(num: int) -> str:
function str_id_to_int_id (line 63) | def str_id_to_int_id(str_id: str) -> int:
function from_string (line 86) | def from_string(mmcif_string: str | bytes) -> Mmcif:
function parse_multi_data_cif (line 90) | def parse_multi_data_cif(cif_string: str) -> dict[str, Mmcif]:
class BondParsingError (line 118) | class BondParsingError(Exception):
function get_bond_atom_indices (line 122) | def get_bond_atom_indices(
function get_or_infer_type_symbol (line 154) | def get_or_infer_type_symbol(
function get_chain_type_by_entity_id (line 175) | def get_chain_type_by_entity_id(mmcif: Mmcif) -> Mapping[str, str]:
function get_internal_to_author_chain_id_map (line 198) | def get_internal_to_author_chain_id_map(mmcif: Mmcif) -> Mapping[str, str]:
function get_experimental_method (line 212) | def get_experimental_method(mmcif: Mmcif) -> str | None:
function get_release_date (line 217) | def get_release_date(mmcif: Mmcif) -> str | None:
function get_resolution (line 226) | def get_resolution(mmcif: Mmcif) -> float | None:
function parse_oper_expr (line 252) | def parse_oper_expr(oper_expression: str) -> list[tuple[str, ...]]:
function format_float_array (line 299) | def format_float_array(
FILE: src/alphafold3/structure/parsing.py
class NoAtomsError (line 43) | class NoAtomsError(Exception):
class BondIndices (line 48) | class BondIndices:
class ModelID (line 54) | class ModelID(enum.Enum):
class SequenceFormat (line 62) | class SequenceFormat(enum.Enum):
function _create_bond_lookup (line 70) | def _create_bond_lookup(
function _get_atom_element (line 93) | def _get_atom_element(
function _get_representative_atom (line 102) | def _get_representative_atom(
function _get_first_non_leaving_atom (line 129) | def _get_first_non_leaving_atom(
function _add_ligand_to_chem_comp (line 142) | def _add_ligand_to_chem_comp(
function _get_first_model_id (line 162) | def _get_first_model_id(cif: mmcif.Mmcif) -> str:
function _get_str_model_id (line 169) | def _get_str_model_id(
function _parse_bonds (line 202) | def _parse_bonds(
class _MmcifHeader (line 257) | class _MmcifHeader:
function _get_mmcif_header (line 266) | def _get_mmcif_header(
function from_parsed_mmcif (line 307) | def from_parsed_mmcif(
function from_mmcif (line 399) | def from_mmcif(
function from_res_arrays (line 456) | def from_res_arrays(atom_mask: np.ndarray, **kwargs) -> structure.Struct...
function expand_sequence (line 591) | def expand_sequence(
function from_sequences_and_bonds (line 628) | def from_sequences_and_bonds(
class _ChainResBuilder (line 842) | class _ChainResBuilder:
method __init__ (line 845) | def __init__(
method add_residues (line 880) | def add_residues(
method make_chains_table (line 943) | def make_chains_table(self) -> structure_tables.Chains:
method make_residues_table (line 966) | def make_residues_table(self) -> structure_tables.Residues:
function _get_string_array_default (line 1003) | def _get_string_array_default(cif: mmcif.Mmcif, key: str, default: list[...
function _generate_required_tables_if_missing (line 1010) | def _generate_required_tables_if_missing(
function _maybe_add_missing_scheme_tables (line 1105) | def _maybe_add_missing_scheme_tables(
function _get_chain_key_by_chain_id (line 1272) | def _get_chain_key_by_chain_id(
function get_tables (line 1301) | def get_tables(
function from_atom_arrays (line 1643) | def from_atom_arrays(
function _guess_entity_type (line 1772) | def _guess_entity_type(
FILE: src/alphafold3/structure/sterics.py
function _make_atom_has_clash_mask (line 21) | def _make_atom_has_clash_mask(
function find_clashing_chains (line 57) | def find_clashing_chains(
FILE: src/alphafold3/structure/structure.py
class CascadeDelete (line 42) | class CascadeDelete(enum.Enum):
class _UnsetSentinel (line 49) | class _UnsetSentinel(enum.Enum):
class Bond (line 56) | class Bond(NamedTuple):
class MissingAtomError (line 64) | class MissingAtomError(Exception):
class MissingAuthorResidueIdError (line 68) | class MissingAuthorResidueIdError(Exception):
function fix_non_standard_polymer_residues (line 166) | def fix_non_standard_polymer_residues(
function _get_change_indices (line 218) | def _get_change_indices(arr: np.ndarray) -> np.ndarray:
function _unpack_filter_predicates (line 226) | def _unpack_filter_predicates(
class StructureTables (line 271) | class StructureTables:
class ResArrays (line 279) | class ResArrays:
class Structure (line 296) | class Structure(table.Database):
method __init__ (line 307) | def __init__(
method _validate_table_foreign_keys (line 345) | def _validate_table_foreign_keys(self):
method _validate_consistent_table_ordering (line 367) | def _validate_consistent_table_ordering(self):
method get_table (line 383) | def get_table(self, table_name: str) -> table.Table:
method chains_table (line 397) | def chains_table(self) -> structure_tables.Chains:
method residues_table (line 402) | def residues_table(self) -> structure_tables.Residues:
method atoms_table (line 407) | def atoms_table(self) -> structure_tables.Atoms:
method bonds_table (line 412) | def bonds_table(self) -> structure_tables.Bonds:
method name (line 417) | def name(self) -> str:
method release_date (line 421) | def release_date(self) -> datetime.date | None:
method resolution (line 425) | def resolution(self) -> float | None:
method structure_method (line 429) | def structure_method(self) -> str | None:
method bioassembly_data (line 433) | def bioassembly_data(self) -> bioassemblies.BioassemblyData | None:
method chemical_components_data (line 437) | def chemical_components_data(
method bonds (line 443) | def bonds(self) -> structure_tables.Bonds:
method author_naming_scheme (line 447) | def author_naming_scheme(self) -> AuthorNamingScheme:
method all_residues (line 485) | def all_residues(self) -> AllResidues:
method label_asym_id_to_entity_id (line 499) | def label_asym_id_to_entity_id(self) -> Mapping[str, str]:
method chain_entity_id (line 503) | def chain_entity_id(self) -> np.ndarray:
method chain_entity_desc (line 510) | def chain_entity_desc(self) -> np.ndarray:
method chain_auth_asym_id (line 517) | def chain_auth_asym_id(self) -> np.ndarray:
method chain_id (line 524) | def chain_id(self) -> np.ndarray:
method chain_type (line 529) | def chain_type(self) -> np.ndarray:
method res_id (line 534) | def res_id(self) -> np.ndarray:
method res_name (line 538) | def res_name(self) -> np.ndarray:
method res_auth_seq_id (line 542) | def res_auth_seq_id(self) -> np.ndarray:
method res_insertion_code (line 549) | def res_insertion_code(self) -> np.ndarray:
method atom_key (line 556) | def atom_key(self) -> np.ndarray:
method atom_name (line 560) | def atom_name(self) -> np.ndarray:
method atom_element (line 564) | def atom_element(self) -> np.ndarray:
method atom_x (line 568) | def atom_x(self) -> np.ndarray:
method atom_y (line 572) | def atom_y(self) -> np.ndarray:
method atom_z (line 576) | def atom_z(self) -> np.ndarray:
method atom_b_factor (line 580) | def atom_b_factor(self) -> np.ndarray:
method atom_occupancy (line 584) | def atom_occupancy(self) -> np.ndarray:
method chain_boundaries (line 588) | def chain_boundaries(self) -> np.ndarray:
method res_boundaries (line 593) | def res_boundaries(self) -> np.ndarray:
method present_chains (line 598) | def present_chains(self) -> structure_tables.Chains:
method present_residues (line 604) | def present_residues(self) -> structure_tables.Residues:
method unresolved_residues (line 612) | def unresolved_residues(self) -> structure_tables.Residues:
method __getitem__ (line 621) | def __getitem__(self, field: str) -> Any:
method __getstate__ (line 628) | def __getstate__(self) -> dict[str, Any]:
method __repr__ (line 641) | def __repr__(self):
method num_atoms (line 649) | def num_atoms(self) -> int:
method num_residues (line 652) | def num_residues(self, *, count_unresolved: bool) -> int:
method num_chains (line 667) | def num_chains(self) -> int:
method num_models (line 671) | def num_models(self) -> int:
method _atom_mask (line 675) | def _atom_mask(self, entities: Set[str]) -> np.ndarray:
method is_protein_mask (line 686) | def is_protein_mask(self) -> np.ndarray:
method is_dna_mask (line 691) | def is_dna_mask(self) -> np.ndarray:
method is_rna_mask (line 696) | def is_rna_mask(self) -> np.ndarray:
method is_nucleic_mask (line 701) | def is_nucleic_mask(self) -> np.ndarray:
method is_ligand_mask (line 706) | def is_ligand_mask(self) -> np.ndarray:
method is_water_mask (line 711) | def is_water_mask(self) -> np.ndarray:
method iter_atoms (line 715) | def iter_atoms(self) -> Iterator[Mapping[str, Any]]:
method iter_residues (line 765) | def iter_residues(
method _iter_atom_ranges (line 795) | def _iter_atom_ranges(
method _iter_residue_ranges (line 804) | def _iter_residue_ranges(
method iter_chain_ranges (line 816) | def iter_chain_ranges(self) -> Iterator[tuple[int, int]]:
method iter_residue_ranges (line 826) | def iter_residue_ranges(self) -> Iterator[tuple[int, int]]:
method iter_chains (line 836) | def iter_chains(self) -> Iterator[Mapping[str, Any]]:
method iter_bonds (line 847) | def iter_bonds(self) -> Iterator[Bond]:
method _apply_atom_index_array (line 888) | def _apply_atom_index_array(
method group_by_residue (line 932) | def group_by_residue(self) -> Self:
method group_by_chain (line 948) | def group_by_chain(self) -> Self:
method with_sorted_chains (line 964) | def with_sorted_chains(self) -> Self:
method atom_ids (line 981) | def atom_ids(self) -> Sequence[tuple[str, str, None, str]]:
method order_and_drop_atoms_to_match (line 999) | def order_and_drop_atoms_to_match(
method copy_and_update (line 1131) | def copy_and_update(
method _copy_and_update (line 1195) | def _copy_and_update(
method copy_and_update_coords (line 1247) | def copy_and_update_coords(self, coords: np.ndarray) -> Self:
method copy_and_update_from_res_arrays (line 1256) | def copy_and_update_from_res_arrays(
method copy_and_update_globals (line 1322) | def copy_and_update_globals(
method copy_and_update_atoms (line 1361) | def copy_and_update_atoms(
method copy_and_update_residues (line 1393) | def copy_and_update_residues(
method _cascade_delete (line 1416) | def _cascade_delete(
method filter (line 1471) | def filter(
method filter_out (line 1627) | def filter_out(self, *args, **kwargs) -> Self:
method filter_to_entity_type (line 1631) | def filter_to_entity_type(
method get_stoichiometry (line 1672) | def get_stoichiometry(
method without_hydrogen (line 1708) | def without_hydrogen(self) -> Self:
method without_terminal_oxygens (line 1714) | def without_terminal_oxygens(self) -> Self:
method reset_author_naming_scheme (line 1728) | def reset_author_naming_scheme(self) -> Self:
method filter_residues (line 1752) | def filter_residues(self, res_mask: np.ndarray) -> Self:
method filter_coords (line 1766) | def filter_coords(
method filter_polymers_to_single_atom_per_res (line 1791) | def filter_polymers_to_single_atom_per_res(
method drop_non_standard_protein_atoms (line 1829) | def drop_non_standard_protein_atoms(self, *, drop_oxt: bool = True) ->...
method drop_non_standard_atoms (line 1850) | def drop_non_standard_atoms(
method find_chains_with_unknown_sequence (line 1883) | def find_chains_with_unknown_sequence(self) -> Sequence[str]:
method add_bonds (line 1898) | def add_bonds(
method coords (line 1963) | def coords(self) -> np.ndarray:
method chain_single_letter_sequence (line 1967) | def chain_single_letter_sequence(
method polymer_auth_asym_id_to_label_asym_id (line 2009) | def polymer_auth_asym_id_to_label_asym_id(
method polymer_author_chain_single_letter_sequence (line 2079) | def polymer_author_chain_single_letter_sequence(
method chain_res_name_sequence (line 2123) | def chain_res_name_sequence(
method fix_non_standard_polymer_res (line 2173) | def fix_non_standard_polymer_res(
method slice_leading_dims (line 2211) | def slice_leading_dims(self) -> '_LeadingDimSlice':
method unstack (line 2230) | def unstack(self, axis: int = 0) -> Sequence[Self]:
method split_by_chain (line 2271) | def split_by_chain(self) -> Sequence[Self]:
method transform_states_to_chains (line 2283) | def transform_states_to_chains(self) -> Self:
method merge_chains (line 2307) | def merge_chains(
method to_res_arrays (line 2454) | def to_res_arrays(
method to_res_atom_lists (line 2503) | def to_res_atom_lists(
method reorder_chains (line 2536) | def reorder_chains(self, new_order: Sequence[str]) -> Self:
method rename_auth_asym_ids (line 2591) | def rename_auth_asym_ids(self, new_id_by_old_id: Mapping[str, str]) ->...
method rename_chain_ids (line 2614) | def rename_chain_ids(self, new_id_by_old_id: Mapping[str, str]) -> Self:
method chains (line 2669) | def chains(self) -> tuple[str, ...]:
method rename_res_name (line 2673) | def rename_res_name(
method remap_res_id (line 2714) | def remap_res_id(self, res_id_map: Mapping[str, Mapping[int, int]]) ->...
method rename_chains_to_match (line 2769) | def rename_chains_to_match(
method _apply_bioassembly_transform (line 2832) | def _apply_bioassembly_transform(
method generate_bioassembly (line 2853) | def generate_bioassembly(self, assembly_id: str | None = None) -> Self:
method _to_mmcif_header (line 2909) | def _to_mmcif_header(self) -> Mapping[str, Sequence[str]]:
method to_mmcif_dict (line 2942) | def to_mmcif_dict(
method to_mmcif (line 2961) | def to_mmcif(
class _LeadingDimSlice (line 2975) | class _LeadingDimSlice:
method __init__ (line 2985) | def __init__(self, struc: Structure):
method __getitem__ (line 2988) | def __getitem__(self, *args, **kwargs) -> Structure:
function stack (line 3005) | def stack(strucs: Sequence[Structure], axis: int = 0) -> Structure:
function _assign_unique_chain_ids (line 3062) | def _assign_unique_chain_ids(
function concat (line 3096) | def concat(
function multichain_residue_index (line 3210) | def multichain_residue_index(
function make_empty_structure (line 3247) | def make_empty_structure() -> Structure:
function enumerate_residues (line 3257) | def enumerate_residues(
FILE: src/alphafold3/structure/structure_tables.py
function _residue_name_to_record_name (line 34) | def _residue_name_to_record_name(
class AuthorNamingScheme (line 49) | class AuthorNamingScheme:
function _default (line 69) | def _default(
class Atoms (line 78) | class Atoms(table.Table):
method __post_init__ (line 98) | def __post_init__(self):
method make_empty (line 111) | def make_empty(cls) -> Self:
method from_defaults (line 126) | def from_defaults(
method get_value_by_index (line 157) | def get_value_by_index(
method copy_and_update_coords (line 165) | def copy_and_update_coords(self, coords: np.ndarray) -> Self:
method shape (line 179) | def shape(self) -> tuple[int, ...]:
method ndim (line 183) | def ndim(self) -> int:
method num_models (line 187) | def num_models(self) -> int:
class Residues (line 203) | class Residues(table.Table):
method make_empty (line 213) | def make_empty(cls) -> Self:
method from_defaults (line 224) | def from_defaults(
class Chains (line 249) | class Chains(table.Table):
method make_empty (line 259) | def make_empty(cls) -> Self:
method from_defaults (line 270) | def from_defaults(
function to_mmcif_sequence_and_entity_tables (line 297) | def to_mmcif_sequence_and_entity_tables(
function to_mmcif_atom_site_and_bonds_table (line 411) | def to_mmcif_atom_site_and_bonds_table(
function _flatten_author_naming_scheme_table (line 523) | def _flatten_author_naming_scheme_table(
function tables_from_atom_arrays (line 557) | def tables_from_atom_arrays(
FILE: src/alphafold3/structure/table.py
class RowLookup (line 38) | class RowLookup(Protocol):
method get_row_by_key (line 40) | def get_row_by_key(
class Table (line 49) | class Table:
method __post_init__ (line 67) | def __post_init__(self):
method __getstate__ (line 82) | def __getstate__(self) -> dict[str, Any]:
method index_by_key (line 92) | def index_by_key(self) -> np.ndarray:
method columns (line 105) | def columns(self) -> tuple[str, ...]:
method items (line 110) | def items(self) -> Mapping[str, np.ndarray]:
method size (line 115) | def size(self) -> int:
method __len__ (line 119) | def __len__(self) -> int:
method get_column (line 122) | def get_column(self, column_name: str) -> np.ndarray:
method apply_array (line 127) | def apply_array(self, arr: np.ndarray) -> Self:
method apply_index (line 137) | def apply_index(self, index_arr: np.ndarray) -> Self:
method apply_array_to_column (line 146) | def apply_array_to_column(
method get_value_by_index (line 157) | def get_value_by_index(self, column_name: str, index: int) -> Any:
method get_value_by_key (line 160) | def get_value_by_key(
method __getitem__ (line 169) | def __getitem__(self, key: str) -> np.ndarray:
method __getitem__ (line 173) | def __getitem__(self, key: np.ndarray) -> 'Table':
method __getitem__ (line 177) | def __getitem__(self, key: tuple[str, int | np.integer]) -> TableEntry:
method __getitem__ (line 181) | def __getitem__(self, key: tuple[str, np.ndarray]) -> np.ndarray:
method __getitem__ (line 184) | def __getitem__(self, key):
method get_row_by_key (line 201) | def get_row_by_key(
method get_row_by_index (line 211) | def get_row_by_index(
method iterrows (line 225) | def iterrows(
method with_column_names (line 262) | def with_column_names(
method make_filter_mask (line 268) | def make_filter_mask(
method filter (line 333) | def filter(
method _validate_keys_are_column_names (line 388) | def _validate_keys_are_column_names(self, keys: Collection[str]) -> None:
method copy_and_update (line 393) | def copy_and_update(self, **new_column_by_column_name: np.ndarray) -> ...
method copy_and_remap (line 405) | def copy_and_remap(
class RenamedTableView (line 433) | class RenamedTableView:
method __init__ (line 436) | def __init__(self, table: Table, column_name_map: Mapping[str, str]):
method get_row_by_key (line 440) | def get_row_by_key(
class Database (line 454) | class Database(abc.ABC):
method tables (line 459) | def tables(self) -> Collection[str]:
method get_table (line 463) | def get_table(self, table_name: str) -> Table:
method foreign_keys (line 468) | def foreign_keys(self) -> Mapping[str, Collection[tuple[str, str]]]:
method copy_and_update (line 479) | def copy_and_update(
function table_dependency_order (line 486) | def table_dependency_order(db: Database) -> Iterable[str]:
function concat_databases (line 505) | def concat_databases(dbs: Sequence[_DatabaseT]) -> _DatabaseT:
FILE: src/alphafold3/structure/test_utils.py
class StructureTestCase (line 22) | class StructureTestCase(parameterized.TestCase):
method assertAuthorNamingSchemeEqual (line 25) | def assertAuthorNamingSchemeEqual(self, ans1, ans2): # pylint: disabl...
method assertAllResiduesEqual (line 38) | def assertAllResiduesEqual(self, all_res1, all_res2): # pylint: disab...
method assertBioassemblyDataEqual (line 48) | def assertBioassemblyDataEqual(self, data1, data2): # pylint: disable...
method assertChemicalComponentsDataEqual (line 55) | def assertChemicalComponentsDataEqual( # pylint: disable=invalid-name
method assertBondsEqual (line 88) | def assertBondsEqual(self, bonds1, bonds2, atom_key1, atom_key2): # p...
method assertStructuresEqual (line 104) | def assertStructuresEqual( # pylint: disable=invalid-name
Condensed preview — 186 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (7,833K chars).
[
{
"path": ".github/workflows/ci.yaml",
"chars": 1012,
"preview": "name: Continuous Integration\n\non:\n push:\n branches:\n - main\n pull_request:\n branches:\n - main\n workfl"
},
{
"path": "CMakeLists.txt",
"chars": 3086,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "CONTRIBUTING.md",
"chars": 1477,
"preview": "# How to Contribute\n\nWe welcome small patches related to bug fixes and documentation, but we do not\nplan to make any maj"
},
{
"path": "LICENSE",
"chars": 20845,
"preview": "Attribution-NonCommercial-ShareAlike 4.0 International\n\n================================================================"
},
{
"path": "OUTPUT_TERMS_OF_USE.md",
"chars": 13022,
"preview": "# ALPHAFOLD 3 OUTPUT TERMS OF USE\n\nLast Modified: 2024-11-09\n\nBy using AlphaFold 3 Output (as defined below), without ha"
},
{
"path": "README.md",
"chars": 12567,
"preview": "\n\n# AlphaFold 3\n\nThis package provides an implementation of the inference pipeline of AlphaFol"
},
{
"path": "WEIGHTS_PROHIBITED_USE_POLICY.md",
"chars": 7074,
"preview": "# ALPHAFOLD 3 MODEL PARAMETERS PROHIBITED USE POLICY\n\nLast Modified: 2024-11-09\n\nAlphaFold 3 can help you accelerate sci"
},
{
"path": "WEIGHTS_TERMS_OF_USE.md",
"chars": 16209,
"preview": "# ALPHAFOLD 3 MODEL PARAMETERS TERMS OF USE\n\nLast Modified: 2024-11-09\n\n[AlphaFold 3](https://blog.google/technology/ai/"
},
{
"path": "docker/Dockerfile",
"chars": 4308,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "docker/dockerignore",
"chars": 23,
"preview": "dockerignore\nDockerfile"
},
{
"path": "docker/jackhmmer_seq_limit.patch",
"chars": 3344,
"preview": "--- hmmer-3.4/src/jackhmmer.c\n+++ hmmer-3.4/src/jackhmmer.c\n@@ -73,6 +73,7 @@ static ESL_OPTIONS options[] = {\n { \"--n"
},
{
"path": "docs/community_tools.md",
"chars": 1303,
"preview": "# Community Tools\n\n## JAAG: a JSON input file Assembler for AlphaFold 3 (with Glycan Integration)\n\nJAAG is a lightweight"
},
{
"path": "docs/contributing.md",
"chars": 1109,
"preview": "# How to Contribute\n\nWe welcome small patches related to bug fixes and documentation, but we do not\nplan to make any maj"
},
{
"path": "docs/input.md",
"chars": 37989,
"preview": "# AlphaFold 3 Input\n\n## Specifying Input Files\n\nYou can provide inputs to `run_alphafold.py` in one of two ways:\n\n- Si"
},
{
"path": "docs/installation.md",
"chars": 18177,
"preview": "# Installation and Running Your First Prediction\n\nYou will need a machine running Linux; AlphaFold 3 does not support ot"
},
{
"path": "docs/known_issues.md",
"chars": 3276,
"preview": "# Known Issues\n\n## Numerical performance for CUDA Capability 7.x GPUs\n\nAll CUDA Capability 7.x GPUs (e.g. V100) produce "
},
{
"path": "docs/metadata_antibody_antigen.csv",
"chars": 5336,
"preview": "pdb_id,chain_id_1,chain_id_2,cluster_key_chain_1,cluster_key_chain_2,interface_cluster_key\n7fci,A,B,5581,5964,5581|5964\n"
},
{
"path": "docs/metadata_antibody_antigen.md",
"chars": 529,
"preview": "# Metadata for Antibody-Antigen pairs used to create figure 5a\n\nFigure 5a in the AlphaFold 3 paper was created using 71 "
},
{
"path": "docs/model_parameters.md",
"chars": 89697,
"preview": "# Model Parameters\n\nAlphaFold 3 layer names, shapes, and dtypes are documented in the table below.\nThis can be used for "
},
{
"path": "docs/output.md",
"chars": 13008,
"preview": "# AlphaFold 3 Output\n\n## Output Directory Structure\n\nFor every input job, AlphaFold 3 writes all its outputs in a direct"
},
{
"path": "docs/performance.md",
"chars": 15969,
"preview": "# Performance\n\n## Running the Pipeline in Stages\n\nThe `run_alphafold.py` script can be executed in stages to optimise re"
},
{
"path": "fetch_databases.sh",
"chars": 1725,
"preview": "#!/bin/bash\n# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0"
},
{
"path": "legal/WEIGHTS_PROHIBITED_USE_POLICY-Bahasa-Indonesia.md",
"chars": 7822,
"preview": "# KEBIJAKAN PENGGUNAAN TERLARANG UNTUK PARAMETER MODEL ALPHAFOLD 3\n\nTerakhir diubah: 2024-11-09\n\nAlphaFold 3 dapat memba"
},
{
"path": "legal/WEIGHTS_PROHIBITED_USE_POLICY-Espanol-Latinoamerica.md",
"chars": 8163,
"preview": "# POLÍTICA DE USO PROHIBIDO DE PARÁMETROS DEL MODELO ALPHAFOLD 3\n\nÚltima modificación: 9 de noviembre de 2024\n\nAlphaFold"
},
{
"path": "legal/WEIGHTS_PROHIBITED_USE_POLICY-Francais-Canada.md",
"chars": 8622,
"preview": "# POLITIQUE D'UTILISATION INTERDITE DES PARAMÈTRES DU MODÈLE ALPHAFOLD 3\n\nDernière modification: 2024-11-09\n\nAlphaFold 3"
},
{
"path": "legal/WEIGHTS_PROHIBITED_USE_POLICY-Portugues-Brazil.md",
"chars": 7466,
"preview": "# POLÍTICA DE USO PROIBIDO DOS PARÂMETROS DO MODELO ALPHAFOLD 3\n\nÚltima modificação: 2024-11-09\n\nO AlphaFold 3 ajuda voc"
},
{
"path": "legal/WEIGHTS_TERMS_OF_USE-Bahasa-Indonesia.md",
"chars": 18081,
"preview": "# PERSYARATAN PENGGUNAAN PARAMETER MODEL ALPHAFOLD 3\n\nTerakhir diubah: 09-11-2024\n\n[AlphaFold 3](https://blog.google/tec"
},
{
"path": "legal/WEIGHTS_TERMS_OF_USE-Espanol-Latinoamerica.md",
"chars": 18509,
"preview": "# CONDICIONES DE USO DE LOS PARÁMETROS DEL MODELO ALPHAFOLD 3\n\nÚltima modificación: 9 de noviembre de 2024\n\n[AlphaFold 3"
},
{
"path": "legal/WEIGHTS_TERMS_OF_USE-Francais-Canada.md",
"chars": 19393,
"preview": "# CONDITIONS D'UTILISATION DES PARAMÈTRES DU MODÈLE ALPHAFOLD 3\n\nDernière modification: 2024-11-09\n\n[AlphaFold 3](https:"
},
{
"path": "legal/WEIGHTS_TERMS_OF_USE-Portugues-Brazil.md",
"chars": 17093,
"preview": "# TERMOS DE USO DOS PARÂMETROS DO MODELO ALPHAFOLD 3\n\nÚltima modificação: 2024-11-09\n\nO\n[AlphaFold 3](https://blog.googl"
},
{
"path": "pyproject.toml",
"chars": 1107,
"preview": "[build-system]\nrequires = [\n \"scikit_build_core\",\n \"pybind11\",\n \"cmake>=3.28\",\n \"ninja\",\n \"numpy\",\n]\nbuil"
},
{
"path": "run_alphafold.py",
"chars": 36893,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "run_alphafold_data_test.py",
"chars": 9631,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "run_alphafold_test.py",
"chars": 15838,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/__init__.py",
"chars": 591,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/build_data.py",
"chars": 1838,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/common/base_config.py",
"chars": 4795,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/common/folding_input.py",
"chars": 53066,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/common/resources.py",
"chars": 2221,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/common/safe_pickle.py",
"chars": 2135,
"preview": "# Copyright 2025 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/common/testing/data.py",
"chars": 2121,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/constants/atom_types.py",
"chars": 10673,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/constants/chemical_component_sets.py",
"chars": 1579,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/constants/chemical_components.py",
"chars": 6649,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/constants/converters/ccd_pickle_gen.py",
"chars": 1523,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/constants/converters/chemical_component_sets_gen.py",
"chars": 2538,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/constants/mmcif_names.py",
"chars": 7200,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/constants/periodic_table.py",
"chars": 12970,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/constants/residue_names.py",
"chars": 22196,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/constants/side_chains.py",
"chars": 4084,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/cpp.cc",
"chars": 2146,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/data/cpp/msa_profile_pybind.cc",
"chars": 2853,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/data/cpp/msa_profile_pybind.h",
"chars": 853,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/data/featurisation.py",
"chars": 4260,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/data/msa.py",
"chars": 11575,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/data/msa_config.py",
"chars": 5974,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/data/msa_features.py",
"chars": 6595,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/data/msa_identifiers.py",
"chars": 2858,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/data/parsers.py",
"chars": 6281,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/data/pipeline.py",
"chars": 24299,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/data/structure_stores.py",
"chars": 3396,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/data/template_realign.py",
"chars": 6871,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/data/templates.py",
"chars": 34820,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/data/tools/hmmalign.py",
"chars": 4743,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/data/tools/hmmbuild.py",
"chars": 4796,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/data/tools/hmmsearch.py",
"chars": 5193,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/data/tools/jackhmmer.py",
"chars": 13080,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/data/tools/msa_tool.py",
"chars": 1331,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/data/tools/nhmmer.py",
"chars": 13911,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/data/tools/rdkit_utils.py",
"chars": 18737,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/data/tools/shards.py",
"chars": 2828,
"preview": "# Copyright 2025 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/data/tools/subprocess_utils.py",
"chars": 3848,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/jax/geometry/__init__.py",
"chars": 1099,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/jax/geometry/rigid_matrix_vector.py",
"chars": 7673,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/jax/geometry/rotation_matrix.py",
"chars": 9329,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/jax/geometry/struct_of_array.py",
"chars": 7692,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/jax/geometry/utils.py",
"chars": 1995,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/jax/geometry/vector.py",
"chars": 6776,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/atom_layout/atom_layout.py",
"chars": 38423,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/components/haiku_modules.py",
"chars": 10421,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/components/mapping.py",
"chars": 8058,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/components/utils.py",
"chars": 2497,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/confidence_types.py",
"chars": 9611,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/confidences.py",
"chars": 23555,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/data3.py",
"chars": 3902,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/data_constants.py",
"chars": 1055,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/feat_batch.py",
"chars": 3065,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/features.py",
"chars": 76456,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/merging_features.py",
"chars": 3302,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/mkdssp_pybind.cc",
"chars": 2348,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/model/mkdssp_pybind.h",
"chars": 818,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/model/mmcif_metadata.py",
"chars": 9006,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/model.py",
"chars": 18256,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/model_config.py",
"chars": 1318,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/msa_pairing.py",
"chars": 12496,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/network/atom_cross_attention.py",
"chars": 14992,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/network/confidence_head.py",
"chars": 10964,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/network/diffusion_head.py",
"chars": 11363,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/network/diffusion_transformer.py",
"chars": 13078,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/network/distogram_head.py",
"chars": 2575,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/network/evoformer.py",
"chars": 11539,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/network/featurization.py",
"chars": 8486,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/network/modules.py",
"chars": 18513,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/network/noise_level_embeddings.py",
"chars": 8372,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/network/template_modules.py",
"chars": 11624,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/params.py",
"chars": 6786,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/pipeline/inter_chain_bonds.py",
"chars": 12254,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/pipeline/pipeline.py",
"chars": 17327,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/pipeline/structure_cleaning.py",
"chars": 13382,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/post_processing.py",
"chars": 4790,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/protein_data_processing.py",
"chars": 4672,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/scoring/alignment.py",
"chars": 4743,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/scoring/chirality.py",
"chars": 6720,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/scoring/covalent_bond_cleaning.py",
"chars": 9570,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/model/scoring/scoring.py",
"chars": 2120,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/parsers/cpp/cif_dict.pyi",
"chars": 4764,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/parsers/cpp/cif_dict_lib.cc",
"chars": 26239,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/parsers/cpp/cif_dict_lib.h",
"chars": 5486,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/parsers/cpp/cif_dict_pybind.cc",
"chars": 24256,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/parsers/cpp/cif_dict_pybind.h",
"chars": 850,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/parsers/cpp/fasta_iterator.pyi",
"chars": 1047,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/parsers/cpp/fasta_iterator_lib.cc",
"chars": 4253,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/parsers/cpp/fasta_iterator_lib.h",
"chars": 3615,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/parsers/cpp/fasta_iterator_pybind.cc",
"chars": 4262,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/parsers/cpp/fasta_iterator_pybind.h",
"chars": 874,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/parsers/cpp/msa_conversion.pyi",
"chars": 919,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/parsers/cpp/msa_conversion_pybind.cc",
"chars": 5452,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/parsers/cpp/msa_conversion_pybind.h",
"chars": 874,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/scripts/copy_to_ssd.sh",
"chars": 1837,
"preview": "#!/bin/bash\n# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0"
},
{
"path": "src/alphafold3/scripts/gcp_mount_ssd.sh",
"chars": 1535,
"preview": "#!/bin/bash\n# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0"
},
{
"path": "src/alphafold3/structure/__init__.py",
"chars": 2578,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/structure/bioassemblies.py",
"chars": 13208,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/structure/bonds.py",
"chars": 9282,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/structure/chemical_components.py",
"chars": 10003,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/structure/cpp/aggregation.pyi",
"chars": 644,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/structure/cpp/aggregation_pybind.cc",
"chars": 1677,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/structure/cpp/aggregation_pybind.h",
"chars": 869,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/structure/cpp/membership.pyi",
"chars": 672,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/structure/cpp/membership_pybind.cc",
"chars": 2720,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/structure/cpp/membership_pybind.h",
"chars": 865,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/structure/cpp/mmcif_altlocs.cc",
"chars": 9832,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/structure/cpp/mmcif_altlocs.h",
"chars": 2073,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/structure/cpp/mmcif_atom_site.pyi",
"chars": 829,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/structure/cpp/mmcif_atom_site_pybind.cc",
"chars": 3224,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/structure/cpp/mmcif_atom_site_pybind.h",
"chars": 883,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/structure/cpp/mmcif_layout.h",
"chars": 5814,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/structure/cpp/mmcif_layout.pyi",
"chars": 1140,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/structure/cpp/mmcif_layout_lib.cc",
"chars": 8646,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/structure/cpp/mmcif_layout_pybind.cc",
"chars": 2149,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/structure/cpp/mmcif_layout_pybind.h",
"chars": 872,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/structure/cpp/mmcif_struct_conn.h",
"chars": 1397,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/structure/cpp/mmcif_struct_conn.pyi",
"chars": 668,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/structure/cpp/mmcif_struct_conn_lib.cc",
"chars": 15104,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/structure/cpp/mmcif_struct_conn_pybind.cc",
"chars": 2819,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/structure/cpp/mmcif_struct_conn_pybind.h",
"chars": 891,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/structure/cpp/mmcif_utils.pyi",
"chars": 2193,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/structure/cpp/mmcif_utils_pybind.cc",
"chars": 30075,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/structure/cpp/mmcif_utils_pybind.h",
"chars": 868,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/structure/cpp/string_array.pyi",
"chars": 1276,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/structure/cpp/string_array_pybind.cc",
"chars": 11240,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/structure/cpp/string_array_pybind.h",
"chars": 872,
"preview": "// Copyright 2024 DeepMind Technologies Limited\n//\n// AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view"
},
{
"path": "src/alphafold3/structure/mmcif.py",
"chars": 11012,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/structure/parsing.py",
"chars": 73197,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/structure/sterics.py",
"chars": 5047,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/structure/structure.py",
"chars": 124952,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/structure/structure_tables.py",
"chars": 31953,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/structure/table.py",
"chars": 19861,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/structure/test_utils.py",
"chars": 6885,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
},
{
"path": "src/alphafold3/test_data/featurised_example.json",
"chars": 5987,
"preview": "[\n {\n \"aatype\": \"46551530df4e79371352989100ae6af82ccd939009517b788173bdbb323ae40a\",\n \"asym_id\": \"42c714885d17f6c0"
},
{
"path": "src/alphafold3/test_data/miniature_databases/bfd-first_non_consensus_sequences__subsampled_1000.fasta",
"chars": 276767,
"preview": ">SRR5689334_7619591\nTFRYLCRQMERRLDGRPTLVVIDEAWTKIRKQPEWLEESLRTLRKKNCAVVLATQSLSEVVESPIASVVFESCQTRLLLPNPEARTPAIRALYTQRLGLT"
},
{
"path": "src/alphafold3/test_data/miniature_databases/mgy_clusters__subsampled_1000.fa",
"chars": 203524,
"preview": ">MGYP001379502932 FL=0\nKNNVKKNNANKNNVKKNNVENIIKQEDDSESNEKLMFKISDDISNDISEIYSYNVDKSKKVYKTYNFYILILVLFILFFIYINEDSSILPFSYTPTP"
},
{
"path": "src/alphafold3/test_data/miniature_databases/nt_rna_2023_02_23_clust_seq_id_90_cov_80_rep_seq__subsampled_1000.fasta",
"chars": 2257928,
"preview": ">XM_032924760.2 PREDICTED: Daphnia magna juvenile hormone acid O-methyltransferase (LOC116918952), mRNA \nCAACAGTGTCTCAAA"
},
{
"path": "src/alphafold3/test_data/miniature_databases/pdb_mmcif/5y2e.cif",
"chars": 31773,
"preview": "data_5Y2E\n#\n_entry.id 5Y2E\n#\nloop_\n_chem_comp.formula\n_chem_comp.formula_weight\n_chem_comp.id\n_chem_comp.mon_nstd_flag\n_"
},
{
"path": "src/alphafold3/test_data/miniature_databases/pdb_mmcif/6s61.cif",
"chars": 234071,
"preview": "data_6S61\n#\n_entry.id 6S61\n#\nloop_\n_chem_comp.formula\n_chem_comp.formula_weight\n_chem_comp.id\n_chem_comp.mon_nstd_flag\n_"
},
{
"path": "src/alphafold3/test_data/miniature_databases/pdb_mmcif/6ydw.cif",
"chars": 159762,
"preview": "data_6YDW\n#\n_entry.id 6YDW\n#\nloop_\n_chem_comp.formula\n_chem_comp.formula_weight\n_chem_comp.id\n_chem_comp.mon_nstd_flag\n_"
},
{
"path": "src/alphafold3/test_data/miniature_databases/pdb_mmcif/7rye.cif",
"chars": 51839,
"preview": "data_7RYE\n#\n_entry.id 7RYE\n#\nloop_\n_chem_comp.formula\n_chem_comp.formula_weight\n_chem_comp.id\n_chem_comp.mon_nstd_flag\n_"
},
{
"path": "src/alphafold3/test_data/miniature_databases/pdb_seqres_2022_09_28__subsampled_1000.fasta",
"chars": 330183,
"preview": ">4ffz_X mol:protein length:111 Envelope protein E\nMASMTLKGMSYVMCTGSFKLEKEVAETQHGTVLVQVKYEGTDAPCKIPFSSQDEKGVTQNGRLITANPI"
},
{
"path": "src/alphafold3/test_data/miniature_databases/rfam_14_4_clustered_rep_seq__subsampled_1000.fasta",
"chars": 490761,
"preview": ">AY587142.1/1755-1856 Arsenophonus endosymbiont of Aleurodicus dugesii 16S ribosomal RNA gene, partial sequence; tRNA-Gl"
},
{
"path": "src/alphafold3/test_data/miniature_databases/rnacentral_active_seq_id_90_cov_80_linclust__subsampled_1000.fasta",
"chars": 1050750,
"preview": ">URS000254B5FC rRNA from 1 species \nATGGAAGTCGACAGAGCCCCGGCCGCTGCCGCGGGAGGAGGATCCTCCTCTGGCGCGATGGCGGTGGACGCGGCCGGCGGCGTG"
},
{
"path": "src/alphafold3/test_data/miniature_databases/uniprot_all__subsampled_1000.fasta",
"chars": 468204,
"preview": ">tr|A0A3A3JCS5|A0A3A3JCS5_SALMO Octaprenyl diphosphate synthase OS=Salmonella montevideo OX=115981 GN=ispB PE=3 SV=1\nMNL"
},
{
"path": "src/alphafold3/test_data/miniature_databases/uniref90__subsampled_1000.fasta",
"chars": 462158,
"preview": ">UniRef90_A0A8C0C0Z5 NADP-retinol dehydrogenase n=1 Tax=Buteo japonicus TaxID=224669 RepID=A0A8C0C0Z5_9AVES\nMATLVPRIVLIT"
},
{
"path": "src/alphafold3/test_data/model_config.json",
"chars": 5426,
"preview": "{\n \"evoformer\": {\n \"max_relative_chain\": 2,\n \"max_relative_idx\": 32,\n \"msa_channel\": 64,\n \"msa_stack\": {\n "
},
{
"path": "src/alphafold3/version.py",
"chars": 604,
"preview": "# Copyright 2024 DeepMind Technologies Limited\n#\n# AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a "
}
]
// ... and 3 more files (download for full content)
About this extraction
This page contains the full source code of the google-deepmind/alphafold3 GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 186 files (7.4 MB), approximately 1.9M tokens, and a symbol index with 1231 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.