File: mossbauer.f90

package info (click to toggle)
elkcode 5.4.24-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 12,840 kB
  • sloc: f90: 48,415; fortran: 22,457; perl: 965; makefile: 384; sh: 369; python: 105; ansic: 67
file content (117 lines) | stat: -rw-r--r-- 3,582 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117

! Copyright (C) 2002-2005 J. K. Dewhurst, S. Sharma and C. Ambrosch-Draxl.
! This file is distributed under the terms of the GNU General Public License.
! See the file COPYING for license details.

!BOP
! !ROUTINE: mossbauer
! !INTERFACE:
subroutine mossbauer
! !USES:
use modmain
! !DESCRIPTION:
!   Computes the contact charge density and contact magnetic hyperfine field for
!   each atom and outputs the data to the file {\tt MOSSBAUER.OUT}. The Thomson
!   radius, $R_{\rm T}=Z/c^2$, is used for determining the contact moment $m_c$,
!   the relation of which to field strength is via Fermi's formula
!   $$ B_c=\frac{8\pi}{3}\mu_B m_c, $$
!   where the orbital and dipolar contributions are neglected. See
!   S. Bl\"{u}gel, H. Akai, R. Zeller, and P. H. Dederichs, {\it Phys. Rev. B}
!   {\bf 35}, 3271 (1987). See also {\tt radnucl}.
!
! !REVISION HISTORY:
!   Created May 2004 (JKD)
!EOP
!BOC
implicit none
! local variables
integer idm,is,ia,ias
integer nr,nri,nrn,nrt,ir
real(8) rt,vt,mc,bc,t1
real(8) rho0,rhon,rhoa
! allocatable arrays
real(8), allocatable :: fr(:,:)
! external functions
real(8) fintgt
external fintgt
! initialise universal variables
call init0
! read density and potentials from file
call readstate
! allocate local arrays
allocate(fr(nrmtmax,3))
open(50,file='MOSSBAUER.OUT',form='FORMATTED')
! loop over species
do is=1,nspecies
  nr=nrmt(is)
  nri=nrmti(is)
  nrn=nrnucl(is)
! Thomson radius and volume
  rt=abs(spzn(is))/solsc**2
  nrt=nr
  do ir=1,nr
    if (rsp(ir,is).gt.rt) then
      nrt=ir
      exit
    end if
  end do
  rt=rsp(nrt,is)
  vt=(4.d0/3.d0)*pi*rt**3
! loop over atoms
  do ia=1,natoms(is)
    ias=idxas(ia,is)
!--------------------------------!
!     contact charge density     !
!--------------------------------!
    call rfmtlm(1,nr,nri,rhomt(:,ias),fr)
    rho0=fr(1,1)*y00
    rhon=fr(nrn,1)*y00
    fr(1:nrn,1)=fr(1:nrn,1)*r2sp(1:nrn,is)
    t1=fintgt(-1,nrn,rsp(:,is),fr)
    rhoa=fourpi*y00*t1/volnucl(is)
    write(50,*)
    write(50,*)
    write(50,'("Species : ",I4," (",A,"), atom : ",I4)') is,trim(spsymb(is)),ia
    write(50,*)
    write(50,'(" approximate nuclear radius : ",G18.10)') rnucl(is)
    write(50,'(" number of mesh points to nuclear radius : ",I6)') nrn
    write(50,'(" density at nuclear center      : ",G18.10)') rho0
    write(50,'(" density at nuclear surface     : ",G18.10)') rhon
    write(50,'(" average contact charge density : ",G18.10)') rhoa
!------------------------------------------!
!     contact magnetic hyperfine field     !
!------------------------------------------!
    if (spinpol) then
      do idm=1,ndmag
        call rfmtlm(1,nr,nri,magmt(:,ias,idm),fr(:,idm))
      end do
      if (ncmag) then
! non-collinear
        fr(1:nrt,1)=sqrt(fr(1:nrt,1)**2 &
                        +fr(1:nrt,2)**2 &
                        +fr(1:nrt,3)**2)*r2sp(1:nrt,is)
      else
! collinear
        fr(1:nrt,1)=abs(fr(1:nrt,1))*r2sp(1:nrt,is)
      end if
      t1=fintgt(-1,nrt,rsp(:,is),fr)
      mc=fourpi*y00*t1/vt
      write(50,*)
      write(50,'(" Thomson radius : ",G18.10)') rt
      write(50,'(" number of mesh points to Thomson radius : ",I6)') nrt
      write(50,'(" contact magnetic moment (mu_B) : ",G18.10)') mc
      bc=(8.d0*pi/3.d0)*mc/(2.d0*solsc)
      write(50,'(" contact hyperfine field : ",G18.10)') bc
      write(50,'("  tesla                  : ",G18.10)') bc*b_si/solsc
    end if
  end do
end do
close(50)
write(*,*)
write(*,'("Info(mossbauer):")')
write(*,'(" Mossbauer parameters written to MOSSBAUER.OUT")')
deallocate(fr)
return
end subroutine
!EOC