This supports IMD on Windows. It is unilaterally defined when compiling for Windows platforms (I don't know whether that is valid), and only used on them. That means that GMX_IMD is always true.
Its existence doesn't serve any current purpose, though perhaps it would serve one if Windows platforms would not have sockets. It complicates the setup of IMD sessions.
Instead, GMX_IMD should become a cmake variable (so a user can turn it off on any platform that doesn't have socket support) and we should more clearly express what the current code always does (ie. compile with socket support).
Reform IMD module
Remove GMX_HAVE_WINSOCK which was synonymous with Windows
support. Because that is somewhat risky, introduced CMake variable to
turn off IMD support. Reduced a lot of config.h dependency in
headers. Moved portability constructs to imdsocket source file.
Expanded testing coverage to be of both a minimizer and a dynamical
integrator. Switched the test case to be one that has some
interactions (because steep segfaults otherwise), and updated the mdp
settings to continue to work given the likely future directions of
Removed an unused method
Moved the ownership of the IMD session data structure out of inputrec
and its point of construction out of minimizers and do_md. This is now
done in runner.cpp, alongside other such construction. This prepares
for more use of MDModules. Set up the default period between IMD steps
in a different but equivalent way (since it works differently for
Separated the inputrec boolean for whether IMD connections are
supported by the input from the run-time boolean of whether the mdrun
command-line arguments require IMD connections to be possible. Now the
inputrec is logically const with IMD.
Used logging framework for reporting, and noted future improvements as
TOD items. Improved reporting in some cases where IMD sessions are
Note TODOs for future improvements for renaming and restructuring.
Removed some useless inclusion of imd.h