Skip to content

Commit 5cd4191

Browse files
committed
cleaning up the rewire example
1 parent bd1c3ba commit 5cd4191

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

af/examples/partial_hallucination_rewire.ipynb

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@
3434
" pip -q install git+https://github.com/sokrypton/ColabDesign.git\n",
3535
" mkdir params\n",
3636
" curl -fsSL https://storage.googleapis.com/alphafold/alphafold_params_2022-03-02.tar | tar x -C params\n",
37-
" for W in openfold_model_ptm_1 openfold_model_ptm_2 openfold_model_no_templ_ptm_1\n",
38-
" do wget -qnc https://files.ipd.uw.edu/krypton/openfold/${W}.npz -P params; done\n",
3937
"fi"
4038
]
4139
},
@@ -84,14 +82,13 @@
8482
"model.prep_inputs(get_pdb(\"2MR5\"), chain=\"A\",\n",
8583
" pos=old_pos, # define positions to contrain\n",
8684
" length=100, # define if the desired length is different from input PDB\n",
87-
" fix_seq=False, # set True to constrain the sequence\n",
88-
" use_sidechains=False) # set True to restrain the sidechains\n",
85+
" fix_seq=False) # set True to constrain the sequence\n",
8986
"\n",
9087
"# set positions (if different from PDB)\n",
9188
"# reorder the segments, \n",
9289
"model.rewire(order = [1,2,3,0,7,4,5,6], # set order of segments\n",
9390
" loops = [3,3,3,4,3,3,4], # change loop length inbetween segments\n",
94-
" offset=0)\n",
91+
" offset=0) # essentially loop length at the N term\n",
9592
"\n",
9693
"print(model.opt[\"pos\"])"
9794
],
@@ -106,12 +103,11 @@
106103
"source": [
107104
"# restart optimization\n",
108105
"model.restart()\n",
106+
"# model.set_seq(mode=\"wildtype\") # initialize with wildtype sequence\n",
109107
"\n",
110-
"# balance weights [dgram_cce=restraint weight], [con=hallucination weight]\n",
111-
"model.set_weights(dgram_cce=1, con=0.1)\n",
112-
"\n",
113-
"# design!\n",
114-
"model.design_3stage(200,100,10)"
108+
"# balance weights [dgram_cce = restraint weight], [con = hallucination weight]\n",
109+
"model.set_weights(dgram_cce=1, con=0)\n",
110+
"model.design_3stage(300,100,10)"
115111
],
116112
"metadata": {
117113
"id": "bDA8cPqMT_eY"
@@ -134,7 +130,7 @@
134130
{
135131
"cell_type": "code",
136132
"source": [
137-
"HTML(model.animate(dpi=100))"
133+
"HTML(model.animate())"
138134
],
139135
"metadata": {
140136
"id": "9sjG7kvoHaVi"

0 commit comments

Comments
 (0)