Commit 78fd27ec authored by marsamos's avatar marsamos

path units and files erased from io_files, if(tapos) return added to read_cards

some aditional cleaning for neb purpose in Modules.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/[email protected] c92efa57-630b-4861-b058-cf58834340f0
parent ef857ff7
......@@ -477,7 +477,7 @@ FUNCTION get_clock( label )
!
get_clock = notrunning
!
WRITE( stdout, '("get_clock: no clock for ",A12," found !")') label
WRITE( 0, '("get_clock: no clock for ",A12," found !")') label
!
RETURN
!
......
......@@ -1019,74 +1019,6 @@ MODULE input_parameters
fe_step, fe_nstep, sw_nstep, eq_nstep, g_amplitude
!
! ... variables added for "path" calculations
!
!
! ... these are two auxiliary variables used in read_cards to
! ... distinguish among neb and smd done in the full phase-space
! ... or in the coarse-grained phase-space
!
LOGICAL :: full_phs_path_flag = .false.
LOGICAL :: cg_phs_path_flag = .false.
!
INTEGER :: nstep_path
!
CHARACTER(len=80) :: string_method = 'neb'
! 'neb' traditional neb as described by Jonsson
! 'sm' something else
CHARACTER(len=80) :: string_method_scheme_allowed(2)
DATA string_method_scheme_allowed / 'neb', 'sm' /
!
INTEGER :: input_images = 0
!
INTEGER :: num_of_images = 0
!
CHARACTER(len=80) :: CI_scheme = 'no-CI'
! CI_scheme = 'no-CI' | 'auto' | 'manual'
! set the Climbing Image scheme
! 'no-CI' Climbing Image is not used
! 'auto' Standard Climbing Image
! 'manual' the image is selected by hand
!
CHARACTER(len=80) :: CI_scheme_allowed(3)
DATA CI_scheme_allowed / 'no-CI', 'auto', 'manual' /
!
LOGICAL :: first_last_opt = .false.
LOGICAL :: use_masses = .false.
LOGICAL :: use_freezing = .false.
LOGICAL :: fixed_tan = .false.
!
CHARACTER(len=80) :: opt_scheme = 'quick-min'
! minimization_scheme = 'quick-min' | 'damped-dyn' |
! 'mol-dyn' | 'sd'
! set the minimization algorithm
! 'quick-min' projected molecular dynamics
! 'sd' steepest descent
! 'broyden' broyden acceleration
! 'broyden2' broyden acceleration - better ?
! 'langevin' langevin dynamics
!
CHARACTER(len=80) :: opt_scheme_allowed(5)
DATA opt_scheme_allowed / 'quick-min', 'broyden', 'broyden2', 'sd', 'langevin' /
!
REAL (DP) :: temp_req = 0.0_DP
! meaningful only when minimization_scheme = 'sim-annealing'
REAL (DP) :: ds = 1.0_DP
!
REAL (DP) :: k_max = 0.1_DP, k_min = 0.1_DP
!
REAL (DP) :: path_thr = 0.05_DP
!
!
NAMELIST / PATH / &
string_method, nstep_path, num_of_images, &
CI_scheme, opt_scheme, use_masses, &
first_last_opt, ds, k_max, k_min, temp_req, &
path_thr, fixed_tan, use_freezing
!=----------------------------------------------------------------------------=!
! CELL Namelist Input Parameters
!=----------------------------------------------------------------------------=!
......@@ -1306,7 +1238,6 @@ MODULE input_parameters
!
! ... variable added for NEB ( C.S. 17/10/2003 )
!
REAL(DP), ALLOCATABLE :: pos(:,:)
!
!
! ION_VELOCITIES
......@@ -1548,8 +1479,6 @@ CONTAINS
IF ( allocated( sp_vel ) ) DEALLOCATE( sp_vel )
IF ( allocated( rd_for ) ) DEALLOCATE( rd_for )
!
IF ( allocated( pos ) ) DEALLOCATE( pos )
IF ( allocated( climbing ) ) DEALLOCATE( climbing )
!
IF ( allocated( constr_type_inp ) ) DEALLOCATE( constr_type_inp )
IF ( allocated( constr_inp ) ) DEALLOCATE( constr_inp )
......
......@@ -32,14 +32,6 @@ MODULE io_files
CHARACTER(LEN=256) :: output_drho = ' ' ! name of the file with the output drho
!
CHARACTER(LEN=5 ), PARAMETER :: crash_file = 'CRASH'
CHARACTER (LEN=256) :: &
dat_file = 'os.dat', &! file containing the enegy profile
int_file = 'os.int', &! file containing the interpolated energy profile
crd_file = 'os.crd', &! file containing path coordinates in pw.x input format
path_file = 'os.path', &! file containing informations needed to restart a path simulation
xyz_file = 'os.xyz', &! file containing coordinates of all images in xyz format
axsf_file = 'os.axsf', &! file containing coordinates of all images in axsf format
broy_file = 'os.broyden' ! file containing broyden's history
CHARACTER (LEN=261) :: &
exit_file = "os.EXIT" ! file required for a soft exit
!
......@@ -82,15 +74,6 @@ MODULE io_files
!
! ... "path" specific
!
INTEGER :: iunpath = 6 ! unit for string output ( stdout or what else )
INTEGER :: iunrestart = 2021 ! unit for saving the restart file ( neb_file )
INTEGER :: iundat = 2022 ! unit for saving the enegy profile
INTEGER :: iunint = 2023 ! unit for saving the interpolated energy profile
INTEGER :: iunxyz = 2024 ! unit for saving coordinates ( xyz format )
INTEGER :: iunaxsf = 2025 ! unit for saving coordinates ( axsf format )
INTEGER :: iunbroy = 2026 ! unit for saving broyden's history
INTEGER :: iuncrd = 2027 ! unit for saving coordinates in pw.x input format
!
!... finite electric field (Umari)
!
INTEGER :: iunefield = 31 ! unit to store wavefunction for calculatin electric field operator
......
This diff is collapsed.
......@@ -34,8 +34,7 @@ MODULE read_namelists_module
system_bcast, ee_bcast, electrons_bcast, ions_bcast, cell_bcast, &
press_ai_bcast, wannier_bcast, wannier_ac_bcast, control_checkin, &
system_checkin, electrons_checkin, ions_checkin, cell_checkin, &
wannier_checkin, wannier_ac_checkin, fixval, &
path_read_namelist, path_defaults, path_checkin, path_bcast
wannier_checkin, wannier_ac_checkin, fixval
!
! ... end of module-scope declarations
!
......@@ -521,44 +520,6 @@ MODULE read_namelists_module
!
END SUBROUTINE
!
!=----------------------------------------------------------------------=!
!
! Variables initialization for Namelist PATH
!
!=----------------------------------------------------------------------=!
!
!-----------------------------------------------------------------------
SUBROUTINE path_defaults( )
!-----------------------------------------------------------------------
!
IMPLICIT NONE
!
!
! ... ( 'full' | 'coarse-grained' )
!
! ... defaults for "path" optimisations variables
!
string_method = 'neb'
num_of_images = 0
first_last_opt = .FALSE.
use_masses = .FALSE.
use_freezing = .FALSE.
opt_scheme = 'quick-min'
temp_req = 0.0_DP
ds = 1.0_DP
path_thr = 0.05_DP
CI_scheme = 'no-CI'
k_max = 0.1_DP
k_min = 0.1_DP
fixed_tan = .FALSE.
nstep_path = 1
restart_mode = 'from_scratch'
!
! for reading ions namelist we need to set calculation=relax
!
RETURN
!
END SUBROUTINE
!
!=----------------------------------------------------------------------=!
!
......@@ -1079,42 +1040,6 @@ MODULE read_namelists_module
!
END SUBROUTINE
!
!=----------------------------------------------------------------------=!
!
! Broadcast variables values for Namelist NEB
!
!=----------------------------------------------------------------------=!
!
!-----------------------------------------------------------------------
SUBROUTINE path_bcast()
!-----------------------------------------------------------------------
!
USE io_global, ONLY: ionode_id
USE mp, ONLY: mp_bcast
!
IMPLICIT NONE
!
! ... "path" variables broadcast
!
CALL mp_bcast ( string_method, ionode_id )
CALL mp_bcast( num_of_images, ionode_id )
CALL mp_bcast( first_last_opt, ionode_id )
CALL mp_bcast( use_masses, ionode_id )
CALL mp_bcast( use_freezing, ionode_id )
CALL mp_bcast( fixed_tan, ionode_id )
CALL mp_bcast( CI_scheme, ionode_id )
CALL mp_bcast( opt_scheme, ionode_id )
CALL mp_bcast( temp_req, ionode_id )
CALL mp_bcast( ds, ionode_id )
CALL mp_bcast( k_max, ionode_id )
CALL mp_bcast( k_min, ionode_id )
CALL mp_bcast( path_thr, ionode_id )
CALL mp_bcast( nstep_path, ionode_id )
CALL mp_bcast( restart_mode, ionode_id )
!
RETURN
!
END SUBROUTINE
!
!=----------------------------------------------------------------------=!
!
......@@ -1583,54 +1508,6 @@ MODULE read_namelists_module
!
!=----------------------------------------------------------------------=!
!
!-----------------------------------------------------------------------
SUBROUTINE path_checkin( )
!-----------------------------------------------------------------------
!
IMPLICIT NONE
!
CHARACTER(LEN=20) :: sub_name = ' path_checkin '
INTEGER :: i
LOGICAL :: allowed = .FALSE.
!
!
! ... general "path" variables checkin
IF ( ds < 0.0_DP ) &
CALL errore( sub_name,' ds out of range ',1)
IF ( temp_req < 0.0_DP ) &
CALL errore( sub_name,' temp_req out of range ',1)
!
allowed = .FALSE.
DO i = 1, SIZE( opt_scheme_allowed )
IF ( TRIM( opt_scheme ) == &
opt_scheme_allowed(i) ) allowed = .TRUE.
END DO
IF ( .NOT. allowed ) &
CALL errore( sub_name, ' opt_scheme '''// &
& TRIM( opt_scheme )//''' not allowed ', 1 )
!
!
! ... NEB(SM) specific checkin
!
IF ( k_max < 0.0_DP ) CALL errore( sub_name, 'k_max out of range', 1 )
IF ( k_min < 0.0_DP ) CALL errore( sub_name, 'k_min out of range', 1 )
IF ( k_max < k_min ) CALL errore( sub_name, 'k_max < k_min', 1 )
!
! IF ( nstep_path < 1 ) CALL errore ( sub_name, 'step_path out of range', 1 )
!
allowed = .FALSE.
DO i = 1, SIZE( CI_scheme_allowed )
IF ( TRIM( CI_scheme ) == CI_scheme_allowed(i) ) allowed = .TRUE.
END DO
!
IF ( .NOT. allowed ) &
CALL errore( sub_name, ' CI_scheme ''' // &
& TRIM( CI_scheme ) //''' not allowed ', 1 )
!
RETURN
!
END SUBROUTINE
!
!=----------------------------------------------------------------------=!
!
!-----------------------------------------------------------------------
......@@ -1786,27 +1663,27 @@ MODULE read_namelists_module
ELSE IF( prog == 'PW' ) THEN
ion_dynamics = 'beeman'
END IF
CASE ( 'neb' )
! CASE ( 'neb' )
!
! ... "path" optimizations
!
IF( prog == 'CP' ) THEN
! IF( prog == 'CP' ) THEN
!
electron_dynamics = 'damp'
ion_dynamics = 'none'
cell_dynamics = 'none'
! electron_dynamics = 'damp'
! ion_dynamics = 'none'
! cell_dynamics = 'none'
!
END IF
! END IF
!
CASE ( 'smd' )
!
IF( prog == 'CP' ) THEN
!
electron_dynamics = 'damp'
ion_dynamics = 'damp'
!
END IF
! CASE ( 'smd' )
!
! IF( prog == 'CP' ) THEN
! !
! electron_dynamics = 'damp'
! ion_dynamics = 'damp'
! !
! END IF
! !
CASE DEFAULT
!
CALL errore( sub_name,' calculation '// &
......@@ -1894,9 +1771,9 @@ MODULE read_namelists_module
CALL cell_defaults( prog )
CALL ee_defaults( prog )
ENDIF
IF( prog == 'SM') THEN
CALL path_defaults()
ENDIF
! IF( prog == 'SM') THEN
! CALL path_defaults()
! ENDIF
!
! ... Here start reading standard input file
!
......@@ -1937,7 +1814,7 @@ MODULE read_namelists_module
!
CALL system_checkin( prog )
!
CALL allocate_input_ions( ntyp, nat )
! CALL allocate_input_ions( ntyp, nat )
!
! ... ELECTRONS namelist
!
......@@ -2061,70 +1938,13 @@ MODULE read_namelists_module
!
ENDIF
!
IF (prog == 'SM') THEN
CALL path_read_namelist(5)
ENDIF
! IF (prog == 'SM') THEN
! CALL path_read_namelist(5)
! ENDIF
!
RETURN
!
END SUBROUTINE read_namelists
!
!
!-----------------------------------------------------------------------
SUBROUTINE path_read_namelist(unit)
!-----------------------------------------------------------------------
!
! this routine reads data from standard input and puts them into
! module-scope variables (accessible from other routines by including
! this module, or the one that contains them)
! ----------------------------------------------
!
! ... declare modules
!
USE io_global, ONLY : ionode, ionode_id
USE mp, ONLY : mp_bcast
!
IMPLICIT NONE
!
! ... declare variables
!
INTEGER, intent(in) :: unit
!
!
! ... declare other variables
!
INTEGER :: ios
!
! ... end of declarations
!
! ----------------------------------------------
!
!
! ... default settings for all namelists
!
CALL path_defaults( )
!
! ... Here start reading standard input file
!
! ... PATH namelist
!
ios = 0
IF ( ionode ) THEN
!
READ( unit, path, iostat = ios )
!
END IF
CALL mp_bcast( ios, ionode_id )
IF( ios /= 0 ) THEN
CALL errore( ' path_read_namelists ', &
& ' reading namelist path ', ABS(ios) )
END IF
!
CALL path_bcast( )
CALL path_checkin( )
!
RETURN
!
END SUBROUTINE path_read_namelist
!
END MODULE read_namelists_module
This diff is collapsed.
......@@ -9,7 +9,7 @@ MODULE read_xml_fields_module
!
USE io_global, ONLY : xmlinputunit
USE kinds, ONLY : DP
USE input_parameters
USE input_parameters
!
!
IMPLICIT NONE
......@@ -219,9 +219,9 @@ CONTAINS
CALL iotk_scan_dat_inside( xmlinputunit, tmpstr, ierr = ierr )
cell_velocities = clean_str(tmpstr)
!
CASE ( 'CI_scheme' )
CALL iotk_scan_dat_inside( xmlinputunit, tmpstr, ierr = ierr )
CI_scheme = clean_str(tmpstr)
! CASE ( 'CI_scheme' )
! CALL iotk_scan_dat_inside( xmlinputunit, tmpstr, ierr = ierr )
! CI_scheme = clean_str(tmpstr)
!
CASE ( 'comp_thr' )
CALL iotk_scan_dat_inside( xmlinputunit, comp_thr, ierr = ierr )
......@@ -273,8 +273,8 @@ CONTAINS
CALL iotk_scan_dat_inside( xmlinputunit, tmpstr, ierr = ierr )
disk_io = clean_str(tmpstr)
!
CASE ( 'ds' )
CALL iotk_scan_dat_inside( xmlinputunit, ds, ierr = ierr )
! CASE ( 'ds' )
! CALL iotk_scan_dat_inside( xmlinputunit, ds, ierr = ierr )
!
CASE ( 'dthr' )
CALL iotk_scan_dat_inside( xmlinputunit, dthr, ierr = ierr )
......@@ -374,8 +374,8 @@ CONTAINS
CALL iotk_scan_dat_inside( xmlinputunit, tmpstr, ierr = ierr )
exchange_grad_corr = clean_str(tmpstr)
!
CASE ( 'first_last_opt' )
CALL iotk_scan_dat_inside( xmlinputunit, first_last_opt, ierr = ierr )
! CASE ( 'first_last_opt' )
! CALL iotk_scan_dat_inside( xmlinputunit, first_last_opt, ierr = ierr )
!
CASE ( 'fixed_magnetization' )
CALL iotk_scan_dat_inside( xmlinputunit, fixed_magnetization, ierr = ierr )
......@@ -407,11 +407,11 @@ CONTAINS
CASE ( 'greasp' )
CALL iotk_scan_dat_inside( xmlinputunit, greasp, ierr = ierr )
!
CASE ( 'k_max' )
CALL iotk_scan_dat_inside( xmlinputunit, k_max, ierr = ierr )
! CASE ( 'k_max' )
! CALL iotk_scan_dat_inside( xmlinputunit, k_max, ierr = ierr )
!
CASE ( 'k_min' )
CALL iotk_scan_dat_inside( xmlinputunit, k_min, ierr = ierr )
! CASE ( 'k_min' )
! CALL iotk_scan_dat_inside( xmlinputunit, k_min, ierr = ierr )
!
CASE ( 'iprint' )
CALL iotk_scan_dat_inside( xmlinputunit, iprint, ierr = ierr )
......@@ -602,9 +602,9 @@ CONTAINS
CALL iotk_scan_dat_inside( xmlinputunit, tmpstr, ierr = ierr )
occupations = clean_str(tmpstr)
!
CASE ( 'opt_scheme' )
CALL iotk_scan_dat_inside( xmlinputunit, tmpstr, ierr = ierr )
opt_scheme = clean_str(tmpstr)
! CASE ( 'opt_scheme' )
! CALL iotk_scan_dat_inside( xmlinputunit, tmpstr, ierr = ierr )
! opt_scheme = clean_str(tmpstr)
!
CASE ( 'ortho_eps' )
CALL iotk_scan_dat_inside( xmlinputunit, ortho_eps, ierr = ierr )
......@@ -632,12 +632,12 @@ CONTAINS
CASE ( 'passop' )
CALL iotk_scan_dat_inside( xmlinputunit, passop, ierr = ierr )
!
CASE ( 'path_thr' )
CALL iotk_scan_dat_inside( xmlinputunit, path_thr, ierr = ierr )
! CASE ( 'path_thr' )
! CALL iotk_scan_dat_inside( xmlinputunit, path_thr, ierr = ierr )
!
CASE ( 'phase_space' )
CALL iotk_scan_dat_inside( xmlinputunit, tmpstr, ierr = ierr )
phase_space = clean_str(tmpstr)
! CASE ( 'phase_space' )
! CALL iotk_scan_dat_inside( xmlinputunit, tmpstr, ierr = ierr )
! phase_space = clean_str(tmpstr)
!
CASE ( 'pot_extrapolation' )
CALL iotk_scan_dat_inside( xmlinputunit, tmpstr, ierr = ierr )
......@@ -708,8 +708,8 @@ CONTAINS
CASE ( 'tefield' )
CALL iotk_scan_dat_inside( xmlinputunit, tefield, ierr = ierr )
!
CASE ( 'temp_req' )
CALL iotk_scan_dat_inside( xmlinputunit, temp_req, ierr = ierr )
! CASE ( 'temp_req' )
! CALL iotk_scan_dat_inside( xmlinputunit, temp_req, ierr = ierr )
!
CASE ( 'temph' )
CALL iotk_scan_dat_inside( xmlinputunit, temph, ierr = ierr )
......@@ -751,11 +751,11 @@ CONTAINS
CALL iotk_scan_dat_inside( xmlinputunit, tmpstr, ierr = ierr )
U_projection_type = clean_str(tmpstr)
!
CASE ( 'use_masses' )
CALL iotk_scan_dat_inside( xmlinputunit, use_masses, ierr = ierr )
! CASE ( 'use_masses' )
! CALL iotk_scan_dat_inside( xmlinputunit, use_masses, ierr = ierr )
!
CASE ( 'use_freezing' )
CALL iotk_scan_dat_inside( xmlinputunit, use_freezing, ierr = ierr )
! CASE ( 'use_freezing' )
! CALL iotk_scan_dat_inside( xmlinputunit, use_freezing, ierr = ierr )
!
CASE ( 'upscale' )
CALL iotk_scan_dat_inside( xmlinputunit, upscale, ierr = ierr )
......
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