Skip to content
Merged
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: 2 additions & 2 deletions .github/workflows/fortran-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ jobs:
--no-rebuild
--num-processes 1
--suite dftd4
-t 2
-t 10
env:
OMP_NUM_THREADS: 1,2,1
BUILD_DIR: ${{ env.BUILD_DIR }}
Expand All @@ -313,7 +313,7 @@ jobs:
--no-rebuild
--num-processes 1
--suite dftd4
-t 2
-t 10
--benchmark
env:
BUILD_DIR: ${{ env.BUILD_DIR }}
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ cmake_minimum_required(VERSION 3.14)
project(
"dftd4"
LANGUAGES "Fortran"
VERSION "4.1.0"
VERSION "4.1.1"
DESCRIPTION "Generally Applicable Atomic-Charge Dependent London Dispersion Correction"
)

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,13 +338,13 @@ pkg-config --modversion dftd4

If your ``dftd4`` installation is not findable, you have to update your environment variables.
One option is to provide a module file for your ``dftd4`` installation.
The example module file below can be placed in your ``MODULEPATH`` to provide access to an installation in ``~/opt/dftd4/4.1.0``.
The example module file below can be placed in your ``MODULEPATH`` to provide access to an installation in ``~/opt/dftd4/4.1.1``.
Retry the above comment after loading the ``dftd4`` module and adjust the module file until ``pkg-config`` finds your installation.

```lua
-- dftd4/4.1.0.lua
-- dftd4/4.1.1.lua
local name = "dftd4"
local version = "4.1.0"
local version = "4.1.1"
local prefix = pathJoin(os.getenv("HOME"), "opt", name, version)
local libdir = "lib" -- or lib64

Expand Down
6 changes: 3 additions & 3 deletions doc/recipe/vasp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ After you completed the installation of ``dftd4``, make sure it is findable by `

If your ``dftd4`` installation is not findable, you have to update your environment variables.
One option is to provide a module file for your ``dftd4`` installation.
The example module file below can be placed in your ``MODULEPATH`` to provide access to an installation in ``~/opt/dftd4/4.1.0``.
The example module file below can be placed in your ``MODULEPATH`` to provide access to an installation in ``~/opt/dftd4/4.1.1``.
Retry the above comment after loading the ``dftd4`` module and adjust the module file until ``pkg-config`` finds your installation.

.. code-block:: lua

-- dftd4/4.1.0.lua
-- dftd4/4.1.1.lua
local name = "dftd4"
local version = "4.1.0"
local version = "4.1.1"
local prefix = pathJoin(os.getenv("HOME"), "opt", name, version)
local libdir = "lib" -- or lib64

