Alphalink2 on Biowulf

Alphalink2 extend AlphaLink to protein complexes. AlphaLink2 is based on Uni-Fold and integrates crosslinking MS data directly into Uni-Fold. The current networks were trained with simulated SDA data.

References:

Documentation
Important Notes

Interactive job
Interactive jobs should be used for debugging, graphics, or applications that cannot be run as batch jobs.

In the following example we will predict a complex from a FASTA file with two chains and the crosslinking mass-spectrometry residue pairs.

Prediction of complex structure with crosslinking constraints

Allocate only CPU and convert CSV crosslink restraints to .pkl file for the input

[user@biowulf]$ sinteractive --gres=lscratch:100 -c 8 --mem=32g
[user@cn0132]$ module load alphalink2
[user@cn0132]$ cp -r ${AL2_TEST_DATA:-none}/* .
[user@cn0132]$ generate_crosslink_pickle.py --csv H1142.csv --output H1142_crosslink.pkl

Run MSA on CPUs

[user@cn0132]$ time run_alphalink.sh \
                --msa \
                --fasta_path H1142.fasta \
                --crosslinks H1142_crosslink.pkl \
                --output_dir H1142_output \
                --param_path $AL2_PARAMS \
                --database_dir $AF2_DB \
                --max_template_date 2026-02-26

========================================
 AlphaLink2 pipeline
 Date:               Thu Oct  8 16:07:03 EDT 2026
 FASTA:              H1142.fasta
 CROSSLINKS:         H1142_crosslink.pkl
 FINAL OUTPUT_DIR:   H1142_output
 WORK OUTPUT_DIR:    /lscratch/32271110/H1142_output
 PARAM_PATH:         /fdb/alphalink2/AlphaLink-Multimer_SDA_v3.pt
 DATABASE_DIR:       /vf/users/alphafold2
 MAX_TEMPLATE_DATE:  2026-02-26
 Run MSA:            true
 Run Inference:      false
 SLURM_JOB_ID:       32271110
 SCRATCH DIR:        /lscratch/32271110
 Inference settings:
   recycling_iters =  20
   num_samples    =   25
   neff           =   -1
   dropout_xlinks =   -1
   relax          =   false
========================================
[Thu Oct  8 16:02:56 EDT 2026] Starting MSA generation with UniFold...
......
I1008 16:07:13.318225 23456244868928 templates.py:945] Using precomputed obsolete pdbs /vf/users/alphafold2/pdb_mmcif/obsolete.dat.
I1008 16:07:13.326912 23456244868928 utils.py:75] Mapping multi-chains fasta with chain order: A B
I1008 16:07:13.327077 23456244868928 homo_search.py:161] searching homogeneous Sequences & structures for H1142_A...
I1008 16:07:13.327310 23456244868928 jackhmmer.py:140] Launching subprocess "/opt/conda/envs/alphalink2/bin/jackhmmer -o /dev/null -A /tmp/tmpehiq7htv/output.sto --noali --F1 0.0005 --F2 5e-05 --F3 5e-07 --incE 0.0001 -E 0.0001 --cpu 8 -N 1 /lscratch/32271110/H1142_output/H1142_A.fasta /vf/users/alphafold2/uniref90/uniref90.fasta"
I1008 16:07:13.336977 23456244868928 utils.py:36] Started Jackhmmer (uniref90.fasta) query
......
========================================
 AlphaLink2 pipeline finished at Tue Oct 13 10:56:29 EDT 2026
 Final results in: H1142_output
========================================

real	71m29.377s
user	122m53.966s
sys	14m1.542s

Run Model Inference on GPUs

[user@biowulf]$ sinteractive --gres=lscratch:100,gpu:l40:1 -c 8 --mem=32g
[user@cn0219]$ module load alphalink2
[user@cn0219]$ time run_alphalink.sh \
    --model_inference \
    --fasta_path H1142.fasta \
    --crosslinks H1142_crosslink.pkl \
    --output_dir H1142_output \
    --param_path $AL2_PARAMS \
    --database_dir $AF2_DB \
    --max_template_date 2026-02-26 \
    --max_recycling_iters 10 \
    --times 16 \
    --neff -1 \
    --dropout_crosslinks 0                

========================================
 AlphaLink2 pipeline
 Date:               Tue Oct 13 11:06:28 EDT 2026
 FASTA:              H1142.fasta
 CROSSLINKS:         H1142_crosslink.pkl
 FINAL OUTPUT_DIR:   H1142_output
 WORK OUTPUT_DIR:    /lscratch/32775813/H1142_output
 PARAM_PATH:         /fdb/alphalink2/AlphaLink-Multimer_SDA_v3.pt
 DATABASE_DIR:       /vf/users/alphafold2
 MAX_TEMPLATE_DATE:  2026-02-26
 Run MSA:            false
 Run Inference:      true
 SLURM_JOB_ID:       32775813
 SCRATCH DIR:        /lscratch/32775813
 Inference settings:
   recycling_iters =  10
   num_samples    =   16
   neff           =   -1
   dropout_xlinks =   0
   relax          =   false
========================================
[Tue Oct 13 11:06:28 EDT 2026] Starting prediction...
... ...
Inference time: 24.14502292207908
Model 14 Crosslink satisfaction: 0.741 Model confidence: 0.752
Inference time: 24.144640894955955
Model 15 Crosslink satisfaction: 0.778 Model confidence: 0.737
plddts {'AlphaLink2_AlphaLink-Multimer_SDA_v3.pt_15137_0.756': '0.8993534'}
ptms {'AlphaLink2_AlphaLink-Multimer_SDA_v3.pt_15137_0.756': '0.7562248'}
[Tue Oct 13 12:41:44 EDT 2026] Prediction completed. Results in H1142_output
========================================
 AlphaLink2 pipeline finished at Tue Oct 13 12:41:44 EDT 2026
 Final results in: H1142_output
========================================

real	93m17.200s
user	91m58.252s
sys	3m35.435s

[user@cn0219]$ ls -lh H1142_output
total 2.5G
drwxr-xr-x 2 yangr3 staff  151 Oct 13 11:06 A
-rw-r--r-- 1 yangr3 staff 453K Oct 13 11:06 A.feature.pkl.gz
-rw-r--r-- 1 yangr3 staff 213K Oct 13 11:55 AlphaLink2_13078_0.700.pdb
-rw-r--r-- 1 yangr3 staff 156M Oct 13 12:01 AlphaLink2_13078_0.700.pdb_outputs.pkl.gz
-rw-r--r-- 1 yangr3 staff 213K Oct 13 12:07 AlphaLink2_15137_0.756.pdb
-rw-r--r-- 1 yangr3 staff 155M Oct 13 12:12 AlphaLink2_15137_0.756.pdb_outputs.pkl.gz
... ...
-rw-r--r-- 1 yangr3 staff 213K Oct 13 11:20 AlphaLink2_99982_0.745.pdb
-rw-r--r-- 1 yangr3 staff 156M Oct 13 11:26 AlphaLink2_99982_0.745.pdb_outputs.pkl.gz
-rw-r--r-- 1 yangr3 staff   81 Oct 13 11:06 A.timings.json
-rw-r--r-- 1 yangr3 staff  28K Oct 13 11:06 A.uniprot.pkl.gz
drwxr-xr-x 2 yangr3 staff  151 Oct 13 11:06 B
-rw-r--r-- 1 yangr3 staff 630K Oct 13 11:06 B.feature.pkl.gz
-rw-r--r-- 1 yangr3 staff   80 Oct 13 11:06 B.timings.json
-rw-r--r-- 1 yangr3 staff 855K Oct 13 11:06 B.uniprot.pkl.gz
-rw-r--r-- 1 yangr3 staff  537 Oct 13 11:06 chain_id_map.json
-rw-r--r-- 1 yangr3 staff    3 Oct 13 11:06 chains.txt
-rw-r--r-- 1 yangr3 staff  228 Oct 13 11:06 H1142_A.fasta
-rw-r--r-- 1 yangr3 staff  137 Oct 13 11:06 H1142_B.fasta
-rw-r--r-- 1 yangr3 staff   74 Oct 13 12:41 multimer_af2_crop_AlphaLink-Multimer_SDA_v3.pt_42_16_r10_e1_plddt.json
-rw-r--r-- 1 yangr3 staff   74 Oct 13 12:41 multimer_af2_crop_AlphaLink-Multimer_SDA_v3.pt_42_16_r10_e1_ptm.json

Batch job
Most jobs should be run as batch jobs.

Similarly, jobs should be run with two steps: Multiple Sequence Alignment (MSA) on CPU and model inference on GPU.

1. Create a batch script file for MSA (e.g. al2_msa.sh)

#! /bin/bash

set -e

module load alphalink2
cp -r ${AL2_TEST_DATA:-none}/* .
generate_crosslink_pickle.py --csv H1142.csv --output H1142_crosslink.pkl

run_alphalink.sh \
--msa \
--fasta_path H1142.fasta \
--crosslinks H1142_crosslink.pkl \
--output_dir H1142_output \
--param_path $AL2_PARAMS \
--database_dir $AF2_DB \
--max_template_date 2026-02-26                

Submit this job using the Slurm sbatch command.

[user@biowulf]$ sbatch --cpus-per-task=8 --mem=32g --time=3:00:00 --gres=lscratch:100 al2_msa.sh

2. Create script al2_inference.sh for model inference:

#! /bin/bash

set -e

module load alphalink2

run_alphalink.sh \
--model_inference \
--fasta_path H1142.fasta \
--crosslinks H1142_crosslink.pkl \
--output_dir H1142_output \
--param_path $AL2_PARAMS \
--database_dir $AF2_DB \
--max_template_date 2026-02-26 \
--max_recycling_iters 10 \
--times 16 \
--neff -1 \
--dropout_crosslinks 0                     

Submit this job using the Slurm sbatch command.

[user@biowulf]$ sbatch --cpus-per-task=8 --mem=32g --time=3:00:00 \
                   --gres=lscratch:100,gpu:1 \
                   --partition=gpu \
                   --constraint='gpup100|gpuv100|gpuv100x|gpua100|gpul40' \
                   al2_inference.sh