Batch Processing Multiple Inputs
AlphaFold 3 supports efficient batch processing of multiple predictions through directory-based input, MSA reuse, and database sharding. This guide covers strategies for high-throughput structure prediction.Basic Batch Processing
Processing Multiple Input Files
Instead of processing a single JSON file, you can provide a directory containing multiple input files:Input Directory Structure
All JSON files in the input directory must be valid AlphaFold 3 input files following the
alphafold3 dialect.Efficient MSA Reuse
For large-scale experiments, compute MSAs once and reuse them across multiple predictions.Strategy 1: Fixed Chains with Varying Partners
When folding multiple candidates with fixed chains:1
Compute MSAs for Fixed Chains
Run data pipeline once for chains that don’t change:
2
Create Multimer Inputs
For each multimer, populate fixed chain data from pre-computed MSAs:
3
Run Full Pipeline
The pipeline will compute MSAs only for chains without pre-computed data:
Strategy 2: All Pairwise Combinations
For n × m combinatorial experiments:- Step 1: Compute Individual MSAs
- Step 2: Generate Dimer Inputs
- Step 3: Run Inference Only
Process each chain individually:
Efficiency Gains
Example: 10 chains × 10 chainsWithout MSA reuse:
- 100 full runs (data pipeline + inference)
- ~100 hours on single machine
- 20 data pipeline runs
- 100 inference-only runs
- ~30 hours total (70% time savings)
- ~10 hours total (90% time savings)
Database Sharding
For maximum throughput on multi-core systems, shard genetic databases to parallelize searches.What is Database Sharding?
Split large sequence databases into multiple smaller files (shards) that can be searched in parallel.1
Shuffle Sequences
Randomize sequence order for balanced shards:
2
Split into Shards
Divide into equal parts:
3
Calculate Database Statistics
For correct e-value scaling:
Sharding Naming Convention
Shards must follow this pattern:shard_index: 5 digits, 0-padded, starts at 00000total_shards: 5 digits, 0-padded
uniprot.fasta-00000-of-00064uniprot.fasta-00063-of-00064bfd.fasta-00000-of-00256
<prefix>@<total_shards>
- Example:
uniprot.fasta@64
Using Sharded Databases
Calculating Parallelization
For protein chains:Shard Size Guidelines
Aim for consistent shard sizes across databases:
- If database A is 3× smaller than database B
- And database B has 48 shards
- Then database A should have 48 ÷ 3 = 16 shards
Multiple Random Seeds
Generate multiple predictions with different random seeds:Batch Seeds Processing
For large-scale seed ensembles:Parallel Processing Strategies
Strategy 1: Multiple Processes
Strategy 2: Multiple GPUs
Strategy 3: HPC Cluster (SLURM)
Performance Optimization
Compilation Cache
Reduce recompilation time by enabling persistent cache:After the first compilation, subsequent runs with similar token counts will reuse cached compilations, saving 10-30 minutes per run.
Bucket Configuration
Optimize bucket sizes for your input distribution:Memory Optimization
For large batches on limited GPU memory:Complete Batch Processing Example
Monitoring and Logging
Track progress of batch jobs:References
Fromperformance.md:27-61:
input.md:5-10: