This PR adds support for the NVE bounce back integrator in the slit pore geometry that will be added to HOOMD 2.7 (https://github.com/glotzerlab/hoomd-blue/issues/440). As such, it shouldn't be merged until that is released, and we will also need to start testing that version of hoomd in CI.
To try to start guaranteeing compatibility with different HOOMD APIs (#10), this PR also implements an experimental decorator interface. The idea is that on the python side, we will decorate classes with things like
@api.require('2.7.0')
class slit_pore(...):
which will do an automatic check against the tagged version of HOOMD, and raise an error if the minimum is not met. On the C++ side, we can do conditional compilation. There are preprocessor defines for HOOMD_VERSION_MAJOR and HOOMD_VERSION_MINOR. I propose letting the azplugins headers define their own API keys that mimic the python command naming as needed:
For now, I did this in the header, but we could also create some sort of api.h that lets us define all of these in one place. The only potential issue with this is when *.cc and *.h files should be completely skipped (and not installed), which is a CMake issue.
The decorator api needs testing and I might change some things as I try using this in production, but opening this now anyway.
This integrator has been implemented in HOOMD, so this PR is no longer needed. However, I want to save the API decorator for future, so I will pull that code out into a separate branch before closing and deleting.
This PR adds support for the NVE bounce back integrator in the slit pore geometry that will be added to HOOMD 2.7 (https://github.com/glotzerlab/hoomd-blue/issues/440). As such, it shouldn't be merged until that is released, and we will also need to start testing that version of hoomd in CI.
To try to start guaranteeing compatibility with different HOOMD APIs (#10), this PR also implements an experimental decorator interface. The idea is that on the python side, we will decorate classes with things like
which will do an automatic check against the tagged version of HOOMD, and raise an error if the minimum is not met. On the C++ side, we can do conditional compilation. There are preprocessor defines for
HOOMD_VERSION_MAJOR
andHOOMD_VERSION_MINOR
. I propose letting the azplugins headers define their own API keys that mimic the python command naming as needed:For now, I did this in the header, but we could also create some sort of
api.h
that lets us define all of these in one place. The only potential issue with this is when*.cc
and*.h
files should be completely skipped (and not installed), which is a CMake issue.The decorator api needs testing and I might change some things as I try using this in production, but opening this now anyway.