Skip to content

Commit 2e8a136

Browse files
committed
Updates the build to the changes in the interface
1 parent 7af671d commit 2e8a136

File tree

17 files changed

+311
-732
lines changed

17 files changed

+311
-732
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.
Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": 1,
6+
"metadata": {},
7+
"outputs": [
8+
{
9+
"data": {
10+
"text/plain": [
11+
"['aloha',\n",
12+
" 'dockstring',\n",
13+
" 'drd3_docking',\n",
14+
" 'foldx_rfp_lambo',\n",
15+
" 'foldx_sasa',\n",
16+
" 'foldx_stability',\n",
17+
" 'foldx_stability_and_sasa',\n",
18+
" 'gfp_cbas',\n",
19+
" 'gfp_select',\n",
20+
" 'penalized_logp_lambo',\n",
21+
" 'rasp',\n",
22+
" 'rdkit_logp',\n",
23+
" 'rdkit_qed',\n",
24+
" 'rfp_foldx_stability_and_sasa',\n",
25+
" 'sa_tdc',\n",
26+
" 'super_mario_bros',\n",
27+
" 'toy_continuous_problem',\n",
28+
" 'white_noise']"
29+
]
30+
},
31+
"execution_count": 1,
32+
"metadata": {},
33+
"output_type": "execute_result"
34+
}
35+
],
36+
"source": [
37+
"from poli.core.registry import get_problems\n",
38+
"get_problems(only_available=False)"
39+
]
40+
},
41+
{
42+
"cell_type": "code",
43+
"execution_count": 2,
44+
"metadata": {},
45+
"outputs": [],
46+
"source": [
47+
"problem_name = \"foldx_stability\""
48+
]
49+
},
50+
{
51+
"cell_type": "code",
52+
"execution_count": 3,
53+
"metadata": {},
54+
"outputs": [
55+
{
56+
"name": "stdout",
57+
"output_type": "stream",
58+
"text": [
59+
"3ned_Repair.pdb optimizing_protein_stability.ipynb\r\n"
60+
]
61+
}
62+
],
63+
"source": [
64+
"!ls"
65+
]
66+
},
67+
{
68+
"cell_type": "code",
69+
"execution_count": 4,
70+
"metadata": {},
71+
"outputs": [
72+
{
73+
"data": {
74+
"text/plain": [
75+
"True"
76+
]
77+
},
78+
"execution_count": 4,
79+
"metadata": {},
80+
"output_type": "execute_result"
81+
}
82+
],
83+
"source": [
84+
"from pathlib import Path\n",
85+
"\n",
86+
"wildtype_pdb_path = Path(\"./3ned_Repair.pdb\").resolve()\n",
87+
"wildtype_pdb_path.exists() # Should say True"
88+
]
89+
},
90+
{
91+
"cell_type": "code",
92+
"execution_count": 5,
93+
"metadata": {
94+
"tags": [
95+
"hide-output"
96+
]
97+
},
98+
"outputs": [
99+
{
100+
"name": "stdout",
101+
"output_type": "stream",
102+
"text": [
103+
"poli 🧪: creating an isolated black box function.\n",
104+
"poli 🧪: starting the isolated objective process.\n"
105+
]
106+
}
107+
],
108+
"source": [
109+
"from poli import objective_factory\n",
110+
"\n",
111+
"f, x0, y0 = objective_factory.create(\n",
112+
" name=\"foldx_stability\",\n",
113+
" wildtype_pdb_path=wildtype_pdb_path\n",
114+
")"
115+
]
116+
},
117+
{
118+
"cell_type": "code",
119+
"execution_count": 6,
120+
"metadata": {},
121+
"outputs": [
122+
{
123+
"name": "stderr",
124+
"output_type": "stream",
125+
"text": [
126+
"/Users/sjt972/anaconda3/envs/poli-docs2/lib/python3.9/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
127+
" from .autonotebook import tqdm as notebook_tqdm\n"
128+
]
129+
}
130+
],
131+
"source": [
132+
"from poli_baselines.solvers.simple.random_mutation import RandomMutation\n",
133+
"solver = RandomMutation(\n",
134+
" black_box=f,\n",
135+
" x0=x0,\n",
136+
" y0=y0,\n",
137+
")"
138+
]
139+
},
140+
{
141+
"cell_type": "code",
142+
"execution_count": 7,
143+
"metadata": {
144+
"tags": [
145+
"hide-output"
146+
]
147+
},
148+
"outputs": [],
149+
"source": [
150+
"solver.solve(max_iter=3)"
151+
]
152+
},
153+
{
154+
"cell_type": "code",
155+
"execution_count": 8,
156+
"metadata": {},
157+
"outputs": [
158+
{
159+
"name": "stdout",
160+
"output_type": "stream",
161+
"text": [
162+
"All y values: [array([[9.41639]]), array([[5.56267]]), array([[0.846902]]), array([[9.39441]])]\n",
163+
"best stability: [9.41639]\n",
164+
"Associated sequence: EEDNMAIIKEFMRFKTHMEGSVNGHEFEIEGEGEGRPYEGTQTAKLKVTKGGPLPFAWDILSPQFSKAYVKHPADIPDYLKLSFPEGFKWERVMNFEDGGVVTVTQDSSLQDGEFIYKVKLRGTNFPSDGPVMQKKTMGWEACSERMYPEDGALKGEMKMRLKLKDGGHYDAEVKTTYKAKKPVQLPGAYNTNTKLDITSHNEDYTIVEQYERNEGRHSTGGMDELYK\n"
165+
]
166+
}
167+
],
168+
"source": [
169+
"print(f\"All y values: {solver.history['y']}\")\n",
170+
"print(f\"best stability: {solver.get_best_performance()}\")\n",
171+
"print(f\"Associated sequence: {''.join(solver.get_best_solution().flatten())}\")"
172+
]
173+
}
174+
],
175+
"metadata": {
176+
"kernelspec": {
177+
"display_name": "poli-dev",
178+
"language": "python",
179+
"name": "python3"
180+
},
181+
"language_info": {
182+
"codemirror_mode": {
183+
"name": "ipython",
184+
"version": 3
185+
},
186+
"file_extension": ".py",
187+
"mimetype": "text/x-python",
188+
"name": "python",
189+
"nbconvert_exporter": "python",
190+
"pygments_lexer": "ipython3",
191+
"version": "3.9.18"
192+
}
193+
},
194+
"nbformat": 4,
195+
"nbformat_minor": 2
196+
}
0 Bytes
Binary file not shown.

