This thread is locked.Only browsing is available.
Top Page > Browsing
(Maybe) fixing Vdw-d3(bj)
Date: 2019/09/22 01:24
Name: Jhon W. Gonzalez

Dear colleagues,

Even using patch 3.8.5 the vdw-d3(bj) correction results in an indefinite vdW term (Uvdw=NaN).

Doing some reverse engineering, it seems that the problem is that the variable W is always less than 1.0e-12, which causes that C6 and C8 are always 0.0 and finally fdamp that is proportional to sqrt(C8/C6) becomes indeterminate, causing NaN.

By modifying the following lines in Total_energy.c
//if (W>1.0e-12){
C6 = Z/W;
C8 = 3.0*C6*r2r4ab_dftD[wanA][wanB];
C6 = 0.0;
C8 = 0.0;
} */

For the vdw-d3(bj) correction UvdW I get values that seem to be correct, being slightly lower than with the vdw-d2 correction.
The layer-layer distances for the vdw-d3(bj) correction in a bilayer system are slightly higher, with differences of less than 10% compared to the vdw-d2 case.

Being aware that the error could be elsewhere.
I hope that this post help to identify the problem.


Jhon W.

Page: [1]

Re: (Maybe) fixing Vdw-d3(bj) ( No.1 )
Date: 2019/10/06 09:43
Name: Kylin  <>

Dear Gonzalez,

I think I ever meet the similar problem for the simulation of UiO-66 crystal. The evoking of DFT-D3 gives the Nan forces for all the atoms for both "bj" and "zero" damping functions as follows. While, if I turn off the periodic (DFTD.IntDirection as 0 0 0), the simulation run smoothly.

MD or geometry opt. at MD = 1

<Steepest_Descent> SD_scaling= 0.150011287118
<Steepest_Descent> |Maximum force| (Hartree/Bohr) = 0.000000000000
<Steepest_Descent> Criterion (Hartree/Bohr) = 0.000300000000

atom= 1, XYZ(ang) Fxyz(a.u.)= 10.3695 6.0212 7.8627 -nan -nan -nan
atom= 2, XYZ(ang) Fxyz(a.u.)= 10.3525 7.7512 6.2011 -nan -nan -nan
atom= 3, XYZ(ang) Fxyz(a.u.)= 10.3833 2.9109 4.6566 -nan -nan -nan
atom= 4, XYZ(ang) Fxyz(a.u.)= 10.3656 4.7021 2.9325 -nan -nan -nan
atom= 5, XYZ(ang) Fxyz(a.u.)= 12.4845 1.9944 8.5528 -nan -nan -nan
atom= 6, XYZ(ang) Fxyz(a.u.)= 8.5531 2.0201 12.4885 -nan -nan -nan
atom= 7, XYZ(ang) Fxyz(a.u.)= 7.7172 10.5339 6.2719 -nan -nan -nan
atom= 8, XYZ(ang) Fxyz(a.u.)= 5.8448 10.5304 7.8186 -nan -nan -nan

Thus, I has to adopt DFT-D2 in my current crystal simulation. The following is my script. Can anyone provide any suggestions about it. here is my script:



Re: (Maybe) fixing Vdw-d3(bj) ( No.2 )
Date: 2019/10/07 02:13
Name: Jhon W. Gonzalez

Hey Kylin,

Although I'm not an OpenMx developer, I think the safest option is to select the D2 approach.
You can try the modification I propose (under your own risk) and compare the results.


Re: (Maybe) fixing Vdw-d3(bj) ( No.3 )
Date: 2019/10/16 13:41
Name: T. Ozaki

Hi Jhon,

Thank you for your valuable post.
In fact, that part is a program bug.
I will fix it in the next release of OpenMX.

Best regards,


Page: [1]