Branch: lyskov/rosetta-ci:main 「revision: №1」
Test: colab.none.root.ColabDesign
SubTest: ColabDesign/tr/design
SubTest files: 「file-system-view」
Daemon: devel    
State: ColabDesign/tr/design

Input Notebook: ColabDesign/tr/design.ipynb Output Notebook: /root/working_dir/ColabDesign_tr_design.ipynb Executing: 0% 0/25 [00:00<?, ?cell/s]Executing notebook with kernel: python3 Executing: 4% 1/25 [00:00<00:21, 1.12cell/s] Executing: 12% 3/25 [00:01<00:08, 2.60cell/s] Traceback (most recent call last): File "/usr/local/bin/papermill", line 8, in <module> sys.exit(papermill()) File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1157, in __call__ return self.main(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1078, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 783, in invoke return __callback(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/click/decorators.py", line 33, in new_func return f(get_current_context(), *args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/papermill/cli.py", line 235, in papermill execute_notebook( File "/usr/local/lib/python3.10/dist-packages/papermill/execute.py", line 131, in execute_notebook raise_for_execution_errors(nb, output_path) File "/usr/local/lib/python3.10/dist-packages/papermill/execute.py", line 251, in raise_for_execution_errors raise error papermill.exceptions.PapermillExecutionError: --------------------------------------------------------------------------- Exception encountered at "In [1]": File "<ipython-input-1-c336f48c7920>", line 3 if [ ! -d params/tr ]; then ^ SyntaxError: invalid syntax [NbConvertApp] Converting notebook /root/working_dir/ColabDesign_tr_design.ipynb to html [NbConvertApp] Writing 295172 bytes to /root/working_dir/ColabDesign_tr_design.html [NbConvertApp] Converting notebook /root/working_dir/ColabDesign_tr_design.ipynb to asciidoc /usr/local/lib/python3.10/dist-packages/nbconvert/utils/pandoc.py:51: RuntimeWarning: You are using an unsupported version of pandoc (2.9.2.1). Your version must be at least (2.14.2) but less than (4.0.0). Refer to https://pandoc.org/installing.html. Continuing with doubts... check_pandoc_version() [NbConvertApp] Writing 3722 bytes to /root/working_dir/ColabDesign_tr_design.asciidoc ---------------------------------------------------------------- An Exception was encountered at `In [1]'. #TrDesign in JAX! Backprop through TrRosetta for protein design. [#papermill-error-cell]#Execution using papermill encountered an exception here and stopped:# +*In[1]:*+ [source, ipython3] ---- #@title install %%bash if [ ! -d params/tr ]; then # get code pip -q install git+https://github.com/sokrypton/ColabDesign.git@v1.1.1 # for debugging ln -s /usr/local/lib/python3.*/dist-packages/colabdesign colabdesign # download params mkdir -p params/tr wget -qnc https://files.ipd.uw.edu/krypton/TrRosetta/models.zip -P params/tr/ wget -qnc https://files.ipd.uw.edu/krypton/TrRosetta/bkgr_models.zip -P params/tr/ unzip -qqo params/tr/models.zip -d params/tr/ unzip -qqo params/tr/bkgr_models.zip -d params/tr/ rm params/tr/models.zip rm params/tr/bkgr_models.zip fi ---- +*Out[1]:*+ ---- File "<ipython-input-1-c336f48c7920>", line 3 if [ ! -d params/tr ]; then ^ SyntaxError: invalid syntax ---- +*In[ ]:*+ [source, ipython3] ---- #@title import libraries import warnings warnings.simplefilter(action='ignore', category=FutureWarning) from colabdesign import * from google.colab import files from IPython.display import HTML import os import numpy as np def get_pdb(pdb_code=""): if pdb_code is None or pdb_code == "": upload_dict = files.upload() pdb_string = upload_dict[list(upload_dict.keys())[0]] with open("tmp.pdb","wb") as out: out.write(pdb_string) return "tmp.pdb" else: os.system(f"wget -qnc https://files.rcsb.org/view/{pdb_code}.pdb") return f"{pdb_code}.pdb" ---- #Hallucination +*In[ ]:*+ [source, ipython3] ---- clear_mem() tr_model = mk_trdesign_model(protocol="hallucination") tr_model.prep_inputs(length=100) ---- +*In[ ]:*+ [source, ipython3] ---- tr_model.restart() tr_model.set_opt(hard=False) tr_model.design(50, verbose=10, save_best=False) tr_model.set_opt(hard=True) tr_model.design(50, verbose=10, save_best=True) ---- +*In[ ]:*+ [source, ipython3] ---- print(tr_model.get_loss()) print(tr_model.get_seq()) tr_model.plot("preds") ---- #fixbb +*In[ ]:*+ [source, ipython3] ---- clear_mem() tr_model = mk_trdesign_model(protocol="fixbb") tr_model.prep_inputs(get_pdb("1TEN"),chain="A") ---- +*In[ ]:*+ [source, ipython3] ---- tr_model.restart() tr_model.set_opt(hard=False) tr_model.design(50, verbose=10, save_best=False) tr_model.set_opt(hard=True) tr_model.design(50, verbose=10, save_best=True) ---- +*In[ ]:*+ [source, ipython3] ---- print(tr_model.get_loss()) print(tr_model.get_seq()) tr_model.plot("preds") ---- == combine with AfDesign +*In[ ]:*+ [source, bash] ---- %%bash if [ ! -d params/af ]; then # download alphafold weights mkdir -p params/af/params curl -fsSL https://storage.googleapis.com/alphafold/alphafold_params_2022-03-02.tar | tar x -C params/af/params fi ---- == initialize with trdesign sequence +*In[ ]:*+ [source, ipython3] ---- af_model = mk_afdesign_model(protocol="fixbb",data_dir="params/af") af_model.prep_inputs(get_pdb("1TEN")) ---- +*In[ ]:*+ [source, ipython3] ---- af_model.restart(seq=tr_model.get_seq()) af_model.design_3stage(100,100,10) ---- +*In[ ]:*+ [source, ipython3] ---- af_model.plot_traj() ---- +*In[ ]:*+ [source, ipython3] ---- af_model.plot_pdb() ---- == let’s try a joint optimization +*In[ ]:*+ [source, ipython3] ---- af_model.restart() af_model.design_3stage(100,100,10, callback=tr_model.af_callback()) ---- +*In[ ]:*+ [source, ipython3] ---- af_model.plot_traj() ---- +*In[ ]:*+ [source, ipython3] ---- af_model.plot_pdb() ---- +*In[ ]:*+ [source, ipython3] ---- HTML(af_model.animate()) ---- +*In[ ]:*+ [source, ipython3] ---- af_model.get_seqs() ----