~nickpapior/siesta/tddft-work

« back to all changes in this revision

Viewing changes to Src/setup_H0.F

  • Committer: Rafi Ullah
  • Date: 2017-08-30 14:09:10 UTC
  • mfrom: (611.1.19 trunk)
  • Revision ID: rraffiu@gmail.com-20170830140910-bhu0osuh4d59wn8e
Merged with trunk-630

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
      use m_dhscf,      only: dhscf_init
36
36
      use m_energies,   only: Eions, Ena, DEna, Emm, Emeta, Eso
37
37
      use m_ntm
38
 
      use m_spin,       only: nspin, SpOrb
 
38
      use m_spin,       only: spin
39
39
      use spinorbit,    only: spinorb
40
40
      use alloc, only: re_alloc, de_alloc
41
41
      use class_dSpData1D, only: val
129
129
! computing forces and stresses, calling it in the first iteration
130
130
! should be enough
131
131
!
132
 
      if ( SpOrb ) then
 
132
      if ( spin%SO ) then
133
133
         H_so => val(H_so_2D)
134
134
!$OMP parallel workshare default(shared)
135
135
         H_so = 0._dp
136
136
!$OMP end parallel workshare
137
137
         call spinorb(no_u,no_l,iaorb,iphorb,isa,indxuo,
138
138
     &        maxnh,numh,listhptr,listh,Dscf,H_so,Eso)
139
 
#ifdef MPI
140
 
!     Global reduction of energy terms
141
 
         call globalize_sum(Eso,dummy_E)
142
 
         Eso = dummy_E
143
 
#endif
144
139
      else
145
140
         Eso = 0._dp
146
141
      end if
149
144
C     This will take care of possible changes to the mesh and atomic-related
150
145
C     mesh structures for geometry changes
151
146
      g2max = g2cut
152
 
      call dhscf_init( nspin, no_s, iaorb, iphorb,
 
147
      call dhscf_init( spin%Grid, no_s, iaorb, iphorb,
153
148
     &                 no_l, no_u, na_u, na_s,
154
149
     &                 isa, xa, indxua, ucell,
155
150
     &                 mscell, G2max, ntm,