Skip to content

gget setup alphafold / gget alphafold break against the current deepmind/alphafold main branch #264

Description

@Elarwei001

Summary

While running our own end-to-end self-test of the custom-MSA path (the feature in the PR for issue #52), we ran into two problems that turned out to be pre-existing and unrelated to that PR: gget setup alphafold fails, and even with a hand-built environment gget alphafold fails at import time.

Both trace back to the same root cause: gget_setup.py pins the AlphaFold source to the upstream main branch (ALPHAFOLD_GIT_REPO_VERSION = "main"), and deepmind/alphafold's main has since drifted in ways gget's install logic doesn't account for. Reproduced on Python 3.12 (but the cause is Python-version-independent).

We're happy to open a PR — just wanted to check the preferred direction first, since it touches the main-vs-pinned decision.

1. gget setup alphafold installs an empty AlphaFold package

Current AF main ships a pyproject.toml whose [tool.setuptools] section declares only:

[tool.setuptools]
py-modules = ["run_alphafold"]

It does not declare the alphafold/ package. So pip install <checkout> (which gget setup alphafold runs as pip install --no-deps <folder>) builds a ~24 KB wheel containing only run_alphafold.py and not the alphafold module. The install reports success, but the subsequent import alphafold fails and setup aborts:

ERROR - AlphaFold installation failed. Import error:
No module named 'alphafold'

2. biopython is missing from alphafold_deps

Even when AlphaFold is made importable (e.g. by adding the checkout to PYTHONPATH), the first AF import fails:

File ".../alphafold/common/protein.py", line 24, in <module>
    from Bio.PDB import MMCIFParser
ModuleNotFoundError: No module named 'Bio'

AF main's alphafold/common/protein.py now imports Bio.PDB, and AF's own requirements.txt lists biopython, but gget's alphafold_deps in gget_setup.py doesn't include it.

Environment

  • Ubuntu 24.04, GPU RTX 6000 Ada, Python 3.12
  • gget dev (0.30.9)
  • AlphaFold cloned from deepmind/alphafold@main

Steps to reproduce

# In a fresh env with openmm installed (so the openmm check passes):
gget setup alphafold
# -> "AlphaFold installation failed. Import error: No module named 'alphafold'"

main vs. a pinned version — trade-offs

The underlying question is whether gget should keep tracking AlphaFold's main. Both options have real costs:

Track main (current) Pin a fixed tag/commit
Reproducibility A given gget release's behavior changes whenever AF main moves Deterministic — gget controls exactly which AF is installed
Breakage risk Upstream can (and did) silently break the install with no gget change — the two issues above are exactly this Upstream changes can't reach users until gget bumps the pin
Freshness Always gets the latest AF code/fixes Needs an occasional manual bump to pick up upstream fixes
Dependency alignment gget's current alphafold_deps (jax 0.4.26, tf ≥ 2.17, numpy ≥ 1.26) already match main — we confirmed a multimer fold runs with them Must reconcile alphafold_deps with the pinned version's own requirements.txt

Suggested fix (open to guidance)

Concrete options, roughly in order of least surprise:

  1. Pin to a recent known-good main commit and keep the current jax 0.4.26 dependency set (which we verified runs a fold), but: (a) add biopython to alphafold_deps, and (b) since even pinned main has the packaging change above, install AlphaFold by adding the checkout to sys.path / PYTHONPATH rather than pip install-ing it. This keeps reproducibility and the modern deps.

  2. Pin to the latest AF2 release tag, v2.3.2. It still ships a setup.py with packages=find_packages(), so pip install works (no empty wheel), and its requirements.txt already includes biopython. The catch: v2.3.2 predates the jax 0.4.x migration (it pins jax==0.3.25, tensorflow-cpu==2.11.0, numpy==1.21.6), so gget's current alphafold_deps would need to be rolled back to match v2.3.2's code and re-tested.

Either way, biopython needs to be added to the dependency list.

Notes

  • Found during our own end-to-end self-test; once AlphaFold is importable and biopython is present, the fold itself works, so this is purely about the install/setup path.
  • gget alphafold is documented as no longer actively maintained; this is just about keeping setup/import functional for users who still rely on it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions