Skip to content

Commit

Permalink
Add Colvars module version 2023-07-21
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomofiorin committed Aug 5, 2023
1 parent 37a4324 commit ef8ca01
Show file tree
Hide file tree
Showing 119 changed files with 49,920 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
matrix:
config:
- {
name: "Windows 2019 MSVC", artifact: "Windows-MSVC.7z",
name: "Windows Latest MSVC", artifact: "Windows-MSVC.7z",
os: windows-2019,
cc: "cl", cxx: "cl",
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat",
Expand All @@ -30,8 +30,8 @@ jobs:
gpu_var: "Off"
}
- {
name: "macOS Latest gcc with OpenCL", artifact: "macOS-gcc-OpenCL.7z",
os: macos-latest,
name: "macOS 11 gcc with OpenCL", artifact: "macOS-gcc-OpenCL.7z",
os: macos-11, # Don't upgrade to macOS 12, see Issue #4646
cc: "gcc-10", cxx: "g++-10",
gpu_var: "OpenCL"

Expand Down
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,9 @@ include(gmxManageTNG)

include(gmxManageLmfit)

include(gmxManageColvars)
include(gmxManageLepton)

# The earliest version of the CUDA toolkit that supports c++14 is 9.0
set(REQUIRED_CUDA_VERSION 9.0)
set(REQUIRED_CUDA_COMPUTE_CAPABILITY 3.0)
Expand Down
17 changes: 17 additions & 0 deletions cmake/gmxManageColvars.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This file is part of the Collective Variables module (Colvars).
# The original version of Colvars and its updates are located at:
# https://github.com/Colvars/colvars
# Please update all Colvars source files before making any changes.
# If you wish to distribute your changes, please submit them to the
# Colvars repository at GitHub.

function(gmx_manage_colvars)
file(GLOB COLVARS_SOURCES ${PROJECT_SOURCE_DIR}/src/external/colvars/*.cpp)
add_library(colvars OBJECT ${COLVARS_SOURCES})
# Colvars requires a correct definition of __cplusplus, which MSVC doesn't give by default
target_compile_options(colvars PRIVATE $<$<CXX_COMPILER_ID:MSVC>:/Zc:__cplusplus>)
endfunction()

function(gmx_include_colvars_headers)
target_include_directories(libgromacs PRIVATE ${PROJECT_SOURCE_DIR}/src/external/colvars)
endfunction()
22 changes: 22 additions & 0 deletions cmake/gmxManageLepton.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This file is part of the Collective Variables module (Colvars).
# The original version of Colvars and its updates are located at:
# https://github.com/Colvars/colvars
# Please update all Colvars source files before making any changes.
# If you wish to distribute your changes, please submit them to the
# Colvars repository at GitHub.

function(gmx_manage_lepton)

# Add Lepton library, which is developed and distributed as part of OpenMM:
# https://github.com/openmm/openmm

file(GLOB LEPTON_SOURCES ${PROJECT_SOURCE_DIR}/src/external/lepton/src/*.cpp)
add_library(lepton OBJECT ${LEPTON_SOURCES})

target_include_directories(lepton PRIVATE ${PROJECT_SOURCE_DIR}/src/external/lepton/include)
target_compile_options(lepton PRIVATE -DLEPTON_BUILDING_STATIC_LIBRARY)

# Set flags so that Colvars can leverage Lepton functionality
target_include_directories(colvars PRIVATE ${PROJECT_SOURCE_DIR}/src/external/lepton/include)
target_compile_options(colvars PRIVATE -DLEPTON -DLEPTON_USE_STATIC_LIBRARIES)
endfunction()
2 changes: 1 addition & 1 deletion cmake/gmxVersionInfo.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ set(REGRESSIONTEST_MD5SUM "ff0a01050c3c8fd77806b7c70b423fc3" CACHE INTERNAL "MD5
# If you are distributing a patch to GROMACS, then this change would
# be great as part of your patch. Otherwise for personal use, you can
# also just set a CMake cache variable.
set(GMX_VERSION_STRING_OF_FORK "" CACHE INTERNAL
set(GMX_VERSION_STRING_OF_FORK "Colvars-2023-07-21" CACHE INTERNAL
"Version string for forks of GROMACS to set to describe themselves")
mark_as_advanced(GMX_VERSION_STRING_OF_FORK)
if (GMX_VERSION_STRING_OF_FORK)
Expand Down
Loading

0 comments on commit ef8ca01

Please sign in to comment.