dftd3 / simple-dftd3

reimplementation of the DFT-D3 program
https://dftd3.readthedocs.io
GNU Lesser General Public License v3.0
48 stars 20 forks source link

Add parameters for B97-3c #26

Closed hebrewsnabla closed 2 years ago

hebrewsnabla commented 2 years ago

The parameters are taken from doi: 10.1063/1.5012601. To verify my implementation, I compare the results of s-dftd3 and ORCA, with a molecule N 0.0 0.0 0.0; N 0.0 0.0 1.1; N 0.0 0.0 3.0; N 0.0 0.0 4.1

s-dftd3 --bj b973c --atm test.xyz gives

Rational (Becke-Johnson) damping: b973c-D3(BJ)-ATM
---------------------
  s6         1.0000
  s8         1.5000
  s9         1.0000
  a1         0.3700
  a2         4.1000
 alp        14.0000
--------------------

Dispersion energy:      -4.4671172794224E-03 Eh

while ORCA 5.0.3 gives


                              DFTD3 V3.1  Rev 1
                          USING Becke-Johnson damping
-------------------------------------------------------------------------------
The B97-3c composite method is recognized
Using three-body term ABC
Active option DFTDOPT                   ...         4

molecular C6(AA) [au] = 344.619512

            DFT-D V3
 parameters
 s6 scaling factor         :     1.0000
 a1 scaling factor         :     0.3700
 s8 scaling factor         :     1.5000
 a2 scaling factor         :     4.1000
 Damping factor alpha9(ATM):    16.0000
 ad hoc parameters k1-k3   :    16.0000     1.3333    -4.0000

 Edisp/kcal,au: -2.803158856868  -0.004467117508
 E6   /kcal   :  -1.422026801
 E8   /kcal   :  -1.380992171
 E6(ABC)      :  -0.000139885
 % E8         :  49.265569348
 % E6(ABC)    :   0.004990275

-------------------------   ----------------
Dispersion correction           -0.004467118

The D3 energies agree well but it seems ORCA adopt a different ATM parameter. Is that a known discrepancy?

codecov[bot] commented 2 years ago

Codecov Report

Merging #26 (3132a1d) into main (84ba953) will increase coverage by 0.03%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #26      +/-   ##
==========================================
+ Coverage   50.32%   50.35%   +0.03%     
==========================================
  Files          34       34              
  Lines        3750     3753       +3     
  Branches     1595     1595              
==========================================
+ Hits         1887     1890       +3     
  Misses       1192     1192              
  Partials      671      671              
Impacted Files Coverage Δ
test/unit/test_param.f90 48.41% <ø> (ø)
src/dftd3/param.f90 94.04% <100.00%> (+0.04%) :arrow_up:

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

awvwgk commented 2 years ago

Would be great if you could add a test case for the B97-3c parameters in https://github.com/dftd3/simple-dftd3/blob/main/test/unit/test_param.f90.

hebrewsnabla commented 2 years ago

Added. Since B97-3c is defined to be used with D3(BJ)-ATM, I only add one test for it.

awvwgk commented 2 years ago

Added. Since B97-3c is defined to be used with D3(BJ)-ATM, I only add one test for it.

Which parametrization is mostly used in practice doesn't matter much, features provided by a library will get used at some point. If the code path is available (e.g. B97-3c with D3(0)) it should be tested.