File size: 750 Bytes
35cdf53
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27


"""An implementation of the inference pipeline of AlphaFold 3."""
from importlib import resources
from pathlib import Path
import os
import warnings


def _data_artifacts_exist() -> bool:
    try:
        root = Path(
            resources.files(__name__ + ".constants.converters")
        )
    except Exception:
        return False
    return (root / "ccd.pickle").exists() and (root / "chemical_component_sets.pickle").exists()


if not _data_artifacts_exist():
    warnings.warn(
        "AlphaFold3 data files (ccd.pickle, chemical_component_sets.pickle) are missing.\n"
        "Please run the following command once to build local artifacts:\n\n"
        "    python -m flax_model.alphafold3.build_extension\n",
        stacklevel=1,
    )