Commit bb4c908e authored by oliviero's avatar oliviero

Added an user-friendly Environ keyword to specify the kind of environment (environ_type).

By default this keyword is set to "input", but by specifying "water" all the optimized 
parameters will be set automatically during the input processing. Other environ types could 
be added in the future. 


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@8700 c92efa57-630b-4861-b058-cf58834340f0
parent 44da73bd
......@@ -8,7 +8,7 @@
!
!
!----------------------------------------------------------------------
! Module to finite differences gradients on dense real space grid
! Module to compute finite differences gradients on dense real space grid
! Written by Oliviero Andreussi
!----------------------------------------------------------------------
!
......
......@@ -517,6 +517,12 @@ MODULE input_parameters
! 2: prints 3D cube files of physical properties
REAL(DP) :: environ_thr = 1.d-1
! how early in scf should the corrective pot start being calculated
CHARACTER( LEN = 256 ) :: environ_type = 'input'
! keyword to set up all the environment parameters at once to a specific set
! vacuum = all the flags are off (perm=1.d0, surf=0.0, pres=0.0)
! water = parameters optimized for water solutions in Andreussi et al.
! J. Chem. Phys. 136, 064102 (perm=78, surf=50, pres=-0.35)
! input = do not use any predefined set, use paramters from input
!
! Switching function parameters
!
......@@ -534,7 +540,7 @@ MODULE input_parameters
!
! Dielectric solvent parameters
!
REAL(DP) :: env_static_permittivity = 78.D0
REAL(DP) :: env_static_permittivity = 1.D0
! static dielectric permittivity of the solvation model. If set equal
! to one (=vacuum) no dielectric effects
CHARACTER( LEN = 256 ) :: eps_mode = 'electronic'
......@@ -584,7 +590,7 @@ MODULE input_parameters
! external pressure for PV energy, if equal to zero no pressure term
NAMELIST / environ / &
verbose, environ_thr, &
verbose, environ_thr, environ_type, &
stype, rhomax, rhomin, tbeta, &
env_static_permittivity, eps_mode, &
solvationrad, atomicspread, &
......
......@@ -273,13 +273,14 @@ MODULE read_namelists_module
!
verbose = 0
environ_thr = 1.D-1
environ_type = 'input'
!
stype = 1
rhomax = 0.005
rhomin = 0.0001
tbeta = 4.8
!
env_static_permittivity = 78.D0
env_static_permittivity = 1.D0
eps_mode = 'electronic'
solvationrad(:) = 3.D0
atomicspread(:) = 0.5D0
......@@ -290,10 +291,10 @@ MODULE read_namelists_module
mixrhopol = 0.5
tolrhopol = 1.D-10
!
env_surface_tension = 50.D0
env_surface_tension = 0.D0
delta = 0.00001D0
!
env_pressure = -0.35D0
env_pressure = 0.D0
!
RETURN
!
......@@ -904,6 +905,7 @@ MODULE read_namelists_module
!
CALL mp_bcast( verbose, ionode_id )
CALL mp_bcast( environ_thr, ionode_id )
CALL mp_bcast( environ_type, ionode_id )
!
CALL mp_bcast( stype, ionode_id )
CALL mp_bcast( rhomax, ionode_id )
......
......@@ -256,7 +256,7 @@ SUBROUTINE iosys()
!
! ... ENVIRON namelist
!
USE input_parameters, ONLY : verbose, environ_thr, &
USE input_parameters, ONLY : verbose, environ_thr, environ_type, &
stype, rhomax, rhomin, tbeta, &
env_static_permittivity, eps_mode, &
solvationrad, atomicspread, &
......@@ -1206,7 +1206,6 @@ SUBROUTINE iosys()
tbeta_ = LOG( rhomax / rhomin )
END IF
!
env_static_permittivity_ = env_static_permittivity
eps_mode_ = eps_mode
ALLOCATE( solvationrad_( ntyp ) )
solvationrad_( 1:ntyp ) = solvationrad( 1:ntyp )
......@@ -1219,11 +1218,29 @@ SUBROUTINE iosys()
mixrhopol_ = mixrhopol
tolrhopol_ = tolrhopol
!
env_surface_tension_ = &
env_surface_tension*1.D-3*bohr_radius_si**2/rydberg_si
delta_ = delta
!
SELECT CASE (TRIM(environ_type))
! if a specific environ is selected use hardcoded parameters
CASE ('vacuum')
! vacuum, all flags off
env_static_permittivity_ = 1.D0
env_surface_tension_ = 0.D0
env_pressure_ = 0.D0
CASE ('water')
! water, experimental and SCCS tuned parameters
env_static_permittivity_ = 78.3D0
env_surface_tension_ = 50.D0*1.D-3*bohr_radius_si**2/rydberg_si
env_pressure_ = -0.35D0*1.D9/rydberg_si*bohr_radius_si**3
CASE ('input')
! take values from input, this is the default option
env_static_permittivity_ = env_static_permittivity
env_surface_tension_ = &
env_surface_tension*1.D-3*bohr_radius_si**2/rydberg_si
env_pressure_ = env_pressure*1.D9/rydberg_si*bohr_radius_si**3
CASE DEFAULT
call errore ('iosys','unrecognized value for environ_type',1)
END SELECT
!
#endif
!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment