~albertog/siesta/trunk-nlso

« back to all changes in this revision

Viewing changes to Src/siesta_tddft.F90

  • Committer: Alberto Garcia
  • Date: 2018-06-04 16:10:46 UTC
  • mfrom: (697.2.2 trunk)
  • Revision ID: albertog@icmab.es-20180604161046-fsufw3pl21dnb5g5
Sync to trunk-699

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
    use atomlist,      only: no_s, no_l, no_u, indxuo
36
36
    use m_spin,        only: nspin
37
37
    use m_gamma
38
 
    use Kpoint_grid,    only: nkpnt, kpoint, kweight
 
38
    use kpoint_scf_m,    only: kpoints_scf
39
39
 
40
40
    use m_compute_energies, only: compute_energies
41
41
    use m_state_analysis, only: state_analysis
114
114
    ! ms_scalapack_setup. Which is now implicit in changebasis. 
115
115
 
116
116
    if ( istep == 1 ) then
117
 
       allocate(wavef_ms(nkpnt,nspin))
118
 
       call iowavef('read',wavef_ms,no_u,nkpnt,nspin)
 
117
       allocate(wavef_ms(kpoints_scf%N,nspin))
 
118
       call iowavef('read',wavef_ms,no_u,kpoints_scf%N,nspin)
119
119
       IF (IONode) THEN
120
120
       write(6,'(a)') 'Computing DM from initial KS wavefunctions'
121
121
       END IF
127
127
      ! The wavefunctions are saved after transforming into the current basis
128
128
      ! but before evolving them to future.This keeps the wavefunctions
129
129
      ! concurrent with atomic position.
130
 
      if(fincoor .gt. 1) call iowavef('write',wavef_ms,no_u,nkpnt,nspin)
 
130
      if(fincoor .gt. 1) call iowavef('write',wavef_ms,no_u,kpoints_scf%N,nspin)
131
131
    end if
132
132
 
133
133
    do itded = 1 , ntded ! TDED loop
142
142
 
143
143
       if (tdsavewf) then
144
144
         if (fincoor .eq. 1 .and. itded .eq. ntded) then
145
 
           call iowavef('write',wavef_ms,no_u,nkpnt,nspin)
 
145
           call iowavef('write',wavef_ms,no_u,kpoints_scf%N,nspin)
146
146
         endif
147
147
       end if
148
148
 
155
155
       
156
156
       call compute_energies (itded)
157
157
       call write_tddft(totime, istep, itded, ntded, rstart_time, &
158
 
            etot, eo, no_u,nspin,nkpnt)
 
158
            etot, eo, no_u,nspin,kpoints_scf%N)
159
159
       
160
160
    end do ! TDED loop
161
161
    call compute_tdEdm (Escf)