45 Commits

Author SHA1 Message Date
Peter Eastman
b1a5324c88 Use native ARM Linux runner (#5123) 2025-11-03 10:01:57 -08:00
Evan Pretti
f55abcaa5f Add constant potential method (#4870)
* Initial implementation of C++ API

* Add kernel interface and information for API generation

* API updates for updating electrode parameters

* Add serialization proxy for ConstantPotentialForce

* Update file headers

* Add CG error tolerance and fix units on getCharges() return value

* Initial implementation of matrix solver

* Fixes and conjugate gradient solver

* Try to fix Linux and Windows builds

* Make sure charge constraint target is on total charge

* Restore handling of exceptions like NonbondedForce since they won't involve electrode atoms

* Ameliorate numerical instability in constrained conjugate gradient

* Fix uninitialized pointers, memory leak, and style

* Set CG tolerance units in Python API

* Test ConstantPotentialForce serialization

* Read/write ExceptionsUsePeriodicBoundaryConditions as bool

* Improve constrained conjugate gradient robustness to roundoff error accumulation

* Recompute matrix if electrode atoms move due to setPositions()

* Tolerance is now in gradient (potential) units again

* Add neutralizing background correction

* Add Python API tests

* Fixes for CG and nonbonded exceptions

* Add initial tests checking against existing NonbondedForce behavior

* Expand test suite and fix some implementation issues

* Add additional tests using larger reference system

* Add Gaussian test

* Finish test against reference computation

* CPU platform implementation

* Fixes for compilation on some platforms

* Fixes for constant potential with AVX/AVX2

* Test linking CPU PME library to constant potential test directly

* Older SWIG versions don't support Python set to C++ set conversion

* Add user guide entry

* Increase speed of reference test

* Conditional building constant potential CPU test is unreliable

* Debugging

* Miscellaneous fixes and improvements for CI

* Cache charges so solver will not run if system and coordinates have not changed

* Preconditioner flag, stability, and automatic detection improvements

* Add GPU platform-specific constant potential kernel classes

* PME and device-host I/O changes to support constant potential

* Initial common constant potential implementation

* Constant potential fixes:

* Fix preconditioner PME position/charge save/restore logic

* Fix reduction synchronization in constant potential solver kernels

* Add double-float accumulation for conjugate gradient solver when
  double unsupported by hardware

* Improve conditioning of a test system, and make sure particles are in or
out of cutoff for consistency and ease of comparing between platforms

* Reorder guess charges for CG when atom reordering changes positions

* Remove PME queue for now

* Trying to debug optimized direct space derivative kernel

* Remove extraneous debugging lines

* Style updates; just make CPU preconditioner double precision

* Debugging updated optimized direct derivatives kernel for all but OpenCL CPU

* OpenCL CPU implementation of direct space derivatives, and cleanup

* Try to make test even shorter to not time out on CI

* Temporary - Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Remove debugging code and fix reduction synchronization

* Fix other reductions

* Debugging - are tests hanging or just slow on CI?

* Debugging

* Debugging

* Fix macro for case when double precision is available on hardware

* Remove changes for debugging again

* Try to improve matrix solver cache locality by uploading transpose

* Fixes for atom ordering and periodic images

* Can't rely on reorder listener for cell offset updates

* Test reducing number of contexts and timing for CI

* Debugging

* Remove timing code and revert debugging changes

* Matrix solver and plasma term optimizations

* Reduce CG solver kernel calls and downloads

* Don't read back convergence flag from global memory

* Update PME due to refactoring in master branch

* Faster matrix solver (1st step)

* Faster matrix solver for CUDA

* Faster matrix solver compatibility with non-CUDA platforms

* Matrix solver fixes

* Use warp shuffle reductions when possible

* Attempt to work around intermittent compiler crash in Intel CPU OpenCL

* Optimize CG solver kernel 1

* Rework CG solver so some kernels can use more than 1 block

* Don't run out of shared memory

* Asynchronously download convergence flag while clearing buffers

---------

Co-authored-by: Evan Pretti <pretti@sh03-17n15.int>
2025-09-12 13:55:50 -07:00
Peter Eastman
6e2f213fa7 Replace C++ code examples in Python API docs (#5043)
* Replace C++ code examples in Python API docs

* Use newer Python for building docs

* Remove sphinx version pin

* Add Python versions of code examples

* Minor edit

* Add Python version of one more code example
2025-08-13 15:02:25 -07:00
Peter Eastman
13c1339687 Remove includes for Dart (#4867)
* Remove includes for Dart

* Fix CMake error

* Fixed broken link

* Pin to cmake<4.0

* Try to make the link checker stop complaining
2025-03-28 10:21:33 -07:00
Peter Eastman
9fe1bae6ef Use Intel OpenCL for CI (#4366)
* Use Intel OpenCL for CI

* Set environment variables

* Try to get CI to run

* Debugging

* Debugging

* Fixes for Intel OpenCL
2024-11-26 08:32:28 -08:00
Peter Eastman
9335b8e274 Updated Python versions for CI (#4694)
* Updated Python versions for CI

* Install setuptools
2024-10-15 17:55:50 -07:00
Peter Eastman
bcc3442ee0 Remove doxygen pin (#4680) 2024-10-01 15:51:03 -07:00
Peter Eastman
66064facae CI build for HIP (#4646)
* CI build for HIP

* Removed some unneeded dependencies

* Fix test for which libraries are present
2024-09-05 15:33:12 -07:00
Peter Eastman
1cd905b4a6 Support numpy 2 (#4622)
* Support numpy 2

* Debugging

* Removed debugging code
2024-08-23 10:55:27 -07:00
Peter Eastman
ab7ad049d4 Run Mac tests on ARM and Intel (#4597)
* Run Mac tests on ARM and Intel

* Added missing environment file

* Removed obsolete code for M1 runner

* Removed obsolete code for M1 runner
2024-07-19 08:11:46 -07:00
Peter Eastman
e30e5b69c2 Debug CI failures (#4588)
* Debug CI failures

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Removed build that was failing

* Fixed URL that had changed
2024-07-17 13:38:50 -07:00
Peter Eastman
9e4b6ba594 addHydrogens() allows specifying exactly what hydrogens to add (#4585)
* addHydrogens() allows specifying exactly what hydrogens to add

* Prevent CI from using numpy 2.0
2024-07-09 07:51:24 -07:00
Peter Eastman
b0eb771304 Revised code from installing CUDA on CI (#4470)
* Revised code from installing CUDA on CI

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging
2024-03-08 19:35:20 -08:00
Peter Eastman
5a00b39191 Remove support for Gromacs implicit solvent (#4246)
* Remove support for Gromacs implicit solvent

* Removed tests of implicit solvent
2023-09-28 08:24:42 -07:00
Peter Eastman
dd07fa704f Always use nvrtc for compilation (#4146)
* Always use nvrtc for compilation

* Install nvrtc on CI

* Workaround for compiler error

* Set empty values for deprecated properties
2023-07-20 12:44:41 -07:00
Peter Eastman
993cfc575d Attempt at fixing failing pypy build (#3860)
* Attempt at fixing failing pypy build

* Try using mambaforge

* Debugging

* A different approach to using mambaforge

* Try a separate environment file for pypy
2023-01-05 09:35:39 -08:00
Peter Eastman
1dac981a63 Use PocketFFT (#3667)
* Use PocketFFT instead of FFTW

* Minor cleanup

* Use PocketFFT instead of fftpack for reference platform

* Remove FFTW as a dependency

* Converted a test case to use PocketFFT

* Fixed an incorrect comment
2022-06-30 12:54:28 -07:00
Peter Eastman
30fa187c36 Update CUDA keys (#3593)
* Update CUDA keys

* Fixed typo
2022-05-04 12:05:14 -07:00
Peter Eastman
e1a926f4de Optimized computing powers in CompiledExpression (#3520)
* Optimized computing powers in CompiledExpression

* Fixed compilation error

* Attempt at fixing compilation error
2022-03-18 10:18:30 -07:00
Peter Eastman
dad8e52dc0 Try to fix errors setting up CI builds (#3363) 2021-12-03 12:44:21 -08:00
Mike Henry
c28ae90372 Add M1 build testing to GHA (#3335)
* lets see what blows up!

* need to add env file, different name than normal

* lets see if setting an env will help it find the base

* try forcing the use of mamba

* this should break everything, but might make osx work

* lets see if this fixes the issue with the extension

* ci bump

* lets see if a different installer will work

* single thread build to see error better

* ci bump

* ci bump

* can't build opencl on m1

* add salt to url to prevent caching

* rename to reflect that we can just build CPU

* going to add a M1 x86_64 buld and an arm64 build

* lets see if I broke 86

* now lets see what happens with arm

* forgot to add new build files

* try older python version

* newer python?

* try mini forge

* ci bump

* unpin doxygen and remove gromacs as a dep

* double check where x86_64 libs are getting pulled in

* ci bump

* try and use conda compiler toolchain and set arch

* weird things happend with setting arch

* lets see what the arch the runner thinks it is using

* try printing arch again

* undo shell change

* remove changes to shell

* make sure I don't break other buikds

* fix syntax issue and add new label to actionlint

* ci bump

* ci bump

* lets focus on arm64 builds for now

* ci bump

* ci bump

* try setting arch to build with arch command

* split steps up so other builds don't break

* see if the cmake step is the only one we need to arch-ify

* cleaning things up

* cleaning things up

* set -j2 for make

* we can use the same build step as the otehr builds

* now lets see if it can install gromacs

* no gromacs, no problem?

* remove bit of logic stopping the build

* pin doxygen to 1.9.1

* try building openCL

* ci bump

* ci bump
2021-11-23 14:32:53 -08:00
Josh A. Mitchell
ae2fe2fd7d Move to actively maintained dependencies for API docs (#3201)
* Proof of concept matching current behaviour with Breathe

* Reorganise C++ API docs to work without autosummary

* Revert to Sphinx-native search

* Move remaining pip deps to conda

* Remove unnecessary lunrsearch templates

* Remove lunrsearch from cmake

* Tidy up layout of API docs

* Get code blocks to work with Breathe

Breathe doesn't seem to support the Doxygen <preformatted> tag.
It does support the <code> tag, but better yet it supports using
<verbatim> tags to embed rst into docstrings. This commit changes
all <pre> tags to use RST verbatim, and updates the Python
documentation machinery to support it too.

* Clarified some language

* Have doxygen exclude undocumented classes and have sphinx fail on warnings for C++ API docs

* List custom forces and integrators last

* Add breathe to documentation CI

* Typo

* Fix link to custom forces in extras.rst

* Have Breathe process only public classes

* Strip OpenMM:: prefix from rst files to avoid colons in links

* Remove existing private classes from EXCLUDE_SYMBOLS

* Add comment to C++ cmake describing why we promote warnings to errors

* Revise documentation build instructions for new dependencies
2021-08-11 09:38:26 -07:00
Peter Eastman
0352909efa Changes to work with recent versions of Sphinx (#3138)
* Changes to work with recent versions of Sphinx

* Updated Sphinx version used for CI
2021-06-15 08:08:49 -07:00
Jaime Rodríguez-Guerra
6f8534dcb3 Migrate CI to GH Actions (#2964)
* Add draft GHA-based CI for Linux

* Fix events

* Dup key

* Fix path

* Update env vars

* More fixes

* Fix env vars again

* add doxygen

* add sudo

* Typo

* upgrade CUDA

* escape newlines

* more backslashes

* fix CUDA_APT

* more env vars fixes

* fix missing file

* acumulate env_vars

* build python wrappers only if requested

* add pytest

* use $GITHUB_ENV

https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#environment-files

* use ${GITHUB_WORKSPACE}

* Pin older gromacs

* add windows

* Provide default values for unbound vars

* fixes

* this is powershell not cmd

* update envs

* win fix

* make windows use cmd

* Change install prefix

* fixes

* better env files

* Increase timeout threshold

* set xcode to 10.x

* specify action version

* fix sdk in macos

* split jobs a bit more

* build wrappers even if tests failed for core

* revert & resort build/test

* fix run logic?

* install envs in D:\

* add more cudas

* allow longer test times

* sudo that

* fix cuda ver checks

* another little fix

* one more

* missing package

* missing dev packages

* missing backslash

* add nvprof

* factor scripts out

* export CUDA_PATH

* no quotes in env var

* add more cudas

* fix ci name

* fix flags

* typo

* missing parenthesis

* add cuda 11.2 urls

* add retry loops for online installations

* add library existence tests

* verbose

* fix sets

* CPU and PME are not built in GPU variants; do not test for those

* quote?

* fix windows checks

* add macos opencl

* disable opencl tests on macos (but build anyway)

* add docs

* cd into build for docs!

* install then cd

* pin sphinxcontrib-bibtex

* we need tex in the system

* split docs into a separate job

* simplify retrying

* simplify retrying 2

* do install

* fix tlmgr installation

* more tex packages

* one more

* one more

* add textcomp to docs

* usepackage[utf8]{inputenc}

* switch to xelatex?

* add xetex

* more fonts

* do not use xindy

* tables can't contain blocks and use tabularcolumns at the same time

https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html?highlight=tabular#directive-tabularcolumns

* build libs in docs too

* update docs deps; bring in pdfs

* kill server after 404 checks

* chage 404 checker

* explicit locations needed

* cumulative exit codes

* override set -e

* update README badges

* add ppc / arm

* missing vbar

* not it

* one too many extensions

* do not test gromacs

* manage workspace

* source conda.sh

* add python version to matrix vars

* source first thing

* disable unbound checks

* add compilers

* some more cuda stuff

* add CPU only ppc64le

* link through stubs

* One more way to obtain HOST_USER_ID?

* let cmake find cf's opencl

* Try with GCC7

* add timeouts for docker based runs

* add several attempts for stochastic failures

* add tests with conda forge compilers

* do not parallelize pytest in docker runs

* exclude some known slow tests

* enable ccache

* forgot conda shell

* No need for macos sdk retries

* \  -> ^

* fix timestampt windows

* export env vars for current step too

* unneeded quotes windows?

* disable compression on windows?

* add ccache in docker too

* group commands

* fix syntax error

* fix version spec

* Increase timeout in Docker runs

* heh, it's double colon

* fix cache timestamp in windows

* escape % with %%

* ccache in docs too

* don't use wrapper package in windows; call vcvarsall directly

* More docker variants

* Handle ccache env vars in yaml

* Re-enable parallel pytest in Docker runs

* Delete unwanted azure ymls that I didn't end up using

* add some comments

* Update badge URL

* is that path messing with windows ccache?

* add CI-README

* Reduce CI matrix

* increase timeouts

* Add GCC7 on PPC QEmu again (temporarily, just for debugging)

* add docker instructions for local debugging

* fix start_docker_locally

* skip some url checks in docs

* Use new package name

* update link
2021-02-10 09:26:54 -08:00
Peter Eastman
e53bdc5eab Top level Python module is now "openmm" (#3000)
* Top level Python module is now "openmm"

* Updated module names in examples

* Updated module names in documentation

* Updated module in CI scripts

* Added deprecation warning
2021-02-01 09:40:37 -08:00
Jason Swails
b8a42c41bc Execute directly 2019-08-30 11:24:30 -04:00
Jason Swails
a2ab823f0c Tweak the build pipeline and scripts 2019-08-30 11:23:54 -04:00
Jason Swails
ca3b526c8a Update docker configurations 2019-08-29 16:21:00 -04:00
Jason Swails
af953fadc5 Try to fix all builds in docker containers. 2019-06-10 14:30:45 -04:00
Jason Swails
a150d570dc Enable docker for GPU builds
I finally got nvidia-docker2 installed and actually working on my Gentoo
machine (I had to disable their restriction of using GPU devices to
users in the 'video' group, since the nvidia container runtime hook
didn't run as a user with those privileges, and I can't figure out what
user it was running as).

The other GPU-enabled node I added to the Jenkins array runs Ubuntu, and
that one already has nvidia-docker2 installed and running correctly on
it.
2019-03-05 01:45:03 -05:00
Jason Swails
6aeccb40c7 Use Jenkinsfile to drive the pipeline job (#2198)
* Add a Jenkinsfile to drive a pipeline

* Also tweaks the installation script for Jenkins to be more amenable to
running other variants in parallel
* Restrict packaging script to only accept Python 2.7, since I think
that's long been the minimum supported Python version
* Allow run-ctest.py to run tests in parallel (and take advantage of
that in the Jenkins tests).

* CUDA -> CUDA_VERSION

* Jenkins will automatically post result back to GitHub.

Not need to have a separate step do that explicitly.

* Run as a login shell.

* Force looking for CUDA node.

* Make sure we load conda module.

* Start building in a docker slave -- much nicer!

* Try to fix up the installation a little.

* Fix more build issues.

* More build debugging.

* Oops -- recursive :-o

* Put opencl lib in library path

* Try 9.2

* Fix library path

* More updates to Jenkins build recipes.

* Try a new (simpler?) approach with building

* Oops -- fix Jenkinsfile syntax.

* Test CPU and Reference together.

* Avoid stashing -- not necessary really.

* Print env (Debug).

* try a new way to get env vars set up.

* More test shuffling.

* Load conda module.

* Fix docker build and test script.

* Fix up install.

* More tweaks to the build.

* Do python tests in Docker container

* Separate CUDA and OpenCL platforms and install make in the docker
container

* reorder arguments to ctest so the retesting only does the failed tests (and can't get overwritten by anything else)

* Add LD_LIBRARY_PATH to find OpenMM libs (it should be found :(...)

* Trying this...

* Seems that some stuff runs inside docker and some doesn't??

* Move all execution to a shell script for the dockerfile install

* Add fixes for Python 3.7

* Revert "Add fixes for Python 3.7"

This reverts commit ef826edbba.

* Python 3.7 turned StopIteration into RuntimeError, as per PEP 479.

A quick-fix for the PDBx library is to catch both StopIteration *and*
RuntimeError to preserve the old behavior.

* Make sure we clean first.

* More thorough cleaning

* Stop trying to do it in a container. >:o

* Consolidate, and go back to docker.

This is irritating.

* Add some debugging commands and temporarily stop testing GPU platforms.

* Oops :-[]

* whoami doesn't work in the docker container :(

* Stop trying to find libdl

* Need to install cython.

* whoami fails -- try id instead.

* Clean up install script now that I have the basics working

Also restrict CPU runs to nodes with the "docker" label.  This allows
exclusion from nodes where docker isn't creating a suitable environment
(most likely due to irritating permission issues).
2018-11-28 09:37:09 -08:00
peastman
1ddce75039 Install Cython on CI 2018-10-08 13:03:17 -07:00
Jason Swails
ec4344c799 Use g++ instead of clang and fix PythonInstall
clang is tested everywhere else, and it's not as routinely up-to-date on
my Jenkins machine.

PythonInstall failed on Linux machines where the build/install
directories had paths with spaces in them.
2018-04-04 23:32:23 -04:00
Jason Swails
0447a9b54b Test both CUDA 8 and CUDA 9 (and have it work concurrently). 2017-11-12 16:07:53 -05:00
Jason Swails
d51772947c Let tests run on Jenkins for longer
Let tests run up to 2 hours and have a 5 minute timeout for individual tests.
2017-02-28 15:59:07 -05:00
Jason Swails
f1de425f61 Set OPENMM_CUDA_COMPILER 2017-02-27 23:44:26 -05:00
Jason Swails
236fb79b51 Few small fixes 2017-02-27 23:31:35 -05:00
Jason Swails
78ccbbe972 Build in the src directory 2017-02-27 22:54:12 -05:00
Jason Swails
088f9ebf4b Make sure directories exist
And protect against possible spaces in directories
2017-02-27 22:44:01 -05:00
Jason Swails
0e544e660a Clean up conda environment 2017-02-27 22:41:20 -05:00
Jason Swails
cc03b10c0f Typo 2017-02-27 22:39:08 -05:00
Jason Swails
2316083e1e First pass at a Jenkins install script 2017-02-27 22:30:28 -05:00
Robert McGibbon
6c5e9bdfb0 Remove unused CI stuff 2015-08-04 17:36:18 -07:00
Robert McGibbon
173f7b1080 Push docs to S3 2014-09-22 16:51:35 -07:00
Peter Eastman
24d0b3b359 Renamed tools to devtools 2014-07-21 15:04:22 -07:00