143 Commits

Author SHA1 Message Date
Christian Clauss
82703dff73 Fix typos discovered by codespell in Python files (#5173) 2025-12-30 12:21:00 -08:00
Peter Eastman
b1a5324c88 Use native ARM Linux runner (#5123) 2025-11-03 10:01:57 -08:00
João Morado
eaf56f96bc Update AMOEBA XML, .prm files, and parsing of Tinker files (#5086)
* Correct AmoebaAngleTorsion in test_Amoeba18Nucleic of TestForceField

* Update processTinkerForceField to handle latest .prm Tinker files

* Update amoeba2018 XML files

* Update amoeba2013 XML files

* Update amoeba2009 XML files

* Adapt addTorTor to new format in the .prm files

* Fix TorsionTorsion

* Also update the total energy in test_Amoeba18Nucleic

* Update amoebabio18.prm

* Fix nucleic acid test energies

* Correct AmoebaAngleTorsionForce params

* Add new addTorTor to TinkerFiles

* Revert unit fix

* Change to .pdb file which Tinker likes

* Update test_Amoeba18BPTI

* Remove trailing zeros from XML files

* Leave trailing zeros only on 2018 ff

* New element names in 2018

* More digits for surfaceAreaFactor

* More digits for surfaceAreaFactor

* More digits

* Remove debugging print

* Add support to 2009 and 2013 AMOEBA ffs to processTinkerForceField.py

* Add FF specific residues XML files

* Delete old residuesFinal.xml

* Update AMOEBA XML ffs

* Update FFs

* Fix some formatting issues

* Fix "." in scientific notation

* Remove old assertions
2025-10-14 12:55:21 -07: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
Mike Henry
58ee361f8d update hosted env to use newer openmm-torch version (#3868)
* update to use newer openmm-torch version

* openmm8 rc1 envs

* forgot to bump nnpops
2023-01-31 11:13:43 -08: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
Mike Henry
02ee93259b Update hosted envs (#3818)
* add guide for dev builds

* hosted env file for openmm-8 beta

* explain how to host an env

* add a namespace to support different os

* pin all the versions

* add version pins and env name

* Added pytest

* update envs
2022-10-30 08:37:03 -07:00
Mike Henry
4888591109 Feat/add host envs (#3808)
* add guide for dev builds

* hosted env file for openmm-8 beta

* explain how to host an env

* add a namespace to support different os

* pin all the versions

* add version pins and env name

* Added pytest
2022-10-17 10:37:18 -07:00
Mike Henry
ffc3ee7886 Add Hosted Environment Instructions. (#3780)
* add guide for dev builds

* hosted env file for openmm-8 beta

* explain how to host an env

* add a namespace to support different os
2022-09-20 13:58:21 -07: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
Peter Eastman
2f20fbe2ad Fixed error using AMOEBA 2018 with RNA (#3313) 2021-11-04 20:41:04 -07:00
Peter Eastman
edee11b601 Fix errors with AMOEBA 2018 (#3311) 2021-11-02 18:33:47 -07:00
Peter Eastman
06767dde49 Added AMOEBA 2018 force field (#3299)
* Adding support for new AMOEBA features

* Support modern method of specifying in-plane angles

* Implemented stretch-torsions

* Implemented angle-torsions

* More AMOEBA fixes

* Bug fix

* Converted AMOEBA 2018 force field

* Added documentation for AMOEBA 2018

* Added a missing file for tests
2021-10-26 09:20:13 -07: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
d8ef57fed6 add docs for conda-forge empty commit retriggers (#3099) 2021-05-03 08:55:00 -07:00
Jaime Rodríguez-Guerra
f3720f62e9 add docs for conda forge releases (#3091)
* add docs for conda forge releases

* adapt to openmm git_url
2021-04-14 09:05:22 -07:00
Peter Eastman
6d4abc5420 Use command line compiler if it is explicitly specified (#3018)
* Use command line compiler if it is explicitly specified

* Don't set OPENMM_CUDA_COMPILER on Jenkins
2021-02-11 08:19:26 -08: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
3aa4bb8c5d Code cleanup (#3014) 2021-02-08 17:40:45 -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
326402ef4a Add arguments needed by the new CUDA agents 2020-07-23 22:09:38 -04:00
Rasmus Wriedt Larsen
c87b96fbd4 Minor Python tweaks (#2616)
* Use list-comprehension in Python code

A minor change, but slighly easier to understand the initialization of
`parent_exclude_list` in my opinion.

* Implement __ne__ in Python classes that has __eq__

In Python 3, `__ne__` is automatically implemented as `not __eq__`.

However, in Python 2 it seems to be implemented as `not is` (so based on object
identity).

Based on setup.py [0] which says that "OpenMM requires Python 2.7 or better", it
should be useful to have better support for Python 2 :)

This was already done in 4 of the 12 classes that implements `__eq__`

```
>>> class WildCard(object):
...     def __eq__(self, other): return True

>>> w = WildCard()

>>> w == 42
True

>>> w != 42
True

>>> w != w
False
```

[0]: 5cef29ce8d/wrappers/python/setup.py (L237)

* Use umambiguous floor division for index calculations in Python

This makes the code work as intended if run as Python 3

```
$ python2 -c 'print(3/2, 3//2)'
(1, 1)
$ python3 -c 'print(3/2, 3//2)'
1.5 1
```

* Use `with` for file handling in Python

* Use `is None` instead of `== None` in Python

This is recommended in PEP8:

> Comparisons to singletons like None should always be done with is or is not, never the equality operators.
> - https://www.python.org/dev/peps/pep-0008/#programming-recommendations
2020-03-29 09:32:07 -07:00
Jason Swails
808441b71e Use a CPU-only docker image for the CPU stages 2019-09-04 21:09:10 -04:00
Jason Swails
f88ec88e8e Add back Python tests in CPU test cases 2019-09-04 15:50:43 -04:00
Jason Swails
21e0ab7d64 Oops -- make sure we also test OpenCL and CPU/Reference platforms 2019-09-04 13:49:39 -04: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
d0ff650ae7 Do not hog an executor when it's not necessary 2019-08-29 16:25:01 -04:00
Jason Swails
ca3b526c8a Update docker configurations 2019-08-29 16:21:00 -04:00
Jason Swails
c82a8dcaed Merge branch 'master' into feature/cuda-docker 2019-08-27 19:57:36 -04:00
Andreas Krämer
b0dacea009 Changed forcefield to not use dispersion corrections for CHARMM 2019-08-08 19:45:24 -04:00
Jason Swails
beb589ada1 Merge branch 'master' of github.com:/pandegroup/openmm into feature/cuda-docker 2019-07-21 14:10:17 -04:00