Skip to content

Commit a329bd5

Browse files
authored
Merge pull request #1 from MachineLearningLifeScience/add_rfp_lambo_docs
Add rfp lambo docs
2 parents 01a8b16 + 0fd44f0 commit a329bd5

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

docs/protein-optimization/using_poli/objective_repository/all_objectives.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ Solvent accessibility of mutations of a wildtype using `foldx`
7878
Rapid Stability Predictions of single mutations from a wildtype. [WIP]
7979
:::
8080

81+
:::{grid-item-card} RFP Fluorescence Protein Stability (using `lambo`)
82+
:link: ./using_poli/objective_repository/foldx_rfp_lambo.html
83+
:columns: 6
84+
LaMBO Fluorescence (RFP) by stability and solvent-accessible surface area.
85+
:::
86+
8187
::::
8288

8389
### Other
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Protein (RFP) stability and SASA (using `foldx`,`lambo`)
2+
![Type of objective function: discrete](https://img.shields.io/badge/Type-discrete_inputs-blue)
3+
![Environment to run this objective function: poli protein](https://img.shields.io/badge/Environment-poli____lambo
4+
)
5+
6+
## About
7+
8+
This objective function returns stability using `foldx` and SASA, _exactly_ as done in the `lambo` implementation.
9+
10+
## Prerequisites
11+
12+
- Have `foldx` installed, and available in your home directory. We expect the following files to be there:
13+
- `~/foldx/foldx`: the binary. You might need to rename it.
14+
- `~/foldx/rotabase.txt`: a text file necessary for `foldx` to run.
15+
- Have `lambo` checked out, preferrably in the home directory, specifically containing:
16+
- `lambo.tasks.proxy_rfp.proxy_rfp.ProxyRFPTask`
17+
- the rfp data: see `~/lambo/assets/fpbase`
18+
19+
## How to run
20+
21+
You can either run this objective function in your current environment (assuming that you have the correct dependencies installed), or you can run it in an isolated environment.
22+
23+
::::{tab-set}
24+
25+
:::{tab-item} In current environment
26+
27+
You will have to install the following two dependencies:
28+
29+
```bash
30+
pip install -r ~/lambo/requirements.txt
31+
```
32+
33+
This contains: `pytorch botorch python-levenshtein wandb biopython hydra-core pymoo pandas deepchem transformers selfies jupyter seaborn pyscreener` and other packages.
34+
35+
Then run
36+
37+
```python
38+
from pathlib import Path
39+
40+
import numpy as np
41+
42+
from poli import objective_factory
43+
44+
# How to create
45+
problem_info, f, x0, y0, run_info = objective_factory.create(
46+
name="foldx_rfp",
47+
)
48+
49+
# Example input:
50+
print(x0)
51+
52+
# Querying:
53+
print(y0) # The stability of your wildtype
54+
```
55+
56+
You could also pass an `problem: ProblemSetupInformation` to the create method. For the alphabet reference by default, [we use this encoding](https://github.com/MachineLearningLifeScience/poli/blob/44cad2a5c95f209aeb24d4893d162b3359ca91a3/src/poli/core/util/proteins/defaults.py#L1).
57+
58+
:::
59+
60+
::::

0 commit comments

Comments
 (0)