mirror of https://gitlab.com/QEF/q-e.git
More conversion constants harmonization - untested
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@8280 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
parent
9fec210ddc
commit
319d1e9649
|
@ -14,7 +14,7 @@ SUBROUTINE dyndiar (dyn,nat3,nmodes,u,nat,ityp,amass,w2,dynout)
|
||||||
! and mode displacements in "dynout". dyn is unchanged on output.
|
! and mode displacements in "dynout". dyn is unchanged on output.
|
||||||
!
|
!
|
||||||
USE kinds, ONLY : DP
|
USE kinds, ONLY : DP
|
||||||
USE constants, ONLY : amconv
|
USE constants, ONLY : amconv, ry_to_thz, ry_to_cmm1
|
||||||
USE io_global, ONLY : stdout
|
USE io_global, ONLY : stdout
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
INTEGER :: nmodes, nat3, nat,ityp(nat), iudyn
|
INTEGER :: nmodes, nat3, nat,ityp(nat), iudyn
|
||||||
|
@ -23,7 +23,7 @@ SUBROUTINE dyndiar (dyn,nat3,nmodes,u,nat,ityp,amass,w2,dynout)
|
||||||
!
|
!
|
||||||
INTEGER:: nu_i, nu_j, mu, na, nb, nt, i, j
|
INTEGER:: nu_i, nu_j, mu, na, nb, nt, i, j
|
||||||
real(DP), ALLOCATABLE :: m(:,:), z(:,:)
|
real(DP), ALLOCATABLE :: m(:,:), z(:,:)
|
||||||
real(DP) :: rydthz, rydcm1, w1, unorm, sum, dif
|
real(DP) :: w1, unorm, sum, dif
|
||||||
!
|
!
|
||||||
ALLOCATE ( m ( nat3, nat3))
|
ALLOCATE ( m ( nat3, nat3))
|
||||||
ALLOCATE ( z ( nat3, nat3))
|
ALLOCATE ( z ( nat3, nat3))
|
||||||
|
@ -78,11 +78,6 @@ SUBROUTINE dyndiar (dyn,nat3,nmodes,u,nat,ityp,amass,w2,dynout)
|
||||||
!
|
!
|
||||||
CALL rdiaghg (nat3, nmodes, dynout, m, nat3, w2, z)
|
CALL rdiaghg (nat3, nmodes, dynout, m, nat3, w2, z)
|
||||||
!
|
!
|
||||||
! conversion factors ryd=>thz e ryd=>1/cm
|
|
||||||
!
|
|
||||||
rydthz = 13.6058d0*241.796d0
|
|
||||||
rydcm1 = 13.6058d0*8065.5d0
|
|
||||||
!
|
|
||||||
! write frequencies
|
! write frequencies
|
||||||
!
|
!
|
||||||
WRITE( stdout,'(5x,"diagonalizing the dynamical matrix ..."//)')
|
WRITE( stdout,'(5x,"diagonalizing the dynamical matrix ..."//)')
|
||||||
|
@ -92,7 +87,7 @@ SUBROUTINE dyndiar (dyn,nat3,nmodes,u,nat,ityp,amass,w2,dynout)
|
||||||
DO nu_i = 1,nmodes
|
DO nu_i = 1,nmodes
|
||||||
w1 = sqrt(abs(w2(nu_i)))
|
w1 = sqrt(abs(w2(nu_i)))
|
||||||
IF (w2(nu_i)<0.0) w1 = -w1
|
IF (w2(nu_i)<0.0) w1 = -w1
|
||||||
WRITE( stdout,9010) nu_i, w1*rydthz, w1*rydcm1
|
WRITE( stdout,9010) nu_i, w1*ry_to_thz, w1*ry_to_cmm1
|
||||||
! bring eigendisplacements in cartesian axis
|
! bring eigendisplacements in cartesian axis
|
||||||
DO mu = 1,3*nat
|
DO mu = 1,3*nat
|
||||||
DO i = 1,nmodes
|
DO i = 1,nmodes
|
||||||
|
|
|
@ -101,7 +101,7 @@ SUBROUTINE cg_dchi(dchi_dtau)
|
||||||
!
|
!
|
||||||
! calculate dX/dtau with finite differences
|
! calculate dX/dtau with finite differences
|
||||||
!
|
!
|
||||||
USE constants, ONLY : BOHR_RADIUS_ANGS
|
USE constants, ONLY : bohr_radius_angs
|
||||||
USE ions_base, ONLY : nat, tau
|
USE ions_base, ONLY : nat, tau
|
||||||
USE io_global, ONLY : stdout, ionode
|
USE io_global, ONLY : stdout, ionode
|
||||||
USE io_files, ONLY : iunres
|
USE io_files, ONLY : iunres
|
||||||
|
@ -150,7 +150,7 @@ SUBROUTINE cg_dchi(dchi_dtau)
|
||||||
!
|
!
|
||||||
2 CONTINUE
|
2 CONTINUE
|
||||||
!
|
!
|
||||||
convfact = BOHR_RADIUS_ANGS**2
|
convfact = bohr_radius_angs**2
|
||||||
!
|
!
|
||||||
DO na=na_,nat
|
DO na=na_,nat
|
||||||
DO ipol=1,3
|
DO ipol=1,3
|
||||||
|
@ -254,7 +254,7 @@ END SUBROUTINE cg_dchi
|
||||||
SUBROUTINE cg_eps0dyn(w2,dynout)
|
SUBROUTINE cg_eps0dyn(w2,dynout)
|
||||||
!-----------------------------------------------------------------------
|
!-----------------------------------------------------------------------
|
||||||
!
|
!
|
||||||
USE constants, ONLY : BOHR_RADIUS_ANGS
|
USE constants, ONLY : bohr_radius_angs
|
||||||
USE ions_base, ONLY : nat, tau, ityp, amass
|
USE ions_base, ONLY : nat, tau, ityp, amass
|
||||||
USE io_global, ONLY : stdout, ionode
|
USE io_global, ONLY : stdout, ionode
|
||||||
USE io_files, ONLY : iunres
|
USE io_files, ONLY : iunres
|
||||||
|
@ -391,7 +391,7 @@ END SUBROUTINE cg_eps0dyn
|
||||||
SUBROUTINE cg_neweps
|
SUBROUTINE cg_neweps
|
||||||
!-----------------------------------------------------------------------
|
!-----------------------------------------------------------------------
|
||||||
!
|
!
|
||||||
USE constants, ONLY : BOHR_RADIUS_ANGS
|
USE constants, ONLY : bohr_radius_angs
|
||||||
USE io_global, ONLY : stdout
|
USE io_global, ONLY : stdout
|
||||||
USE ions_base, ONLY : nat, tau
|
USE ions_base, ONLY : nat, tau
|
||||||
USE pwcom
|
USE pwcom
|
||||||
|
@ -520,18 +520,15 @@ SUBROUTINE raman_cs(dynout,dchi_dtau)
|
||||||
!
|
!
|
||||||
! calculate Raman cross section
|
! calculate Raman cross section
|
||||||
!
|
!
|
||||||
|
USE kinds, ONLY : DP
|
||||||
|
USE constants, ONLY : amu_ry
|
||||||
USE ions_base, ONLY : nat
|
USE ions_base, ONLY : nat
|
||||||
USE io_global, ONLY : stdout
|
USE io_global, ONLY : stdout
|
||||||
USE pwcom
|
|
||||||
USE cgcom
|
|
||||||
!
|
!
|
||||||
REAL(DP) :: dynout(3*nat,3*nat), dchi_dtau(3,3,3,nat)
|
REAL(DP) :: dynout(3*nat,3*nat), dchi_dtau(3,3,3,nat)
|
||||||
!
|
!
|
||||||
INTEGER :: nu, na, ipol, jpol, lpol
|
INTEGER :: nu, na, ipol, jpol, lpol
|
||||||
REAL(DP), ALLOCATABLE :: raman_activity(:,:,:)
|
REAL(DP), ALLOCATABLE :: raman_activity(:,:,:)
|
||||||
REAL(DP), PARAMETER :: r1fac = 911.444d0
|
|
||||||
!
|
|
||||||
! conversion factor from (Ry au for mass)^(-1) to amu(-1)
|
|
||||||
!
|
!
|
||||||
ALLOCATE ( raman_activity( 3, 3, nmodes))
|
ALLOCATE ( raman_activity( 3, 3, nmodes))
|
||||||
WRITE( stdout,'(/5x, "Raman tensor for mode nu : dX_{alpha,beta}/d nu"/)')
|
WRITE( stdout,'(/5x, "Raman tensor for mode nu : dX_{alpha,beta}/d nu"/)')
|
||||||
|
@ -548,8 +545,11 @@ SUBROUTINE raman_cs(dynout,dchi_dtau)
|
||||||
ENDDO
|
ENDDO
|
||||||
ENDDO
|
ENDDO
|
||||||
ENDDO
|
ENDDO
|
||||||
|
!
|
||||||
|
! conversion factor from (Ry au for mass)^(-1) to amu(-1)
|
||||||
|
!
|
||||||
WRITE( stdout,'(i5,3x,3e14.6,2(/8x,3e14.6))') &
|
WRITE( stdout,'(i5,3x,3e14.6,2(/8x,3e14.6))') &
|
||||||
nu,( ( raman_activity(ipol,jpol,nu)*r1fac,jpol=1,3), ipol=1,3)
|
nu,( ( raman_activity(ipol,jpol,nu)*amu_ry,jpol=1,3), ipol=1,3)
|
||||||
ENDDO
|
ENDDO
|
||||||
DEALLOCATE(raman_activity)
|
DEALLOCATE(raman_activity)
|
||||||
!
|
!
|
||||||
|
@ -562,7 +562,7 @@ SUBROUTINE raman_cs2(w2,dynout)
|
||||||
!
|
!
|
||||||
! calculate d X/d u (u=phonon mode) with finite differences
|
! calculate d X/d u (u=phonon mode) with finite differences
|
||||||
!
|
!
|
||||||
USE constants, ONLY : BOHR_RADIUS_ANGS
|
USE constants, ONLY : bohr_radius_angs, ry_to_thz, ry_to_cmm1, amu_ry
|
||||||
USE ions_base, ONLY : nat, tau
|
USE ions_base, ONLY : nat, tau
|
||||||
USE io_global, ONLY : stdout, ionode
|
USE io_global, ONLY : stdout, ionode
|
||||||
USE io_files, ONLY : iunres
|
USE io_files, ONLY : iunres
|
||||||
|
@ -582,7 +582,7 @@ SUBROUTINE raman_cs2(w2,dynout)
|
||||||
DATA delta4/-2.d0, -1.d0, 1.d0, 2.d0/
|
DATA delta4/-2.d0, -1.d0, 1.d0, 2.d0/
|
||||||
DATA coeff4/ 0.08333333333333d0,-0.66666666666666d0, &
|
DATA coeff4/ 0.08333333333333d0,-0.66666666666666d0, &
|
||||||
& 0.66666666666667d0,-0.08333333333337d0 /
|
& 0.66666666666667d0,-0.08333333333337d0 /
|
||||||
REAL(8):: polar(3), rydcm1, cm1thz, freq, r1fac, cmfac, irfac
|
REAL(8):: polar(3), freq, cmfac, irfac
|
||||||
REAL(8):: alpha, beta2
|
REAL(8):: alpha, beta2
|
||||||
!
|
!
|
||||||
CALL start_clock('raman_cs2')
|
CALL start_clock('raman_cs2')
|
||||||
|
@ -614,14 +614,10 @@ SUBROUTINE raman_cs2(w2,dynout)
|
||||||
ENDIF
|
ENDIF
|
||||||
!
|
!
|
||||||
2 CONTINUE
|
2 CONTINUE
|
||||||
!
|
|
||||||
! conversion factor from (Ry au for mass)^(-1) to amu(-1)
|
|
||||||
!
|
|
||||||
r1fac = 911.444d0
|
|
||||||
!
|
!
|
||||||
! conversion factor from bohr^2*(Ry au for mass)^(-1/2) to A^2 amu(-1/2)
|
! conversion factor from bohr^2*(Ry au for mass)^(-1/2) to A^2 amu(-1/2)
|
||||||
!
|
!
|
||||||
convfact = BOHR_RADIUS_ANGS**2*sqrt(r1fac)
|
convfact = bohr_radius_angs**2*sqrt(amu_ry)
|
||||||
!
|
!
|
||||||
DO nu=first,last
|
DO nu=first,last
|
||||||
IF (nu<nu_) GOTO 11
|
IF (nu<nu_) GOTO 11
|
||||||
|
@ -711,11 +707,6 @@ SUBROUTINE raman_cs2(w2,dynout)
|
||||||
nu,( ( raman_activity(ipol,jpol,nu-first+1),jpol=1,3), ipol=1,3)
|
nu,( ( raman_activity(ipol,jpol,nu-first+1),jpol=1,3), ipol=1,3)
|
||||||
ENDDO
|
ENDDO
|
||||||
!
|
!
|
||||||
! conversion factors RYD=>THZ, RYD=>1/CM e 1/CM=>THZ
|
|
||||||
!
|
|
||||||
rydcm1 = 13.6058d0*8065.5d0
|
|
||||||
cm1thz = 241.796d0/8065.5d0
|
|
||||||
!
|
|
||||||
! derivatives of epsilon are translated into derivatives of molecular
|
! derivatives of epsilon are translated into derivatives of molecular
|
||||||
! polarizabilities by assuming a Clausius-Mossotti behavior
|
! polarizabilities by assuming a Clausius-Mossotti behavior
|
||||||
! (for anisotropic systems epsilon is replaced by its trace)
|
! (for anisotropic systems epsilon is replaced by its trace)
|
||||||
|
@ -728,7 +719,7 @@ SUBROUTINE raman_cs2(w2,dynout)
|
||||||
! 1 e = 4.80324x10^(-10) esu = 4.80324 Debye/A
|
! 1 e = 4.80324x10^(-10) esu = 4.80324 Debye/A
|
||||||
! (1 Debye = 10^(-18) esu*cm = 0.2081928 e*A)
|
! (1 Debye = 10^(-18) esu*cm = 0.2081928 e*A)
|
||||||
!
|
!
|
||||||
irfac = 4.80324d0**2/2.d0*r1fac
|
irfac = 4.80324d0**2/2.d0*amu_ry
|
||||||
!
|
!
|
||||||
ALLOCATE (infrared(3*nat))
|
ALLOCATE (infrared(3*nat))
|
||||||
!
|
!
|
||||||
|
@ -759,7 +750,7 @@ SUBROUTINE raman_cs2(w2,dynout)
|
||||||
!
|
!
|
||||||
DO nu = 1,3*nat
|
DO nu = 1,3*nat
|
||||||
!
|
!
|
||||||
freq = sqrt(abs(w2(nu)))*rydcm1
|
freq = sqrt(abs(w2(nu)))
|
||||||
IF (w2(nu)<0.0) freq = -freq
|
IF (w2(nu)<0.0) freq = -freq
|
||||||
!
|
!
|
||||||
! alpha, beta2: see PRB 54, 7830 (1996) and refs quoted therein
|
! alpha, beta2: see PRB 54, 7830 (1996) and refs quoted therein
|
||||||
|
@ -780,7 +771,7 @@ SUBROUTINE raman_cs2(w2,dynout)
|
||||||
beta2 = 0
|
beta2 = 0
|
||||||
ENDIF
|
ENDIF
|
||||||
WRITE( stdout,'(i5,f10.2,f12.4,2f10.4)') &
|
WRITE( stdout,'(i5,f10.2,f12.4,2f10.4)') &
|
||||||
nu, freq, freq*cm1thz, infrared(nu), &
|
nu, freq*ry_to_cmm1, freq*ry_to_thz, infrared(nu), &
|
||||||
(45.d0*alpha**2 + 7.0d0*beta2)
|
(45.d0*alpha**2 + 7.0d0*beta2)
|
||||||
ENDDO
|
ENDDO
|
||||||
!
|
!
|
||||||
|
|
|
@ -735,7 +735,7 @@ SUBROUTINE elphsum_simple
|
||||||
! Rewritten by Matteo Calandra
|
! Rewritten by Matteo Calandra
|
||||||
!-----------------------------------------------------------------------
|
!-----------------------------------------------------------------------
|
||||||
USE kinds, ONLY : DP
|
USE kinds, ONLY : DP
|
||||||
USE constants, ONLY : pi
|
USE constants, ONLY : pi, ry_to_cmm1, rytoev
|
||||||
USE ions_base, ONLY : nat, ityp, tau,amass,tau, ntyp => nsp, atm
|
USE ions_base, ONLY : nat, ityp, tau,amass,tau, ntyp => nsp, atm
|
||||||
USE cell_base, ONLY : at, bg, ibrav, celldm
|
USE cell_base, ONLY : at, bg, ibrav, celldm
|
||||||
USE fft_base, ONLY: dfftp
|
USE fft_base, ONLY: dfftp
|
||||||
|
@ -757,10 +757,7 @@ SUBROUTINE elphsum_simple
|
||||||
USE mp, ONLY: mp_sum
|
USE mp, ONLY: mp_sum
|
||||||
!
|
!
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
! eps = 20 cm^-1, in Ry
|
REAL(DP), PARAMETER :: eps = 20_dp/ry_to_cmm1 ! eps = 20 cm^-1, in Ry
|
||||||
REAL(DP) :: eps
|
|
||||||
PARAMETER (eps = 20.d0 / 13.6058d0 / 8065.5d0)
|
|
||||||
!
|
|
||||||
!
|
!
|
||||||
INTEGER :: ik, ikk, ikq, isig, ibnd, jbnd, ipert, jpert, nu, mu, &
|
INTEGER :: ik, ikk, ikq, isig, ibnd, jbnd, ipert, jpert, nu, mu, &
|
||||||
vu, ngauss1, nsig, iuelph, ios, iuelphmat,icnt,i,j,rrho,nt,k
|
vu, ngauss1, nsig, iuelph, ios, iuelphmat,icnt,i,j,rrho,nt,k
|
||||||
|
@ -886,11 +883,11 @@ SUBROUTINE elphsum_simple
|
||||||
bg, nsymq, nat, irotmq, minus_q)
|
bg, nsymq, nat, irotmq, minus_q)
|
||||||
!
|
!
|
||||||
WRITE (6, 9000) degauss1, ngauss1
|
WRITE (6, 9000) degauss1, ngauss1
|
||||||
WRITE (6, 9005) dosef, ef1 * 13.6058
|
WRITE (6, 9005) dosef, ef1 * rytoev
|
||||||
WRITE (6, 9006) phase_space
|
WRITE (6, 9006) phase_space
|
||||||
IF (iuelph.NE.0) THEN
|
IF (iuelph.NE.0) THEN
|
||||||
WRITE (iuelph, 9000) degauss1, ngauss1
|
WRITE (iuelph, 9000) degauss1, ngauss1
|
||||||
WRITE (iuelph, 9005) dosef, ef1 * 13.6058
|
WRITE (iuelph, 9005) dosef, ef1 * rytoev
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
DO nu = 1, nmodes
|
DO nu = 1, nmodes
|
||||||
|
@ -902,9 +899,8 @@ SUBROUTINE elphsum_simple
|
||||||
ENDDO
|
ENDDO
|
||||||
ENDDO
|
ENDDO
|
||||||
write(819+mu,*) gamma
|
write(819+mu,*) gamma
|
||||||
gamma = 3.1415926 * gamma / 2.d0
|
gamma = pi * gamma / 2.d0
|
||||||
|
write(6,*) 'gamma*pi/2=',gamma
|
||||||
write(6,*) 'gamma*pi/2=',gamma*pi/2
|
|
||||||
!
|
!
|
||||||
! the factor 2 comes from the factor sqrt(hbar/2/M/omega) that appears
|
! the factor 2 comes from the factor sqrt(hbar/2/M/omega) that appears
|
||||||
! in the definition of the electron-phonon matrix element g
|
! in the definition of the electron-phonon matrix element g
|
||||||
|
@ -919,11 +915,10 @@ SUBROUTINE elphsum_simple
|
||||||
! is absent because we sum, not average, over the Fermi surface.
|
! is absent because we sum, not average, over the Fermi surface.
|
||||||
! The factor 2 is provided by the sum over spins
|
! The factor 2 is provided by the sum over spins
|
||||||
!
|
!
|
||||||
|
IF (SQRT (ABS (w2 (nu) ) ) > eps) THEN
|
||||||
IF (SQRT (ABS (w2 (nu) ) ) .GT.eps) THEN
|
|
||||||
! lambda is the adimensional el-ph coupling for mode nu:
|
! lambda is the adimensional el-ph coupling for mode nu:
|
||||||
! lambda(nu)= gamma(nu)/(pi N(Ef) \omega_{q,nu}^2)
|
! lambda(nu)= gamma(nu)/(pi N(Ef) \omega_{q,nu}^2)
|
||||||
lambda = gamma / 3.1415926 / w2 (nu) / dosef
|
lambda = gamma / pi / w2 (nu) / dosef
|
||||||
ELSE
|
ELSE
|
||||||
lambda = 0.0
|
lambda = 0.0
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
|
@ -158,7 +158,7 @@ SUBROUTINE elphsum_wannier(q_index)
|
||||||
! missing calc_sigma_yet
|
! missing calc_sigma_yet
|
||||||
!-----------------------------------------------------------------------
|
!-----------------------------------------------------------------------
|
||||||
USE kinds, ONLY : DP
|
USE kinds, ONLY : DP
|
||||||
USE constants, ONLY : pi
|
USE constants, ONLY : pi, ry_to_cmm1, rytoev
|
||||||
USE ions_base, ONLY : nat, ityp, tau,amass,tau, ntyp => nsp, atm
|
USE ions_base, ONLY : nat, ityp, tau,amass,tau, ntyp => nsp, atm
|
||||||
USE cell_base, ONLY : at, bg, ibrav, celldm
|
USE cell_base, ONLY : at, bg, ibrav, celldm
|
||||||
USE fft_base, ONLY: dfftp
|
USE fft_base, ONLY: dfftp
|
||||||
|
@ -181,14 +181,9 @@ SUBROUTINE elphsum_wannier(q_index)
|
||||||
!
|
!
|
||||||
IMPLICIT NONE
|
IMPLICIT NONE
|
||||||
!
|
!
|
||||||
INTEGER :: q_index
|
INTEGER, INTENT(IN) :: q_index
|
||||||
!
|
|
||||||
!
|
|
||||||
|
|
||||||
! eps = 20 cm^-1, in Ry
|
|
||||||
REAL(DP) :: eps
|
|
||||||
PARAMETER (eps = 20.d0 / 13.6058d0 / 8065.5d0)
|
|
||||||
!
|
!
|
||||||
|
REAL(DP), PARAMETER :: eps = 20_dp/ry_to_cmm1 ! eps = 20 cm^-1, in Ry
|
||||||
!
|
!
|
||||||
INTEGER :: ik, ikk, ikq, isig, ibnd, jbnd, ipert, jpert, nu, mu, &
|
INTEGER :: ik, ikk, ikq, isig, ibnd, jbnd, ipert, jpert, nu, mu, &
|
||||||
vu, ngauss1, nsig, iuelph, ios, iuelphmat,icnt,i,j,rrho,nt,k
|
vu, ngauss1, nsig, iuelph, ios, iuelphmat,icnt,i,j,rrho,nt,k
|
||||||
|
@ -367,11 +362,11 @@ SUBROUTINE elphsum_wannier(q_index)
|
||||||
bg, nsymq, nat, irotmq, minus_q)
|
bg, nsymq, nat, irotmq, minus_q)
|
||||||
!
|
!
|
||||||
WRITE (6, 9000) degauss1, ngauss1
|
WRITE (6, 9000) degauss1, ngauss1
|
||||||
WRITE (6, 9005) dosef, ef1 * 13.6058
|
WRITE (6, 9005) dosef, ef1 * rytoev
|
||||||
WRITE (6, 9006) phase_space
|
WRITE (6, 9006) phase_space
|
||||||
IF (iuelph.NE.0) THEN
|
IF (iuelph.NE.0) THEN
|
||||||
WRITE (iuelph, 9000) degauss1, ngauss1
|
WRITE (iuelph, 9000) degauss1, ngauss1
|
||||||
WRITE (iuelph, 9005) dosef, ef1 * 13.6058
|
WRITE (iuelph, 9005) dosef, ef1 * rytoev
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
DO nu = 1, nmodes
|
DO nu = 1, nmodes
|
||||||
|
|
|
@ -315,7 +315,7 @@ subroutine writemodes (nax,nat,q,w2,z,iout)
|
||||||
! write modes on output file in a readable way
|
! write modes on output file in a readable way
|
||||||
!
|
!
|
||||||
use kinds, only: dp
|
use kinds, only: dp
|
||||||
USE constants, ONLY : RY_TO_THZ, RY_TO_CMM1
|
USE constants, ONLY : ry_to_thz, ry_to_cmm1
|
||||||
implicit none
|
implicit none
|
||||||
! input
|
! input
|
||||||
integer nax, nat, iout
|
integer nax, nat, iout
|
||||||
|
@ -324,16 +324,10 @@ subroutine writemodes (nax,nat,q,w2,z,iout)
|
||||||
! local
|
! local
|
||||||
integer nat3, na, ipol, i, j
|
integer nat3, na, ipol, i, j
|
||||||
real(DP):: freq(3*nat)
|
real(DP):: freq(3*nat)
|
||||||
real(DP):: rydthz,rydcm1,cm1thz,znorm
|
real(DP):: znorm
|
||||||
!
|
!
|
||||||
nat3=3*nat
|
nat3=3*nat
|
||||||
!
|
!
|
||||||
! conversion factors RYD=>THZ, RYD=>1/CM e 1/CM=>THZ
|
|
||||||
!
|
|
||||||
rydthz = RY_TO_THZ
|
|
||||||
rydcm1 = RY_TO_CMM1
|
|
||||||
cm1thz = RY_TO_THZ/RY_TO_CMM1
|
|
||||||
!
|
|
||||||
! write frequencies and normalised displacements
|
! write frequencies and normalised displacements
|
||||||
!
|
!
|
||||||
write(iout,'(5x,''diagonalizing the dynamical matrix ...''/)')
|
write(iout,'(5x,''diagonalizing the dynamical matrix ...''/)')
|
||||||
|
@ -341,9 +335,9 @@ subroutine writemodes (nax,nat,q,w2,z,iout)
|
||||||
write(iout,'(1x,74(''*''))')
|
write(iout,'(1x,74(''*''))')
|
||||||
do i = 1,nat3
|
do i = 1,nat3
|
||||||
!
|
!
|
||||||
freq(i)= sqrt(abs(w2(i)))*rydcm1
|
freq(i)= sqrt(abs(w2(i)))
|
||||||
if (w2(i).lt.0.0_DP) freq(i) = -freq(i)
|
if (w2(i).lt.0.0_DP) freq(i) = -freq(i)
|
||||||
write (iout,9010) i, freq(i)*cm1thz, freq(i)
|
write (iout,9010) i, freq(i)*ry_to_thz, freq(i)*ry_to_cmm1
|
||||||
znorm = 0.0d0
|
znorm = 0.0d0
|
||||||
do j=1,nat3
|
do j=1,nat3
|
||||||
znorm=znorm+abs(z(j,i))**2
|
znorm=znorm+abs(z(j,i))**2
|
||||||
|
@ -359,7 +353,7 @@ subroutine writemodes (nax,nat,q,w2,z,iout)
|
||||||
! if (flvec.ne.' ') then
|
! if (flvec.ne.' ') then
|
||||||
! open (unit=iout,file=flvec,status='unknown',form='unformatted')
|
! open (unit=iout,file=flvec,status='unknown',form='unformatted')
|
||||||
! write(iout) nat, nat3, (ityp(i),i=1,nat), (q(i),i=1,3)
|
! write(iout) nat, nat3, (ityp(i),i=1,nat), (q(i),i=1,3)
|
||||||
! write(iout) (freq(i),i=1,nat3), ((z(i,j),i=1,nat3),j=1,nat3)
|
! write(iout) (freq(i)*ry_to_cmm1,i=1,nat3), ((z(i,j),i=1,nat3),j=1,nat3)
|
||||||
! close(iout)
|
! close(iout)
|
||||||
! end if
|
! end if
|
||||||
!
|
!
|
||||||
|
@ -377,6 +371,7 @@ subroutine writemolden (flmol, gamma, nat, atm, a0, tau, ityp, w2, z)
|
||||||
! write modes on output file in a molden-friendly way
|
! write modes on output file in a molden-friendly way
|
||||||
!
|
!
|
||||||
use kinds, only: dp
|
use kinds, only: dp
|
||||||
|
USE constants, ONLY : ry_to_cmm1
|
||||||
implicit none
|
implicit none
|
||||||
! input
|
! input
|
||||||
integer :: nat, ityp(nat)
|
integer :: nat, ityp(nat)
|
||||||
|
@ -388,7 +383,7 @@ subroutine writemolden (flmol, gamma, nat, atm, a0, tau, ityp, w2, z)
|
||||||
! local
|
! local
|
||||||
integer :: nat3, na, ipol, i, j, iout
|
integer :: nat3, na, ipol, i, j, iout
|
||||||
real(DP) :: freq(3*nat)
|
real(DP) :: freq(3*nat)
|
||||||
real(DP) :: rydcm1, znorm
|
real(DP) :: znorm
|
||||||
!
|
!
|
||||||
if (flmol.eq.' ') then
|
if (flmol.eq.' ') then
|
||||||
return
|
return
|
||||||
|
@ -398,15 +393,13 @@ subroutine writemolden (flmol, gamma, nat, atm, a0, tau, ityp, w2, z)
|
||||||
end if
|
end if
|
||||||
nat3=3*nat
|
nat3=3*nat
|
||||||
!
|
!
|
||||||
rydcm1 = 13.6058d0*8065.5d0
|
|
||||||
!
|
|
||||||
! write frequencies and normalised displacements
|
! write frequencies and normalised displacements
|
||||||
!
|
!
|
||||||
write(iout,'(''[Molden Format]'')')
|
write(iout,'(''[Molden Format]'')')
|
||||||
!
|
!
|
||||||
write(iout,'(''[FREQ]'')')
|
write(iout,'(''[FREQ]'')')
|
||||||
do i = 1,nat3
|
do i = 1,nat3
|
||||||
freq(i)= sqrt(abs(w2(i)))*rydcm1
|
freq(i)= sqrt(abs(w2(i)))*ry_to_cmm1
|
||||||
if (w2(i).lt.0.0d0) freq(i) = 0.0d0
|
if (w2(i).lt.0.0d0) freq(i) = 0.0d0
|
||||||
write (iout,'(f8.2)') freq(i)
|
write (iout,'(f8.2)') freq(i)
|
||||||
end do
|
end do
|
||||||
|
|
Loading…
Reference in New Issue