~nickpapior/siesta/tddft-work

« back to all changes in this revision

Viewing changes to Src/m_ts_electype.F90

  • Committer: Rafi Ullah
  • Date: 2017-09-27 12:02:36 UTC
  • mfrom: (611.1.22 trunk)
  • Revision ID: rraffiu@gmail.com-20170927120236-68zal54nt0bu1jxp
Merged with trunk-633

Show diffs side-by-side

added added

removed removed

Lines of Context:
1530
1530
  subroutine create_sp2sp01(this,IO)
1531
1531
 
1532
1532
    use parallel, only : IONode
1533
 
 
 
1533
#ifdef MPI
 
1534
    use mpi_siesta
 
1535
#endif
 
1536
    use m_os, only: file_exist
 
1537
    
1534
1538
    use class_OrbitalDistribution
1535
1539
 
1536
1540
    use create_Sparsity_SC
1537
1541
    use geom_helper, only : iaorb
1538
 
#ifdef MPI
1539
 
    use mpi_siesta
1540
 
#endif
1541
1542
 
1542
1543
    type(Elec), intent(inout) :: this
1543
1544
    logical, intent(in), optional :: io
1663
1664
 
1664
1665
    ! Check that there is a transfer matrix!
1665
1666
    if ( nnzs(this%sp01) == 0 ) then
1666
 
       write(*,'(a)') 'Electrode '//trim(this%name)//' has no transfer matrix.'
1667
 
       write(*,'(a)') 'The self-energy cannot be calculated with a zero transfer matrix!'
1668
 
       call die('Elec: transfer matrix has 0 elements. The self-&
1669
 
            &energy cannot be calculated. Please check your electrode &
1670
 
            &electronic structure.')
 
1667
       if ( IONode ) then
 
1668
          write(*,'(a)') 'Electrode '//trim(this%name)//' has no transfer matrix.'
 
1669
       end if
 
1670
       ! We will *only* die if the user haven't provided an externally created GF file
 
1671
       lio = file_exist(trim(this%GFfile), Bcast=.true.)
 
1672
       if ( this%out_of_core .and. this%ReUseGF .and. lio ) then
 
1673
          if ( IONode ) then
 
1674
             write(*,'(3a)') 'Assuming ',trim(this%GFfile),' contains H, S and E*S - H - \Sigma &
 
1675
                  &for calculating the correct self-energies and scattering matrices.'
 
1676
          end if
 
1677
       else
 
1678
          write(*,'(a)') 'The self-energy cannot be calculated with a zero transfer matrix!'
 
1679
          call die('Elec: transfer matrix has 0 elements. The self-&
 
1680
               &energy cannot be calculated. Please check your electrode &
 
1681
               &electronic structure.')
 
1682
       end if
1671
1683
    end if
1672
1684
 
1673
1685
  end subroutine create_sp2sp01