Issue Encountered While Setting Up DMFold

This forum is shown on the index page along with all topics.

Moderator: robpearc

Xin-Dong Xu
Posts: 9
Joined: Wed Jan 10, 2024 11:52 am

Issue Encountered While Setting Up DMFold

Post by Xin-Dong Xu »

After downloading the DMFold installation package from the provided link and following the instructions in the readme file to install it on our server, I encountered the following error during the testing phase:

"WARNING! No such file: /data/DMFold/database/UniRef30_2022_02/UniRef30_2022_02.cs219 Fall back to hhblits3. Result may be affected."

In response, I have re-downloaded the database files provided by running the Download_lib.py script and verified the integrity of the files using the md5 files in the UniRef30_2022_02 directory, which confirmed that all files were successfully downloaded.

"UniRef30_2022_02_hhm.ffindex: OK
UniRef30_2022_02_cs219.ffindex: OK
UniRef30_2022_02_a3m.ffindex: OK
UniRef30_2022_02_cs219.ffdata: OK
UniRef30_2022_02_hhm.ffdata: OK
UniRef30_2022_02_a3m.ffdata: OK"

While the program continues running, I keep encountering the following errors: " File "/data/DMFold/bin/alphafold/run_alphafold_buildmsa.py", line 98
fasta_path: str,
^
SyntaxError: invalid syntax
DeprecationWarning: 'source deactivate' is deprecated. Use 'conda deactivate'.
cp: cannot stat ‘/data/DMFold/test_dxxu/test_dxxu-A/MSA/seq/msas/alphafold2.a3m’: No such file or directory
grep: /data/DMFold/test_dxxu/test_dxxu-A/MSA/aMSA.a3m: No such file or directory
qMSA for test_dxxu-A has been complete!
dMSA for test_dxxu-A has been complete!
/data/DMFold/test_dxxu/test_dxxu-A/record/aMSA_test_dxxu-A at Wed Jan 10 20:06:21 CST 2024 /data/DMFold/bin/alphafold/run_alphafold_buildmsa.py --cpu=2 --max_mem=30 --hhblits_binary_path=/data/DMFold/anaconda3/envs/alphafold2nondocker/bin/hhblits --hhsearch_binary_path=/data/DMFold/anaconda3/envs/alphafold2nondocker/bin/hhsearch --jackhmmer_binary_path=/data/DMFold/anaconda3/envs/alphafold2nondocker/bin/jackhmmer --kalign_binary_path=/data/DMFold/anaconda3/envs/alphafold2nondocker/bin/kalign --bfd_database_path=/data/DMFold/database/bfd/bfd_metaclust_clu_complete_id30_c90_final_seq.sorted_opt --mgnify_database_path=/data/DMFold/database/mgnify/mgy_clusters.fasta --template_mmcif_dir=/data/DMFold/database/pdb_mmcif/mmcif_files --obsolete_pdbs_path=/data/DMFold/database/pdb_mmcif/obsolete.dat --pdb70_database_path=/data/DMFold/database/pdb70/pdb70 --uniclust30_database_path=/data/DMFold/database/UniRef30_2022_02/UniRef30_2022_02 --uniref90_database_path=/data/DMFold/database/uniref90/uniref90.fasta --data_dir=/data/igem/dxxu/DMFold/database --output_dir=/data/DMFold/test_dxxu/test_dxxu-A/MSA --fasta_paths=/data/igem/dxxu/DMFold/test_dxxu/test_dxxu-A/seq.fasta --model_names=model_1 --max_template_date=2999-01-01 --preset=casp14 --benchmark=false --logtostder"
jlspzw
Posts: 247
Joined: Tue May 04, 2021 5:04 pm

Re: Issue Encountered While Setting Up DMFold

Post by jlspzw »

Dear Xin-Dong Xu,

Thank you for using our software.

First, you can ignore the 'Warning message, it is not the error'.

Second, please make sure that you correctly run the ./Install_af2_env.sh command and the AlphaFold2 package is successfully installed in your cluster. You can try $DMFold_dir/bin/alphafold/run_alphafold_msa_benchmark.sh to check the help command.

It seems that the aMSA is not correctly generated

Based on your message, I guess you can try

/data/DMFold/bin/alphafold/run_alphafold_msa_benchmark.sh -o test -m model1 -f /data/DMFold/test_dxxu/test_dxxu-A/seq.fasta -A /data/DMFold/test_dxxu/test_dxxu-A/MSA/dMSA.a3m -D /data/DMFold/bin/alphafold/ -L /data/DMFold/database

please see if you can correctly get the results.

If the Alphafold2 is not correctly installed, then you may first pay attention to installing AF2,
Sometimes, different clusters have different environments for AlphaFold2 installation, you can also check the DeepMid page (https://github.com/google-deepmind/alphafold) to see for any help.

Let me know you sequences of the input if possible. maybe it is too large some time.

Maybe you can also try enlarging the memory of AlphaFold2, you can see one line as "max_mem=30" in /data/DMFold/bin/alphafold/run_alphafold_buildmsa.sh, you can also try to change 30 to 60 to see if anything changes.
Please notice, that some clusters do not allow the running of large memory jobs on the login node, so make sure you run the job in the correct way.

Please try the above option, and see if anything helps. and let us know if you solve the problem or find any issues.

Thank you.

Best Regards
Wei Zheng
Xin-Dong Xu
Posts: 9
Joined: Wed Jan 10, 2024 11:52 am

Re: Issue Encountered While Setting Up DMFold

Post by Xin-Dong Xu »

Dear Wei Zheng,

Thank you for your valuable suggestions. I will reply to you as soon as possible after testing these options.

Best regards,

Xin-Dong Xu
Xin-Dong Xu
Posts: 9
Joined: Wed Jan 10, 2024 11:52 am

Re: Issue Encountered While Setting Up DMFold

Post by Xin-Dong Xu »

Dear Wei Zheng,

This is the sequence I am testing:

>DEFB
MKSLLFTLAVFMLLAQLVSGNWYVKKCLNDVGICKKKCKPEEMHVKNGWATCGKQRDCCVPADRRANYPVFCVQTRTTRISTV
It is an antimicrobial peptide with a length of 80 amino acids.

Best regards,

Xin-Dong Xu
Xin-Dong Xu
Posts: 9
Joined: Wed Jan 10, 2024 11:52 am

Re: Issue Encountered While Setting Up DMFold

Post by Xin-Dong Xu »

Dear Zheng Wei,

Thank you for your previous suggestions, they were very helpful to me. After testing the multiple options you provided, it seems that there was an issue with my Conda environment configuration. I manually reconfigured the conda environment according to the Install_af2_env.sh script, and the previous error was resolved. The multiple sequence alignment files can now be generated correctly.

However, a new error,

“2024-01-11 09:52:04.567185: E external/org_tensorflow/tensorflow/compiler/xla/pjrt/pjrt_stream_executor_client.cc:2040] Execution of replica 0 failed: Internal: CUBLAS_STATUS_INVALID_VALUE
Traceback (most recent call last):
File "/data/DMFold/bin/alphafold/run_alphafold_msa_benchmark.py", line 306, in <module>
app.run(main)
File "/data/DMFold/anaconda3/envs/alphafold2nondocker/lib/python3.8/site-packages/absl/app.py", line 312, in run
_run_main(main, args)
File "/data/DMFold/anaconda3/envs/alphafold2nondocker/lib/python3.8/site-packages/absl/app.py", line 258, in _run_main
sys.exit(main(argv))
File "/data/DMFold/bin/alphafold/run_alphafold_msa_benchmark.py", line 274, in main
predict_structure(
File "/data/DMFold/bin/alphafold/run_alphafold_msa_benchmark.py", line 151, in predict_structure
prediction_result = model_runner.predict(processed_feature_dict)
File "/data/DMFold/bin/alphafold/alphafold/model/model.py", line 134, in predict
result = self.apply(self.params, jax.random.PRNGKey(0), feat)
File "/data/DMFold/anaconda3/envs/alphafold2nondocker/lib/python3.8/site-packages/jax/_src/traceback_util.py", line 183, in reraise_with_filtered_traceback
return fun(*args, **kwargs)
File "/data/DMFold/anaconda3/envs/alphafold2nondocker/lib/python3.8/site-packages/jax/_src/api.py", line 424, in cache_miss
out_flat = xla.xla_call(
File "/data/DMFold/anaconda3/envs/alphafold2nondocker/lib/python3.8/site-packages/jax/core.py", line 1560, in bind
return call_bind(self, fun, *args, **params)
File "/data/DMFold/anaconda3/envs/alphafold2nondocker/lib/python3.8/site-packages/jax/core.py", line 1551, in call_bind
outs = primitive.process(top_trace, fun, tracers, params)
File "/data/DMFold/anaconda3/envs/alphafold2nondocker/lib/python3.8/site-packages/jax/core.py", line 1563, in process
return trace.process_call(self, fun, tracers, params)
File "/data/DMFold/anaconda3/envs/alphafold2nondocker/lib/python3.8/site-packages/jax/core.py", line 606, in process_call
return primitive.impl(f, *tracers, **params)
File "/data/DMFold/anaconda3/envs/alphafold2nondocker/lib/python3.8/site-packages/jax/interpreters/xla.py", line 595, in _xla_call_impl
return compiled_fun(*args)
File "/data/DMFold/anaconda3/envs/alphafold2nondocker/lib/python3.8/site-packages/jax/interpreters/xla.py", line 893, in _execute_compiled
out_bufs = compiled.execute(input_bufs)
jax._src.traceback_util.UnfilteredStackTrace: RuntimeError: Internal: CUBLAS_STATUS_INVALID_VALUE

The stack trace below excludes JAX-internal frames.
The preceding is the original exception that occurred, unmodified.

--------------------

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/data/DMFold/bin/alphafold/run_alphafold_msa_benchmark.py", line 306, in <module>
app.run(main)
File "/data/DMFold/anaconda3/envs/alphafold2nondocker/lib/python3.8/site-packages/absl/app.py", line 312, in run
_run_main(main, args)
File "/data/DMFold/anaconda3/envs/alphafold2nondocker/lib/python3.8/site-packages/absl/app.py", line 258, in _run_main
sys.exit(main(argv))
File "/data/DMFold/bin/alphafold/run_alphafold_msa_benchmark.py", line 274, in main
predict_structure(
File "/data/DMFold/bin/alphafold/run_alphafold_msa_benchmark.py", line 151, in predict_structure
prediction_result = model_runner.predict(processed_feature_dict)
File "/data/DMFold/bin/alphafold/alphafold/model/model.py", line 134, in predict
result = self.apply(self.params, jax.random.PRNGKey(0), feat)
File "/data/DMFold/anaconda3/envs/alphafold2nondocker/lib/python3.8/site-packages/jax/interpreters/xla.py", line 893, in _execute_compiled
out_bufs = compiled.execute(input_bufs)
RuntimeError: Internal: CUBLAS_STATUS_INVALID_VALUE
DeprecationWarning:'source deactivate' is deprecated. Use 'conda deactivate'.”,

keeps reappearing during the subsequent running process. I am currently checking if there is still an issue with the environment configuration. Could you please provide some suggestions to resolve this error? I would greatly appreciate it.

Best wishes,
Xin-Dong Xu.
jlspzw
Posts: 247
Joined: Tue May 04, 2021 5:04 pm

Re: Issue Encountered While Setting Up DMFold

Post by jlspzw »

Hi Xin-Dong

Based on the message I guess it may be the issue from Google Jax,

You can try a different version Jax, if you used CUDA11, maybe

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.20.1 scipy==1.7.0 tensorflow==2.8.4 pandas==1.3.4 tensorflow-cpu==2.8.4
pip install --upgrade jax==0.2.14 jaxlib==0.1.69+cuda111 -f https://storage.googleapis.com/jax-rele ... eases.html

But this is not guaranteed could work on your cluster, you can try a different version, or check the issue section of AlphaFold2 github see if any situation similar to your case.

Let me know if you solve this problem or find any issues.

Best
Wei
Xin-Dong Xu
Posts: 9
Joined: Wed Jan 10, 2024 11:52 am

Re: Issue Encountered While Setting Up DMFold

Post by Xin-Dong Xu »

Dear Wei,

I wanted to express my sincere gratitude for the advice you provided. It successfully resolved the error I encountered. However, while continuing the process, I encountered a new error message,

"Traceback (most recent call last):
File "/data/DMFold/bin/alphafold/run_alphafold_msa_benchmark.py", line 306, in <module>
app.run(main)
File "/data/DMFold/anaconda3/envs/alphafold2nondocker/lib/python3.8/site-packages/absl/app.py", line 312, in run
_run_main(main, args)
File "/data/DMFold/anaconda3/envs/alphafold2nondocker/lib/python3.8/site-packages/absl/app.py", line 258, in _run_main
sys.exit(main(argv))
File "/data/DMFold/bin/alphafold/run_alphafold_msa_benchmark.py", line 274, in main
predict_structure(
File "/data/DMFold/bin/alphafold/run_alphafold_msa_benchmark.py", line 180, in predict_structure
relaxed_pdb_str, _, _ = amber_relaxer.process(prot=unrelaxed_protein)
File "/data/DMFold/bin/alphafold/alphafold/relax/relax.py", line 60, in process
out = amber_minimize.run_pipeline(
File "/data/DMFold/bin/alphafold/alphafold/relax/amber_minimize.py", line 470, in run_pipeline
ret = _run_one_iteration(
File "/data/DMFold/bin/alphafold/alphafold/relax/amber_minimize.py", line 416, in _run_one_iteration
raise ValueError(f"Minimization failed after {max_attempts} attempts.")
ValueError: Minimization failed after 100 attempts."

Could you please give me some suggestions for resolving this error? Thank you so much for your help.

Best wishes,
Xin-Dong
Xin-Dong Xu
Posts: 9
Joined: Wed Jan 10, 2024 11:52 am

Re: Issue Encountered While Setting Up DMFold

Post by Xin-Dong Xu »

Hi Wei,

It seems to be a problem with AlphaFold2. Running with the option “–run_relax=false” could help resolve this error.

I found this solution on https://github.com/google-deepmind/alphafold/issues/466.

Best regards,
Xin-Dong
jlspzw
Posts: 247
Joined: Tue May 04, 2021 5:04 pm

Re: Issue Encountered While Setting Up DMFold

Post by jlspzw »

Hi Xin-Dong,

Yes, sometimes the amber refinement has an issue with GPU, you can either use CPU to do refinement (it still has some change failed) or cancel it and use other tools to remove clash (if exists).

Glad to see you solve the problems.

Best
Wei
Xin-Dong Xu
Posts: 9
Joined: Wed Jan 10, 2024 11:52 am

Re: Issue Encountered While Setting Up DMFold

Post by Xin-Dong Xu »

Hi Wei,

I would like to express my sincere gratitude for your previous assistance, which enabled me to successfully install and run DMfold locally.

However, upon comparing the structures obtained from my local run with those predicted by the online version of DMfold (https://seq2fun.dcmb.med.umich.edu/DMFo ... 877198252/), I noticed a significant difference with an RMSD of around 2 Å. I am curious to understand the cause of this variance and seek your guidance on resolving this issue. I would greatly appreciate your insights on this matter.

Looking forward to your response.

Best regards,
Xin-Dong
Post Reply