Skip to content

Commit

Permalink
Uni-Dock v1.1 (#77)
Browse files Browse the repository at this point in the history
* get template parameter

* add small size template mode

* add small config template

* success run template docking

* add large medium extra_large template

* fix missing template parameter

* fix template parameter error

* adjust ExtraLarge template parameter

* update Version number to 1.1.0

* success run template mode  docking

* Add GPU model support policy

* feat: remove template code

* create issue templates (#18)

* create issue templates

* Create CONTRIBUTING.md

* refactor of unidock_tools (#19)

* unidock tools 2

* unidock and mcdock runner

* fix unidock pipeline runner

* fix mcdock

* main entry

* fix savedir name

* feat:pdb2pdbqt and ligprep module

* build:use toml

* fix toml

* fix: package data

* fix: toml package data

* (feat):Update time measurement in vina.h

* refactor unidock tools cicd workflow (#25)

* refactor:ut by module

* rm old ut

* refactor:use pytest syntex for ut

* fix:ut

* fix static type

* fix static type 2

* fix static type 3

* build:base env dockerfile

* feat:add application e2e tests

* fix:e2e tests

* fix:app test read score

* fix:app test

* build:update unidocktools ci

* test:update tools ci trigger condition

* build:fix tool yaml

* build:fix ci yaml variable

* build:fix build ninja dep

* build:fix ninja dep

* test: ut unidock input change to 1iep

* test: skip ad4 test

* build:change push image condition

* feat(unidock):add energy_range arg

* build:downgrade docker login action

* build:reupdate docker login action

* build:dockerhub token

* build:add checkout

* build:change docker login action version

* build:change docker login action version 2

* build:docker login action 3

* build:docker build job

* build image workflow trigger after push

* style:pyright check

* build:fix toml pyright setting

---------

Co-authored-by: Yuan Yannan <[email protected]>

* rename dockerfile name

* Update unidock/CMakeLists.txt

* Feature:Refactor docking process and remove unnecessary code

* Found a situation where the program  hang without printf

* Create dependabot.yml

* Add instructions to build a docker image for unidock

* format cdpkit dockerfile

* use CDPKit from release

* set default cuda version

* Bump actions/setup-python from 3 to 5

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v3...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump docker/build-push-action from 2 to 5

Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2 to 5.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](docker/build-push-action@v2...v5)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump docker/login-action from 1 to 3

Bumps [docker/login-action](https://github.com/docker/login-action) from 1 to 3.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](docker/login-action@v1...v3)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump actions/checkout from 2 to 4

Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v2...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* build:unidock_tools image base on unidock image

* flatten folder structure

* Update CUDA device synchronization and CUDA architectures

* Remove cudaMalloc output

* Delete test data files

* Update MAX_NUM_OF_RIGID and MAX_NUM_OF_ATOMS constants

* Update MAX_NUM_OF_ATOMS_ constant values

* Update CI workflows and add benchmark (#32)

* Refactor Docker image building workflow

* remove outdated actions

* add benchmark workflow

* download test dataset

* fix requirements

* upload test result in benchmark

* build:fix bm test vs result

* fix missing path for python scripts

---------

Co-authored-by: Yuan Yannan <[email protected]>

* update issue template for bug report (#34)

* fix:tool dockerfile

* Set `wget --quiet` in Dockerfile

* Update MAX_NUM_OF_LIG_TORSION and MAX_NUM_OF_ATOMS constants

* Update MAX_NUM_OF_ATOMS_ constant values

* Update kernel.h

* doc: update unidock_tools README (#42)

* doc:tool readme 1

* update unidocktools readme

* update readme

---------

Co-authored-by: Yuan Yannan <[email protected]>

* Update Readme Files (#41)

* Update readme files

* Update README.md

* Unify the spelling

* Prompt source code access

* Update deepmodeling badge

* re-organize paragraphs

* Remove unidock-tools subtitles

---------

Co-authored-by: Yuan Yannan <[email protected]>

* doc:update unidock new bm test result images (#43)

* Add unit test case  (#40)

* Add Catch2 unit test

* Fix unit test

* Add git support in Dockerfile

* Add git in CI basic packages

* Fix file path in parse_pdqt_test.cpp

* Update CMakeLists.txt to link unit_tests with lib and cuda

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: ysy <[email protected]>
Co-authored-by: dp-yuanyn <[email protected]>
Co-authored-by: Yuan Yannan <[email protected]>
Co-authored-by: YANG SHAOYI <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
6 people authored Feb 29, 2024
1 parent 9ad06c4 commit 5895952
Show file tree
Hide file tree
Showing 94 changed files with 28,361 additions and 6,049 deletions.
63 changes: 63 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Contribution Guidelines

Thank you for your interest in contributing to Uni-Dock! We value your time and effort, and aim to make the contribution process enjoyable and efficient. To ensure consistency and maintainability, please follow these guidelines when submitting your contributions.

## Troubleshooting

If you encountered problems using Uni-Dock, please refer to our GitHub [issue tracker](https://github.com/dptech-corp/Uni-Dock/issues), and check if it is a known problem.
If you found a bug, you can help us improve by [submitting a new issue](https://github.com/dptech-corp/Uni-Dock/issues/new) to our GitHub Repository. Provide a clear and concise title and description, including steps to reproduce the issue (if applicable) and any relevant context.
Even better, you can submit a Pull Request with a patch.

## Feature requests

We highly appreciate your contributions, and would like to help you crafting the changes and making contributions to the community.
If you would like to implement a new feature, please **submit a feature requesting issue with a proposal for your work first**.
This help fitting your ideas and work with the development road map well, coordinating our efforts, and avoiding duplication of work.

## Submitting a Pull Request

**Please fork your own copy of the Uni-Dock repository, and draft your changes there.** Once the modified codes work as expected, please submit a pull request to merge your contributions.

1. [Fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) the [Uni-Dock repository](https://github.com/dptech-corp/Uni-Dock). If you already had an existing fork, [sync](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork) the fork to keep your modification up-to-date.

2. Pull your forked repository, create a new git branch, and make your changes in it:

```shell
git checkout -b bug-fix
```

3. Coding your patch and commit the changes.

4. Push your branch to GitHub:

```shell
git push origin my-fix-branch
```

5. On GitHub, create a pull request (PR) from your bug-fix branch targeting `dptech-corp/Uni-Dock`.

6. After your pull request is merged, you can safely delete your branch and sync the changes from the main (upstream) repository:

- Delete the remote branch on GitHub either [through the GitHub web UI](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/deleting-and-restoring-branches-in-a-pull-request#deleting-a-branch-used-for-a-pull-request) or your local shell as follows:

```shell
git push origin --delete my-fix-branch
```

- Check out the master branch:

```shell
git checkout develop -f
```

- Delete the local branch:

```shell
git branch -D my-fix-branch
```

- Update your master with the latest upstream version:

```shell
git pull --ff upstream develop
```
56 changes: 56 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Bug Report
description: Create a report to help us improve
labels: [bug]
assignees: ["ysyecust"]
body:
- type: textarea
attributes:
label: Describe the bug
description: |
A clear and concise description of what the bug is. The bug may results in:
- abnormal interruption of the program,
- systematic or randomized numerical error, or
- relatively low efficiency.
placeholder: |
Example: Uni-Dock crashed with the following error message ...
validations:
required: true

- type: textarea
attributes:
label: Expected behavior
description: |
A clear and concise description of what you expected to happen.
placeholder: |
Example: Uni-Dock should output the result as ...
- type: textarea
attributes:
label: To Reproduce
description: |
Steps to reproduce the behavior.
Please provide necessary information including input file, running commands, error log, etc.
It is strongly recommended to attach your input files here for the developers to reproduce the bug.
placeholder: |
Example:
1. Build Uni-Dock
2. Run the following command ...
- type: textarea
attributes:
label: Environment
description: |
- CUDA version
- GPU model
- Uni-Dock version
placeholder: |
Example:
- CUDA 12.2.0
- GPU: NVIDIA A100
- Uni-Dock on commit: 9ad06c4
- type: textarea
attributes:
label: Additional Context
description: |
Add any other context about the problem here.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/custom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Custom issue template
about: Describe this issue template's purpose here.
title: ''
labels: ''
assignees: ''

---


20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: 'Feature Request: '
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is.

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
49 changes: 49 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Uni-Dock Benchmark
on:
workflow_dispatch:
inputs:
tag:
description: "Docker image used"
required: false
default: "latest"
jobs:
unidock_benchmark:
runs-on: nvidia
container:
image: dptechnology/unidock:${{ github.event.inputs.tag }}
options: --gpus all
steps:
- name: Checkout test suites
uses: actions/checkout@v4
with:
repository: dptech-corp/Uni-Dock-Benchmarks
- name: Setup Python
uses: actions/setup-python@v5
- name: Install requirements
run: |
apt update && apt install -y wget unzip
pip install -r scripts/requirements.txt
- name: Run molecular docking benchmarks
run: |
python3 scripts/test_molecular_docking.py
- name: Upload docking results
uses: actions/upload-artifact@v4
with:
name: molecular_docking_results.csv
path: results/results.csv
- name: Upload docking metrics
uses: actions/upload-artifact@v4
with:
name: molecular_docking_metrics.csv
path: results/metrics.csv

- name: Run virtual screening benchmarks
run: |
rm -rf results
python3 scripts/test_virtual_screening.py
- name: Upload virtual screening results
uses: actions/upload-artifact@v4
with:
name: virtual_screening_results.csv
path: results/results.csv
99 changes: 99 additions & 0 deletions .github/workflows/ci_test_tools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Uni-Dock Tools CI/CD
on:
push:
branches:
- '**ci**'
pull_request:
branches:
- main

env:
PYTHON_VERSION: "3.11"

jobs:
flake8:
continue-on-error: true
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
- name: Run flake8 formating
run: |
flake8 unidock_tools/unidock_tools --exit-zero
pyright:
continue-on-error: true
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyright
- name: Run pyright check
id: pyright_check
working-directory: ./unidock_tools
run: |
pyright
tests:
if: ${{ always() }}
needs: [flake8,pyright]
runs-on: nvidia
strategy:
matrix:
cuda-version: ["12.0.0"]
container:
image: docker.io/xmyyn/unidock_tools_base:0.0.1_cuda${{ matrix.cuda-version }}
options: --gpus all
steps:
- name: checkout repo
uses: actions/checkout@v4

- name: install unidock
working-directory: ./unidock
run: |
apt-get update && apt-get install -y ninja-build
mkdir build
cd build
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build .
cmake --install .
cd ..
- name: check env
run: |
unidock --version
confgen --version
which python
- name: install tools
working-directory: ./unidock_tools
run: |
pip install .
- name: run unit-test
run: |
pip install pytest pytest-cov
pytest unidock_tools/tests/ut -vv --cov --cov-report term
- name: run application e2e test
run: |
pytest unidock_tools/tests/applications -vv --cov --cov-report term
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: Uni-Dock CI/CD
on:
push:
branches: []
branches:
- '**ci**'
pull_request:
branches: [ main ]
branches:
- main

jobs:
unidock_test:
Expand All @@ -13,12 +15,12 @@ jobs:
options: --gpus all
steps:
- name: checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: install basic packages
run: |
apt-get update
apt-get install -y build-essential cmake libboost-all-dev ninja-build
apt-get install -y build-essential cmake libboost-all-dev ninja-build git
- if: ${{ env.ACT }}
name: Hack container for local development
Expand All @@ -43,7 +45,7 @@ jobs:
unidock --version
- name: Set up Python 3.10
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: '3.10'

Expand All @@ -52,35 +54,3 @@ jobs:
python -m pip install --upgrade pip
pip install pytest>=8.0.0 pytest-cov
pytest unidock/test/ut -vv --doctest-modules --junitxml=junit/test-results.xml --cov --cov-report term
build_docker_image:
needs: unidock_test
runs-on: ubuntu-latest
steps:

- name: log in to docker hub
uses: docker/login-action@v3
if: github.event_name == 'push'
with:
username: dptechnology
password: ${{ secrets.DOCKERHUB_PAT }}

- name: set up docker buildx
id: buildx
uses: docker/setup-buildx-action@v2

- uses: benjlevesque/[email protected]
id: short-sha
with:
length: 7

- name: check commit short sha
run: echo ${{ steps.short-sha.outputs.sha }}

- name: build and push container
uses: docker/build-push-action@v4
with:
tags: dptechnology/unidock:${{ steps.short-sha.outputs.sha }},dptechnology/unidock:latest
file: Dockerfile
context: "{{defaultContext}}:unidock"
push: ${{ github.event_name == 'push' }}
Loading

0 comments on commit 5895952

Please sign in to comment.