<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://hpcguide.tau.ac.il/index.php?action=history&amp;feed=atom&amp;title=Alphafold3</id>
	<title>Alphafold3 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://hpcguide.tau.ac.il/index.php?action=history&amp;feed=atom&amp;title=Alphafold3"/>
	<link rel="alternate" type="text/html" href="https://hpcguide.tau.ac.il/index.php?title=Alphafold3&amp;action=history"/>
	<updated>2026-05-16T12:36:50Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.5</generator>
	<entry>
		<id>https://hpcguide.tau.ac.il/index.php?title=Alphafold3&amp;diff=1508&amp;oldid=prev</id>
		<title>Levk: Created page with &quot;&#039;&#039;&#039;AlphaFold3 Module Guide&#039;&#039;&#039;  == Overview == This guide provides instructions on using the AlphaFold3 module in an HPC environment with Slurm and Apptainer (Singularity).  ==...&quot;</title>
		<link rel="alternate" type="text/html" href="https://hpcguide.tau.ac.il/index.php?title=Alphafold3&amp;diff=1508&amp;oldid=prev"/>
		<updated>2025-03-20T12:13:12Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;AlphaFold3 Module Guide&amp;#039;&amp;#039;&amp;#039;  == Overview == This guide provides instructions on using the AlphaFold3 module in an HPC environment with Slurm and Apptainer (Singularity).  ==...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;AlphaFold3 Module Guide&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
