278 Commits

Author SHA1 Message Date
Peter Eastman
c6f9fab280 More barostats support scaling particles independently (#5278)
* More barostats support scaling particles independently

* Documentation update

* MonteCarloMembraneBarostat can scale particles independently
2026-05-26 07:37:26 -07:00
Peter Eastman
58749d9d84 Try to get docs build working (#5282)
* Try to get docs build working

* Update changed link

* Try switching a URL to https
2026-05-07 18:02:55 -07:00
Peter Eastman
aa8ec1a8e9 SimulatedTempering uses ExpandedEnsembleSampler (#5281) 2026-05-07 11:30:27 -07:00
Peter Eastman
b55e60882d Update installation instructions (#5227) 2026-03-12 10:38:09 -07:00
Peter Eastman
a157923823 Improved documentation on CMMotionRemover (#5219) 2026-02-24 09:14:45 -08:00
Yulian Manchev
bc6fe72928 Update patch documentation (#5208)
* Update patch documentation

Clarified the definition and purpose of patches.

* Fix typo in RemoveExternalBond tag description

* Update wording in patches

* A few edits to the description of patches

---------

Co-authored-by: Peter Eastman <peter.eastman@gmail.com>
2026-02-16 10:36:16 -08:00
Peter Eastman
834b1294a9 Residue templates can specify constraints (#5197)
* Residue templates can specify constraints

* Patched template generation preserves constraints
2026-02-09 13:29:40 -08:00
Peter Eastman
8eeee16de9 Templates can match whole molecules (#5181)
* Templates can match whole molecules

* addExtraParticles() supports molecule templates

* Documentation on molecule templates

* Bug fix
2026-01-30 11:16:39 -08:00
Evan Pretti
adfd84c273 Add LCPO method (#5130)
* Basic LCPO support

* Add basic test for LCPO from a prmtop file

* API for LCPOForce

* Started LCPO reference implementation

* Finished reference forces & test cases

* Use other test for finite difference since grid might have discontinuous forces

* Reference platform formatting

* Initial implementation of CPU platform

* Bugfixes

* More vectorization and improve neighbor list query speed

* Parallelize part of neighbor search

* Check box size for LCPO with periodic boundary conditions

* Fixes for updating parameters in context

* GBSAOBCForce doesn't use first & last indices for updates, so no need for this optimization here

* Changes to neighbor checking and optimization

* Fixes and minor changes

* Add global surface tension parameter

* Only process half of the pairs in the neighbor list

* Remove unnecessary checks

* Initial version of common platform implementation

* Asynchronously download neighbor list size

* Debugging

* Do pair precomputation in copyPairsToNeighborList

* Recompute interactions instead of scanning neighbor list in inner loop

* Condense position array before computations

* Also make neighbor count download asynchronous on device

* Fixes for kernel launching

* Topology-based LCPO parameter assignment

* Fixes, and use test system for LCPO with nucleic acids

* Always raise instead of warn when LCPO parameters can't be assigned

* Use Amber convention for phosphates
2025-12-11 13:28:36 -08:00
Evan Pretti
103b64b3c2 Remove ff19ipq (#5143) 2025-11-18 12:33:55 -08:00
Peter Eastman
2fbed59258 Created PythonForce (#5122)
* Initial implementation of PythonForce

* Continuing implementation of PythonForce

* Tests for PythonForce

* Fix memory leaks

* Documentation for PythonForce

* Fixed incorrect return type

* Fix compilation error on Python older than 3.12

* Handle all dtypes

* Optimizations to PythonForce

* Optimized getPositions()

* Test all platforms

* Fix test failures
2025-11-12 09:14:19 -08:00
Peter Eastman
2b20ffbabc Document installing HIP 7 package (#5107) 2025-10-16 15:42:17 -07:00
Peter Eastman
85e0efb6f4 Documentation updates for 8.4 (#5101) 2025-10-14 11:35:00 -07:00
Evan Pretti
3076825e19 Update logo, styles and font in documentation (#5090) 2025-09-25 08:59:23 -07:00
João Morado
939e0af545 Reader of Tinker files (#4769)
* Add basic version of TinkerFiles

* Refactor TinkerFiles

* Update docstring, type hints, and fix bug when setting box vectors

* Small fixes

* Add unit tests for the TinkerFiles class

* Fixes and updates to TinkerFiles

* Add simuteTinker example

* Update Modeller to work with AMOEBA force fields

* Small fixes

* Relax type hinting

* Fix indices in modeller

* Fix modeller indices

* Fix type hints and usage of Quantity

* Remove numpy protector

* Add reader of .seq files

* Add topology parsing of some protein residues, waters, ions, and generic molecules.

* Miscellaneous improvements

* Update amino acids and nucleotides list

* Various fixes to XML writing, and separate XML writing into a new class

* Comments/warnings

* Add nucleic topological definitions

* Improved handling of peptide residues

* Fix for CYX (disulfide bonds)

* Refactor the topology creation methods

* General improvements, and add support for nucleic-like residues

* No need to handle MP, DP, TP

* Minor improvements

* General refactoring, add automatic determination of topology

* Add TinkerAtomType dataclass, and remove references to biotypes as they are not needed

* Re-add missing parsing of forces and scalars

* Updates to createSystem()

* Add AMOEBA forces

* Add angle-related forces to createSystem

* Add placeholders for missing forces

* Beginning of support for AmoebaMultipoleForce

* Finished support for AmoebaMultipoleForce

* Support for AmoebaVdwForce

* TinkerFiles supports vdw

* Misc updates, and add AmoebaTorsionTorsion, AmoebaWcaDispersion, and AmoebaGeneralizedKirkwood

* Remove XML writer

* Fixes

* Fix wrong indentation in _findBitorsions

* Remove pdb debugging

* Documentation and fixes

* Remove files

* Revert checks in AmoebaVdwForceBuilder and ## @private  markers

* Remove duplicated static methods _getChiralAtomIndex

* Fix GK force

* Fix WcaDispersion force

* Fix WcaDisp

* Fixes and updates

* Cleanup and removing duplicated code

* Bug fixes

* A few more unit conversions

* Minor cleanup

* Misc fixes and updates

* Fix Add AmoebaStretchBendForce

* Simplify force builders

* Update ForceField

* Fix AmoebaPiTorsionForce

* Only add AmoebaWcaDispersionForce if using implicitSolvent

* Simplify amoebaforces

* Stretch torsion and angle torsion

* Misc. fixes

* Improve tests

* Fix cap group identification

* Add/improve tests

* Remove whitespaces from residue names

* Improve tests

* Consistent use of atomClasses list

* Fix match condition in AmoebaOutOfPlaneBendForceBuilder

* Fix AmoebaStretchBendForce

* Final fix for AmoebaStretchBendForce

* Fix AmoebaAngleForce

* Small fixes and improvements

* Update assertion tolerances

* Simplify torsion-torsion force creation

* Small fixes in the tests

* Review comments, type hints, docs for tinkerfiles.py

* Only use standard PDB for AA

* Type hint and docs for amoebaforces

* Reduce tolerances for failing tests

* Fixed error with ZOnly axis type when x particle is not specified

---------

Co-authored-by: peastman <peastman@stanford.edu>
2025-09-18 18:00:59 -07:00
Evan Pretti
0a5be952ce Update constant potential entry in user guide (#5073)
* Add note about polarizable force fields with constant potential

* Add notes about CG preconditioner
2025-09-17 09:48:12 -07:00
Evan Pretti
16efb71b6e Add Lipid21 and update documentation (#5066) 2025-09-16 09:47:27 -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
d8798cb3db Updated documentation on adding solvent (#5060) 2025-09-02 13:04:44 -07:00
Peter Eastman
54fa65ed0d Created OrientationRestraintForce (#5048)
* Created OrientationRestraintForce

* Python API

* Documentation

* Serialization

* GPU implementation of OrientationRestraintForce

* Bug fix

* Remove unused code
2025-08-26 11:44:32 -07:00
Peter Eastman
1b6236a8cc Radius of gyration force (#5031)
* Reference implementation of RGForce

* GPU implementation of RGForce

* Serialization

* Documentation

* Fix compilation error

* Fixed error building API docs
2025-08-14 08:26:25 -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
Emilio Gallicchio
3645e1eeb7 Variable distance-based displacements for ATMForce (#4776)
* Variable displacements based on particle positions

* set variable displacements when adding particles

* update documentation

* address compilation error in OpenMMFortranWrapper

* update python API tests

* fix stray 'and'

* addParticle() without arguments add a particle that is not displaced

* pack displacement particles into int4

* put back default displacement removed in error

* ATMForce interface with coordinate transformation objects

* revise variable displacement API

* documentation, formatting, serialization

* Fixed C and Fortran wrappers

* Fixed Python wrappers

* Fixed factory

* Sort files to ensure classes are listed in the correct order

* Converted APIUnits test to new ATMForce API

* write class name

* skip the documentation for forward declarations

* undo 9e91d0b since it does not fix the doc build

* remove temporary doc files for nested classes

* Clean away tabs

---------

Co-authored-by: Peter Eastman <peastman@stanford.edu>
2025-08-12 12:22:58 -07:00
Peter Eastman
4a956a72fa Convert C++ types to Python types in API docs (#5036)
* Convert C++ types to Python types in API docs

* Translate some more types

* Convert return types that are STL containers
2025-08-12 12:09:57 -07:00
Peter Eastman
2af004b652 Adaptive quantum thermal bath (#4995)
* Began implementing QTBIntegrator

* Adaptation and deconvolution

* Continuing reference implementation

* Continuing to implement QTBIntegrator

* Use common thread pool

* More tests, documentation, and threading

* Fix segfault

* Serialize adapted friction when creating a State

* Beginning of GPU implementation

* Added missing files

* Bug fixes

* Fixed inverse FFT

* Continuing GPU implementation

* Checkpointing

* Bug fixes

* Test cases run faster

* Changes needed for latest main branch

* Minor optimizations

* Documentation

* Fixed atom reordering

* Added parahydrogen test case

* Workaround for bug in Microsoft's compiler

* Added a Python test

* Normalize kernel in deconvolution

* Minor documentation improvements
2025-08-11 08:03:06 -07:00
Evan Pretti
3bbd3bb990 License and links update 2025-08-05 11:55:16 -07:00
Evan Pretti
ae57f2f78b Update documentation copyright strings 2025-08-05 11:19:19 -07:00
Evan Pretti
3e33b09e7f Move example files and update README files 2025-08-04 16:52:44 -07:00
Evan Pretti
346d3ce324 Tentative new structure for examples directory 2025-07-29 15:11:57 -07:00
Peter Eastman
bb3073d4f3 Virtual site for symmetric molecules (#4185)
* Reference implementation of SymmetrySite

* Common implementation of SymmetrySite

* Removed duplicated code

* Serialization for SymmetrySite

* Fixed compilation error building C wrapper

* Added SymmetrySite to user guide

* Bug fix

* Added P21 test case
2025-07-23 16:25:28 -07:00
Peter Eastman
6c119bc233 Update a URL in the docs (#5005) 2025-07-09 10:26:30 -07:00
Evan Pretti
166c596371 Update documentation 2025-07-02 10:07:16 -07:00
Joe Greener
643473cee9 Fix typo in CustomAngleForce docs (#4969) 2025-06-17 21:39:47 -07:00
Evan Pretti
94e0853a1a Copy water models from Amber14 to Amber 19 and update paths 2025-05-05 10:10:31 -07:00
Evan Pretti
a4f8921d2d Add amber19-all, update documentation and tests 2025-05-02 15:24:34 -07:00
Evan Pretti
e49baa76f1 Add description of updated force fields to documentation 2025-05-01 13:51:19 -07:00
Peter Eastman
baf7942c74 Created CustomVolumeForce (#4902)
* Created CustomVolumeForce

* Serialization for CustomVolumeForce

* Documentation for CustomVolumeForce

* Code simplification

* Removed unused code
2025-04-28 11:43:40 -07:00
Peter Eastman
bce0c133e0 Added computeCurrentPressure() to MonteCarloBarostat (#4881)
* Added computeCurrentPressure() to MonteCarloBarostat

* Use instantaneous temperature to compute pressure

* Added computeCurrentPressure() to MonteCarloAnisotropicBarostat

* Added computeCurrentPressure() to MonteCarloMembraneBarostat

* Fixed compilation error

* Fixed error in typemap

* Added documentation on computing pressure

* Fixed CUDA compilation errors

* Made test case more robust

* Made a test case more robust

* Added computeCurrentPressure() to MonteCarloFlexibleBarostat

* Fixed compilation error

* More documentation on computing pressure
2025-04-28 11:42:43 -07:00
Peter Eastman
de180e4e94 DPDIntegrator (#4799)
* Created DPDIntegrator class

* Reference implementation of DPDIntegrator

* Build neighbor list for DPDIntegrator

* Minor fixes

* Documentation for DPDIntegrator

* Python API for DPDIntegrator

* Preliminary OpenCL implementation of DPDIntegrator

* Enable USE_PERIODIC

* Use updated positions in DPD thermostat

* Working on neighbor list for OpenCL DPDIntegrator

* ReorderListener for particle types

* Serialization for DPDIntegrator

* CUDA implementation of DPDIntegrator

* HIP implementation of DPDIntegrator

* Fixed compile error in Python wrapper

* Fixed compile error in wrappers

* Fixed uninitialized memory in reference neighbor list

* Added DPDIntegrator to C++ API docs

* Fixed incorrect launch size

* Fixed nan in DPD random number generator

* Minor optimizations

* Improved load balancing

* Fixed an indexing error

* Neighbor list uses the maximum cutoff of any force

* Fixed HIP compilation error

* Fixed access to invalid memory

* Added test case for diffusion coefficient

* Try to debug segfaults on CI

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Possible fix

* Debugging

* Debugging

* Debugging

* Use correct block size on CPU OpenCL

* Workaround for bug in Intel's OpenCL for CPUs

* Removed an unnecessary define

* Removed debugging code

* Include Dart

* More Intel workarounds

* Workaround for error in NVIDIA OpenCL
2025-04-14 08:44:16 -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
7bdf028c94 Examples use DCDReporter instead of PDBReporter (#4838) 2025-03-10 13:23:21 -07:00
Peter Eastman
e1d679aa65 Document installing with pip (#4708) 2024-10-30 17:14:59 -07:00
Peter Eastman
f5fc52ffd7 Updated installation instructions (#4693) 2024-10-16 14:47:57 -07:00
Will Poole
0fc91b7742 updated units in energy minimisation user guide (#4683)
* updated units in energy minimisation user guide

* Made units more readable
2024-10-04 10:23:41 -07:00
Marc Schuh
693756ba9b Increase describeNextReport readability and allow requesting more values (#4671)
* added type checking for Simulation.step()

* changed how to check if step is an integer number

* allow for dicts to be returned from Reporter.describeNextReport
remove deprecated getState parameters ( #4437 )

* convert old format into new format

* update docstring

* nested set comprehension to set.union

* Allow 'periodic':None
update describeNextReport in all occurrences in the code

* debug

* update documentation

* add a reporter for energyParameterDerivative

* Revert "add a reporter for energyParameterDerivative"

This reverts commit 1d44dc3f60.

* Edit documentation
2024-10-02 10:39:26 -07:00
Peter Eastman
f48eb17ba3 Added documentation on HIP (#4672)
* Added documentation on HIP

* Instructions for building HIP on Windows
2024-09-26 17:26:01 -07:00
Anton Gorenko
28fb291862 Fix docs, comments, remove non-existing types from swigInputConfig.py 2024-09-05 21:23:15 +05:00
Anton Gorenko
f717ed8963 Use VkFFT in HipFFT3D, remove hipFFT and the builtin FFT
* VkFFT-based 3D FFT;
* Caching of compiled VkFFT kernels;
* Extend FFT tests with more sizes.
2024-09-05 21:23:15 +05:00
Peter Eastman
8defca2d65 Update reference for citing OpenMM (#4628) 2024-08-23 10:55:55 -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