Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/install_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# .github/workflows/test-install.yml
name: Test PyProject Install

on:
pull_request:
branches: [main]

jobs:
test-install:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: [3.11]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Upgrade pip and build tools
run: |
python -m pip install --upgrade pip
pip install build

- name: Install package via pip (pyproject.toml)
run: |
pip install uv
uv pip install . --system

- name: Verify package import
run: |
python -c "import provada"
166 changes: 166 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
# Added
.DS_Store
**results
**tmp_
**logs

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "ProteinMPNN"]
path = ProteinMPNN
url = https://github.com/dauparas/ProteinMPNN.git
1 change: 1 addition & 0 deletions ProteinMPNN
Submodule ProteinMPNN added at 8907e6
64 changes: 33 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,52 +29,54 @@ The fitness score combines multiple objectives. A key component is a lightweight

## Installation

### 1. Prerequisites

Before installing, please ensure your system meets the following requirements:

* **Python 3.11+**: This package requires Python version 3.11 or newer. You can verify your version by running:
```bash
python3 --version
```
Make sure that the `python3` command used to create the virtual environment in the next step points to a compatible version.

* **ProteinMPNN**: This package relies on a local installation of ProteinMPNN for structure-based sequence design. Please follow the official [ProteinMPNN installation guide](https://github.com/dauparas/ProteinMPNN) to set it up first.

**Crucially**, after installing ProteinMPNN, you must **update the `MPNN_SCRIPT` path in `provada/paths.py`** to point to your local `protein_mpnn_run.py` script.

### 2. Package Installation

We strongly recommend installing ProVADA in a clean, dedicated virtual environment.

The following commands will clone the repository, set up a virtual environment, and install the `provada` package with all its required Python libraries.
Follow the instructions below to install ProVADA.

### 1. Clone the repository
```bash
# 1. Clone this repository from GitHub
git clone https://github.com/SUwonglab/provada.git
cd provada
```

# 2. Create and activate a virtual environment using a compatible Python version
# (The following commands create a 'venv' folder in your project directory)
### 2. Create and activate a virtual environment
```bash
conda create -n provada-env python=3.11 -y
conda activate provada-env
pip install uv
uv pip install .
```

# On macOS / Linux:
python3 -m venv venv
source venv/bin/activate

# On Windows:
# python -m venv venv
# venv\Scripts\activate
### 3. ProteinMPNN Set up
ProVADA uses ProteinMPNN as a local dependency for structure-based sequence design.
Run the command below to populate the ProteinMPNN submodule with the required source code.

# 3. Install the provada package and its dependencies
# This command reads the pyproject.toml file and installs everything needed.
pip install .
```bash
git submodule update --init --recursive
```




## Usage

We provide an example script to run ProVADA on the example Renin protein described in the manuscript.

```bash
python run_provada.py \
--input_pdb_path 'inputs/renin/renin_af3.pdb' \
--input_sequence_path 'inputs/renin/example_seq_renin.txt' \
--classifier_weights 'inputs/renin/logreg_model_weights.pkl' \
--fixed_positions_files 'inputs/renin/interface_positions.txt' 'inputs/renin/conserved_positions.txt' \
--force_design_residues 'C' \
--output_dir './results/test_hard_fix' \
--trajectory_file 'test_fix_300iter_2.csv' \
--save_trajectory \
--greedy
```

### Example


### A Note on Using Your Own Proteins

The ProVADA workflow relies on two key utility scripts to prepare PDB structures for ProteinMPNN: `provada/utils/pdb_to_mpnn_jsonl.py` and `provada/utils/define_design_constraints.py`.
Expand Down
3 changes: 3 additions & 0 deletions inputs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Example Inputs

This directory contains example input files for the ProVADA pipeline.
6 changes: 6 additions & 0 deletions inputs/renin/conserved_positions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
27
29
69
129
316
319
1 change: 1 addition & 0 deletions inputs/renin/example_seq_renin.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
LTLGNTTSSVILTNYMDTQYYGEIGIGTPPQTFKVVFDTGSSNVWVPSSKCSRLYTACVYHKLFDASDSSSYKHNGTELTLRYSTGTVSGFLSQDIITVGGITVTQMFGEVTEMPALPFMLAEFDGVVGMGFIEQAIGRVTPIFDNIISQGVLKEDVFSFYYNRDSENSQSLGGQIVLGGSDPQHYEGNFHYINLIKTGVWQIQMKGVSVGSSTLLCEDGCLALVDTGASYISGSTSSIEKLMEALGAKKRLFDYVVKCNEGPTLPDISFHLGGKEYTLTSADYVFQESYSSKKLCTLAIHAMDIPPPTGPTWALGATFIRKFYTEFDRRNNRIGFALAR
Loading