Re: segfault with libMBD
I have designed a code to directly call the libMBD twice, and found that it can work successfully. Moreover, I have checked several points and noticed that during the first ionic step (I also tested with a static calculation), the apparently normal calculation in fact does not compute the vdW energy, as shown below in the OUTCAR file. Furthermore, when I moved the two lines under CASE(14) from the first position to the second in vdwforcefield.F, the structural optimization with IVDW=14 could complete successfully. However, all vdW energies and gradients became zero. Therefore, I believe the problem should lie in either libmd.F or vdwforcefield.F. The following is the corresponding result extracted from the OUTCAR file.
FORCE on cell =-STRESS in cart. coord. units (eV):
Direction XX YY ZZ XY YZ ZX
--------------------------------------------------------------------------------------
Alpha Z 20.71241 20.71241 20.71241
Ewald 11137.71754 11137.73871-12224.71345 0.00004 0.00000 0.00000
Hartree 11324.13471 11324.15579-11242.42892 0.00000 -0.00000 0.00000
E(xc) -134.97114 -134.95777 -135.87443 -0.00000 0.00000 0.00000
Local -23027.07751-23027.03326 22895.15380 -0.00003 0.00000 0.00000
n-local 257.35542 257.31064 265.25763 1.38537 0.00003 -0.00000
augment -58.99432 -58.99793 -60.24963 0.00000 -0.00000 0.00000
Kinetic 469.58608 469.54860 466.45144 0.71598 -0.00005 0.00000
Fock 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
vdW 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
-------------------------------------------------------------------------------------