Skip to content

Default --db2 to the template database created by setup_databases.sh (#748) - #867

Open
AtharvaTilewale wants to merge 1 commit into
sokrypton:mainfrom
AtharvaTilewale:fix/748-default-template-db
Open

AtharvaTilewale wants to merge 1 commit into
sokrypton:mainfrom
AtharvaTilewale:fix/748-default-template-db

Conversation

@AtharvaTilewale

@AtharvaTilewale AtharvaTilewale commented Oct 24, 2026 •

Copy link
Copy Markdown

Problem

colabfold_search ... --use-templates 1 without --db2 fails with

FileNotFoundError: Database . does not exist

even though the template database is present in the database directory (#748).

Root cause

--db1 and --db3 default to the database names that setup_databases.sh creates, but --db2 defaulted to Path(""). With --use-templates 1 that empty path is appended to the list of used databases and formats as ., which produces the misleading error message. As noted in the issue thread, the template database simply had no default name.

What the fix does

Give --db2 (and the template_db argument of mmseqs_search_monomer) the default pdb100_230517, the name setup_databases.sh creates, the same way --db1 (uniref30_2302_db) and --db3 (colabfold_envdb_202108_db) already have defaults. --use-templates 1 now works without --db2, and if that database really is missing the error names it instead of ..

Validation

Added tests/test_search.py, which runs colabfold_search through main() (with run_mmseqs stubbed out) against a temp database directory holding only the UniRef stub files, and asserts the resulting FileNotFoundError names the template database.

Pre-patch (git stash push colabfold/mmseqs/search.py, test kept):

$ pytest tests/test_search.py -q
E   AssertionError: Regex pattern did not match.
E     Expected regex: 'pdb100_230517'
E     Actual message: 'Database . does not exist'
1 failed

Post-patch:

$ pytest tests/test_search.py -q
1 passed

$ colabfold_search --help
  --db2 DB2             Templates database (default: pdb100_230517)

$ pytest -q
29 passed, 20 skipped, 7 errors

The 7 errors are tests/test_colabfold.py prediction tests, which need network access to download parameters/MSAs; they error identically on unmodified main in this environment (baseline there is 28 passed, 20 skipped, 7 errors).

Fixes #748

Disclosure: this change was prepared with AI assistance and validated locally as described above.

--use-templates 1 without --db2 left the template database as an empty
path, so the existence check reported the confusing "Database . does not
exist". Give --db2 the default name that setup_databases.sh creates, the
same way --db1 and --db3 already have defaults.

Fixes sokrypton#748
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Database . does not exist

1 participant