Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed HFX-stress/hfx_stress.pdf
Binary file not shown.
File renamed without changes.
2 changes: 2 additions & 0 deletions src/dftbp/dftb/sparse2dense.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
30 changes: 19 additions & 11 deletions src/dftbp/dftbplus/main.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
Loading