~albertog/siesta/trunk-nlso

« back to all changes in this revision

Viewing changes to Src/m_ts_trik.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:
72
72
    ! Self-energy expansion
73
73
    use m_ts_elec_se
74
74
 
75
 
    use m_ts_kpoints, only : ts_nkpnt, ts_kpoint, ts_kweight
 
75
    use ts_kpoint_scf_m, only : ts_kpoints_scf
76
76
 
77
77
    use m_ts_options, only : Calc_Forces
78
78
    use m_ts_options, only : N_mu, mus
298
298
 
299
299
    
300
300
    ! start the itterators
301
 
    call itt_init  (SpKp,end1=nspin,end2=ts_nkpnt)
 
301
    call itt_init  (SpKp,end1=nspin,end2=ts_kpoints_scf%N)
302
302
    ! point to the index iterators
303
303
    call itt_attach(SpKp,cur1=ispin,cur2=ikpt)
304
304
    
311
311
       end if
312
312
 
313
313
       ! Include spin factor and 1/(2\pi)
314
 
       kpt(:) = ts_kpoint(:,ikpt)
 
314
       kpt(:) = ts_kpoints_scf%k(:,ikpt)
315
315
       ! create the k-point in reciprocal space
316
316
       call kpoint_convert(ucell,kpt,bkpt,1)
317
 
       kw = 0.5_dp / Pi * ts_kweight(ikpt)
 
317
       kw = 0.5_dp / Pi * ts_kpoints_scf%w(ikpt)
318
318
       if ( nspin == 1 ) kw = kw * 2._dp
319
319
       
320
320
#ifdef TRANSIESTA_TIMING
685
685
    ! Self-energy expansion
686
686
    use m_ts_elec_se
687
687
 
688
 
    use m_ts_kpoints, only : ts_nkpnt, ts_kpoint, ts_kweight
 
688
    use ts_kpoint_scf_m, only : ts_kpoints_scf
689
689
 
690
690
    use m_ts_sparse, only : ts_sp_uc, tsup_sp_uc
691
691
    use m_ts_sparse, only : ltsup_sp_sc, sc_off
811
811
    zDM => val(spuDM)
812
812
    call newdSpData2D(ltsup_sp_sc,1, sp_dist,spDM   ,name='TS spDM')
813
813
    
814
 
    call itt_init  (SpKp,end1=nspin,end2=ts_nkpnt)
 
814
    call itt_init  (SpKp,end1=nspin,end2=ts_kpoints_scf%N)
815
815
    call itt_attach(SpKp,cur1=ispin,cur2=ikpt)
816
816
    
817
817
    call init_val(spDM)
818
818
    do while ( .not. itt_step(SpKp) )
819
819
 
820
 
       kpt(:) = ts_kpoint(:,ikpt)
 
820
       kpt(:) = ts_kpoints_scf%k(:,ikpt)
821
821
       call kpoint_convert(ucell,kpt,bkpt,1)
822
 
       kw = 0.5_dp / Pi * ts_kweight(ikpt)
 
822
       kw = 0.5_dp / Pi * ts_kpoints_scf%w(ikpt)
823
823
       if ( nspin == 1 ) kw = kw * 2._dp
824
824
       
825
825
#ifdef TRANSIESTA_TIMING