@@ -171,6 +171,8 @@ class Cp2k(MakefilePackage, CMakePackage, CudaPackage, ROCmPackage):
171171 when = "@2025.2: build_system=cmake" ,
172172 )
173173
174+ variant ("vdwxc" , default = False , description = "Enable VDW support in SIRIUS." , when = "+sirius" )
175+
174176 variant ("deepmd" , default = False , description = "Enable DeepMD-kit support" )
175177 conflicts ("+deepmd" , msg = "DeepMD-kit is not yet available in Spack" )
176178
@@ -223,6 +225,7 @@ class Cp2k(MakefilePackage, CMakePackage, CudaPackage, ROCmPackage):
223225 depends_on ("greenx" , when = "+greenx" )
224226 depends_on ("hdf5+hl+fortran" , when = "+hdf5" )
225227 depends_on ("trexio" , when = "+trexio" )
228+ depends_on ("libvdwxc" , when = "+vdwxc" )
226229
227230 # Force openmp propagation on some providers of blas / fftw-api
228231 with when ("+openmp" ):
@@ -344,6 +347,8 @@ class Cp2k(MakefilePackage, CMakePackage, CudaPackage, ROCmPackage):
344347 depends_on ("sirius@7.5:" , when = "@2024.1:" )
345348 depends_on ("sirius@7.6:7.7 +pugixml" , when = "@2024.2:" )
346349 depends_on ("sirius@7.7: +pugixml" , when = "@2025.2:" )
350+ depends_on ("sirius+vdwxc" , when = "+vdwxc" )
351+
347352 with when ("+libvori" ):
348353 depends_on ("libvori@201219:" , when = "@8.1" )
349354 depends_on ("libvori@210412:" , when = "@8.2:" )
@@ -1090,6 +1095,7 @@ def cmake_args(self):
10901095 self .define_from_variant ("CP2K_USE_DEEPMD" , "deepmd" ),
10911096 self .define_from_variant ("CP2K_USE_TREXIO" , "trexio" ),
10921097 self .define_from_variant ("CP2K_USE_GREENX" , "greenx" ),
1098+ self .define_from_variant ("CP2K_USE_LIBVDWXC" , "vdwxc" ),
10931099 ]
10941100
10951101 if spec .satisfies ("^[virtuals=fftw-api] fftw+openmp" ):
0 commit comments