-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test workflow for openmm dmff plugin
- Loading branch information
Showing
2 changed files
with
55 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: OpenMM DMFF Plugin tests. | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.9] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Dependencies | ||
run: | | ||
source $CONDA/bin/activate | ||
conda create -n dmff -y python=${{ matrix.python-version }} numpy openmm==7.7.0 mdtraj=1.9.7 pytest rdkit biopandas openbabel -c conda-forge | ||
conda activate dmff | ||
pip install --upgrade pip | ||
pip install jax==0.3.15 jaxlib==0.3.15 jax_md==0.2.0 pymbar==4.0.1 chex==0.1.4 dm-haiku==0.0.7 tqdm | ||
conda install -c deepmodeling libtensorflow_cc=2.9.1=cuda112h02da4e0_0 | ||
mkdir /tmp/omm_dmff_working_dir | ||
cd /tmp/omm_dmff_working_dir | ||
wget https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.9.1.tar.gz | ||
tar -xvf v2.9.1.tar.gz | ||
cp -r tensorflow-2.9.1/tensorflow/c ${CONDA_PREFIX}/include/tensorflow/ | ||
git clone https://github.com/serizba/cppflow.git | ||
cd cppflow | ||
git apply ${GITHUB_WORKSPACE}/backend/openmm_dmff_plugin/tests/cppflow_empty_constructor.patch | ||
mkdir ${CONDA_PREFIX}/include/cppflow | ||
cp -r include/cppflow ${CONDA_PREFIX}/include/ | ||
- name: Install OpenMM DMFF Plugin | ||
run: | | ||
source $CONDA/bin/activate dmff | ||
cd ${GITHU_WORKSPACE}/backend/openmm_dmff_plugin | ||
mkdir build && cd build | ||
export OPENMM_INSTALLED_DIR=$CONDA_PREFIX | ||
export CPPFLOW_INSTALLED_DIR=$CONDA_PREFIX | ||
export LIBTENSORFLOW_INSTALLED_DIR=$CONDA_PREFIX | ||
cmake .. -DOPENMM_DIR=${OPENMM_INSTALLED_DIR} -DCPPFLOW_DIR=${CPPFLOW_INSTALLED_DIR} -DTENSORFLOW_DIR=${LIBTENSORFLOW_INSTALLED_DIR} | ||
make && make install | ||
make PythonInstall | ||
- name: Run Tests | ||
run: | | ||
source $CONDA/bin/activate dmff | ||
python -m OpenMMDMFFPlugin.tests.test_dmff_plugin_nve -n 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters