<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.bwhpc.de/wiki/index.php?action=history&amp;feed=atom&amp;title=BinAC2%2FSoftware%2FAlphafold</id>
	<title>BinAC2/Software/Alphafold - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.bwhpc.de/wiki/index.php?action=history&amp;feed=atom&amp;title=BinAC2%2FSoftware%2FAlphafold"/>
	<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BinAC2/Software/Alphafold&amp;action=history"/>
	<updated>2026-05-07T13:21:54Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://wiki.bwhpc.de/wiki/index.php?title=BinAC2/Software/Alphafold&amp;diff=15649&amp;oldid=prev</id>
		<title>F Bartusch: Created page with &quot;{{Softwarepage|bio/alphafold}}  {| width=600px class=&quot;wikitable&quot; |- ! Description !! Content |- | module load | bio/alphafold |- | License | ACC BY-NC-SA 4.0 - see [https://github.com/google-deepmind/alphafold3/blob/main/LICENSE] |- | Citing | See [https://github.com/google-deepmind/alphafold3?tab=readme-ov-file#citing-this-work] |- | Links | DeepMind AlphaFold Website: [https://deepmind.google/technologies/alphafold/] &lt;br&gt; Alphafold 3 Repository: [https://github.com/goo...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.bwhpc.de/wiki/index.php?title=BinAC2/Software/Alphafold&amp;diff=15649&amp;oldid=prev"/>
		<updated>2025-12-16T10:57:55Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Softwarepage|bio/alphafold}}  {| width=600px class=&amp;quot;wikitable&amp;quot; |- ! Description !! Content |- | module load | bio/alphafold |- | License | ACC BY-NC-SA 4.0 - see [https://github.com/google-deepmind/alphafold3/blob/main/LICENSE] |- | Citing | See [https://github.com/google-deepmind/alphafold3?tab=readme-ov-file#citing-this-work] |- | Links | DeepMind AlphaFold Website: [https://deepmind.google/technologies/alphafold/] &amp;lt;br&amp;gt; Alphafold 3 Repository: [https://github.com/goo...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Softwarepage|bio/alphafold}}&lt;br /&gt;
&lt;br /&gt;
{| width=600px class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Description !! Content&lt;br /&gt;
|-&lt;br /&gt;
| module load&lt;br /&gt;
| bio/alphafold&lt;br /&gt;
|-&lt;br /&gt;
| License&lt;br /&gt;
| ACC BY-NC-SA 4.0 - see [https://github.com/google-deepmind/alphafold3/blob/main/LICENSE]&lt;br /&gt;
|-&lt;br /&gt;
| Citing&lt;br /&gt;
| See [https://github.com/google-deepmind/alphafold3?tab=readme-ov-file#citing-this-work]&lt;br /&gt;
|-&lt;br /&gt;
| Links&lt;br /&gt;
| DeepMind AlphaFold Website: [https://deepmind.google/technologies/alphafold/] &amp;lt;br&amp;gt;&lt;br /&gt;
Alphafold 3 Repository: [https://github.com/google-deepmind/alphafold3]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
AlphaFold 3 developed by DeepMind predicts the 3D structure and interactions of biological molecules: proteins, DNA, RNA, ligands, and other small molecules.&lt;br /&gt;
&lt;br /&gt;
BinAC 2 provides almost everything you need for working with Alphafold 3:&lt;br /&gt;
* Alphafold 3 installed in an Apptainer image&lt;br /&gt;
* Alphafold 3 database&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;BUT&amp;#039;&amp;#039;&amp;#039; you have to bring your own parameter file! Due to license issues we are not allowed to share them publicly. You can find information on how to obtain them [https://github.com/google-deepmind/alphafold3?tab=readme-ov-file#obtaining-model-parameters here].&lt;br /&gt;
&lt;br /&gt;
= Interpreting Predictions =&lt;br /&gt;
&lt;br /&gt;
When using AlphaFold3, users should treat predicted structures as hypotheses rather than definitive representations of molecular reality.&lt;br /&gt;
While the method often produces highly accurate models, confidence can vary substantially across regions, especially for flexible loops, disordered segments, or novel interactions not well represented in training data. Users should therefore critically assess confidence metrics provided by the model and, where possible, validate predictions against experimental data or independent computational approaches. Biological plausibility, consistency with known functional or biochemical evidence, and sensitivity to alternative inputs should also be considered. Overall, AlphaFold3 outputs are most powerful when used as guidance for downstream analysis and experimental design, not as final ground truth.&lt;br /&gt;
&lt;br /&gt;
AlphaFold 3 supplies multiple confidence metrics to help you critically assess its predictions:&lt;br /&gt;
&lt;br /&gt;
* Predicted LDDT (pLDDT): predicted atomic coordinates are accompanied by pLDDT scores. These reflect AlphaFold 3’s local confidence in the prediction of the position of that particular atom.&lt;br /&gt;
* Predicted Aligned Error (PAE) scores and a PAE plot: an indication of AlphaFold’s confidence in the packing and relative positions of domains, molecular chains such as proteins and DNA, and other entities like ligands and ions.&lt;br /&gt;
* Predicted TM (pTM) score: a single-value metric reflecting the accuracy of the overall predicted structure.&lt;br /&gt;
* Interface-predicted TM (ipTM) score: measures the accuracy of predictions of one component of the complex relative to the other components of the complex.&lt;br /&gt;
* Per chain pTM and per-chain pair ipTM: confidence in individual chains or pairs of chains.&lt;br /&gt;
&lt;br /&gt;
Further Reading:&lt;br /&gt;
&lt;br /&gt;
* [https://www.ebi.ac.uk/training/online/courses/alphafold/alphafold-3-and-alphafold-server/introducing-alphafold-3/how-have-alphafold-3s-predictions-been-validated/ AlphaFold3 validation overview]&lt;br /&gt;
&lt;br /&gt;
* [https://www.ebi.ac.uk/training/online/courses/alphafold/alphafold-3-and-alphafold-server/how-to-assess-the-quality-of-alphafold-3-predictions/ How to assess the quality of AlphaFold3 predictions]&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&lt;br /&gt;
AlphaFold&amp;#039;s algorithm can be devided into two steps:&lt;br /&gt;
&lt;br /&gt;
# CPU-only part: Computation of several multiple sequence alignments (MSA)&lt;br /&gt;
# GPU-part: MSA used as input for neural network for infering structure&lt;br /&gt;
&lt;br /&gt;
This results in two optimal resource profiles regarding the number of CPU cores and GPUs.&lt;br /&gt;
Therefore we provide two template jobscripts for both steps at &amp;lt;code&amp;gt;/opt/bwhpc/common/bio/alphafold/3.0.1/bwhpc-examples&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Input == &lt;br /&gt;
&lt;br /&gt;
You can provide inputs to &amp;lt;code&amp;gt;run_alphafold.py&amp;lt;/code&amp;gt; in one of two ways:&lt;br /&gt;
&lt;br /&gt;
* Single input file: Use the &amp;lt;code&amp;gt;--json_path&amp;lt;/code&amp;gt; flag followed by the path to a single JSON file.&lt;br /&gt;
* Multiple input files: Use the &amp;lt;code&amp;gt;--input_dir&amp;lt;/code&amp;gt; flag followed by the path to a directory of JSON files.&lt;br /&gt;
&lt;br /&gt;
Please see the official [https://github.com/google-deepmind/alphafold3/blob/main/docs/input.md#top-level-structure AlphaFold 3 documentation] for more information regarding JSON file structure.&lt;br /&gt;
&lt;br /&gt;
The example jobscript uses a very simple input JSON:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;name&amp;quot;: &amp;quot;2PV7&amp;quot;,&lt;br /&gt;
  &amp;quot;sequences&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;protein&amp;quot;: {&lt;br /&gt;
        &amp;quot;id&amp;quot;: [&amp;quot;A&amp;quot;, &amp;quot;B&amp;quot;],&lt;br /&gt;
        &amp;quot;sequence&amp;quot;: &amp;quot;GMRESYANENQFGFKTINSDIHKIVIVGGYGKLGGLFARYLRASGYPISILDREDWAVAESILANADVVIVSVPINLTLETIERLKPYLTENMLLADLTSVKREPLAKMLEVHTGAVLGLHPMFGADIASMAKQVVVRCDGRFPERYEWLLEQIQIWGAKIYQTNATEHDHNMTYIQALRHFSTFANGLHLSKQPINLANLLALSSPIYRLELAMIGRLFAQDAELYADIIMDKSENLAVIETLKQTYDEALTFFENNDRQGFIDAFHKVRDWFGDYSEQFLKESRQLLQQANDLKQG&amp;quot;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;modelSeeds&amp;quot;: [1],&lt;br /&gt;
  &amp;quot;dialect&amp;quot;: &amp;quot;alphafold3&amp;quot;,&lt;br /&gt;
  &amp;quot;version&amp;quot;: 1&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AlphaFold 3 database ==&lt;br /&gt;
&lt;br /&gt;
Don&amp;#039;t change &amp;lt;code&amp;gt;--db_dir=$ALPHAFOLD_DATABASES&amp;lt;/code&amp;gt; without a good reason. Upon loading the AlphaFold 3 module, the environment variable &amp;lt;code&amp;gt;$ALPHAFOLD_DATABASES&amp;lt;/code&amp;gt; is set to the centrally stored database at &amp;lt;code&amp;gt;/pfs/10/project/db/alphafold/3.0.1/databases/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== AlphaFold 3 model parameters ==&lt;br /&gt;
&lt;br /&gt;
Set the path to your AlphaFold 3 model parameters you received from DeepMind after applying for it. If you place the file &amp;lt;code&amp;gt;af3.bin.zst&amp;lt;/code&amp;gt; in the directory &amp;lt;code&amp;gt;$HOME/af3-models&amp;lt;/code&amp;gt; the example scripts will work out of the box.&lt;br /&gt;
&lt;br /&gt;
Please note: You can also store the parameters in your project directory or a workspace for slightly better performance. The template uses &amp;lt;code&amp;gt;$HOME/af3-models&amp;lt;/code&amp;gt; because this environment variable works for everyone.&lt;br /&gt;
&lt;br /&gt;
== Output ==&lt;br /&gt;
&lt;br /&gt;
You can set the output directory via the &amp;lt;code&amp;gt;--output_dir=$ALPHAFOLD_RESULTS_DIR&amp;lt;/code&amp;gt; option. The template jobscript creates a workspace called &amp;lt;code&amp;gt;alphafold&amp;lt;/code&amp;gt; as output directory.&lt;br /&gt;
&lt;br /&gt;
For every input job, AlphaFold 3 writes all its outputs in a directory called by the sanitized version of the job name. E.g. for job name &amp;quot;My first fold (TEST)&amp;quot;, AlphaFold 3 will write its outputs in a directory called &amp;lt;code&amp;gt;My_first_fold_TEST&amp;lt;/code&amp;gt; (the case is respected). If such directory already exists, AlphaFold 3 will append a timestamp to the directory name to avoid overwriting existing data unless &amp;lt;code&amp;gt;--force_output_dir&amp;lt;/code&amp;gt; is passed.&lt;br /&gt;
&lt;br /&gt;
Please see the official [https://github.com/google-deepmind/alphafold3/blob/main/docs/output.md AlphaFold 3 documentation] for more information regarding output directory structure.&lt;br /&gt;
&lt;br /&gt;
= CPU-only: Multiple Sequence Alignment =&lt;br /&gt;
&lt;br /&gt;
In the beginning, AlphaFold 3 computes three multiple sequence alignments (MSA).&lt;br /&gt;
These MSAs are computed on the CPU sequentially and the number of threads are hard-coded:&lt;br /&gt;
&lt;br /&gt;
* jackhmmer on UniRef90 using 8 threads&amp;lt;/br&amp;gt;&lt;br /&gt;
* jackhmmer on MGnify using 8 threads&amp;lt;/br&amp;gt;&lt;br /&gt;
* HHblits on BFD + Uniclust30 using 4 threads&amp;lt;/br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We provide a template jobscript at: &amp;lt;code&amp;gt;/opt/bwhpc/common/bio/alphafold/3.0.1/bwhpc-examples/binac2-af3-alignment.slurm&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can change &amp;lt;code&amp;gt;--time&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--mem&amp;lt;/code&amp;gt;, although these are sensible defaults.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --partition=compute&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
&lt;br /&gt;
# Alphafold creates alignments sequentially, using at max 8 cores.&lt;br /&gt;
#SBATCH --ntasks-per-node=8&lt;br /&gt;
&lt;br /&gt;
#SBATCH --time=10:00:00&lt;br /&gt;
#SBATCH --mem=100gb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The MSAs are stored in the directory specified by &amp;lt;code&amp;gt;--output_dir&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= GPU-part: Model Inference =&lt;br /&gt;
&lt;br /&gt;
Aftere computing the MSAs, AlphaFold performs model inference on the GPU. Only one GPU is used.&lt;br /&gt;
This use case has this optimal resource profile:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --partition=gpu&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
#SBATCH --cpus-per-task=8&lt;br /&gt;
#SBATCH --gres=gpu:a100:1&lt;br /&gt;
#SBATCH --time=06:00:00&lt;br /&gt;
#SBATCH --mem=100gb&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The template jobscript only differs to CPU-only part in the option &amp;lt;code&amp;gt;--norun_data_pipeline&amp;lt;/code&amp;gt;. This means the MSAs aren&amp;#039;t recomputed, but are taken from the previous CPU-only job.&lt;br /&gt;
&lt;br /&gt;
= Chaining CPU- and GPU-Jobs = &lt;br /&gt;
&lt;br /&gt;
To run the data pipeline first and then start the inference job as soon as the first one is finished, you can chain them like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
JOBID=$(sbatch --parsable binac2-af3-alignment.slurm)&lt;br /&gt;
sbatch --dependency=afterok:$JOBID binac2-af3-inference.slurm&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This is a comment&lt;br /&gt;
= Benchmark on BinAC 2 =&lt;br /&gt;
&lt;br /&gt;
We ran some CASP14 targets with the &amp;lt;code&amp;gt;--benchmark=true&amp;lt;/code&amp;gt; on BinAC. The following table gives you some guidance for choosing meaningful memory and walltime values. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto&amp;quot;&lt;br /&gt;
|+ Benchmark results on BinAC (work in progress)&lt;br /&gt;
|-&lt;br /&gt;
! Target !! #Residues !! jackhmmer UniRef90 [s] !! jackhmmer MGnify [s] !! HHblits on BFD [s] !! Inference [s] !! Memory Usage [GB]&lt;br /&gt;
|-&lt;br /&gt;
| ... || ... || ... || ... || ... || ... || ...&lt;br /&gt;
|-&lt;br /&gt;
| ... || ... || ... || ... || ... || ... || ...&lt;br /&gt;
|-&lt;br /&gt;
| ... || ... || ... || ... || ... || ... || ...&lt;br /&gt;
|}&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>F Bartusch</name></author>
	</entry>
</feed>