[QE-users] Bugs in cp.x from QE 7.2 affecting stresses calculated with US pseudos and CG

RABONE Jeremy jeremy.rabone at get.omp.eu
Thu Oct 3 13:04:22 CEST 2024


Hello,

  I have been getting some weird stress values in MD calculations using cp.x from QE 7.2 with ultrasoft pseudopotentials and after some rummaging I have found a couple of bugs:

    i) The dbec array gets inadvertantly altered through the call to cg_sub.f90 where is is assigned a different size "real(dp) :: dbec(nkb, nbspx, 3, 3)" than initially allocated in mainvar.f90 "ALLOCATE( dbec( nhsa, 2*nrcx, 3, 3 ), STAT=ierr )". The upshot of this is that the values of dbec get jumbled and the resulting stress tensor is messed up (and physically nonsensical). Also, since dbec is not zeroed and the initially allocated size does not seem to correspond to the used size, this also has the effect of introducing random values into the stress tensor, although zeroing dbec after the allocation in mainvar.f90 fixes this.

   ii) In fromscra.f90 the constraints contribution to the stress is calculated "if ( tstress ) CALL nlfh( stress, bec_bgrp, dbec, lambda, idesc )" before the dbec array has been calculated "if ( tstress ) CALL caldbec_bgrp( eigr, cm_bgrp, dbec, idesc )".


Kind regards,

Jeremy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20241003/bb62eef3/attachment.html>


More information about the users mailing list