Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions source/gmx/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
message(
DEPRECATION
"The GROMACS plugin is deprecated and will be removed in a future version. "
"See https://arxiv.org/abs/2602.02234 for a third-party alternative.")
Comment on lines +1 to +4
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description says the deprecation warning appears when the GROMACS plugin is enabled, but this message(DEPRECATION ...) will fire whenever source/gmx is configured. In source/CMakeLists.txt the gmx/ subdirectory is added unconditionally for non-Python C++ builds (around lines 565–567), so this warning will show up even for builds that don’t intend to use GROMACS. Consider adding an explicit CMake option to enable/disable the GROMACS plugin and only emitting the deprecation warning when that option is ON (and/or only adding the subdirectory when enabled).

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +4
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using message(DEPRECATION ...) can hard-fail configuration for users/CI that set CMAKE_ERROR_DEPRECATED=ON. If the goal is to warn while still allowing builds during the deprecation window, consider either emitting a message(WARNING ...) instead, or conditionally downgrading to WARNING when CMAKE_ERROR_DEPRECATED is enabled so downstreams don’t get an unexpected configure error.

Suggested change
message(
DEPRECATION
"The GROMACS plugin is deprecated and will be removed in a future version. "
"See https://arxiv.org/abs/2602.02234 for a third-party alternative.")
if(CMAKE_ERROR_DEPRECATED)
message(
WARNING
"The GROMACS plugin is deprecated and will be removed in a future version. "
"See https://arxiv.org/abs/2602.02234 for a third-party alternative.")
else()
message(
DEPRECATION
"The GROMACS plugin is deprecated and will be removed in a future version. "
"See https://arxiv.org/abs/2602.02234 for a third-party alternative.")
endif()

Copilot uses AI. Check for mistakes.
message(STATUS "Build GROMACS plugin")

file(GLOB PATCH_VERSIONS patches/*)
Expand Down
2 changes: 2 additions & 0 deletions source/gmx/dp_gmx_patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash
echo "WARNING: The GROMACS patch in deepmd-kit is deprecated and will be removed in a future version." >&2
echo "WARNING: See https://arxiv.org/abs/2602.02234 for a third-party alternative." >&2
DEEPMD_PATCH_SCRIPT_DIR=$(dirname $(readlink -f "$0"))
DEEPMD_PATCH_ROOT=${DEEPMD_PATCH_SCRIPT_DIR}/../share/deepmd_gromacs_patches
VERSION="NULL"
Expand Down
Loading