mphowardlab / azplugins

A HOOMD-blue component for soft matter simulations.
BSD 3-Clause "New" or "Revised" License
21 stars 13 forks source link

Support HOOMD 2.6.0 #9

Closed mphoward closed 5 years ago

mphoward commented 5 years ago

HOOMD 2.6.0 introduces confined MPCD streaming geometries, which leads to symbol collisions with BoundaryCondition.h and SlitGeometry.h. (These objects were copied from that implementation while it was being developed, and actually reside in the mpcd namespace.)

There are three options to fix this:

  1. Easiest: bump the minimum version of HOOMD for azplugins to be 2.6.0 and always require an MPCD build. Then, remove BoundaryConditions.h and SlitGeometry.h from azplugins and use the mpcd headers from HOOMD.
  2. Harder: change the namespace in BoundaryConditions.h and SlitGeometry.h to be azplugins rather than mpcd. This should avoid the naming collision in the binary, but you might need to also change the python export name (prepend "AZP" or something).
  3. Hardest: keep the files as is, and conditionally include / compile them depending on the version of HOOMD that azplugins has been built against. At the python level, this means conditionally importing as well.

Option 1 is probably the most straightforward approach for now since azplugins does not promise backward compatibility with any given version of HOOMD (the minimum is stated in the release notes).

The reason to require an MPCD build now is that the SlitGeometry is used in the BounceBackNVE integrator, which is intended to be run with things like DPD, regular LJ particles, etc., and without the mpcd component of HOOMD, these will be missing. We should add an error like this to CMake for BUILD_MPCD:

https://github.com/mphoward/azplugins/blob/582513a0e36d8e5541290312268bdf4a1b524335/azplugins/CMakeLists.txt#L15-L17

That way, the conditional compilation of the MPCD component could possibly be enabled again at a later time.

mphoward commented 5 years ago

The new test container has been built. As expected, builds fail for the develop branch when the python module is imported due to naming clashes. So, I merged it into this one, and tests are running now. py3-internal-nompcd should be the only failure for this build, and I will disable it after we confirm this working.

Update: it already failed with the appropriate CMake error, disabling now. Feel free to open a PR for this when you are ready.

mphoward commented 5 years ago

Resolved by #12