Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rfdiff

Intro

Cyrus notes

  • You can skip installation of RFDiffusion by using Dan’s copy on Apollo
conda activate /home/dfarrell/.local/share/micromamba/envs/rfdiffusion
cp /home/dfarrell/git/RFdiffusion ~/
python RFdiffusion/scripts/run_inference.py --help

Basic execution - an unconditional monomer

  • Test on apollo:
export CUDA_VISIBLE_DEVICES=""
~/RFdiffusion/scripts/run_inference.py 'contigmap.contigs=[10-15]' inference.output_prefix=run1/test inference.num_designs=1
  • Result: all-glycine peptide
~/RFdiffusion/scripts/run_inference.py 'contigmap.contigs=[150-150]' inference.output_prefix=run2/test inference.num_designs=1

Configs

  • Hydra framework used to manage command-line options via "configs"
  • RFdiffusion/config/inference/base.yaml contains defaults

contigmap config

  • Defines the protein being built
contigmap:
  contigs: null
  inpaint_seq: null
  provide_seq: null
  length: null

Motif Scaffolding

  • Anything prefixed by a letter indicates that this is a motif, with the letter corresponding to the chain letter in the input pdb files. E.g. A10-25 pertains to residues ('A',10),('A',11)...('A',25) in the corresponding input pdb

  • Anything not prefixed by a letter indicates protein to be built. This can be input as a length range. These length ranges are randomly sampled each iteration of RFdiffusion inference.

  • To specify chain breaks, we use /0 .

  • 'contigmap.contigs=[5-15/A10-25/30-40/0 B1-100]'

  • Test on apollo:

  • Run in results_rfdiff/00_toy

cp ~/results_dovetail/00_toy/01_Rosetta_MSD/input_pdb/input_relaxed_repacked.pdb ~/rfdiff/00_toy
~/RFdiffusion/scripts/run_inference.py 'contigmap.contigs=[A1-100/101-106/5-8/0 B119-223/0 C224-320]' inference.input_pdb=input_relaxed_repacked.pdb inference.output_prefix=run3/test inference.num_designs=1
  • Interface residues of chains A and B that are close to chain C: A31 A52 A53 A54 A57 A99 A100 A101 A102 A103 A104 A105 A106 A107 B144 B145 B146 B147 B148 B166 B182 B183 B184 B185 B207 B211i
  • This runs right away and produces all glycine backbones in the designable regions
  • The next step is apply MPNN to the glycine backbones

Create new installation (conda environment) instead of using Dan's

  • name: rfdiff
  • Create new environment and try to run again the same script, from inside results_rfdiff/00_toy
conda create --name rfdiff python=3.11.2 -y
conda activate rfdiff
pip install torch
pip install omegaconf
pip install hydra-core==1.3.2
pip install numpy
pip install dgl
pip install e3nn
pip install executing
pip install pygments
pip install asttokens
~/RFdiffusion/scripts/run_inference.py 'contigmap.contigs=[A1-100/101-106/5-8/0 B119-223/0 C224-320]' inference.input_pdb=input_relaxed_repacked.pdb inference.output_prefix=run4/test inference.num_designs=1
  • leads to error:
Traceback (most recent call last):
  File "/home/aloshbaugh/RFdiffusion/scripts/run_inference.py", line 24, in <module>
    from rfdiffusion.util import writepdb_multi, writepdb
ModuleNotFoundError: No module named 'rfdiffusion'
  • Trying to see why Dan's environment can automatically find package:
(base) ➜  env git:(main) ✗ ack 'RFdiffusion' /home/dfarrell/.local/share/micromamba/envs/rfdiffusion
/home/dfarrell/.local/share/micromamba/envs/rfdiffusion/lib/python3.11/site-packages/easy-install.pth
1:/home/dfarrell/git/RFdiffusion/env/SE3Transformer
2:/home/dfarrell/git/RFdiffusion

/home/dfarrell/.local/share/micromamba/envs/rfdiffusion/lib/python3.11/site-packages/se3-transformer.egg-link
1:/home/dfarrell/git/RFdiffusion/env/SE3Transformer

/home/dfarrell/.local/share/micromamba/envs/rfdiffusion/lib/python3.11/site-packages/rfdiffusion.egg-link
1:/home/dfarrell/git/RFdiffusion

/home/dfarrell/.local/share/micromamba/envs/rfdiffusion/bin/run_inference.py
5:__file__ = '/home/dfarrell/git/RFdiffusion/scripts/run_inference.py'

and

(base) ➜  env git:(main) ✗ cat /home/dfarrell/.local/share/micromamba/envs/rfdiffusion/lib/python3.11/site-packages/easy-install.pth
/home/dfarrell/git/RFdiffusion/env/SE3Transformer
/home/dfarrell/git/RFdiffusion
(base) ➜  env git:(main) ✗ cat /home/dfarrell/.local/share/micromamba/envs/rfdiffusion/lib/python3.11/site-packages/rfdiffusion.egg-link
/home/dfarrell/git/RFdiffusion
.%
(base) ➜  env git:(main) ✗ cat /home/dfarrell/.local/share/micromamba/envs/rfdiffusion/lib/python3.11/site-packages/se3-transformer.egg-link
/home/dfarrell/git/RFdiffusion/env/SE3Transformer
.%
(base) ➜  env git:(main) ✗ cat /home/dfarrell/.local/share/micromamba/envs/rfdiffusion/bin/run_inference.py
#!/home/dfarrell/.local/share/micromamba/envs/rfdiffusion/bin/python3.11
# EASY-INSTALL-DEV-SCRIPT: 'rfdiffusion==1.0.0','run_inference.py'
__requires__ = 'rfdiffusion==1.0.0'
__import__('pkg_resources').require('rfdiffusion==1.0.0')
__file__ = '/home/dfarrell/git/RFdiffusion/scripts/run_inference.py'
with open(__file__) as f:
    exec(compile(f.read(), __file__, 'exec'))
  • I tried:
export PYTHONPATH=/home/aloshbaugh/RFdiffusion
  • and now it has moved on to the next error so maybe this worked.
  • New error:
  File "/home/aloshbaugh/RFdiffusion/rfdiffusion/SE3_network.py", line 9, in <module>
    from se3_transformer.model import SE3Transformer
ModuleNotFoundError: No module named 'se3_transformer'
  • This is actually contained within the RFDiffusion git repo: RFdiffusion/env/SE3Transformer
  • Attempted solution:
export PYTHONPATH="/home/aloshbaugh/RFdiffusion/env/SE3Transformer:$PYTHONPATH"
  • I think this worked because it moved on to the next error which is a standard package not found. For brevity, adding it to the list of pip install above.
  • Now moved on to a new type of error:
dgl._ffi.base.DGLError: [12:45:09] /opt/dgl/src/array/array.cc:42: Operator Range does not support cuda device.
  • Which I believe is related to the wrong version of dgl installed
  • Dan's environment had:
    - dgl==1.0.2+cu118
    - dglgo==0.0.2
  • Whereas this environment has
dgl                       1.1.1                    pypi_0    pypi
 pip install dgl==1.0.2+cu118 -f https://data.dgl.ai/wheels/cu118/repo.html
  • This resolved the last problem and the script now runs.

Known errors when running

  • CUDA errors
RuntimeError: CUDA error: out of memory
  • Resolution:
nvidia-smi
export CUDA_VISIBLE_DEVICES="" # example
export CUDA_VISIBLE_DEVICES=2,3,4 # example

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages