diff --git a/HFX-stress/hfx_stress.pdf b/HFX-stress/hfx_stress.pdf deleted file mode 100644 index b80166f418..0000000000 Binary files a/HFX-stress/hfx_stress.pdf and /dev/null differ diff --git a/HFX-stress/hfx_stress.tex b/doc/dftb+/code/source/tex/hfx_stress.tex similarity index 100% rename from HFX-stress/hfx_stress.tex rename to doc/dftb+/code/source/tex/hfx_stress.tex diff --git a/src/dftbp/dftb/sparse2dense.F90 b/src/dftbp/dftb/sparse2dense.F90 index a47df9bbfb..cd84eab940 100644 --- a/src/dftbp/dftb/sparse2dense.F90 +++ b/src/dftbp/dftb/sparse2dense.F90 @@ -33,7 +33,9 @@ module dftbp_dftb_sparse2dense public :: unpackHelicalHS, packHelicalHS public :: getSparseDescriptor public :: getUnpackedOverlapPrime_real, getUnpackedOverlapPrime_kpts +#:if not WITH_SCALAPACK public :: getUnpackedOverlapStress_real +#:endif #:if WITH_SCALAPACK public :: unpackHSRealBlacs, unpackHSCplxBlacs, unpackHPauliBlacs, unpackSPauliBlacs diff --git a/src/dftbp/dftbplus/main.F90 b/src/dftbp/dftbplus/main.F90 index 4550c88039..cc7bbec3be 100644 --- a/src/dftbp/dftbplus/main.F90 +++ b/src/dftbp/dftbplus/main.F90 @@ -6382,9 +6382,9 @@ end subroutine getEDensityMtxFromPauliEigvecs !> Calculates the gradients subroutine getGradients(env, parallelKS, boundaryConds, sccCalc, tblite, isExtField, isXlbomd,& & nonSccDeriv, rhoPrim, ERhoPrim, qOutput, q0, skHamCont, skOverCont, repulsive,& - & neighbourList, symNeighbourList, nNeighbourSK, nNeighbourCamSym, iCellVec, cellVecs, cellVol,& - & rCellVecs, recVecs2p, species, img2CentCell, iSparseStart, orb, potential, coord, derivs,& - & groundDerivs, tripletderivs, mixedderivs, iRhoPrim, thirdOrd, solvation,& + & neighbourList, symNeighbourList, nNeighbourSK, nNeighbourCamSym, iCellVec, cellVecs,& + & cellVol, rCellVecs, recVecs2p, species, img2CentCell, iSparseStart, orb, potential, coord,& + & derivs, groundDerivs, tripletderivs, mixedderivs, iRhoPrim, thirdOrd, solvation,& & areSolventNeighboursSym, qDepExtPot, chrgForces, dispersion, hybridXc, SSqrReal, ints,& & denseDesc, halogenXCorrection, tHelical, coord0, deltaDftb, tPeriodic, tRealHS, kPoint,& & kWeight, densityMatrix, errStatus) @@ -6622,10 +6622,14 @@ subroutine getGradients(env, parallelKS, boundaryConds, sccCalc, tblite, isExtFi end do end do - st(:,:) = st / cellVol - - print *, 'Virial Block stress' - print *, st + print *, 'Virial tensor' + write(stdOut,"(3F20.12)")st + if (tPeriodic) then + st(:,:) = st / cellVol + write(stdout,*) + write(stdout,*)'Virial Block stress' + write(stdOut,"(3F20.12)")st + end if end if end if @@ -6766,10 +6770,14 @@ subroutine getGradients(env, parallelKS, boundaryConds, sccCalc, tblite, isExtFi end do end do - st(:,:) = st / cellVol - - print *, 'Virial total stress' - print *, st + print *, 'Virial tensor' + write(stdOut,"(3F20.12)")st + if (tPeriodic) then + st(:,:) = st / cellVol + write(stdout,*) + write(stdout,*)'Virial Block stress' + write(stdOut,"(3F20.12)")st + end if end subroutine getGradients