This guide provides instructions on using the AlphaFold3 module in an HPC environment with Slurm and Apptainer (Singularity).&lt;br /&gt;
&lt;br /&gt;
== Loading the Module ==&lt;br /&gt;
To use AlphaFold3, first load the module:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module load alphafold3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This will automatically load the required Apptainer module and set up necessary environment variables.&lt;br /&gt;
&lt;br /&gt;
== Environment Variables ==&lt;br /&gt;
After loading the module, the following environment variables are available:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;$AF3_CONTAINER&amp;#039;&amp;#039;&amp;#039; - Path to the AlphaFold3 Singularity container&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;$AF3_MODELS&amp;#039;&amp;#039;&amp;#039; - Path to AlphaFold3 model parameters&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;$AF3_DB&amp;#039;&amp;#039;&amp;#039; - Path to the AlphaFold3 database&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;$AF3_SRC&amp;#039;&amp;#039;&amp;#039; - Path to AlphaFold3 source directory&lt;br /&gt;
&lt;br /&gt;
== Understanding Bind Mounts in Singularity ==&lt;br /&gt;
Singularity requires **bind mounts** to provide external directories inside the container. This ensures that the container can access necessary files without modifying its internal structure.&lt;br /&gt;
&lt;br /&gt;
A bind mount follows this format:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
--bind /path/on/host:/path/inside/container&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
- `/path/on/host` → The folder on your actual system (outside the container)&lt;br /&gt;
- `/path/inside/container` → Where this folder will be accessible **inside** the container&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
--bind /home/user/data:/root/input_data&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This allows the **`/home/user/data`** directory on the host system to appear inside the container at **`/root/input_data`**.&lt;br /&gt;
&lt;br /&gt;
== Binding a Folder for Your Input Data ==&lt;br /&gt;
The default AlphaFold3 example from Google DeepMind uses `/root/af_input`, but this is **not a required folder inside the container**. You can bind your input folder to **any directory** inside the container.&lt;br /&gt;
&lt;br /&gt;
For example, if your input JSON is located at `/home/user/alphafold_inputs/fold_input.json`, you can bind it inside the container at **any location**:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
--bind /home/user/alphafold_inputs:/root/custom_folder&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then, the JSON file should be referenced as:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
--json_path=/root/custom_folder/fold_input.json&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Refer to the official AlphaFold3 documentation for details on how to structure the input file: [AlphaFold3 Input File Guide](https://github.com/google-deepmind/alphafold3/blob/main/docs/input.md)&lt;br /&gt;
&lt;br /&gt;
== Listing All Available Command Flags ==&lt;br /&gt;
To see a full list of available command-line options for AlphaFold3, run the following inside the container:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
singularity exec --nv \&lt;br /&gt;
    --bind $AF3_SRC:/root/custom_folder \&lt;br /&gt;
    --bind /tmp:/root/af_output \&lt;br /&gt;
    --bind $AF3_MODELS:/root/models \&lt;br /&gt;
    --bind $AF3_DB:/root/public_databases \&lt;br /&gt;
    --bind /home/user/alphafold_inputs:/root/custom_folder \&lt;br /&gt;
    $AF3_CONTAINER \&lt;br /&gt;
    python /root/custom_folder/run_alphafold.py --helpfull&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This will provide detailed documentation on all possible flags and parameters that can be used when running AlphaFold3.&lt;br /&gt;
&lt;br /&gt;
== Running AlphaFold3 ==&lt;br /&gt;
To run AlphaFold3 inside the Singularity container, use:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
singularity exec --nv \&lt;br /&gt;
    --bind $AF3_SRC:/root/custom_folder \&lt;br /&gt;
    --bind /tmp:/root/af_output \&lt;br /&gt;
    --bind $AF3_MODELS:/root/models \&lt;br /&gt;
    --bind $AF3_DB:/root/public_databases \&lt;br /&gt;
    --bind /home/user/alphafold_inputs:/root/custom_folder \&lt;br /&gt;
    $AF3_CONTAINER \&lt;br /&gt;
    python /root/custom_folder/run_alphafold.py \&lt;br /&gt;
        --json_path=/root/custom_folder/fold_input.json \&lt;br /&gt;
        --model_dir=/root/models \&lt;br /&gt;
        --db_dir=/root/public_databases \&lt;br /&gt;
        --output_dir=/root/af_output&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace `/home/user/alphafold_inputs` with the actual path to your input folder.&lt;br /&gt;
&lt;br /&gt;
== Binding a Folder That is Not Related to Built-In Environment Variables ==&lt;br /&gt;
If you need to bind a folder that is **not already covered by** `$AF3_SRC`, `$AF3_DB`, or `$AF3_MODELS`, you can specify it manually using the `--bind` option. Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
--bind /external/data:/root/custom_data&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This makes `/external/data` accessible inside the container at `/root/custom_data`.&lt;br /&gt;
&lt;br /&gt;
Then, reference files from inside the container:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
--json_path=/root/custom_data/my_input.json&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Submitting an AlphaFold3 Job to Slurm ==&lt;br /&gt;
To submit an AlphaFold3 job to Slurm, create a script (e.g., `alphafold3_job.sh`):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --job-name=alphafold3&lt;br /&gt;
#SBATCH --partition=gpu-general&lt;br /&gt;
#SBATCH --output=alphafold3.out&lt;br /&gt;
#SBATCH --error=alphafold3.err&lt;br /&gt;
#SBATCH --gres=gpu:1,af3&lt;br /&gt;
#SBATCH --cpus-per-task=8&lt;br /&gt;
#SBATCH --mem=64G&lt;br /&gt;
#SBATCH --time=1-00:00:00&lt;br /&gt;
&lt;br /&gt;
module load alphafold3&lt;br /&gt;
&lt;br /&gt;
singularity exec --nv \&lt;br /&gt;
    --bind $AF3_SRC:/root/custom_folder \&lt;br /&gt;
    --bind /tmp:/root/af_output \&lt;br /&gt;
    --bind $AF3_MODELS:/root/models \&lt;br /&gt;
    --bind $AF3_DB:/root/public_databases \&lt;br /&gt;
    --bind /home/user/alphafold_inputs:/root/custom_folder \&lt;br /&gt;
    $AF3_CONTAINER \&lt;br /&gt;
    python /root/custom_folder/run_alphafold.py \&lt;br /&gt;
        --json_path=/root/custom_folder/fold_input.json \&lt;br /&gt;
        --model_dir=/root/models \&lt;br /&gt;
        --db_dir=/root/public_databases \&lt;br /&gt;
        --output_dir=/root/af_output&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Submit the job using:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sbatch alphafold3_job.sh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Unloading the Module ==&lt;br /&gt;
To unload the module when done:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module unload alphafold3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will also unload the Apptainer module.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
* If the module does not load, ensure the correct name is used: `module avail alphafold3`&lt;br /&gt;
* If Slurm fails to allocate a node, check available resources: `sinfo -o &amp;quot;%N %G&amp;quot;`&lt;br /&gt;
* If the container fails to run, verify that the paths in `$AF3_CONTAINER`, `$AF3_MODELS`, and `$AF3_DB` are correct.&lt;br /&gt;
* If input files are not found, ensure the correct directory is bound and referenced properly inside the container.&lt;/div&gt;</summary>
		<author><name>Levk</name></author>
	</entry>
</feed>