Skip to content

Commit b8c4408

Browse files
committed
Modifies the docs to account for the api change
1 parent f40d070 commit b8c4408

24 files changed

+44
-55
lines changed

docs/poli-docs/contributing/a_new_problem.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ If you can find your problem in this list, then you're set! You should be able t
233233
```python
234234
from poli import objective_factory
235235
236-
problem_info, f, x0, y0, _ = objective_factory.create(
236+
f, x0, y0 = objective_factory.create(
237237
name="your_problem",
238238
...,
239239
your_arg_1=..., # <-- Keywords you (maybe) needed

docs/poli-docs/getting_started/getting_started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Let's write a small script that creates an instance of `white_noise` from the re
128128
import numpy as np
129129
from poli import objective_factory
130130

131-
problem_info, f, x0, y0, run_info = objective_factory.create(name="white_noise")
131+
f, x0, y0 = objective_factory.create(name="white_noise")
132132

133133
x = np.array([["1", "2", "3"]]) # must be of shape [b, L], in this case [1, 3].
134134
for _ in range(5):

docs/poli-docs/using_poli/objective_repository/RaSP.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Follow that with
3636
conda activate poli__rasp
3737
```
3838

39-
Supposing you have [`3ned.pdb`](https://www.rcsb.org/structure/3ned) in the same directory as this script:
39+
Assuming you have [`3ned.pdb`](https://www.rcsb.org/structure/3ned) in the same directory as this script:
4040

4141
```python
4242
from pathlib import Path
@@ -53,7 +53,7 @@ if __name__ == "__main__":
5353
# You could have more if you want.
5454
]
5555

56-
problem_info, f_rasp, x0, y0, _ = objective_factory.create(
56+
f_rasp, x0, y0 = objective_factory.create(
5757
name="rasp",
5858
wildtype_pdb_path=wildtype_pdb_paths_for_rasp,
5959
)
@@ -79,7 +79,7 @@ if __name__ == "__main__":
7979

8080
:::{tab-item} In isolation
8181

82-
Supposing you have [`3ned.pdb`](https://www.rcsb.org/structure/3ned) in the same directory as this script:
82+
Assuming you have [`3ned.pdb`](https://www.rcsb.org/structure/3ned) in the same directory as this script:
8383

8484
```python
8585
from pathlib import Path
@@ -96,7 +96,7 @@ if __name__ == "__main__":
9696
# You could have more if you want.
9797
]
9898

99-
problem_info, f_rasp, x0, y0, _ = objective_factory.create(
99+
f_rasp, x0, y0 = objective_factory.create(
100100
name="rasp",
101101
wildtype_pdb_path=wildtype_pdb_paths_for_rasp,
102102
)

docs/poli-docs/using_poli/objective_repository/aloha.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import numpy as np
1919
from poli import objective_factory
2020

2121
# How to create
22-
problem_info, f, x0, y0, run_info = objective_factory.create(name="aloha")
22+
f, x0, y0 = objective_factory.create(name="aloha")
2323

2424
# Example input:
2525
x = np.array([["A", "L", "O", "O", "F"]]) # must be of shape [b, L], in this case [1, 5].

docs/poli-docs/using_poli/objective_repository/dockstring.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ import numpy as np
7676
from poli import objective_factory
7777

7878
if __name__ == "__main__":
79-
problem_info, f, x0, y0, _ = objective_factory.create(
79+
f, x0, y0 = objective_factory.create(
8080
name="dockstring",
8181
target_name="DRD2",
8282
string_representation="SMILES",

docs/poli-docs/using_poli/objective_repository/drd3_docking.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,15 @@ Running this objective function will create an `./oracle` folder on your working
8585

8686
::::{tab-set}
8787

88-
:::{tab-item} (Isolated) in the `poli__lambo` environment
88+
:::{tab-item} (Isolated) in the `poli__tdc` environment
8989

9090
After the setup described above, you can simply run the following code from
9191

9292
```python
9393
from poli import objective_factory
9494

9595
# How to create
96-
problem_info, f, x0, y0, run_info = objective_factory.create(
96+
f, x0, y0 = objective_factory.create(
9797
name="drd3_docking",
9898
force_register=True
9999
)

docs/poli-docs/using_poli/objective_repository/foldx_rfp_lambo.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ We need you to have `foldx` installed, and available in your home directory. We
1616

1717
### Python environment
1818

19-
We expect you to have [cloned and installed the `lambo` repository](https://github.com/samuelstanton/lambo). Since there are some files we can't install automatically using `pip install git+...`, we ask you to create a `conda` environment for the lambo tasks:
19+
We recommend that you have [cloned and installed the `lambo` repository](https://github.com/samuelstanton/lambo). Since there are some files we can't install automatically using `pip install git+...`, we recommend that you create a `conda` environment for the lambo tasks:
2020

2121
```
2222
# From the root of the poli repository
@@ -44,6 +44,13 @@ In particular, we need
4444

4545
Make sure the data is avaliable.
4646

47+
:::{admonition} We can install `lambo` automatically
48+
:class: dropdown
49+
50+
These steps can be skipped. If so, we will install LaMBO automatically and download the relevant files using `PyGithub`. That being said, the API of GitHub limits queries if you are doing anonymous queries. If you decide to skip installing lambo, we recommend that you add an environment variable called `GITHUB_TOKEN_FOR_POLI` whose value is a personal token. [See how to create one here.](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token)
51+
52+
:::
53+
4754
## How to run
4855

4956
You can only run this objective function either in the `poli__lambo` environment, or as an isolated process (which runs this environment underneath).
@@ -62,8 +69,8 @@ import numpy as np
6269
from poli import objective_factory
6370

6471
# How to create
65-
problem_info, f, x0, y0, run_info = objective_factory.create(
66-
name="foldx_rfp",
72+
f, x0, y0 = objective_factory.create(
73+
name="foldx_rfp_lambo",
6774
)
6875

6976
# Example input:

docs/poli-docs/using_poli/objective_repository/foldx_sasa.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ from poli import objective_factory
6262
wildtype_pdb_file = Path("path/to/wildtype.pdb")
6363

6464
# How to create
65-
problem_info, f, x0, y0, run_info = objective_factory.create(
65+
f, x0, y0 = objective_factory.create(
6666
name="foldx_sasa",
6767
wildtype_pdb_file=wildtype_pdb_file
6868
)
@@ -91,7 +91,7 @@ from poli import objective_factory
9191
wildtype_pdb_file = Path("path/to/wildtype.pdb")
9292

9393
# How to create
94-
problem_info, f, x0, y0, run_info = objective_factory.create(
94+
f, x0, y0 = objective_factory.create(
9595
name="foldx_sasa",
9696
wildtype_pdb_file=wildtype_pdb_file,
9797
force_register=True,

docs/poli-docs/using_poli/objective_repository/foldx_stability.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ from poli import objective_factory
6161
wildtype_pdb_file = Path("path/to/wildtype.pdb")
6262

6363
# How to create
64-
problem_info, f, x0, y0, run_info = objective_factory.create(
64+
f, x0, y0 = objective_factory.create(
6565
name="foldx_stability",
6666
wildtype_pdb_file=wildtype_pdb_file
6767
)
@@ -90,7 +90,7 @@ from poli import objective_factory
9090
wildtype_pdb_file = Path("path/to/wildtype.pdb")
9191

9292
# How to create
93-
problem_info, f, x0, y0, run_info = objective_factory.create(
93+
f, x0, y0 = objective_factory.create(
9494
name="foldx_stability",
9595
wildtype_pdb_file=wildtype_pdb_file,
9696
force_register=True,

docs/poli-docs/using_poli/objective_repository/penalized_logp_lambo.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ import numpy as np
5757
from poli import objective_factory
5858

5959
# Using create
60-
problem_info, f, x0, y0, _ = objective_factory.create(name="penalized_logp_lambo")
60+
f, x0, y0 = objective_factory.create(name="penalized_logp_lambo")
6161

6262
# An example input
6363
print(x0)
@@ -77,10 +77,3 @@ f.terminate()
7777

7878
- `penalized: bool = True`. Whether we are evaluating penalized logP or not.
7979
- `string_representation: str = "SMILES"`. Can be either `"SMILES"` or `"SELFIES"`.
80-
81-
<!-- ## References
82-
83-
:::{bibliography}
84-
:style: alpha
85-
86-
::: -->

0 commit comments

Comments
 (0)