Lesson 9 of 14 · 12 min
Running predictions with ColabFold
ColabFold accelerates AlphaFold2 by replacing its slow genetic-database search with MMseqs2, which builds the multiple sequence alignment in seconds against the ColabFold public server. The prediction network still loads the original AlphaFold2 weights, so accuracy is comparable while runtime drops dramatically. The localcolabfold distribution installs a command-line entry point, colabfold_batch, that runs the whole pipeline outside a notebook.
Preparing the FASTA input
>ubiquitin
MQIFVKTLTGKTITLEVEPSDTIENVKAKIQDKEGIPPDQQRLIFAGKQLEDGRTLSDYNIQKESTLHLVLRLRGGRunning colabfold_batch
colabfold_batch \
--num-recycle 3 \
--num-models 5 \
--model-type alphafold2_ptm \
--msa-mode mmseqs2_uniref_env \
--templates \
--amber \
--num-relax 1 \
--use-gpu-relax \
ubiquitin.fasta \
ubiquitin_out/The positional arguments are the input (here a single-record FASTA) and the output directory. --num-recycle sets how many times the model refines its own output; three is the default and usually enough, but disordered or large targets can benefit from more. --num-models and --model-type choose how many of the five AlphaFold2 networks to run and which weight set, where alphafold2_ptm adds the pTM head that produces the ptm score, while --templates pulls PDB templates and --amber with --num-relax runs an OpenMM/Amber minimization that fixes clashes in the top-ranked model.
Tip: MSA generation queries the public ColabFold MMseqs2 server by default, so a network connection is required unless you point --host-url at your own instance. Enable --use-gpu-relax only when OpenMM has a working CUDA platform; without one, requesting the GPU raises a 'no registered Platform called CUDA' error. Omitting the flag instead runs Amber minimization on the CPU, which is correct but much slower.
Inspecting the output bundle
ls ubiquitin_out/*.pdb
jq '{mean_plddt: (.plddt | add / length | . * 100 | round / 100), ptm: .ptm, max_pae: .max_pae}' \
ubiquitin_out/ubiquitin_scores_rank_001_alphafold2_ptm_model_3_seed_000.jsonubiquitin_out/ubiquitin_relaxed_rank_001_alphafold2_ptm_model_3_seed_000.pdb
ubiquitin_out/ubiquitin_unrelaxed_rank_001_alphafold2_ptm_model_3_seed_000.pdb
ubiquitin_out/ubiquitin_unrelaxed_rank_002_alphafold2_ptm_model_4_seed_000.pdb
ubiquitin_out/ubiquitin_unrelaxed_rank_003_alphafold2_ptm_model_1_seed_000.pdb
ubiquitin_out/ubiquitin_unrelaxed_rank_004_alphafold2_ptm_model_2_seed_000.pdb
ubiquitin_out/ubiquitin_unrelaxed_rank_005_alphafold2_ptm_model_5_seed_000.pdb
{
"mean_plddt": 96.31,
"ptm": 0.87,
"max_pae": 8.42
}
Models are ranked by mean pLDDT, so rank_001 is the best and its relaxed PDB is the one to open first; with --num-relax 1 only that top model gets a relaxed structure. Each corresponding scores JSON stores the per-residue pLDDT array, the predicted aligned error matrix, its max_pae, and the ptm value, and the run also writes coverage, PAE, and pLDDT plots as PNGs. Low pLDDT stretches and high off-diagonal PAE flag the parts of the fold the model is least sure about, which is far more informative than the single global number.
Try it yourself: Save the ubiquitin sequence above as ubiquitin.fasta and run the command end to end. Then use jq to compare the mean pLDDT of rank_001 and rank_005, open the relaxed and unrelaxed rank_001 PDBs together in PyMOL, and confirm the flexible C-terminal Gly-Gly tail (LRGG) carries the lowest per-residue pLDDT of the whole chain (ColabFold writes pLDDT into the PDB B-factor column, so color by B-factor to see it).