14real(8) wmin,wmax,wd,dw
15real(8) tmax,temp(ntemp),s(ntemp)
18real(8),
allocatable :: wq(:),w(:),gw(:),f(:)
19complex(8),
allocatable :: dq(:,:),ev(:,:)
21real(8),
external :: splint
34 wmax=max(wmax,wq(
nbph))
40if (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
67t1=1.d0/(dw*dble(
ngrkf)**3)
72open(50,file=
'PHDOS.OUT',form=
'FORMATTED')
74 write(50,
'(2G18.10)') w(iw),gw(iw)
78write(*,
'("Info(phdos):")')
79write(*,
'(" phonon density of states written to PHDOS.OUT")')
87 temp(i)=tmax*dble(i)/dble(ntemp)
89open(50,file=
'THERMO.OUT',form=
'FORMATTED')
91write(50,
'("(All quantities are per unit cell)")')
99write(50,
'("Zero-point energy : ",G18.10)') t1
102write(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
119write(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)
137write(50,
'("Entropy vs. temperature :")')
139 write(50,
'(2G18.10)') temp(i),s(i)
143write(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
159write(*,
'(" thermodynamic properties written to THERMO.OUT")')
162deallocate(wq,w,gw,f,dq,ev)
subroutine dynev(dq, wq, ev)
subroutine dynrtoq(vpl, dr, dq)
pure subroutine fsmooth(m, n, f)
real(8), parameter kboltz
real(8), dimension(:,:,:), allocatable dynr
complex(8), dimension(:,:,:), allocatable dynq
subroutine writetest(id, descr, nv, iv, iva, tol, rv, rva, zv, zva)
real(8) function splint(n, x, f)