[Q-e-developers] PW vc-relax - FFT grids in final scf step

Nicolas Mounet nicolas.mounet at epfl.ch
Wed Feb 8 01:20:41 CET 2017


Dear QE developers,

I discovered recently that in QE 6.0 (pw.x), the FFT grids do not seem 
to be re-calculated and updated in the last final scf step of a vc-relax 
calculation done. Since it was not the case in the past, and I did not 
find any mention of it in the release notes, I presume this was not 
intended.

The reason seems to be that in the routine PW/src/move_ions.f90, the 
nr[123] of the dfftp and dffts are not re-initialized before calling the 
function fft_type_allocate, which subsequently prevents the function 
realspace_grid_init to recalculate the grid.

So, just adding the line

dfftp%nr1=0; dfftp%nr2=0; dfftp%nr3=0; dffts%nr1=0; dffts%nr2=0; dffts%nr3=0

right before the lines 335-336 in the PW/src/move_ions.f90 file

CALL fft_type_allocate (dfftp, at, bg, gcutm, intra_bgrp_comm )
CALL fft_type_allocate (dffts, at, bg, gcutms, intra_bgrp_comm)

solves the problem.

I attached the fixed function, plus an example with Si (with and without 
the fix - I used relaxed parameters and the PS library 1.0.0 PBE-US pseudo)

Apologies in advance if this is not the proper way to submit a bugfix to 
the code, or if anything I wrote turns out to be wrong...

Best regards,
Nicolas Mounet

--
Nicolas Mounet
EPFL STI IMX THEOS
Station 9
CH-1015 Lausanne (Switzerland)
Phone: +41 21 69 31159
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Si_without_fix.out
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20170208/4b434d64/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Si.in
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20170208/4b434d64/attachment-0001.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Si_with_fix.out
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20170208/4b434d64/attachment-0002.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: move_ions.f90
Type: text/x-fortran
Size: 15365 bytes
Desc: not available
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20170208/4b434d64/attachment.bin>


More information about the developers mailing list