Skip to content

Commit 15ab6cc

Browse files
HaoZekeLuthaf
andcommitted
chore(cmake): rework for older versions and clean
Co-authored-by: Guillaume Fraux <[email protected]>
1 parent 82c786d commit 15ab6cc

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed

cmake/gmxManageMetatomic.cmake

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,6 @@ option(GMX_METATOMIC "Enable interface to metatomic atomistic models" OFF)
3939
# endif()
4040

4141
if(GMX_METATOMIC)
42-
# Taken near verbatim from LAMMPS
43-
# https://github.com/metatensor/lammps/blob/metatomic/cmake/Modules/Packages/ML-METATOMIC.cmake
44-
if (BUILD_OMP AND APPLE)
45-
message(FATAL_ERROR
46-
"Can not enable both BUILD_OMP and PGK_ML-METATOMIC on Apple systems, "
47-
"since this results in two different versions of the OpenMP library (one "
48-
"from the system and one from Torch) being linked to the final "
49-
"executable, which then crashes"
50-
)
51-
endif()
52-
5342
# Bring the `torch` target in scope to allow evaluation
5443
# of cmake generator expression from `metatensor_torch`
5544
find_package(Torch REQUIRED)
@@ -69,19 +58,19 @@ if(GMX_METATOMIC)
6958
set(VESIN_GIT_TAG "87dcad999fec47b29ab21be9662ef283edc7530b")
7059

7160
set(DOWNLOAD_VESIN_DEFAULT ON)
72-
find_package(vesin QUIET ${VESIN_VERSION})
61+
find_package(vesin ${VESIN_VERSION} QUIET)
7362
if (vesin_FOUND)
7463
set(DOWNLOAD_VESIN_DEFAULT OFF)
7564
endif()
7665

7766
set(DOWNLOAD_METATENSOR_DEFAULT ON)
78-
find_package(metatensor_torch QUIET ${METATENSOR_TORCH_VERSION})
67+
find_package(metatensor_torch ${METATENSOR_TORCH_VERSION} QUIET)
7968
if (metatensor_torch_FOUND)
8069
set(DOWNLOAD_METATENSOR_DEFAULT OFF)
8170
endif()
8271

8372
set(DOWNLOAD_METATOMIC_DEFAULT ON)
84-
find_package(metatomic_torch QUIET ${METATOMIC_TORCH_VERSION})
73+
find_package(metatomic_torch ${METATOMIC_TORCH_VERSION} QUIET)
8574
if (metatomic_torch_FOUND)
8675
set(DOWNLOAD_METATOMIC_DEFAULT OFF)
8776
endif()

src/gromacs/applied_forces/metatomic/metatomic_topologypreprocessor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ void MetatomicTopologyPreprocessor::preprocess(gmx_mtop_t* mtop, const MDLogger&
6363

6464
GMX_LOG(logger.info)
6565
.appendTextFormatted(
66-
"Number of embedded MTA atoms: %td\nNumber of regular atoms: %td\n",
66+
"Number of embedded metatomic atoms: %td\nNumber of regular atoms: %td\n",
6767
gmx::ssize(mtaIndices_),
6868
mtop->natoms - gmx::ssize(mtaIndices_));
6969

0 commit comments

Comments
 (0)