|
| 1 | +# Protein (RFP) stability and SASA (using `foldx`,`lambo`) |
| 2 | + |
| 3 | + |
| 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