Task #3027

Task #2045: API design and language bindings

Feature #2896: Python packaging

Move sample_restraint development from GitHub to Gerrit

Added by Eric Irrgang about 2 months ago. Updated 7 days ago.

In Progress
build system
Target version:


Sample MD extension code is provided to demonstrate gmxapi and to bootstrap new extension projects.

For GROMACS 2020 and beyond, the maintenance of the sample code is being moved from to the main GROMACS repository.

An external repository will likely be provided as either a skeleton, Cookie Cutter project, or simple subtree to help new users get started, but that will have to come a little bit later. will be the basis for the new subtree in the GROMACS repository, but several commits are required to migrate maintenance of the code.

  • Copy source code, but exclude extraneous test data and bundled source code from external projects. Forking projects will need to have these, but they don't need to be in the GROMACS repo.
  • Generically solve the availability of pybind11 for both
    - building and testing within a GROMACS build tree, and
    - building a standalone project
  • Generically solve the availability of googletest for both
    - building and testing within a GROMACS build tree, and
    - building a standalone project
  • Make minimal updates to the existing source code to build and test a project to establish a baseline for future development.

Explicitly deferred to separate issues:

  • Improve the sample code.
  • Update the GROMACS MD extension library interface.
  • Update the generated user interfaces to the targeted gmxapi 0.1+ conventions.
  • Full end-to-end testing in Jenkins.

Related issues

Related to GROMACS - Feature #3038: Improvements to MD plugin development environmentNew
Related to GROMACS - Task #3033: Clean up and modernize googletest bundling and usageIn Progress

Associated revisions

Revision c6d213ae (diff)
Added by Eric Irrgang about 1 month ago

Incorporate sample_restraint repository.

This commit transfers development of the sample MD plug-in
code from an external repository to the GROMACS repository.
It should not be considered to add or change functionality,
but serves as a base for future integrated development.

The sample_restraint subtree serves as the root of a
template repository that a researcher could start from
to develop gmxapi MD extension code. It is meant to be
self-contained and built against an existing GROMACS
installation. Moving it to a GROMACS repo subdirectory
makes it less accessible to extension developers, but
easier to test and maintain for GROMACS developers. Near
term follow-up should include the creation of an external
skeleton repository, downstream subtree repository, or
"cookie cutter" repository drawing core content from the
GROMACS subtree.

Refs #3027

Change-Id: I1033a4a74dbce1bf1f9220a31cc9c15055c5dbaf

Revision 3538b349 (diff)
Added by Eric Irrgang about 1 month ago

Don't install sample restraint package by default.

When building the sample_restraint project as part of a GROMACS build,
do not installed the myplugin Python package as part of the `install`
target. This is almost undoubtedly not what the user intended.

However, the package is still built when GMX_PYTHON_PACKAGE=ON to help
catch errors and facilitate testing by developers or automated systems
(i.e. Jenkins).

Refs #3027

Change-Id: I934fcc9f8f6f3f749435c5a85a904006e48d1d81

Revision 93673139 (diff)
Added by Eric Irrgang 30 days ago

Begin new sample_restraint development.

  • Update the sample MD plugin project for its new home in the GROMACS
      source tree and the gmxapi Python package that is now part of the
      GROMACS distribution (as opposed to gmxapi 0.0.7 hosted at
  • Update googletest infrastructure to use CMake 3.9 utilities.
  • Download googletest and pybind sources during docker CI build.
  • Download binary test data from GitHub.

Future updates are necessary both for using the subtree in Jenkins
builds (to avoid downloading or using redundant copies of dependencies)
and for using the subtree as a starting point for an external project
(in which case the external dependencies should be bundled).

Also, requires Change-Id: I44a66646eceb191a2ec755169671af326f22526a to
pass all CI tests.

Refs #3027

Change-Id: I4dd699168d6bc8e84e7de4d3b5b7b1cd6bd21090

Revision 40102f52 (diff)
Added by Eric Irrgang 30 days ago

Remove one of the examples from sample_restraint.

Remove the old simple harmonic spring potential. It is not useful and
presents a maintenance headache as we modify the plugin interfaces.
Take this opportunity to clarify or simplify some naming.

Refs #3027

Change-Id: Ic0c59b0f2b9391beac48f64cabba8dbf05f0cd63

Revision 298f4798 (diff)
Added by Eric Irrgang 10 days ago

Improve sample_restraint project integration.

Build for testing as part of a gmxapi enabled GROMACS build. Fix some
errors and collisions.

  • Use distinct CMake options for using bundled pybind sources in
    gmxapi Python package and sample_restraint package.
  • Distinguish between "umbrella" build and standalone build when
    trying to determine googletest source for sample_restraint.
  • Avoid a couple of warnings about unused variables.
  • Use GTest::Main target more consistently for sample_restraint tests.

Refs #2056
Refs #3027
Refs #3033

Change-Id: I55d20e6228779ecc726587231c83298356192f6f


#1 Updated by Eric Irrgang about 1 month ago

  • Description updated (diff)

#2 Updated by Eric Irrgang about 1 month ago

  • Related to Feature #3038: Improvements to MD plugin development environment added

#3 Updated by Eric Irrgang about 1 month ago

  • Related to Task #3033: Clean up and modernize googletest bundling and usage added

#4 Updated by Mark Abraham 13 days ago

@Eric is there more work remaining here? Does the target make sense, rather than 2020-beta1?

#5 Updated by Eric Irrgang 9 days ago

  • Description updated (diff)
  • Status changed from New to In Progress

The main remaining aspect of this issue is to figure out how the sample code will be (re)packaged for easy forking. We likely need a skeleton repository with a CookieCutter configuration and some git submodules / subtrees, plus automated documentation build and testing. In the mean time, people can copy the current subtree and either use the CMake facilities to download google test and pybind or add these to the new project.

#6 Updated by Mark Abraham 7 days ago

  • Target version changed from 2020-infrastructure-stable to 2020-beta1

Also available in: Atom PDF