Skip to content

Commit

Permalink
Bump to verson 0.5.1
Browse files Browse the repository at this point in the history
- allow renaming of key-value arguments in Python API
- actually install files for QCSchema support
  • Loading branch information
awvwgk committed Jan 23, 2022
1 parent ecacc44 commit 448b92b
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 9 deletions.
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(
"s-dftd3"
LANGUAGES "Fortran"
VERSION "0.5.0"
VERSION "0.5.1"
DESCRIPTION "Simple reimplementation of the DFT-D3 dispersion model"
)

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 = "s-dftd3"
version = "0.5.0"
version = "0.5.1"
license = "LGPL-3.0-or-later"
maintainer = ["@awvwgk"]
author = ["Sebastian Ehlert"]
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(
's-dftd3',
'fortran',
version: '0.5.0',
version: '0.5.1',
license: 'LGPL-3.0-or-later',
meson_version: '>=0.55',
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 @@ -98,7 +98,7 @@ Now you are ready to use ``dftd3``, check if you can import it with
>>> import dftd3
>>> from dftd3.libdftd3 import get_api_version
>>> get_api_version()
'0.5.0'
'0.5.1'
Building the extension module
Expand Down
2 changes: 1 addition & 1 deletion python/dftd3/__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__ = "0.5.0"
__version__ = "0.5.1"
17 changes: 17 additions & 0 deletions python/dftd3/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ class RationalDampingParam(DampingParam):
"""

def __init__(self, **kwargs):
_rename_kwargs(kwargs, "alpha6", "alp")
DampingParam.__init__(self, **kwargs)

@staticmethod
Expand Down Expand Up @@ -247,6 +248,9 @@ class ZeroDampingParam(DampingParam):
"""

def __init__(self, **kwargs):
_rename_kwargs(kwargs, "sr6", "rs6")
_rename_kwargs(kwargs, "sr8", "rs8")
_rename_kwargs(kwargs, "alpha6", "alp")
DampingParam.__init__(self, **kwargs)

@staticmethod
Expand Down Expand Up @@ -281,6 +285,7 @@ class ModifiedRationalDampingParam(DampingParam):
"""

def __init__(self, **kwargs):
_rename_kwargs(kwargs, "alpha6", "alp")
DampingParam.__init__(self, **kwargs)

@staticmethod
Expand Down Expand Up @@ -315,6 +320,10 @@ class ModifiedZeroDampingParam(DampingParam):
"""

def __init__(self, **kwargs):
_rename_kwargs(kwargs, "sr6", "rs6")
_rename_kwargs(kwargs, "sr8", "rs8")
_rename_kwargs(kwargs, "alpha6", "alp")
_rename_kwargs(kwargs, "beta", "bet")
DampingParam.__init__(self, **kwargs)

@staticmethod
Expand Down Expand Up @@ -350,6 +359,8 @@ class OptimizedPowerDampingParam(DampingParam):
"""

def __init__(self, **kwargs):
_rename_kwargs(kwargs, "alpha6", "alp")
_rename_kwargs(kwargs, "beta", "bet")
DampingParam.__init__(self, **kwargs)

@staticmethod
Expand Down Expand Up @@ -464,3 +475,9 @@ def _ref(ctype, value):
ref = library.ffi.new(ctype + "*")
ref[0] = value
return ref


def _rename_kwargs(kwargs, old_name, new_name):
if old_name in kwargs and new_name not in kwargs:
kwargs[new_name] = kwargs[old_name]
del kwargs[old_name]
2 changes: 2 additions & 0 deletions python/dftd3/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ if install
'library.py',
'interface.py',
'parameters.py',
'qcschema.py',
'test_library.py',
'test_interface.py',
'test_parameters.py',
'test_qcschema.py',
subdir: 'dftd3',
)
endif
3 changes: 2 additions & 1 deletion python/dftd3/test_qcschema.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,9 @@ def test_gradient_tpss_d3zero():
},
keywords={
"params_tweaks": {
"rs6": 1.166,
"sr6": 1.166,
"s8": 1.105,
"alpha6": 14.0,
},
"level_hint": "d3zero",
},
Expand Down
2 changes: 1 addition & 1 deletion python/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = dftd3-python
version = 0.5.0
version = 0.5.1
desciption = Python API of the DFT-D3 project
long_desciption = file: README.rst
long_description_content_type = text/x-rst
Expand Down
4 changes: 2 additions & 2 deletions src/dftd3/version.f90
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ module dftd3_version


!> String representation of the s-dftd3 version
character(len=*), parameter :: dftd3_version_string = "0.5.0"
character(len=*), parameter :: dftd3_version_string = "0.5.1"

!> Numeric representation of the s-dftd3 version
integer, parameter :: dftd3_version_compact(3) = [0, 5, 0]
integer, parameter :: dftd3_version_compact(3) = [0, 5, 1]


contains
Expand Down

0 comments on commit 448b92b

Please sign in to comment.