In colabfold_search GPU mmseqs not compatible with `--use-templates 1`
In this line: https://github.com/sokrypton/ColabFold/blob/406d4c6cf25a0755f61b3adac7c5d47d3025f42c/colabfold/mmseqs/search.py#L171
The --gpu 1 parameter is not propagated from the command line.
I built the local databases with:
GPU=1 ./setup_databases.sh /path/to/db_folder
as in the documentation.
When my run gets to the template search, it runs the command:
mmseqs search msas/prof_res /mnt/rbg/sequence_databases/colabfold_db/pdb100_230517 msas/res_pdb msas/tmp2 --db-load-mode 1 --threads 64 -s 7.5 -a -e 0.1 --prefilter-mode 0
and crashes with this error:
Index version: 16
Generated by: 8ef870f95af2a3ee474c2cdbb845f5f007fe5be6
ScoreMatrix: VTML80.out
Query database size: 1 type: Profile
Estimated memory consumption: 1G
Target database size: 329605 type: Aminoacid
Invalid database read for database data file=/mnt/rbg/sequence_databases/colabfold_db/pdb100_230517.idx, database index=/mnt/rbg/sequence_databases/colabfold_db/pdb100_230517.idx.index
getData: local id (4294967295) >= db size (17)
Error: Prefilter died
I can get the search to complete by modifying the command to:
mmseqs search msas/prof_res /mnt/rbg/sequence_databases/colabfold_db/pdb100_230517 msas/res_pdb msas/tmp2 --db-load-mode 1 --threads 64 -s 7.5 -a -e 0.1 --prefilter-mode 1 --gpu 1
The same issue I have ever found. The template database is built in GPU-version in the setup_database.sh script, whereas in colabfold/mmseqs/search.py CPU-version is used in searching template workflow. Considering its relative small size, I just replaced the GPU database into CPU one. It will work as useful as your modifying.