The Elk Code
 
Loading...
Searching...
No Matches
gensocfr.f90
Go to the documentation of this file.
1
2! Copyright (C) 2009 J. K. Dewhurst, S. Sharma and E. K. U. Gross
3! This file is distributed under the terms of the GNU Lesser General Public
4! License. See the file COPYING for license details.
5
6subroutine gensocfr
7use modmain
8use modomp
9implicit none
10! local variables
11integer is,ias,nthd
12integer nr,nri,ir,irc
13real(8) cso,rm
14! automatic arrays
15real(8) vr(nrmtmax),dvr(nrmtmax)
16if (.not.spinorb) return
17! coefficient of spin-orbit coupling
18cso=y00*socscf/(4.d0*solsc**2)
19call holdthd(natmtot,nthd)
20!$OMP PARALLEL DO DEFAULT(SHARED) &
21!$OMP PRIVATE(vr,dvr,is,nr,nri) &
22!$OMP PRIVATE(ir,irc,rm) &
23!$OMP SCHEDULE(DYNAMIC) &
24!$OMP NUM_THREADS(nthd)
25do ias=1,natmtot
26 is=idxis(ias)
27 nr=nrmt(is)
28 nri=nrmti(is)
29! radial derivative of the spherical part of the Kohn-Sham potential
30 call rfmtlm(1,nr,nri,vsmt(:,ias),vr)
31 call splined(nr,wcrmt(:,:,is),vr,dvr)
32 do ir=1,nr,lradstp
33 irc=(ir-1)/lradstp+1
34 rm=1.d0-2.d0*cso*vr(ir)
35 socfr(irc,ias)=cso*dvr(ir)/(rsp(ir,is)*rm**2)
36 end do
37end do
38!$OMP END PARALLEL DO
39call freethd(nthd)
40end subroutine
41
subroutine gensocfr
Definition gensocfr.f90:7
integer, dimension(maxspecies) nrmti
Definition modmain.f90:211
real(8), parameter y00
Definition modmain.f90:1233
real(8), dimension(:,:,:), allocatable wcrmt
Definition modmain.f90:187
integer, dimension(maxspecies) nrmt
Definition modmain.f90:150
logical spinorb
Definition modmain.f90:230
real(8), dimension(:,:), allocatable rsp
Definition modmain.f90:135
integer, dimension(maxatoms *maxspecies) idxis
Definition modmain.f90:44
integer lradstp
Definition modmain.f90:171
integer natmtot
Definition modmain.f90:40
real(8), dimension(:,:), allocatable socfr
Definition modmain.f90:670
real(8) socscf
Definition modmain.f90:232
real(8), dimension(:,:), pointer, contiguous vsmt
Definition modmain.f90:649
real(8) solsc
Definition modmain.f90:1252
subroutine holdthd(nloop, nthd)
Definition modomp.f90:78
subroutine freethd(nthd)
Definition modomp.f90:106
pure subroutine rfmtlm(lm, nr, nri, rfmt, fr)
Definition rfmtlm.f90:7
pure subroutine splined(n, wc, f, df)
Definition splined.f90:7