Expand Down
2 changes: 1 addition & 1 deletion fpm.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = "dftd4"
version = "4.1.0"
version = "4.1.1"
license = "LGPL-3.0-or-later"
maintainer = ["@awvwgk"]
author = ["Eike Caldeweyher", "Sebastian Ehlert", "Stefan Grimme"]
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
project(
'dftd4',
'fortran',
version: '4.1.0',
version: '4.1.1',
license: 'LGPL-3.0-or-later',
meson_version: '>=0.55,!=1.8.0',
default_options: [
Expand Down
2 changes: 1 addition & 1 deletion python/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ Now you are ready to use ``dftd4``, check if you can import it with
>>> import dftd4
>>> from dftd4.libdftd4 import get_api_version
>>> get_api_version()
'4.1.0'
'4.1.1'


Building the extension module
Expand Down
2 changes: 1 addition & 1 deletion python/dftd4/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
# make sure we have a CFFI available
import cffi

__version__ = "4.1.0"
__version__ = "4.1.1"
2 changes: 1 addition & 1 deletion python/dftd4/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
-------
>>> from dftd4.library import get_api_version
>>> get_api_version()
'4.1.0'
'4.1.1'
"""

import functools
Expand Down
4 changes: 2 additions & 2 deletions python/ffibuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@
raise ModuleNotFoundError(
"Unable to find pkg-config package 'dftd4'"
)
if pkgconfig.installed(library, "< 3.0"):
if pkgconfig.installed(library, "< 4.0"):
raise RuntimeError(
"Installed 'dftd4' version is too old, 3.0 or newer is required"
"Installed 'dftd4' version is too old, 4.0 or newer is required"
)

kwargs = pkgconfig.parse(library)
Expand Down
2 changes: 1 addition & 1 deletion python/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
project(
'dftd4',
'c',
version: '4.1.0',
version: '4.1.1',
license: 'LGPL-3.0-or-later',
meson_version: '>=0.55,!=1.8.0',
default_options: [
Expand Down
3 changes: 2 additions & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ build-backend = "mesonpy"

[project]
name = "dftd4"
version = "4.1.0"
version = "4.1.1"
description = "Python API of the DFT-D4 project"
readme = "README.rst"
license.text = "LGPL-3.0-or-later"
Expand All @@ -25,6 +25,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Scientific/Engineering :: Chemistry",
"Topic :: Scientific/Engineering :: Physics",
]
Expand Down
9 changes: 6 additions & 3 deletions src/dftd4/damping/atm.f90
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,12 @@ subroutine get_atm_dispersion_derivs(mol, trans, cutoff, s9, a1, a2, alp, r4r2,
energy_local(jat) = energy_local(jat) - dE_third
energy_local(kat) = energy_local(kat) - dE_third

gradient_local(:, iat) = gradient_local(:, iat) - dGij - dGik
gradient_local(:, jat) = gradient_local(:, jat) + dGij - dGjk
gradient_local(:, kat) = gradient_local(:, kat) + dGik + dGjk
gradient_local(:, iat) = gradient_local(:, iat) &
& - (dGij + dGik) * triple
gradient_local(:, jat) = gradient_local(:, jat) &
& + (dGij - dGjk) * triple
gradient_local(:, kat) = gradient_local(:, kat) &
& + (dGik + dGjk) * triple

dS(:, :) = spread(dGij, 1, 3) * spread(vij, 2, 3)&
& + spread(dGik, 1, 3) * spread(vik, 2, 3)&
Expand Down
4 changes: 2 additions & 2 deletions src/dftd4/version.f90
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ module dftd4_version


!> String representation of the dftd4 version
character(len=*), parameter :: dftd4_version_string = "4.1.0"
character(len=*), parameter :: dftd4_version_string = "4.1.1"

!> Numeric representation of the dftd4 version
integer, parameter :: dftd4_version_compact(3) = [4, 1, 0]
integer, parameter :: dftd4_version_compact(3) = [4, 1, 1]


contains
Expand Down
37 changes: 37 additions & 0 deletions test/unit/test_periodic.f90
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ subroutine collect_periodic(testsuite)
& new_unittest("BLYP-D4", test_blypd4_adaman), &
& new_unittest("BLYP-D4S", test_blypd4s_adaman), &
& new_unittest("TPSS-D4", test_tpssd4_ammonia), &
& new_unittest("TPSS-D4+ATM", test_tpssd4atm_ammonia), &
& new_unittest("TPSS-D4S", test_tpssd4s_ammonia), &
& new_unittest("TPSS-D4S+ATM", test_tpssd4satm_ammonia), &
& new_unittest("SCAN-D4", test_scand4_anthracene), &
& new_unittest("SCAN-D4S", test_scand4s_anthracene) &
& ]
Expand Down Expand Up @@ -285,6 +287,41 @@ subroutine test_tpssd4s_ammonia(error)
end subroutine test_tpssd4s_ammonia


subroutine test_tpssd4atm_ammonia(error)

!> Error handling
type(error_type), allocatable, intent(out) :: error

type(structure_type) :: mol
type(d4_model) :: d4
type(rational_damping_param) :: param = rational_damping_param(&
& s6 = 1.0_wp, s9 = 1.0_wp, alp = 16.0_wp, &
& s8 = 1.76596355_wp, a1 = 0.42822303_wp, a2 = 4.54257102_wp )

call get_structure(mol, "X23", "ammonia")
call new_d4_model(error, d4, mol)
call test_numgrad(error, mol, d4, param)

end subroutine test_tpssd4atm_ammonia

subroutine test_tpssd4satm_ammonia(error)

!> Error handling
type(error_type), allocatable, intent(out) :: error

type(structure_type) :: mol
type(d4s_model) :: d4s
type(rational_damping_param) :: param = rational_damping_param(&
& s6 = 1.0_wp, s9 = 1.0_wp, alp = 16.0_wp, &
& s8 = 1.76596355_wp, a1 = 0.42822303_wp, a2 = 4.54257102_wp )

call get_structure(mol, "X23", "ammonia")
call new_d4s_model(error, d4s, mol)
call test_numgrad(error, mol, d4s, param)

end subroutine test_tpssd4satm_ammonia


subroutine test_scand4_anthracene(error)

!> Error handling
Expand Down
Loading