docs/poli-docs/_build/html/_sources/using_poli/optimization_examples/protein-stability-foldx/optimizing_protein_stability.ipynb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
" 'rasp',\n",
4343
" 'rdkit_logp',\n",
4444
" 'rdkit_qed',\n",
45+
" 'rfp_foldx_stability_and_sasa',\n",
4546
" 'sa_tdc',\n",
4647
" 'super_mario_bros',\n",
4748
" 'toy_continuous_problem',\n",
@@ -251,8 +252,6 @@
251252
"\n",
252253
"f, x0, y0 = objective_factory.create(\n",
253254
" name=\"foldx_stability\",\n",
254-
" caller_info=None,\n",
255-
" observer=None,\n",
256255
" wildtype_pdb_path=wildtype_pdb_path\n",
257256
")"
258257
]
@@ -626,7 +625,7 @@
626625
"name": "python",
627626
"nbconvert_exporter": "python",
628627
"pygments_lexer": "ipython3",
629-
"version": "3.9.17"
628+
"version": "3.9.18"
630629
},
631630
"orig_nbformat": 4
632631
},

docs/poli-docs/_build/html/reports/using_poli/the_basics/isolation.err.log

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Traceback (most recent call last):
3737
File "<string>", line 1, in <module>
3838
ModuleNotFoundError: No module named 'register'
3939
----- stderr -----
40-
CRITICAL:root:Path: /opt/homebrew/bin:/Users/sjt972/anaconda3/envs/poli__dockstring/bin:/Users/sjt972/anaconda3/condabin:/Users/sjt972/autodock_vina_1_1_2_mac_catalina_64bit/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/TeX/texbin:/usr/local/go/bin:/Users/sjt972/.cargo/bin:/opt/homebrew/bin:/Users/sjt972/autodock_vina_1_1_2_mac_catalina_64bit/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/TeX/texbin:/usr/local/go/bin:/opt/homebrew/bin:/Users/sjt972/anaconda3/bin:/Users/sjt972/anaconda3/condabin:/Users/sjt972/autodock_vina_1_1_2_mac_catalina_64bit/bin:/Users/sjt972/.cargo/bin:/Users/sjt972/anaconda3/bin
40+
CRITICAL:root:Path: /opt/homebrew/opt/openjdk/bin:/opt/homebrew/bin:/Users/sjt972/anaconda3/envs/poli__dockstring/bin:/Users/sjt972/anaconda3/condabin:/Users/sjt972/autodock_vina_1_1_2_mac_catalina_64bit/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/TeX/texbin:/usr/local/go/bin:/Users/sjt972/.cargo/bin
4141
CRITICAL:root:Python path: ['/Users/sjt972/Projects/poli/src/poli', '/Users/sjt972/Projects/poli-docs/docs/poli-docs/using_poli/the_basics', '/Users/sjt972/anaconda3/envs/poli-docs2/lib/python3.9/site-packages/poli/objective_repository/dockstring', '/Users/sjt972/anaconda3/envs/poli__dockstring/lib/python39.zip', '/Users/sjt972/anaconda3/envs/poli__dockstring/lib/python3.9', '/Users/sjt972/anaconda3/envs/poli__dockstring/lib/python3.9/lib-dynload', '/Users/sjt972/anaconda3/envs/poli__dockstring/lib/python3.9/site-packages', '/Users/sjt972/Projects/poli/src', '', '/Users/sjt972/anaconda3/envs/poli-docs2/lib/python3.9/site-packages/poli/objective_repository/dockstring']
4242
CRITICAL:root:Path: :/Users/sjt972/anaconda3/envs/poli-docs2/lib/python3.9/site-packages/poli/objective_repository/dockstring
4343
CRITICAL:root:Path: :/Users/sjt972/anaconda3/envs/poli-docs2/lib/python3.9/site-packages/poli/objective_repository/dockstring

docs/poli-docs/_build/html/searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)