Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GeM CV #242

Merged
merged 5 commits into from
Feb 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-latest]
python-version: [3.7, 3.9]
python-version: [3.8, 3.9]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
Expand All @@ -32,7 +32,7 @@ jobs:
- name: Install python dependecies
run: |
python -m pip install --upgrade pip
pip install jaxlib pytest matplotlib
pip install dill jaxlib jax-md jaxopt pytest matplotlib

- name: Install pysages
run: pip install .
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
- name: Install python dependecies
run: |
python -m pip install --upgrade pip
pip install jaxlib pytest pylint flake8
pip install dill jaxlib jax-md jaxopt pytest pylint flake8
pip install -r docs/requirements.txt
- name: Install pysages
run: pip install .
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ WORKDIR /
RUN python -m pip install --upgrade pip
RUN python -m pip install ase gsd matplotlib "pyparsing<3"

# Install JAX
# Install JAX and JAX-MD
RUN python -m pip install --upgrade "jax[cuda]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
RUN python -m pip install --upgrade jax-md jaxopt

COPY . /PySAGES
RUN pip install /PySAGES/
33 changes: 33 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,36 @@ Whereas the following applies to `pysages/methods/abf.py`:

For a list of contributors to the SSAGES project visit
<https://github.com/SSAGESproject/SSAGES>.

The code in `pysages/utils/transformations.py` was adapted from
<https://github.com/cgohlke/transformations/blob/v2022.9.26/transformations/transformations.py>.
The following applies to the original implementation:

> Copyright (c) 2006-2022, Christoph Gohlke
> All rights reserved.
>
> Redistribution and use in source and binary forms, with or without
> modification, are permitted provided that the following conditions are met:
>
> 1. Redistributions of source code must retain the above copyright notice,
> this list of conditions and the following disclaimer.
>
> 2. Redistributions in binary form must reproduce the above copyright notice,
> this list of conditions and the following disclaimer in the documentation
> and/or other materials provided with the distribution.
>
> 3. Neither the name of the copyright holder nor the names of its
> contributors may be used to endorse or promote products derived from
> this software without specific prior written permission.
>
> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
> AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
> LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
> SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
> INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
> CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
> ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
> POSSIBILITY OF SUCH DAMAGE.
9 changes: 9 additions & 0 deletions pysages/colvars/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,12 @@
ShapeAnisotropy,
)
from .utils import get_periods, wrap

# Conditionally export GeM if both `jax_md` and `jaxopt` are available
try:
import jax_md
import jaxopt

from .patterns import GeM
except ImportError:
pass
Loading