glotzerlab / hoomd-blue

Molecular dynamics and Monte Carlo soft matter simulation on GPUs.
http://glotzerlab.engin.umich.edu/hoomd-blue
BSD 3-Clause "New" or "Revised" License
324 stars 127 forks source link

External potentials in HPMC. #1811

Closed joaander closed 1 month ago

joaander commented 1 month ago

Description

Motivation and context

Replace CPPExternalPotential.

How has this been tested?

Added unit tests.

Change log

Added:

* ``hoomd.hpmc.external.External`` provides an abstract interface to external potentials
  (`#1811 <https://github.com/glotzerlab/hoomd-blue/pull/1811>`__).
* ``hoomd.hpmc.external.Linear`` computes linear potential as a function of the distance from a point to a plane
  (`#1811 <https://github.com/glotzerlab/hoomd-blue/pull/1811>`__).
* ``HPMCIntegrator.external_potentials`` sets the list of external potentials applied to the system
  (`#1811 <https://github.com/glotzerlab/hoomd-blue/pull/1811>`__).

Deprecated:

* ``HPMCIntegrator.external_potential`` - use ``HPMCIntegrator.external_potentials``
  (`#1811 <https://github.com/glotzerlab/hoomd-blue/pull/1811>`__).
* ``hoomd.hpmc.external.user.CPPExternalPotential`` - use ``hoomd.hpmc.external.Linear`` or write a custom component in C++
  (`#1811 <https://github.com/glotzerlab/hoomd-blue/pull/1811>`__).

Checklist: