e41671e6de2a4893687c11d9138a84824fdeac21
examples/alphafold3.md
... | ... | @@ -52,5 +52,73 @@ The resulting layout should look like this: |
52 | 52 | └── uniref90_2022_05.fa |
53 | 53 | ``` |
54 | 54 | |
55 | -### |
|
55 | +### Run AlphaFold |
|
56 | + |
|
57 | +The script below provides a minimal example. You must provide the location of the model file. |
|
58 | + |
|
59 | +Edit PROJECT_DIR, MODEL_DIR and DATABASE_DIR as needed. |
|
60 | + |
|
61 | +We use the input json file given in the AF3 github readme; alphafold_input.json. |
|
62 | + |
|
56 | 63 | ``` |
64 | +#!/usr/bin/env bash |
|
65 | + |
|
66 | +#SBATCH --partition=bch-gpu |
|
67 | +#SBATCH --gres=gpu:large:1 |
|
68 | +#SBATCH --mem-per-cpu=24G |
|
69 | +#SBATCH --time=04:00:00 |
|
70 | +#SBATCH --job-name=JV-AF3 |
|
71 | + |
|
72 | +nvidia-smi --query-gpu=name,memory.total --format=csv |
|
73 | + |
|
74 | +## AlphaFold 3.0.0 example |
|
75 | +## https://github.com/google-deepmind/alphafold3 |
|
76 | +## |
|
77 | +## help@sbgrid.org |
|
78 | +## Nov 11, 2024 |
|
79 | + |
|
80 | +## Start SBGrid environment |
|
81 | +source /programs/biogrids.shrc |
|
82 | +export ALPHAFOLD_X=3.0.0 |
|
83 | + |
|
84 | +export XLA_FLAGS="--xla_gpu_enable_triton_gemm=false" |
|
85 | +# Memory settings used for folding up to 5,120 tokens on A100 80 GB. |
|
86 | +export XLA_PYTHON_CLIENT_PREALLOCATE=true |
|
87 | +export XLA_CLIENT_MEM_FRACTION=0.95 |
|
88 | + |
|
89 | +PROJECT_DIR=/temp_work/ch199734/121503_alphafold3_3.0.0 |
|
90 | +MODEL_DIR=/home/ch199734/models |
|
91 | +DATABASE_DIR=/programs/local/biogrids/alphafold-3.0.0/databases |
|
92 | + |
|
93 | +cd ${PROJECT_DIR} |
|
94 | + |
|
95 | +input_json=${PROJECT_DIR}/alphafold_input.json |
|
96 | + |
|
97 | +time run_alphafold.py \ |
|
98 | + --json_path=${input_json} \ |
|
99 | + --output_dir=${PROJECT_DIR}/af3_example_output \ |
|
100 | + --db_dir=${DATABASE_DIR} \ |
|
101 | + --model_dir=${MODEL_DIR} |
|
102 | + |
|
103 | + |
|
104 | +``` |
|
105 | + |
|
106 | +### [alphafold_input.json](https://github.com/google-deepmind/alphafold3) |
|
107 | + |
|
108 | +``` |
|
109 | +{ |
|
110 | + "name": "2PV7", |
|
111 | + "sequences": [ |
|
112 | + { |
|
113 | + "protein": { |
|
114 | + "id": ["A", "B"], |
|
115 | + "sequence": "GMRESYANENQFGFKTINSDIHKIVIVGGYGKLGGLFARYLRASGYPISILDREDWAVAESILANADVVIVSVPINLTLETIERLKPYLTENMLLADLTSVKREPLAKMLEVHTGAVLGLHPMFGADIASMAKQVVVRCDGRFPERYEWLLEQIQIWGAKIYQTNATEHDHNMTYIQALRHFSTFANGLHLSKQPINLANLLALSSPIYRLELAMIGRLFAQDAELYADIIMDKSENLAVIETLKQTYDEALTFFENNDRQGFIDAFHKVRDWFGDYSEQFLKESRQLLQQANDLKQG" |
|
116 | + } |
|
117 | + } |
|
118 | + ], |
|
119 | + "modelSeeds": [1], |
|
120 | + "dialect": "alphafold3", |
|
121 | + "version": 1 |
|
122 | +} |
|
123 | +``` |
|
124 | + |