https://github.com/deepmind/alphafold
创建新环境
conda create -n alphafold python=3.8 conda activate alphafold / source activate alphafold conda install -y -c conda-forge openmm==7.5.1 cudnn==8.2.1.32 cudatoolkit==11.0.3 pdbfixer==1.7 conda install -y -c bioconda hmmer==3.3.2 hhsuite==3.3.0 kalign2==2.04
安装配置
pip install absl-py==0.13.0 biopython==1.79 chex==0.0.7 dm-haiku==0.0.4 dm-tree==0.1.6 immutabledict==2.0.0 jax==0.2.14 ml-collections==0.1.0 numpy==1.19.5 pandas==1.3.4 scipy==1.7.0 tensorflow==2.5.0 pip install --upgrade jax jaxlib>=0.3.7+cuda111 -f https://storage.googleapis.com/jax-releases/jax_releases.html
应用OpenMM patch
alphafold_path 是 alphafold 路径。
cd ~/anaconda3/envs/alphafold/lib/python3.8/site-packages/ && patch -p0 < $$alphafold_path$$/docker/openmm.patch
下载数据库
database_path 是数据库存放的路径。
cd $$alphafold_path$$ scripts/download_all_data.sh $$database_path$$
或者
打开 ./scripts/xxxxx.sh 文件,找到各个数据库下载地址。
本地下载上传并解压。
我本地下载完成的数据库 502G,上传解压之后 2.3T。
(我实在是下载了好久。。
下载化合物properties
下载 stereo_chemical_props.txt 到 ./alphafold/common/ 文件夹下。
wget -q -P $$alphafold_path$$/alphafold/common/ https://git.scicore.unibas.ch/schwede/openstructure/-/raw/7102c63615b64735c4941278d92b554ec94415f8/modules/mol/alg/src/stereo_chemical_props.txt
运行
https://github.com/kalininalab/alphafold_non_docker 下载 run_alphafold.sh。
bash run_alphafold.sh -d $$database_path$$ -o $$output_path$$ -f $$test_data_path$$/test.fasta -t 2020-05-14
测试使用的 test.fasta:
>query_sequence GWSTELEKHREELKEFLKKEGITNVEIRIDNGRLEVRVEGGTERLKRFLEELRQKLEKKGYTVDIKIE
run_alphafold.sh 参数:
Required Parameters: -dPath to directory of supporting data -o Path to a directory that will store the results -f Path to a FASTA file containing sequence. If a FASTA file contains multiple sequences, then it will be folded as a multimer -t Maximum template release date to consider (ISO-8601 format - i.e. YYYY-MM-DD). Important if folding historical test sets Optional Parameters: -g Enable NVIDIA runtime to run with GPUs (default: true) -r Whether to run the final relaxation step on the predicted models. Turning relax off might result in predictions with distracting stereochemical violations but might help in case you are having issues with the relaxation stage (default: true) -e Run relax on GPU if GPU is enabled (default: true) -n OpenMM threads (default: all available cores) -a Comma separated list of devices to pass to 'CUDA_VISIBLE_DEVICES' (default: 0) -m Choose preset model configuration - the monomer model, the monomer model with extra ensembling, monomer model with pTM head, or multimer model (default: 'monomer') -c Choose preset MSA database configuration - smaller genetic database config (reduced_dbs) or full genetic database config (full_dbs) (default: 'full_dbs') -p Whether to read MSAs that have been written to disk. WARNING: This will not check if the sequence, database or configuration have changed (default: 'false') -l How many predictions (each with a different random seed) will be generated per model. E.g. if this is 2 and there are 5 models then there will be 10 predictions per input. Note: this FLAG only applies if model_preset=multimer (default: 5) -b Run multiple JAX model evaluations to obtain a timing that excludes the compilation time, which should be more indicative of the time required for inferencing many proteins (default: 'false')
(我安装倒是很顺利,基本上没报什么错就成功了。



