Main transport subroutine
subroutine tran_main()
!! Main transport subroutine
!==================================================================!
use w90_io, only: stdout, io_stopwatch
use w90_parameters, only: transport_mode, tran_read_ht, timing_level, write_hr, &
write_xyz
use w90_hamiltonian, only: hamiltonian_get_hr, hamiltonian_write_hr, hamiltonian_setup
implicit none
real(kind=dp), allocatable, dimension(:, :) :: signatures
integer :: num_G
logical :: pl_warning
if (timing_level > 0) call io_stopwatch('tran: main', 1)
write (stdout, '(/1x,a)') '*---------------------------------------------------------------------------*'
write (stdout, '(1x,a)') '| TRANSPORT |'
write (stdout, '(1x,a)') '*---------------------------------------------------------------------------*'
write (stdout, *)
if (index(transport_mode, 'bulk') > 0) then
write (stdout, '(/1x,a/)') 'Calculation of Quantum Conductance and DoS: bulk mode'
if (.not. tran_read_ht) then
call hamiltonian_setup()
call hamiltonian_get_hr()
if (write_hr) call hamiltonian_write_hr()
call tran_reduce_hr()
call tran_cut_hr_one_dim()
call tran_get_ht()
if (write_xyz) call tran_write_xyz()
end if
call tran_bulk()
end if
if (index(transport_mode, 'lcr') > 0) then
write (stdout, '(/1x,a/)') 'Calculation of Quantum Conductance and DoS: lead-conductor-lead mode'
if (.not. tran_read_ht) then
call hamiltonian_setup()
call hamiltonian_get_hr()
if (write_hr) call hamiltonian_write_hr()
call tran_reduce_hr()
call tran_cut_hr_one_dim()
write (stdout, *) '------------------------- 2c2 Calculation Type: ------------------------------'
write (stdout, *) ' '
call tran_find_integral_signatures(signatures, num_G)
call tran_lcr_2c2_sort(signatures, num_G, pl_warning)
if (write_xyz) call tran_write_xyz()
call tran_parity_enforce(signatures)
call tran_lcr_2c2_build_ham(pl_warning)
endif
call tran_lcr()
end if
if (timing_level > 0) call io_stopwatch('tran: main', 2)
end subroutine tran_main