Add frontend for sGNN #23
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
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_omm -y python=${{ matrix.python-version }} numpy openmm=7.7 -c conda-forge | |
conda activate dmff_omm | |
conda install -y libtensorflow_cc=2.9.1 -c conda-forge | |
pip install setuptools==59.5.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_omm | |
cd ${GITHUB_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} -DUSE_HIGH_PRECISION=ON | |
make && make install | |
make PythonInstall | |
- name: Run Tests | |
run: | | |
source $CONDA/bin/activate dmff_omm | |
python -m OpenMMDMFFPlugin.tests.test_dmff_plugin_nve -n 100 |