Skip to content

Commit

Permalink
Add inelastic tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pecchia committed Mar 20, 2024
1 parent 30df87a commit baca6b2
Show file tree
Hide file tree
Showing 18 changed files with 860 additions and 89 deletions.
27 changes: 13 additions & 14 deletions src/dftbp/transport/negfint.F90
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ subroutine TNegfInt_init(this, transpar, env, greendens, tundos, tempElec, kPoin
write(stdOut,format2U)'Electro-chemical potentials', params%mu(i), 'H',&
& Hartree__eV*params%mu(i), 'eV'
end if

write(stdOut,*)

enddo
Expand Down Expand Up @@ -1748,13 +1748,10 @@ subroutine calc_current(this, env, groupKS, ham, over, iNeighbor, nNeighbor, iAt

subroutine calc_current_ela()

if (params%verbose.gt.30) then
write(stdOut, *)
write(stdOut, '(80("="))')
write(stdOut, *) ' COMPUTATION OF CURRENT '
write(stdOut, '(80("="))')
write(stdOut, *)
end if
write(stdOut, *)
write(stdOut, '(80("="))')
write(stdOut, *) ' COMPUTING TRANSMISSION AND CURRENT '
write(stdOut, '(80("="))')

call get_params(this%negf, params)

Expand Down Expand Up @@ -1815,6 +1812,7 @@ subroutine calc_current_ela()

! converts from internal atomic units into amperes
currLead(:) = currLead * convertCurrent(unitsOfEnergy, unitsOfCurrent)
call get_params(this%negf, params)

do ii = 1, size(currLead)
write(stdOut, *)
Expand All @@ -1833,13 +1831,14 @@ subroutine calc_current_inel()
call error('Internal error: no adequate inelastic method for currents.')
end if

if (params%verbose.gt.30) then
write(stdOut, *)
write(stdOut, '(80("="))')
write(stdOut, *) ' COMPUTATION OF INELASTIC CURRENT '
write(stdOut, '(80("="))')
write(stdOut, *)
write(stdOut, *)
write(stdOut, '(80("="))')
if (this%tLayerCurrents) then
write(stdOut, *) ' COMPUTING LAYER CURRENTS '
else if (this%tMeirWingreen) then
write(stdOut, *) ' COMPUTING CONTACT CURRENTS (Meir-Wingreen) '
end if
write(stdOut, '(80("="))')

call get_params(this%negf, params)
params%mu(1:ncont) = mu(1:ncont,1)
Expand Down
2 changes: 2 additions & 0 deletions test/app/dftb+/tests
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,9 @@ transport/SiH-chain_semiInf #? WITH_TRANSPORT and MPI_PROCS <= 2 and
transport/local-curr #? WITH_TRANSPORT and MPI_PROCS <= 4 and LONG_TEST
transport/polyacetylene_semiInf #? WITH_TRANSPORT and MPI_PROCS <= 4
transport/H-sheet_end #? WITH_TRANSPORT and MPI_PROCS <= 4
transport/deph_H5 #? WITH_TRANSPORT and MPI_PROCS <= 4
transport/inelastic_H56 #? WITH_TRANSPORT and MPI_PROCS <= 4
transport/inelastic_H-sheet #? WITH_TRANSPORT and MPI_PROCS <= 4

pp-RPA/ethene #? not WITH_MPI
pp-RPA/benzene_TammDancoff #? not WITH_MPI
Expand Down
27 changes: 27 additions & 0 deletions test/app/dftb+/transport/deph_H5/H5.gen
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
25 C
H
1 1 0.0000000000 0.0000000000 20.39200000
1 1 0.0000000000 0.0000000000 22.31800000
1 1 0.0000000000 0.0000000000 24.24400000
1 1 0.0000000000 0.0000000000 26.17000000
1 1 0.0000000000 0.0000000000 28.09600000
1 1 0.0000000000 0.0000000000 30.09600000
1 1 0.0000000000 0.0000000000 31.76800000
1 1 0.0000000000 0.0000000000 33.44000000
1 1 0.0000000000 0.0000000000 35.11200000
1 1 0.0000000000 0.0000000000 36.78400000
1 1 0.0000000000 0.0000000000 38.45600000
1 1 0.0000000000 0.0000000000 40.12800000
1 1 0.0000000000 0.0000000000 41.80000000
1 1 0.0000000000 0.0000000000 43.47200000
1 1 0.0000000000 0.0000000000 45.14400000
1 1 0.0000000000 0.0000000000 11.70400000
1 1 0.0000000000 0.0000000000 13.37600000
1 1 0.0000000000 0.0000000000 15.04800000
1 1 0.0000000000 0.0000000000 16.72000000
1 1 0.0000000000 0.0000000000 18.39200000
1 1 0.0000000000 0.0000000000 3.34400000
1 1 0.0000000000 0.0000000000 5.01600000
1 1 0.0000000000 0.0000000000 6.68800000
1 1 0.0000000000 0.0000000000 8.36000000
1 1 0.0000000000 0.0000000000 10.03200000
Loading

0 comments on commit baca6b2

Please sign in to comment.