2003-01-27 06:39:33 +08:00
|
|
|
!
|
2003-10-29 18:41:05 +08:00
|
|
|
! Copyright (C) 2002-2003 FPMD & PWSCF group
|
2003-01-27 06:39:33 +08:00
|
|
|
! This file is distributed under the terms of the
|
|
|
|
! GNU General Public License. See the file `License'
|
|
|
|
! in the root directory of the present distribution,
|
|
|
|
! or http://www.gnu.org/copyleft/gpl.txt .
|
|
|
|
!
|
2003-10-29 18:41:05 +08:00
|
|
|
!----------------------------------------------------------------------------
|
|
|
|
MODULE constants
|
|
|
|
!----------------------------------------------------------------------------
|
|
|
|
!
|
2004-11-27 00:49:02 +08:00
|
|
|
USE kinds, ONLY : dbl
|
2003-10-29 18:41:05 +08:00
|
|
|
!
|
|
|
|
! ... The constants needed everywhere
|
|
|
|
!
|
|
|
|
IMPLICIT NONE
|
|
|
|
!
|
|
|
|
SAVE
|
|
|
|
!
|
|
|
|
REAL(dbl) :: PI, tpi, FPI
|
|
|
|
REAL(dbl) :: SQRTPI, SQRTPM1, sqrt2
|
|
|
|
!
|
|
|
|
! ... Physical constants
|
|
|
|
!
|
|
|
|
REAL(dbl), PARAMETER :: K_BOLTZMAN_SI = 1.38066D-23 ! J K^-1
|
|
|
|
REAL(dbl), PARAMETER :: K_BOLTZMAN_AU = 3.1667D-6 ! Hartree K^-1
|
|
|
|
REAL(dbl), PARAMETER :: K_BOLTZMAN_M1_AU = 315795.26D0 ! Hartree^-1 K
|
|
|
|
REAL(dbl), PARAMETER :: FACTEM = 315795.26D0 ! 27.212d0*11605.d0 Hartree^-1 K
|
|
|
|
!
|
|
|
|
! ... Physical constants defining the Atomic Units System
|
|
|
|
!
|
|
|
|
REAL(dbl), PARAMETER :: BOHR_RADIUS_SI = 0.529177D-10 ! m
|
|
|
|
REAL(dbl), PARAMETER :: BOHR_RADIUS_CM = 0.529177D-8 ! cm
|
|
|
|
REAL(dbl), PARAMETER :: BOHR_RADIUS_ANGS = 0.529177D0 ! angstrom
|
|
|
|
REAL(dbl), PARAMETER :: ELECTRONMASS_SI = 9.10953D-31 ! Kg
|
|
|
|
REAL(dbl), PARAMETER :: ELECTRONMASS_UMA = 5.4858D-4 ! uma
|
|
|
|
!
|
|
|
|
! ... Units conversion factors
|
|
|
|
!
|
|
|
|
REAL(dbl), PARAMETER :: ELECTRONVOLT_SI = 1.6021892D-19 ! J
|
|
|
|
REAL(dbl), PARAMETER :: UMA_SI = 1.66057D-27 ! Kg
|
|
|
|
REAL(dbl), PARAMETER :: ANGSTROM_AU = 1.889727D0 ! au
|
|
|
|
REAL(dbl), PARAMETER :: AU_TO_OHMCMM1 = 46000.0D0 ! (ohm cm)^-1
|
|
|
|
REAL(dbl), PARAMETER :: AU_KB = 294210.0D0 ! Kbar
|
2004-09-13 16:49:06 +08:00
|
|
|
REAL(dbl), PARAMETER :: KB_AU = 1.0D0/294210.0D0 ! au
|
|
|
|
REAL(dbl), PARAMETER :: AU_GPA = 29421.0D0 ! GPa
|
|
|
|
REAL(dbl), PARAMETER :: GPA_AU = 1.0D0/29421.0D0 ! au
|
2004-11-03 17:53:12 +08:00
|
|
|
REAL(dbl), PARAMETER :: AU = 27.211652D0 ! eV
|
|
|
|
REAL(dbl), PARAMETER :: RY = 13.605826D0 ! eV
|
2003-10-29 18:41:05 +08:00
|
|
|
REAL(dbl), PARAMETER :: SCMASS = 1822.89D0 ! uma to au ( mass of a proton )
|
|
|
|
REAL(dbl), PARAMETER :: UMA_AU = 1822.89D0 ! au
|
|
|
|
REAL(dbl), PARAMETER :: AU_TERAHERTZ = 2.418D-5 ! THz
|
|
|
|
REAL(dbl), PARAMETER :: TERAHERTZ = 2.418D-5 ! from au to THz
|
|
|
|
REAL(dbl), PARAMETER :: AU_SEC = 2.4189D-17 ! sec
|
2004-08-27 18:20:42 +08:00
|
|
|
REAL(dbl), PARAMETER :: AU_PS = 2.4189D-5 ! sec
|
2003-10-29 18:41:05 +08:00
|
|
|
!
|
|
|
|
!
|
|
|
|
PARAMETER( pi = 3.14159265358979323846_dbl )
|
|
|
|
PARAMETER( tpi = 2.0_dbl * 3.14159265358979323846_dbl )
|
|
|
|
PARAMETER( fpi = 4.0_dbl * 3.14159265358979323846_dbl )
|
|
|
|
PARAMETER( sqrtpi = 1.77245385090551602729_dbl )
|
|
|
|
PARAMETER( sqrtpm1 = 1.0_dbl / sqrtpi )
|
|
|
|
PARAMETER( sqrt2 = 1.41421356237309504880 )
|
|
|
|
!
|
|
|
|
!
|
|
|
|
REAL(dbl), PARAMETER :: rhothr = 1.0e-5_dbl ! tolerance
|
|
|
|
REAL(dbl), PARAMETER :: gsmall = 1.0d-12
|
|
|
|
!
|
2003-11-05 19:35:48 +08:00
|
|
|
REAL(dbl), PARAMETER :: e2 = 2.D0 ! the square of the electron charge
|
|
|
|
REAL(dbl), PARAMETER :: degspin = 2.D0 ! the number of spins per level
|
|
|
|
REAL(dbl), PARAMETER :: rytoev=13.6058d0 ! conversion from Ry to eV
|
2003-10-29 18:41:05 +08:00
|
|
|
!
|
2003-11-05 19:35:48 +08:00
|
|
|
! ... mass conversion: a.m.u to a.u. (Ry)
|
|
|
|
!
|
2004-11-27 00:49:02 +08:00
|
|
|
REAL(dbl), PARAMETER :: amconv= 1.66042D-24 / 9.1095D-28 * 0.5D0
|
2003-11-05 19:35:48 +08:00
|
|
|
!
|
|
|
|
! ... pressure conversion from Ry/(a.u)^3 to K
|
|
|
|
!
|
|
|
|
REAL(dbl), PARAMETER :: uakbar= 147105.d0
|
|
|
|
!
|
|
|
|
! ... zero up to a given accuracy
|
|
|
|
!
|
2004-05-03 16:48:48 +08:00
|
|
|
REAL(dbl), PARAMETER :: eps4 = 1.0D-4
|
2003-11-05 19:35:48 +08:00
|
|
|
REAL(dbl), PARAMETER :: eps8 = 1.0D-8
|
2005-05-27 21:49:19 +08:00
|
|
|
REAL(dbl), PARAMETER :: eps14 = 1.0D-14
|
2003-11-05 19:35:48 +08:00
|
|
|
REAL(dbl), PARAMETER :: eps16 = 1.0D-16
|
|
|
|
REAL(dbl), PARAMETER :: eps32 = 1.0D-32
|
2003-10-29 18:41:05 +08:00
|
|
|
!
|
2004-11-27 00:49:02 +08:00
|
|
|
REAL(dbl), PARAMETER :: eV_to_kelvin = 1.1604D4 ! from eV to Kelvin
|
|
|
|
REAL(dbl), PARAMETER :: convert_E_to_temp = 315642.28D0 * 0.5D0 ! from Ry to Kelvin
|
2003-10-29 18:41:05 +08:00
|
|
|
!
|
|
|
|
END MODULE constants
|