14 real(8) wmin,wmax,wd,dw
15 real(8) tmax,temp(ntemp),s(ntemp)
18 real(8),
allocatable :: wq(:),w(:),gw(:),f(:)
19 complex(8),
allocatable :: dq(:,:),ev(:,:)
21 real(8),
external :: splint
34 wmax=max(wmax,wq(
nbph))
40 if (wd < 1.d-8) wd=1.d0
44 w(iw)=dw*dble(iw-1)+wmin
48 v(1)=dble(i1)/dble(
ngrkf)
50 v(2)=dble(i2)/dble(
ngrkf)
52 v(3)=dble(i3)/dble(
ngrkf)
58 t1=(wq(i)-wmin)/dw+1.d0
60 if ((iw >= 1).and.(iw <=
nwplot))
then 67 t1=1.d0/(dw*dble(
ngrkf)**3)
72 open(50,file=
'PHDOS.OUT',form=
'FORMATTED')
74 write(50,
'(2G18.10)') w(iw),gw(iw)
78 write(*,
'("Info(phdos):")')
79 write(*,
'(" phonon density of states written to PHDOS.OUT")')
87 temp(i)=tmax*dble(i)/dble(ntemp)
89 open(50,file=
'THERMO.OUT',form=
'FORMATTED')
91 write(50,
'("(All quantities are per unit cell)")')
99 write(50,
'("Zero-point energy : ",G18.10)') t1
102 write(50,
'("Vibrational energy vs. temperature :")')
105 t1=w(iw)/(2.d0*
kboltz*temp(i))
107 f(iw)=gw(iw)*w(iw)*cosh(t1)/sinh(t1)
114 write(50,
'(2G18.10)') temp(i),t1
119 write(50,
'("Free energy vs. temperature :")')
122 t1=2.d0*sinh(w(iw)/(2.d0*
kboltz*temp(i)))
131 write(50,
'(2G18.10)') temp(i),t1
133 s(i)=(s(i)-t1)/temp(i)
137 write(50,
'("Entropy vs. temperature :")')
139 write(50,
'(2G18.10)') temp(i),s(i)
143 write(50,
'("Heat capacity vs. temperature :")')
148 if (abs(t2) > 1.d-14)
then 149 f(iw)=gw(iw)*(t1**2)*(t2+1.d0)/t2**2
156 write(50,
'(2G18.10)') temp(i),t1
159 write(*,
'(" thermodynamic properties written to THERMO.OUT")')
162 deallocate(wq,w,gw,f,dq,ev)
real(8), dimension(:,:,:), allocatable dynr
subroutine writetest(id, descr, nv, iv, iva, tol, rv, rva, zv, zva)
real(8), parameter kboltz
pure subroutine fsmooth(m, n, f)
subroutine dynrtoq(vpl, dr, dq)
subroutine dynev(dq, wq, ev)
complex(8), dimension(:,:,:), allocatable dynq