Skip to content

Commit

Permalink
Add and document pip installation path
Browse files Browse the repository at this point in the history
  • Loading branch information
amorehead committed Aug 12, 2024
1 parent ad9f842 commit 2461915
Show file tree
Hide file tree
Showing 17 changed files with 178 additions and 41 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package

on:
release:
types: [published]

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@v1.9.0
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

[![Paper](http://img.shields.io/badge/arXiv-2405.14108-B31B1B.svg)](https://arxiv.org/abs/2405.14108)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.11477766.svg)](https://doi.org/10.5281/zenodo.11477766)
[![PyPI version](https://badge.fury.io/py/posebench.svg)](https://badge.fury.io/py/posebench)
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![Docs](https://assets.readthedocs.org/static/projects/badges/passing-flat.svg)](https://bioinfomachinelearning.github.io/PoseBench/)
<a href="https://hydra.cc/"><img alt="Config: Hydra" src="https://img.shields.io/badge/config-hydra-89b8cd"></a>
Expand Down Expand Up @@ -38,7 +39,19 @@ Comprehensive benchmarking of protein-ligand structure generation methods

<details>

Install `mamba` for dependency management (as a fast alternative to Anaconda)
### Portable installation

To reuse modules and utilities within `PoseBench` in other projects, one can simply use `pip`

```bash
pip install posebench
```

### Full installation

To reproduce, customize, or extend the `PoseBench` benchmark, we recommend fully installing `PoseBench` using `mamba` as follows:

First, install `mamba` for dependency management (as a fast alternative to Anaconda)

```bash
wget "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh"
Expand Down
4 changes: 2 additions & 2 deletions docs/source/acknowledgements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ Acknowledgements
================

.. mdinclude:: ../../README.md
:start-line: 862
:end-line: 879
:start-line: 875
:end-line: 892
4 changes: 2 additions & 2 deletions docs/source/available_methods.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Available inference methods
================

.. mdinclude:: ../../README.md
:start-line: 273
:end-line: 310
:start-line: 286
:end-line: 323

.. note::
Have a new method to add? Please let us know by creating a pull request. We would be happy to work with you to integrate new methodology into this benchmark!
4 changes: 2 additions & 2 deletions docs/source/bonus.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Bonus
================

.. mdinclude:: ../../README.md
:start-line: 897
:end-line: 899
:start-line: 910
:end-line: 912

.. image:: ./_static/WorkBench.jpeg
:alt: My brain after building PoseBench
Expand Down
4 changes: 2 additions & 2 deletions docs/source/citing_this_work.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ Citing this work
================

.. mdinclude:: ../../README.md
:start-line: 881
:end-line: 893
:start-line: 894
:end-line: 906
4 changes: 2 additions & 2 deletions docs/source/comparative_plots.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ How to create comparative plots of inference results
================

.. mdinclude:: ../../README.md
:start-line: 809
:end-line: 818
:start-line: 822
:end-line: 831
4 changes: 2 additions & 2 deletions docs/source/data_preparation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ How to prepare `PoseBench` data
================

.. mdinclude:: ../../README.md
:start-line: 134
:end-line: 267
:start-line: 147
:end-line: 280
4 changes: 2 additions & 2 deletions docs/source/ensemble_inference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ How to run inference with a method ensemble
================

.. mdinclude:: ../../README.md
:start-line: 750
:end-line: 801
:start-line: 763
:end-line: 814

.. note::
In addition to having `consensus` as an available value for `ensemble_ranking_method`, one can also set `ensemble_ranking_method=ff` to have the method ensemble's top-ranked predictions selected using the criterion of "minimum (molecular dynamics) force field energy" (albeit while incurring a very large runtime complexity).
4 changes: 2 additions & 2 deletions docs/source/for_developers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ For developers
================

.. mdinclude:: ../../README.md
:start-line: 824
:end-line: 858
:start-line: 837
:end-line: 871
6 changes: 3 additions & 3 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ Welcome to PoseBench's documentation!

.. mdinclude:: ../../README.md
:start-line: 4
:end-line: 12
:end-line: 13

.. image:: ./_static/PoseBench.png
:alt: Overview of PoseBench
:align: center
:width: 600

.. mdinclude:: ../../README.md
:start-line: 18
:end-line: 20
:start-line: 19
:end-line: 21


.. toctree::
Expand Down
4 changes: 2 additions & 2 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ Installation
================

.. mdinclude:: ../../README.md
:start-line: 40
:end-line: 116
:start-line: 41
:end-line: 129
4 changes: 2 additions & 2 deletions docs/source/method_inference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ How to run inference with individual methods
================

.. mdinclude:: ../../README.md
:start-line: 318
:end-line: 744
:start-line: 331
:end-line: 757
4 changes: 2 additions & 2 deletions docs/source/tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ Tutorials
================

.. mdinclude:: ../../README.md
:start-line: 122
:end-line: 128
:start-line: 135
:end-line: 141
4 changes: 3 additions & 1 deletion posebench/data/neuralplexer_input_preparation.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
rootutils.setup_root(__file__, indicator=".project-root", pythonpath=True)

from posebench import register_custom_omegaconf_resolvers
from posebench.models.ensemble_generation import LIGAND_ONLY_RECEPTOR_PLACEHOLDER_SEQUENCE
from posebench.models.ensemble_generation import (
LIGAND_ONLY_RECEPTOR_PLACEHOLDER_SEQUENCE,
)
from posebench.utils.data_utils import parse_inference_inputs_from_dir

logging.basicConfig(format="[%(asctime)s] {%(filename)s:%(lineno)d} %(levelname)s - %(message)s")
Expand Down
101 changes: 101 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,96 @@
[project]
name = "posebench"
version = "0.3.0"
description = "Comprehensive benchmarking of protein-ligand structure generation methods"
authors = [
{ name = "Alex Morehead", email = "acmwhb@umsystem.edu" }
]
readme = "README.md"
requires-python = ">= 3.10"
license = { file = "LICENSE" }
keywords = [
'artificial intelligence',
'deep learning',
'protein-ligand structure generation',
'benchmarking',
'molecular docking',
'protein-ligand docking',
'protein-ligand interaction',
'protein-ligand binding',
'protein-ligand scoring',
'protein-ligand pose prediction',
'protein-ligand pose refinement',
]

classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.10',
]

dependencies = [
# --------- pytorch --------- #
"lightning>=2.1.3",
"torch==2.3.0",
"torchmetrics>=1.2.0",
"torchvision>=0.18.0",

# --------- hydra --------- #
"hydra-core==1.3.2",
"hydra-colorlog==1.2.0",
"hydra-optuna-sweeper==1.2.0",
"omegaconf",
"pydantic>=2.18.3",
"pyyaml",

# --------- others --------- #
"beartype", # runtime type checking
"biopandas", # for biological dataframe parsing
"biopython==1.79", # for biological data parsing
"ipykernel", # for running Jupyter notebooks
"jaxtyping>=0.2.21", # tensor type checking
"joblib", # for parallel processing
"lovely-numpy", # for fancy numpy debugging
"lovely-tensors", # for fancy pytorch debugging
"meeko", # for molecular docking preparation
"numpy", # for numerical operations
"pandas>=1.5.0", # for data parsing and analysis
"plotly", # for plotting
"pre-commit", # hooks for applying linters on commit
"prody", # for protein data parsing
"prolif", # for protein-ligand data parsing
"rdkit>=2023.3.3", # for parsing small molecule data files
"rich", # beautiful text formatting in terminal
"rootutils", # standardizing the project root setup
"scikit-learn>=1.1.2", # for basic machine learning utilities
"seaborn", # for plotting
"setuptools", # for packaging
"spyrmsd", # for RMSD calculations
"timeout_decorator>=0.5.0", # for preventing certain functions from executing indefinitely
"tqdm", # progress bars
"loguru", # for cleaner logging
]

[project.urls]
Homepage = "https://pypi.org/project/posebench/"
Repository = "https://github.com/BioinfoMachineLearning/PoseBench"

[project.optional-dependencies]
examples = []
test = [
"pytest",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.pytest.ini_options]
pythonpath = [
"."
]
addopts = [
"--color=yes",
"--durations=0",
Expand All @@ -16,6 +108,15 @@ markers = [
minversion = "6.0"
testpaths = "tests/"

# Assuming you're developing for Python 3.10
target-version = "py310"

[tool.hatch.metadata]
allow-direct-references = true

[tool.hatch.build.targets.wheel]
packages = ["posebench"]

[tool.coverage.report]
exclude_lines = [
"pragma: nocover",
Expand Down
14 changes: 0 additions & 14 deletions setup.py

This file was deleted.

0 comments on commit 2461915

Please sign in to comment.