Skip to content

Add support for Foyer forcefields #1248

Add support for Foyer forcefields

Add support for Foyer forcefields #1248

Workflow file for this run

name: tests
on:
push:
branches:
- "main"
- "v0-3-x"
pull_request:
branches:
- "main"
- "v0-3-x"
schedule:
- cron: "0 0 * * *"
jobs:
test:
name: 💻 ${{ matrix.os }}, 🐍 ${{ matrix.python-version }}, 👀 ${{ matrix.openeye }}, pymbar ${{ matrix.pymbar-version }}, OpenMM ${{ matrix.openmm-version }}
runs-on: ${{ matrix.os }}
env:
OE_LICENSE: ${{ github.workspace }}/oe_license.txt
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macOS-latest
python-version:
- "3.9"
- "3.10"
pymbar-version:
- "3.1"
openmm-version:
- "7"
- "8"
openeye:
- true
- false
exclude:
- python-version: "3.10"
openmm-version: "7"
steps:
- uses: actions/checkout@v3
- name: Setup Conda Environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: devtools/conda-envs/test_env.yaml
channel-priority: flexible
create-args: >-
python=${{ matrix.python-version }}
pymbar=${{ matrix.pymbar-version }}
openmm=${{ matrix.openmm-version }}
jax>=0.3
jaxlib>=0.3
- name: Install OpenEye
if: matrix.openeye
shell: bash -l {0}
run: |
echo "${SECRET_OE_LICENSE}" > ${OE_LICENSE}
micromamba install -c openeye openeye-toolkits
python -c "from openeye import oechem; assert oechem.OEChemIsLicensed()"
env:
SECRET_OE_LICENSE: ${{ secrets.OE_LICENSE }}
- name: Install PASCAL Compiler (MacOS)
shell: bash -l {0}
if: startsWith(matrix.os, 'macOS')
run: |
brew install fpc
- name: Install PASCAL Compiler (Ubuntu)
shell: bash -l {0}
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get install fp-compiler
- name: Install checkmol
shell: bash -l {0}
run: |
curl https://homepage.univie.ac.at/norbert.haider/download/chemistry/checkmol/checkmol.pas > checkmol.pas
fpc checkmol.pas -S2
echo $(pwd) >> $GITHUB_PATH
- name: Install Package
shell: bash -l {0}
run: |
python -m pip install .
- name: Conda Environment Information
shell: bash -l {0}
run: |
conda info
conda list
- name: Run tests
shell: bash -l {0}
run: |
python -m pytest -v --cov=openff openff/evaluator/tests/ --cov-report=xml --color=yes
- name: Run (non-GPU) tutorials
shell: bash -l {0}
if: ${{ matrix.pymbar-version == 3 }}
run: |
# ForceBalance requires pymbar 3, so don't run these tests if we are using pymbar 4,
# even though we're not running the fitting tutorial
# https://github.com/conda-forge/forcebalance-feedstock/blob/9793b0205489f8ec7826d301a3c82cfb96997c57/recipe/meta.yaml#L29
micromamba install "forcebalance >=1.9.5" -c conda-forge -yq
python -m pytest --nbval-lax docs/tutorials/tutorial01.ipynb docs/tutorials/tutorial03.ipynb
- name: Code coverage
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}