Skip to content

Commit 4f66a49

Browse files
authored
Merge pull request #312 from Lumi-supercomputer/DFTD4_25.03
Dftd4 25.03
2 parents 357c789 + 258cc2d commit 4f66a49

File tree

2 files changed

+124
-0
lines changed

2 files changed

+124
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
easyblock = 'MesonNinja'
2+
3+
name = 'DFTD4'
4+
version = '3.7.0'
5+
6+
homepage= 'https://github.com/dftd4/dftd4'
7+
8+
whatis = [
9+
'Description: DFTD4: Generally Applicable Atomic-Charge Dependent London Dispersion Correction'
10+
]
11+
12+
description = """
13+
Generally Applicable Atomic-Charge Dependent London Dispersion Correction.
14+
15+
Citation
16+
========
17+
The authors of the package ask to always cite the following papers:
18+
19+
Eike Caldeweyher, Christoph Bannwarth and Stefan Grimme, J. Chem. Phys., 2017,
20+
147, 034112. DOI: 10.1063/1.4993215
21+
22+
Eike Caldeweyher, Sebastian Ehlert, Andreas Hansen, Hagen Neugebauer, Sebastian
23+
Spicher, Christoph Bannwarth and Stefan Grimme, J. Chem Phys, 2019, 150, 154122.
24+
DOI: 10.1063/1.5090222 chemrxiv: 10.26434/chemrxiv.7430216
25+
26+
Eike Caldeweyher, Jan-Michael Mewes, Sebastian Ehlert and Stefan Grimme, Phys. Chem.
27+
Chem. Phys., 2020, 22, 8499-8512. DOI: 10.1039/D0CP00502A
28+
chemrxiv: 10.26434/chemrxiv.10299428
29+
30+
License
31+
=======
32+
This project is free software: you can redistribute it and/or modify it under the
33+
terms of the Lesser GNU General Public License as published by the Free Software
34+
Foundation, either version 3 of the License, or (at your option) any later version.
35+
36+
37+
"""
38+
39+
toolchain = {'name': 'cpeGNU', 'version': '25.03'}
40+
41+
source_urls = ['https://github.com/dftd4/dftd4/releases/download/v3.7.0/']
42+
sources = ['dftd4-3.7.0.tar.xz']
43+
checksums = ['4e8749df6852bf863d5d1831780a2d30e9ac4afcfebbbfe5f6a6a73d06d6c6ee']
44+
45+
builddependencies = [('buildtools-python', '%(toolchain_version)s', '-systemPython', True),('buildtools', '%(toolchain_version)s', '', True)]
46+
47+
patches = ['DFTD4-3.7.0.patch']
48+
49+
preconfigopts = 'export FC=ftn && export CC=cc &&'
50+
# Add API v2 for VASP compatibility
51+
configopts = '-Dlapack=custom -Dapi_v2=true'
52+
53+
sanity_check_paths = {
54+
'files' : ['bin/dftd4','lib/libdftd4.a','include/dftd4.h'],
55+
'dirs' : ['bin','lib64','include']
56+
}
57+
58+
sanity_check_commands = ["dftd4 --version"]
59+
60+
moduleclass = 'chem'
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
diff -ruN dftd4-3.7.0.orig/config/meson.build dftd4-3.7.0/config/meson.build
2+
--- dftd4-3.7.0.orig/config/meson.build 2024-08-29 16:35:42.000000000 +0300
3+
+++ dftd4-3.7.0/config/meson.build 2025-08-14 14:38:22.000000000 +0300
4+
@@ -108,16 +108,18 @@
5+
elif lapack_vendor == 'custom'
6+
custom_deps = []
7+
libs = get_option('custom_libraries')
8+
- if libs[0].startswith('-L')
9+
- foreach lib: libs
10+
- if lib != libs[0]
11+
- custom_deps += fc.find_library(lib, dirs: libs[0].substring(2))
12+
- endif
13+
- endforeach
14+
- else
15+
- foreach lib: libs
16+
- custom_deps += fc.find_library(lib)
17+
- endforeach
18+
+ if libs.length() > 0
19+
+ if libs[0].startswith('-L')
20+
+ foreach lib: libs
21+
+ if lib != libs[0]
22+
+ custom_deps += fc.find_library(lib, dirs: libs[0].substring(2))
23+
+ endif
24+
+ endforeach
25+
+ else
26+
+ foreach lib: libs
27+
+ custom_deps += fc.find_library(lib)
28+
+ endforeach
29+
+ endif
30+
endif
31+
if (not fc.links('external dsytrs; call dsytrs(); end', dependencies: [custom_deps,omp_dep]))
32+
error('Custom LAPACK libraries do not link')
33+
diff -ruN dftd4-3.7.0.orig/subprojects/multicharge/config/meson.build dftd4-3.7.0/subprojects/multicharge/config/meson.build
34+
--- dftd4-3.7.0.orig/subprojects/multicharge/config/meson.build 2024-08-29 16:25:54.000000000 +0300
35+
+++ dftd4-3.7.0/subprojects/multicharge/config/meson.build 2025-08-14 14:56:53.000000000 +0300
36+
@@ -107,16 +107,18 @@
37+
elif lapack_vendor == 'custom'
38+
custom_deps = []
39+
libs = get_option('custom_libraries')
40+
- if libs[0].startswith('-L')
41+
- foreach lib: libs
42+
- if lib != libs[0]
43+
- custom_deps += fc.find_library(lib, dirs: libs[0].substring(2))
44+
- endif
45+
- endforeach
46+
- else
47+
- foreach lib: libs
48+
- custom_deps += fc.find_library(lib)
49+
- endforeach
50+
+ if libs.length() > 0
51+
+ if libs[0].startswith('-L')
52+
+ foreach lib: libs
53+
+ if lib != libs[0]
54+
+ custom_deps += fc.find_library(lib, dirs: libs[0].substring(2))
55+
+ endif
56+
+ endforeach
57+
+ else
58+
+ foreach lib: libs
59+
+ custom_deps += fc.find_library(lib)
60+
+ endforeach
61+
+ endif
62+
endif
63+
if (not fc.links('external dsytrs; call dsytrs(); end', dependencies: [custom_deps,omp_dep]))
64+
error('Custom LAPACK libraries do not link')

0 commit comments

Comments
 (0)