2003-01-20 05:58:50 +08:00
|
|
|
!
|
2005-07-02 04:39:45 +08:00
|
|
|
! Copyright (C) 2002-2005 Quantum-ESPRESSO group
|
2003-01-20 05:58:50 +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 .
|
|
|
|
!
|
2005-07-08 10:56:05 +08:00
|
|
|
!----------------------------------------------------------------------------
|
2005-07-01 22:26:10 +08:00
|
|
|
MODULE input
|
2005-07-08 10:56:05 +08:00
|
|
|
!---------------------------------------------------------------------------
|
2005-07-01 22:26:10 +08:00
|
|
|
!
|
2005-08-28 22:09:42 +08:00
|
|
|
USE kinds, ONLY: DP
|
2005-07-01 22:26:10 +08:00
|
|
|
!
|
All namelists and cards moved to Modules/input_parameters.f90 .
From now on, all new input variables should be added
to this module, and then copied to the code internal
variables in the input.f90 subroutine
The namelists and cards parsers are in :
Modules/read_namelists.f90 and Modules/read_cards.f90
files input_parameters.f90 read_namelists.f90 read_cards.f90
are shared by all codes, while each code has its own version
of input.f90 ( used to copy input values into internals variables ).
EXAMPLE:
suppose you need to add a new input variable called "pippo"
to the namelist control, then:
1) add pippo to the input_parameters.f90 file containing the
namelist control
INTEGER :: pippo = 0
NAMELIST / control / ....., pippo
remember: always set an initialization value!
2) add pippo to the control_default subroutine
( cantained in module read_namelists.f90 )
subroutine control_default( prog )
...
IF( prog == 'PW' ) pippo = 10
...
end subroutine
this routine set the default value for pippo,
that could vary with the code
3) add pippo to the control_bcast subroutine
( cantained in module read_namelists.f90 )
subroutine control_bcast( )
...
call mp_bcast( pippo )
...
end subroutine
4) add pippo to the control_checkin subroutine
( cantained in module read_namelists.f90 )
subroutine control_checking( prog )
...
IF( pippo < 0 ) &
CALL error(' control_checkin ',' variable pippo less than 0 ', 1 )
...
end subroutine
5) Copy the value of pippo in the code internal variables
( file input.f90 )
subroutine iosys()
use input_parameters, only: ...., pippo
use pwcom, only: ....., myvar
...
call read_namelists( 'PW' )
...
myvar = pippo
...
end subroutine
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@282 c92efa57-630b-4861-b058-cf58834340f0
2003-07-31 21:24:20 +08:00
|
|
|
IMPLICIT NONE
|
|
|
|
SAVE
|
2005-07-01 22:26:10 +08:00
|
|
|
!
|
2005-03-02 18:03:55 +08:00
|
|
|
PRIVATE ! Input Subroutines
|
|
|
|
! should be called in the following order
|
|
|
|
!
|
|
|
|
PUBLIC :: read_input_file ! a) This sub. should be called first
|
|
|
|
PUBLIC :: iosys_pseudo ! b) then read pseudo files
|
|
|
|
PUBLIC :: iosys ! c) finally copy variables to modules
|
2006-02-28 04:06:23 +08:00
|
|
|
PUBLIC :: modules_setup, set_control_flags
|
2005-07-01 22:26:10 +08:00
|
|
|
!
|
2004-11-29 06:11:41 +08:00
|
|
|
LOGICAL :: has_been_read = .FALSE.
|
2005-07-01 22:26:10 +08:00
|
|
|
!
|
|
|
|
CONTAINS
|
2005-07-08 10:56:05 +08:00
|
|
|
!
|
|
|
|
!-------------------------------------------------------------------------
|
|
|
|
SUBROUTINE read_input_file()
|
|
|
|
!-------------------------------------------------------------------------
|
|
|
|
!
|
|
|
|
USE read_namelists_module, ONLY : read_namelists
|
|
|
|
USE read_cards_module, ONLY : read_cards
|
|
|
|
USE input_parameters, ONLY : calculation, title
|
2007-11-01 21:39:43 +08:00
|
|
|
USE control_flags, ONLY : lneb, lpath, lwf, lmetadyn, &
|
2005-09-19 07:10:50 +08:00
|
|
|
program_name
|
2005-07-08 10:56:05 +08:00
|
|
|
USE printout_base, ONLY : title_ => title
|
2006-05-03 22:19:57 +08:00
|
|
|
USE io_global, ONLY : meta_ionode, stdout
|
2007-02-26 22:48:03 +08:00
|
|
|
USE xml_input, ONLY : xml_input_dump
|
2005-07-08 10:56:05 +08:00
|
|
|
!
|
|
|
|
IMPLICIT NONE
|
|
|
|
!
|
|
|
|
CHARACTER(LEN=2) :: prog
|
|
|
|
!
|
2005-07-18 09:16:41 +08:00
|
|
|
!
|
2005-09-19 07:49:24 +08:00
|
|
|
prog = 'CP'
|
2005-07-08 10:56:05 +08:00
|
|
|
!
|
2007-02-26 22:48:03 +08:00
|
|
|
IF ( meta_ionode ) THEN
|
|
|
|
CALL xml_input_dump()
|
|
|
|
CALL input_from_file()
|
|
|
|
END IF
|
2005-07-08 10:56:05 +08:00
|
|
|
!
|
|
|
|
! ... Read NAMELISTS
|
|
|
|
!
|
|
|
|
CALL read_namelists( prog )
|
|
|
|
!
|
|
|
|
! ... Read CARDS
|
|
|
|
!
|
|
|
|
CALL read_cards( prog )
|
|
|
|
!
|
2005-09-19 07:49:24 +08:00
|
|
|
IF( TRIM( calculation ) == 'fpmd' ) program_name = 'FPMD'
|
|
|
|
!
|
2006-04-03 05:29:28 +08:00
|
|
|
IF( TRIM( calculation ) == 'fpmd-neb' ) THEN
|
|
|
|
!
|
|
|
|
program_name = 'FPMD'
|
|
|
|
lneb = .TRUE.
|
|
|
|
!
|
|
|
|
ELSE
|
|
|
|
!
|
|
|
|
lneb = ( TRIM( calculation ) == 'neb' )
|
|
|
|
!
|
|
|
|
END IF
|
2005-07-08 10:56:05 +08:00
|
|
|
!
|
2007-11-01 21:39:43 +08:00
|
|
|
lpath = lneb
|
2005-07-18 09:16:41 +08:00
|
|
|
!
|
2005-09-19 07:10:50 +08:00
|
|
|
lmetadyn = ( TRIM( calculation ) == 'metadyn' )
|
|
|
|
!
|
2005-07-08 10:56:05 +08:00
|
|
|
lwf = ( TRIM( calculation ) == 'cp-wf' )
|
|
|
|
!
|
|
|
|
! ... Set job title and print it on standard output
|
|
|
|
!
|
|
|
|
title_ = title
|
|
|
|
!
|
|
|
|
WRITE( stdout, '(/,3X,"Job Title: ",A )' ) TRIM( title_ )
|
|
|
|
!
|
|
|
|
has_been_read = .TRUE.
|
|
|
|
!
|
|
|
|
RETURN
|
2005-07-01 22:26:10 +08:00
|
|
|
!
|
2005-05-18 16:49:38 +08:00
|
|
|
END SUBROUTINE read_input_file
|
2005-03-02 18:03:55 +08:00
|
|
|
!
|
2005-07-18 09:16:41 +08:00
|
|
|
!-------------------------------------------------------------------------
|
|
|
|
SUBROUTINE iosys_pseudo()
|
|
|
|
!-------------------------------------------------------------------------
|
|
|
|
!
|
|
|
|
USE input_parameters, ONLY : atom_pfile, pseudo_dir, ntyp, nat, &
|
2006-08-12 20:27:56 +08:00
|
|
|
prefix, outdir, xc_type
|
2005-07-18 09:16:41 +08:00
|
|
|
USE control_flags, ONLY : program_name
|
|
|
|
USE parameters, ONLY : nsx
|
|
|
|
USE read_pseudo_module_fpmd, ONLY : readpp
|
|
|
|
USE io_files, ONLY : psfile_ => psfile , &
|
|
|
|
pseudo_dir_ => pseudo_dir, &
|
2005-07-28 00:09:03 +08:00
|
|
|
outdir_ => outdir, &
|
2005-07-18 09:16:41 +08:00
|
|
|
prefix_ => prefix
|
|
|
|
USE ions_base, ONLY : nsp_ => nsp, nat_ => nat
|
|
|
|
!
|
|
|
|
IMPLICIT NONE
|
|
|
|
!
|
|
|
|
!
|
|
|
|
IF ( .NOT. has_been_read ) &
|
|
|
|
CALL errore( 'iosys_pseudo ', 'input file has not been read yet!', 1 )
|
|
|
|
!
|
|
|
|
prefix_ = TRIM( prefix )
|
2005-07-28 00:09:03 +08:00
|
|
|
outdir_ = TRIM( outdir )
|
2005-07-18 09:16:41 +08:00
|
|
|
!
|
|
|
|
! ... Set internal variables for the number of species and number of atoms
|
|
|
|
!
|
|
|
|
nsp_ = ntyp
|
|
|
|
nat_ = nat
|
|
|
|
!
|
|
|
|
psfile_ = ' '
|
|
|
|
psfile_(1:nsp_) = atom_pfile(1:nsp_)
|
|
|
|
pseudo_dir_ = TRIM( pseudo_dir )
|
|
|
|
!
|
|
|
|
! ... read in pseudopotentials and wavefunctions files
|
|
|
|
!
|
|
|
|
CALL readpp( xc_type )
|
|
|
|
!
|
|
|
|
RETURN
|
|
|
|
!
|
2005-05-18 16:49:38 +08:00
|
|
|
END SUBROUTINE iosys_pseudo
|
2005-03-02 18:03:55 +08:00
|
|
|
!
|
2005-07-18 09:16:41 +08:00
|
|
|
!-------------------------------------------------------------------------
|
|
|
|
SUBROUTINE iosys()
|
|
|
|
!-------------------------------------------------------------------------
|
|
|
|
!
|
2006-05-11 02:17:56 +08:00
|
|
|
USE control_flags, ONLY : fix_dependencies, program_name, &
|
2007-11-01 21:39:43 +08:00
|
|
|
lconstrain, lmetadyn
|
2006-05-11 02:17:56 +08:00
|
|
|
USE io_global, ONLY : meta_ionode, stdout
|
|
|
|
USE ions_base, ONLY : nat, tau, ityp
|
|
|
|
USE constraints_module, ONLY : init_constraint
|
|
|
|
USE metadyn_vars, ONLY : init_metadyn_vars
|
2005-07-18 09:16:41 +08:00
|
|
|
!
|
2005-01-26 18:15:04 +08:00
|
|
|
IMPLICIT NONE
|
2005-07-18 09:16:41 +08:00
|
|
|
!
|
|
|
|
!
|
2006-05-03 22:19:57 +08:00
|
|
|
IF ( meta_ionode ) THEN
|
2005-03-02 18:03:55 +08:00
|
|
|
!
|
2005-07-18 09:16:41 +08:00
|
|
|
WRITE( UNIT = stdout, &
|
|
|
|
FMT = "(//,3X,'Main Simulation Parameters (from input)',/ &
|
|
|
|
& ,3X,'---------------------------------------')" )
|
2005-03-02 18:03:55 +08:00
|
|
|
!
|
2005-07-18 09:16:41 +08:00
|
|
|
END IF
|
|
|
|
!
|
|
|
|
! ... Set internal flags according to the input
|
|
|
|
!
|
|
|
|
CALL set_control_flags()
|
|
|
|
!
|
2006-02-28 04:06:23 +08:00
|
|
|
! ... write to stdout basic simulation parameters
|
2005-07-18 09:16:41 +08:00
|
|
|
!
|
|
|
|
CALL input_info()
|
|
|
|
!
|
2006-02-28 04:06:23 +08:00
|
|
|
! ... call the module specific setup routine
|
2005-07-18 09:16:41 +08:00
|
|
|
!
|
|
|
|
CALL modules_setup()
|
|
|
|
!
|
2006-05-11 02:17:56 +08:00
|
|
|
IF ( lconstrain ) CALL init_constraint( nat, tau, ityp, 1.D0 )
|
|
|
|
!
|
|
|
|
IF ( lmetadyn ) CALL init_metadyn_vars()
|
|
|
|
!
|
2006-02-28 04:06:23 +08:00
|
|
|
! ... fix values for dependencies
|
2005-07-18 09:16:41 +08:00
|
|
|
!
|
2006-09-11 19:06:42 +08:00
|
|
|
IF ( program_name == 'FPMD' ) THEN
|
|
|
|
!
|
|
|
|
IF ( lconstrain .OR. lmetadyn ) THEN
|
|
|
|
|
|
|
|
! ... Apply sort to constraints atomic index
|
|
|
|
|
|
|
|
CALL new_atomind_constraints()
|
|
|
|
|
|
|
|
END IF
|
|
|
|
|
|
|
|
CALL fix_dependencies()
|
|
|
|
!
|
|
|
|
END IF
|
2005-07-18 09:16:41 +08:00
|
|
|
!
|
2006-02-28 04:06:23 +08:00
|
|
|
! ... write to stdout input module information
|
2005-07-18 09:16:41 +08:00
|
|
|
!
|
|
|
|
CALL modules_info()
|
|
|
|
!
|
2005-01-26 18:15:04 +08:00
|
|
|
RETURN
|
2005-07-18 09:16:41 +08:00
|
|
|
!
|
2005-01-26 18:15:04 +08:00
|
|
|
END SUBROUTINE iosys
|
2005-03-02 18:03:55 +08:00
|
|
|
!
|
2005-07-18 09:16:41 +08:00
|
|
|
!-------------------------------------------------------------------------
|
|
|
|
SUBROUTINE set_control_flags()
|
|
|
|
!-------------------------------------------------------------------------
|
|
|
|
!
|
2006-05-03 22:19:57 +08:00
|
|
|
USE io_global, ONLY : stdout
|
2005-09-19 07:10:50 +08:00
|
|
|
USE autopilot, ONLY : auto_check
|
|
|
|
USE autopilot, ONLY : restart_p
|
|
|
|
USE control_flags, ONLY : lcoarsegrained, ldamped, lmetadyn
|
2005-07-18 09:16:41 +08:00
|
|
|
USE control_flags, ONLY : program_name
|
|
|
|
USE control_flags, ONLY : ndw_ => ndw, &
|
|
|
|
ndr_ => ndr, &
|
|
|
|
iprint_ => iprint, &
|
|
|
|
isave_ => isave, &
|
|
|
|
tstress_ => tstress, &
|
|
|
|
tprnfor_ => tprnfor, &
|
|
|
|
tprnsfac_ => tprnsfac, &
|
|
|
|
ampre_ => ampre, &
|
|
|
|
trane_ => trane, &
|
|
|
|
newnfi_ => newnfi, &
|
|
|
|
tnewnfi_ => tnewnfi, &
|
|
|
|
tdipole_ => tdipole, &
|
|
|
|
nomore_ => nomore, &
|
|
|
|
memchk_ => memchk, &
|
|
|
|
tpre_ => tpre, &
|
|
|
|
timing_ => timing, &
|
|
|
|
iprsta_ => iprsta, &
|
|
|
|
taurdr_ => taurdr, &
|
|
|
|
nbeg_ => nbeg, &
|
|
|
|
gamma_only_ => gamma_only, &
|
|
|
|
tchi2_ => tchi2, &
|
|
|
|
tatomicwfc_ => tatomicwfc, &
|
|
|
|
printwfc_ => printwfc, &
|
2005-09-20 23:17:18 +08:00
|
|
|
tortho_ => tortho, &
|
2007-02-22 16:45:23 +08:00
|
|
|
nstep_ => nstep
|
2006-12-31 19:09:03 +08:00
|
|
|
USE control_flags, ONLY : tsde_ => tsde, &
|
2005-07-18 09:16:41 +08:00
|
|
|
tsteepdesc_ => tsteepdesc, &
|
|
|
|
tzeroe_ => tzeroe, &
|
|
|
|
tdamp_ => tdamp, &
|
|
|
|
trhor_ => trhor, &
|
2006-08-11 16:29:52 +08:00
|
|
|
trhow_ => trhow, &
|
2007-02-22 16:45:23 +08:00
|
|
|
tksw_ => tksw, &
|
2005-07-18 09:16:41 +08:00
|
|
|
ortho_eps_ => ortho_eps, &
|
|
|
|
ortho_max_ => ortho_max, &
|
|
|
|
tnosee_ => tnosee
|
|
|
|
USE control_flags, ONLY : tdampions_ => tdampions, &
|
|
|
|
tfor_ => tfor, &
|
|
|
|
tsdp_ => tsdp, &
|
2006-12-31 19:09:03 +08:00
|
|
|
lfixatom, tconvthrs
|
2005-07-18 09:16:41 +08:00
|
|
|
USE control_flags, ONLY : tnosep_ => tnosep, &
|
|
|
|
tcap_ => tcap, &
|
|
|
|
tcp_ => tcp, &
|
|
|
|
tolp_ => tolp, &
|
|
|
|
tzerop_ => tzerop, &
|
|
|
|
tv0rd_ => tv0rd, &
|
|
|
|
tranp_ => tranp, &
|
2006-03-18 03:36:47 +08:00
|
|
|
amprp_ => amprp, &
|
|
|
|
dt_old_ => dt_old
|
2005-07-18 09:16:41 +08:00
|
|
|
USE control_flags, ONLY : tionstep_ => tionstep, &
|
|
|
|
nstepe_ => nstepe
|
|
|
|
USE control_flags, ONLY : tzeroc_ => tzeroc, &
|
|
|
|
tnoseh_ => tnoseh, &
|
|
|
|
thdyn_ => thdyn, &
|
|
|
|
tsdc_ => tsdc, &
|
|
|
|
tbeg_ => tbeg
|
|
|
|
USE control_flags, ONLY : ekin_conv_thr_ => ekin_conv_thr, &
|
|
|
|
etot_conv_thr_ => etot_conv_thr, &
|
|
|
|
forc_conv_thr_ => forc_conv_thr, &
|
|
|
|
ekin_maxiter_ => ekin_maxiter, &
|
|
|
|
etot_maxiter_ => etot_maxiter, &
|
|
|
|
forc_maxiter_ => forc_maxiter
|
|
|
|
USE control_flags, ONLY : force_pairing_ => force_pairing
|
2006-06-26 07:15:20 +08:00
|
|
|
USE control_flags, ONLY : remove_rigid_rot_ => remove_rigid_rot
|
2006-08-11 16:29:52 +08:00
|
|
|
USE control_flags, ONLY : iesr, tvhmean, vhrmin, vhrmax, vhasse
|
2006-08-11 23:39:37 +08:00
|
|
|
USE control_flags, ONLY : tprojwfc
|
2005-07-18 09:16:41 +08:00
|
|
|
!
|
|
|
|
! ... Other modules
|
|
|
|
!
|
2006-06-07 04:41:34 +08:00
|
|
|
USE cp_main_variables, ONLY : nprint_nfi
|
2005-07-18 09:16:41 +08:00
|
|
|
USE wave_base, ONLY : frice_ => frice
|
|
|
|
USE ions_base, ONLY : fricp_ => fricp
|
|
|
|
USE cell_base, ONLY : frich_ => frich
|
|
|
|
USE time_step, ONLY : set_time_step
|
|
|
|
USE cp_electronic_mass, ONLY : emass_ => emass, &
|
|
|
|
emaec_ => emass_cutoff
|
|
|
|
!
|
2006-12-23 00:50:40 +08:00
|
|
|
USE efield_module, ONLY : tefield_ => tefield, &
|
|
|
|
epol_ => epol, &
|
|
|
|
efield_ => efield, &
|
|
|
|
tefield2_ => tefield2, &
|
|
|
|
epol2_ => epol2, &
|
|
|
|
efield2_ => efield2
|
2006-06-26 07:15:20 +08:00
|
|
|
!
|
2006-12-23 00:50:40 +08:00
|
|
|
USE cvan, ONLY : nvb
|
2007-08-10 04:49:40 +08:00
|
|
|
USE control_flags, ONLY : ortho_para_ => ortho_para
|
2006-06-26 07:15:20 +08:00
|
|
|
!
|
2006-04-14 05:38:16 +08:00
|
|
|
USE input_parameters, ONLY: &
|
2006-12-31 19:09:03 +08:00
|
|
|
electron_dynamics, electron_damping, electron_temperature, &
|
2005-07-18 09:16:41 +08:00
|
|
|
ion_dynamics, ekin_conv_thr, etot_conv_thr, forc_conv_thr, ion_maxstep,&
|
2005-01-16 04:07:08 +08:00
|
|
|
electron_maxstep, ion_damping, ion_temperature, ion_velocities, tranp, &
|
2005-07-18 09:16:41 +08:00
|
|
|
amprp, ion_nstepe, cell_nstepe, cell_dynamics, cell_damping, &
|
|
|
|
cell_parameters, cell_velocities, cell_temperature, force_pairing, &
|
|
|
|
tapos, tavel, ecutwfc, emass, emass_cutoff, taspc, trd_ht, ibrav, &
|
|
|
|
ortho_eps, ortho_max, ntyp, tolp, tchi2_inp, calculation, disk_io, dt, &
|
|
|
|
tcg, ndr, ndw, iprint, isave, tstress, k_points, tprnfor, verbosity, &
|
2006-12-31 19:09:03 +08:00
|
|
|
tdipole_card, tnewnfi_card, newnfi_card, &
|
2005-07-18 09:16:41 +08:00
|
|
|
ampre, nstep, restart_mode, ion_positions, startingwfc, printwfc, &
|
2005-10-22 02:14:30 +08:00
|
|
|
orthogonalization, electron_velocities, nat, if_pos, phase_space, &
|
2006-08-11 16:29:52 +08:00
|
|
|
tefield, epol, efield, tefield2, epol2, efield2, remove_rigid_rot, &
|
2006-12-23 00:50:40 +08:00
|
|
|
iesr_inp, vhrmax_inp, vhrmin_inp, tvhmean_inp, vhasse_inp, saverho, &
|
|
|
|
ortho_para
|
2004-11-29 06:11:41 +08:00
|
|
|
!
|
|
|
|
IMPLICIT NONE
|
2005-01-15 18:53:46 +08:00
|
|
|
!
|
2005-09-20 23:17:18 +08:00
|
|
|
!
|
2005-07-18 09:16:41 +08:00
|
|
|
IF ( .NOT. has_been_read ) &
|
|
|
|
CALL errore( 'iosys ', 'input file has not been read yet!', 1 )
|
|
|
|
!
|
|
|
|
ndr_ = ndr
|
|
|
|
ndw_ = ndw
|
|
|
|
iprint_ = iprint
|
|
|
|
isave_ = isave
|
|
|
|
tstress_ = tstress
|
|
|
|
tpre_ = tstress
|
|
|
|
gamma_only_ = ( TRIM( k_points ) == 'gamma' )
|
|
|
|
tprnfor_ = tprnfor
|
|
|
|
printwfc_ = printwfc
|
|
|
|
tchi2_ = tchi2_inp
|
2005-01-15 18:53:46 +08:00
|
|
|
ekin_conv_thr_ = ekin_conv_thr
|
|
|
|
etot_conv_thr_ = etot_conv_thr
|
|
|
|
forc_conv_thr_ = forc_conv_thr
|
|
|
|
ekin_maxiter_ = electron_maxstep
|
2006-08-11 16:29:52 +08:00
|
|
|
iesr = iesr_inp
|
|
|
|
!
|
|
|
|
tvhmean = tvhmean_inp
|
|
|
|
vhrmin = vhrmin_inp
|
|
|
|
vhrmax = vhrmax_inp
|
|
|
|
vhasse = vhasse_inp
|
2006-06-26 07:15:20 +08:00
|
|
|
!
|
|
|
|
remove_rigid_rot_ = remove_rigid_rot
|
|
|
|
!
|
|
|
|
tefield_ = tefield
|
|
|
|
epol_ = epol
|
|
|
|
efield_ = efield
|
|
|
|
tefield2_ = tefield2
|
|
|
|
epol2_ = epol2
|
|
|
|
efield2_ = efield2
|
2005-07-18 09:16:41 +08:00
|
|
|
!
|
|
|
|
! ... Set internal time step variables ( delt, twodelt, dt2 ... )
|
|
|
|
!
|
2005-03-31 02:08:01 +08:00
|
|
|
CALL set_time_step( dt )
|
2005-07-18 09:16:41 +08:00
|
|
|
!
|
|
|
|
! ... Set electronic fictitius mass and its cut-off for fourier
|
|
|
|
! ... acceleration
|
|
|
|
!
|
2005-03-31 02:08:01 +08:00
|
|
|
emass_ = emass
|
|
|
|
emaec_ = emass_cutoff
|
2004-11-29 06:11:41 +08:00
|
|
|
!
|
2005-07-18 09:16:41 +08:00
|
|
|
! ... set the level of output, the code verbosity
|
2004-11-29 06:11:41 +08:00
|
|
|
!
|
|
|
|
iprsta_ = 1
|
|
|
|
timing_ = .FALSE.
|
|
|
|
! The code write to files fort.8 fort.41 fort.42 fort.43
|
|
|
|
! a detailed report of subroutines timing
|
|
|
|
memchk_ = .FALSE.
|
|
|
|
! The code performs a memory check, write on standard
|
|
|
|
! output the allocated memory at each step.
|
|
|
|
! Architecture Dependent
|
2005-08-24 02:42:25 +08:00
|
|
|
tprnsfac_ = .FALSE.
|
2004-11-29 06:11:41 +08:00
|
|
|
! Print on file STRUCTURE_FACTOR the structure factor
|
|
|
|
! gvectors and charge density, in reciprocal space.
|
2005-07-18 09:16:41 +08:00
|
|
|
!
|
2007-02-22 16:45:23 +08:00
|
|
|
trhor_ = ( TRIM( calculation ) == 'nscf' )
|
|
|
|
trhow_ = saverho
|
|
|
|
tksw_ = ( TRIM( disk_io ) == 'high' )
|
2005-07-18 09:16:41 +08:00
|
|
|
!
|
|
|
|
SELECT CASE( TRIM( verbosity ) )
|
|
|
|
CASE( 'minimal' )
|
|
|
|
!
|
2005-03-31 02:08:01 +08:00
|
|
|
iprsta_ = 0
|
2005-07-18 09:16:41 +08:00
|
|
|
!
|
|
|
|
CASE( 'low', 'default' )
|
|
|
|
!
|
2005-03-31 02:08:01 +08:00
|
|
|
iprsta_ = 1
|
2004-11-29 06:11:41 +08:00
|
|
|
timing_ = .TRUE.
|
2005-07-18 09:16:41 +08:00
|
|
|
!
|
2006-08-11 23:39:37 +08:00
|
|
|
CASE( 'default+projwfc' )
|
|
|
|
!
|
|
|
|
iprsta_ = 1
|
|
|
|
timing_ = .TRUE.
|
|
|
|
tprojwfc = .TRUE.
|
|
|
|
!
|
2005-07-18 09:16:41 +08:00
|
|
|
CASE( 'medium' )
|
|
|
|
!
|
|
|
|
iprsta_ = 2
|
|
|
|
timing_ = .TRUE.
|
2004-11-29 06:11:41 +08:00
|
|
|
tprnsfac_ = .TRUE.
|
2005-07-18 09:16:41 +08:00
|
|
|
!
|
|
|
|
CASE( 'high' )
|
|
|
|
!
|
|
|
|
iprsta_ = 3
|
|
|
|
memchk_ = .TRUE.
|
|
|
|
timing_ = .TRUE.
|
2004-11-29 06:11:41 +08:00
|
|
|
tprnsfac_ = .TRUE.
|
2006-08-11 23:39:37 +08:00
|
|
|
tprojwfc = .TRUE.
|
2005-07-18 09:16:41 +08:00
|
|
|
!
|
2004-11-29 06:11:41 +08:00
|
|
|
CASE DEFAULT
|
2005-07-18 09:16:41 +08:00
|
|
|
!
|
|
|
|
CALL errore( 'control_flags ', &
|
|
|
|
'unknown verbosity ' // TRIM( verbosity ), 1 )
|
|
|
|
!
|
2004-11-29 06:11:41 +08:00
|
|
|
END SELECT
|
2005-07-18 09:16:41 +08:00
|
|
|
!
|
2004-11-29 06:11:41 +08:00
|
|
|
tdipole_ = tdipole_card
|
|
|
|
newnfi_ = newnfi_card
|
|
|
|
tnewnfi_ = tnewnfi_card
|
|
|
|
!
|
2005-07-18 09:16:41 +08:00
|
|
|
! ... set the restart flags
|
2004-11-29 06:11:41 +08:00
|
|
|
!
|
2005-07-28 00:09:03 +08:00
|
|
|
trane_ = .FALSE.
|
|
|
|
ampre_ = ampre
|
|
|
|
taurdr_ = .FALSE.
|
2005-09-20 23:17:18 +08:00
|
|
|
!
|
2004-11-29 06:11:41 +08:00
|
|
|
SELECT CASE ( TRIM( restart_mode ) )
|
2005-09-20 23:17:18 +08:00
|
|
|
!
|
|
|
|
CASE( 'from_scratch' )
|
|
|
|
!
|
|
|
|
nbeg_ = -1
|
|
|
|
nomore_ = nstep
|
|
|
|
nstep_ = nstep
|
|
|
|
trane_ = ( startingwfc == 'random' )
|
|
|
|
!
|
|
|
|
IF ( ampre_ == 0.D0 ) ampre_ = 0.02D0
|
|
|
|
!
|
|
|
|
CASE( 'reset_counters' )
|
|
|
|
!
|
|
|
|
nbeg_ = 0
|
|
|
|
nomore_ = nstep
|
|
|
|
nstep_ = nstep
|
|
|
|
!
|
|
|
|
CASE( 'restart' )
|
|
|
|
!
|
|
|
|
nbeg_ = 1
|
|
|
|
nomore_ = nstep
|
|
|
|
nstep_ = nstep
|
2006-06-07 04:41:34 +08:00
|
|
|
nprint_nfi = -2
|
2005-09-20 23:17:18 +08:00
|
|
|
!
|
|
|
|
CASE( 'auto' )
|
|
|
|
!
|
|
|
|
IF ( auto_check( ndr, ' ' ) ) THEN
|
|
|
|
!
|
|
|
|
WRITE( stdout, '("autopilot: Auto Check detects restart.xml")' )
|
|
|
|
WRITE( stdout, '(" adjusting restart_mode to restart")' )
|
|
|
|
!
|
|
|
|
restart_mode = 'restart'
|
|
|
|
!
|
|
|
|
nbeg_ = 1
|
|
|
|
!
|
|
|
|
! ... Also handle NSTEPS adjustment so that
|
|
|
|
! ... nomore does not include past nfi in cpr.f90
|
|
|
|
!
|
|
|
|
restart_p = .TRUE.
|
|
|
|
nomore_ = nstep
|
|
|
|
nstep_ = nstep
|
2006-06-07 04:41:34 +08:00
|
|
|
nprint_nfi = -2
|
2005-09-20 23:17:18 +08:00
|
|
|
!
|
|
|
|
IF ( ion_positions == 'from_input' ) THEN
|
|
|
|
!
|
|
|
|
taurdr_ = .TRUE.
|
|
|
|
nbeg_ = -1
|
|
|
|
!
|
|
|
|
END IF
|
|
|
|
!
|
|
|
|
ELSE
|
|
|
|
!
|
|
|
|
WRITE( stdout, &
|
|
|
|
'("autopilot: Auto Check did not detect restart.xml")' )
|
|
|
|
!
|
|
|
|
WRITE( stdout, &
|
|
|
|
'(" adjusting restart_mode to from_scratch")' )
|
|
|
|
!
|
|
|
|
restart_mode = 'from_scratch'
|
|
|
|
!
|
|
|
|
nbeg_ = -2
|
|
|
|
!
|
|
|
|
IF ( ion_positions == 'from_input' ) nbeg_ = -1
|
|
|
|
!
|
|
|
|
nomore_ = nstep
|
|
|
|
nstep_ = nstep
|
|
|
|
!
|
|
|
|
trane_ = ( startingwfc == 'random' )
|
|
|
|
!
|
|
|
|
IF ( ampre_ == 0.d0 ) ampre_ = 0.02D0
|
|
|
|
!
|
|
|
|
END IF
|
|
|
|
!
|
2004-11-29 06:11:41 +08:00
|
|
|
CASE DEFAULT
|
2005-09-20 23:17:18 +08:00
|
|
|
!
|
|
|
|
CALL errore( 'iosys ', &
|
|
|
|
'unknown restart_mode ' // TRIM( restart_mode ), 1 )
|
|
|
|
!
|
2004-11-29 06:11:41 +08:00
|
|
|
END SELECT
|
2005-09-20 23:17:18 +08:00
|
|
|
!
|
2004-11-29 06:11:41 +08:00
|
|
|
! ... Starting/Restarting Atomic positions
|
2005-07-28 00:09:03 +08:00
|
|
|
!
|
2004-11-29 06:11:41 +08:00
|
|
|
SELECT CASE ( TRIM(ion_positions) )
|
|
|
|
CASE ( 'from_input' )
|
|
|
|
taurdr_ = .TRUE. ! Positions read from standard input
|
|
|
|
CASE ( 'default' )
|
|
|
|
taurdr_ = .FALSE.
|
|
|
|
CASE DEFAULT
|
|
|
|
CALL errore(' control_flags ',' unknown ion_positions '//TRIM(ion_positions), 1 )
|
|
|
|
END SELECT
|
|
|
|
|
|
|
|
! ... Electronic randomization
|
|
|
|
|
|
|
|
tatomicwfc_ = .FALSE.
|
|
|
|
SELECT CASE ( TRIM(startingwfc) )
|
|
|
|
CASE ('default','none')
|
|
|
|
trane_ = .FALSE.
|
|
|
|
CASE ('random')
|
|
|
|
trane_ = .TRUE.
|
|
|
|
CASE ('atomic')
|
|
|
|
tatomicwfc_ = .TRUE.
|
|
|
|
CASE DEFAULT
|
|
|
|
CALL errore(' control_flags ',' unknown startingwfc '//TRIM(startingwfc), 1 )
|
|
|
|
END SELECT
|
|
|
|
IF( ampre_ == 0 ) trane_ = .FALSE.
|
|
|
|
|
2005-01-15 18:53:46 +08:00
|
|
|
! ... TORTHO
|
|
|
|
|
|
|
|
SELECT CASE ( orthogonalization )
|
|
|
|
CASE ('Gram-Schmidt')
|
|
|
|
tortho_ = .FALSE.
|
|
|
|
CASE ('ortho')
|
|
|
|
tortho_ = .TRUE.
|
|
|
|
CASE DEFAULT
|
|
|
|
CALL errore(' iosys ',' unknown orthogonalization '//&
|
2005-07-18 09:16:41 +08:00
|
|
|
TRIM(orthogonalization), 1 )
|
2005-01-15 18:53:46 +08:00
|
|
|
END SELECT
|
|
|
|
|
2006-12-23 00:50:40 +08:00
|
|
|
ortho_max_ = ortho_max
|
|
|
|
ortho_eps_ = ortho_eps
|
|
|
|
ortho_para_ = ortho_para
|
2005-01-15 18:53:46 +08:00
|
|
|
|
|
|
|
! ... Electrons initial velocity
|
|
|
|
|
|
|
|
SELECT CASE ( TRIM(electron_velocities) )
|
|
|
|
CASE ('default')
|
|
|
|
tzeroe_ = .FALSE.
|
|
|
|
CASE ('zero')
|
|
|
|
tzeroe_ = .TRUE.
|
|
|
|
IF( program_name == 'CP90' ) &
|
2005-09-11 08:50:13 +08:00
|
|
|
WRITE( stdout, &
|
|
|
|
'("Warning: electron_velocities keyword has no effect")' )
|
2005-01-15 18:53:46 +08:00
|
|
|
CASE DEFAULT
|
|
|
|
CALL errore(' control_flags ',' unknown electron_velocities '//TRIM(electron_velocities), 1 )
|
|
|
|
END SELECT
|
|
|
|
|
|
|
|
! ... Electron dynamics
|
|
|
|
|
|
|
|
tdamp_ = .FALSE.
|
|
|
|
tsteepdesc_ = .FALSE.
|
|
|
|
frice_ = 0.d0
|
|
|
|
SELECT CASE ( TRIM(electron_dynamics) )
|
|
|
|
CASE ('sd', 'default')
|
|
|
|
tsde_ = .TRUE.
|
|
|
|
CASE ('verlet')
|
|
|
|
tsde_ = .FALSE.
|
|
|
|
CASE ('cg')
|
|
|
|
tsde_ = .FALSE.
|
2005-07-18 09:16:41 +08:00
|
|
|
IF( program_name == 'CP90' ) THEN
|
|
|
|
tcg = .TRUE.
|
2007-09-17 17:04:55 +08:00
|
|
|
tortho_ = .FALSE.
|
2005-07-18 09:16:41 +08:00
|
|
|
ELSE
|
2006-12-31 19:09:03 +08:00
|
|
|
CALL errore(' control_flags ',' conjugate gradient not yet implemented in FPMD ', 1 )
|
2005-07-18 09:16:41 +08:00
|
|
|
ENDIF
|
2005-01-15 18:53:46 +08:00
|
|
|
CASE ('damp')
|
|
|
|
tsde_ = .FALSE.
|
|
|
|
tdamp_ = .TRUE.
|
|
|
|
frice_ = electron_damping
|
|
|
|
CASE ('diis')
|
2006-12-31 19:09:03 +08:00
|
|
|
CALL errore( "iosys ", " electron_dynamics keyword diis not yet implemented ", 1 )
|
2005-01-15 18:53:46 +08:00
|
|
|
CASE ('none')
|
|
|
|
tsde_ = .FALSE.
|
|
|
|
CASE DEFAULT
|
|
|
|
CALL errore(' control_flags ',' unknown electron_dynamics '//TRIM(electron_dynamics), 1 )
|
|
|
|
END SELECT
|
|
|
|
|
|
|
|
! ... Electronic Temperature
|
|
|
|
|
|
|
|
tnosee_ = .FALSE.
|
|
|
|
SELECT CASE ( TRIM(electron_temperature) )
|
|
|
|
! temperature control of electrons via Nose' thermostat
|
|
|
|
CASE ('nose')
|
|
|
|
tnosee_ = .TRUE.
|
|
|
|
CASE ('not_controlled', 'default')
|
|
|
|
tnosee_ = .FALSE.
|
|
|
|
CASE DEFAULT
|
|
|
|
CALL errore(' control_flags ',' unknown electron_temperature '//TRIM(electron_temperature), 1 )
|
|
|
|
END SELECT
|
2005-09-20 23:17:18 +08:00
|
|
|
|
2005-09-19 07:10:50 +08:00
|
|
|
SELECT CASE( TRIM( phase_space ) )
|
|
|
|
CASE( 'full' )
|
|
|
|
!
|
|
|
|
lcoarsegrained = .FALSE.
|
|
|
|
!
|
|
|
|
CASE ( 'coarse-grained' )
|
|
|
|
!
|
|
|
|
lcoarsegrained = .TRUE.
|
|
|
|
!
|
|
|
|
END SELECT
|
|
|
|
!
|
2006-02-28 04:06:23 +08:00
|
|
|
IF ( lmetadyn ) lcoarsegrained = .TRUE.
|
2005-09-19 07:10:50 +08:00
|
|
|
|
2005-01-15 18:53:46 +08:00
|
|
|
! ... Ions dynamics
|
|
|
|
|
2005-03-26 23:29:07 +08:00
|
|
|
tdampions_ = .FALSE.
|
2005-01-15 18:53:46 +08:00
|
|
|
tconvthrs%active = .FALSE.
|
|
|
|
tconvthrs%nstep = 1
|
|
|
|
tconvthrs%ekin = 0.0d0
|
|
|
|
tconvthrs%derho = 0.0d0
|
|
|
|
tconvthrs%force = 0.0d0
|
|
|
|
SELECT CASE ( TRIM(ion_dynamics) )
|
|
|
|
CASE ('sd')
|
|
|
|
tsdp_ = .TRUE.
|
|
|
|
tfor_ = .TRUE.
|
|
|
|
fricp_ = 0.d0
|
|
|
|
tconvthrs%ekin = ekin_conv_thr
|
|
|
|
tconvthrs%derho = etot_conv_thr
|
|
|
|
tconvthrs%force = forc_conv_thr
|
|
|
|
tconvthrs%active = .TRUE.
|
|
|
|
tconvthrs%nstep = 1
|
|
|
|
CASE ('verlet')
|
|
|
|
tsdp_ = .FALSE.
|
|
|
|
tfor_ = .TRUE.
|
|
|
|
fricp_ = 0.d0
|
|
|
|
CASE ('cg') ! Conjugate Gradient minimization for ions
|
2006-12-31 19:09:03 +08:00
|
|
|
CALL errore( "iosys ", " ion_dynamics = '//TRIM(ion_dynamics)//' not yet implemented ", 1 )
|
2005-01-15 18:53:46 +08:00
|
|
|
CASE ('damp')
|
2006-02-28 04:06:23 +08:00
|
|
|
ldamped = .TRUE.
|
2005-01-15 18:53:46 +08:00
|
|
|
tsdp_ = .FALSE.
|
|
|
|
tfor_ = .TRUE.
|
|
|
|
tdampions_ = .TRUE.
|
|
|
|
fricp_ = ion_damping
|
|
|
|
tconvthrs%ekin = ekin_conv_thr
|
|
|
|
tconvthrs%derho = etot_conv_thr
|
|
|
|
tconvthrs%force = forc_conv_thr
|
|
|
|
tconvthrs%active = .TRUE.
|
|
|
|
tconvthrs%nstep = 1
|
|
|
|
CASE ('none', 'default')
|
|
|
|
tsdp_ = .FALSE.
|
|
|
|
tfor_ = .FALSE.
|
|
|
|
fricp_ = 0.d0
|
|
|
|
CASE DEFAULT
|
|
|
|
CALL errore(' control_flags ',' unknown ion_dynamics '//TRIM(ion_dynamics), 1 )
|
|
|
|
END SELECT
|
|
|
|
|
2006-06-26 07:15:20 +08:00
|
|
|
|
|
|
|
|
2005-07-28 00:09:03 +08:00
|
|
|
IF ( ANY( if_pos(:,1:nat) == 0 ) ) lfixatom = .TRUE.
|
|
|
|
|
2005-01-15 18:53:46 +08:00
|
|
|
! ... Ionic Temperature
|
|
|
|
|
|
|
|
tcp_ = .FALSE.
|
|
|
|
tnosep_ = .FALSE.
|
|
|
|
tolp_ = tolp
|
|
|
|
SELECT CASE ( TRIM(ion_temperature) )
|
|
|
|
! temperature control of ions via Nose' thermostat
|
|
|
|
CASE ('nose')
|
|
|
|
tnosep_ = .TRUE.
|
2005-07-18 09:16:41 +08:00
|
|
|
tcp_ = .FALSE.
|
2005-01-15 18:53:46 +08:00
|
|
|
CASE ('not_controlled', 'default')
|
|
|
|
tnosep_ = .FALSE.
|
2005-07-18 09:16:41 +08:00
|
|
|
tcp_ = .FALSE.
|
2005-01-15 18:53:46 +08:00
|
|
|
CASE ('rescaling' )
|
|
|
|
tnosep_ = .FALSE.
|
2005-07-18 09:16:41 +08:00
|
|
|
tcp_ = .TRUE.
|
2005-01-15 18:53:46 +08:00
|
|
|
CASE DEFAULT
|
|
|
|
CALL errore(' control_flags ',' unknown ion_temperature '//TRIM(ion_temperature), 1 )
|
|
|
|
END SELECT
|
|
|
|
|
|
|
|
! ... Starting/Restarting ionic velocities
|
|
|
|
|
|
|
|
tcap_ = .FALSE.
|
|
|
|
SELECT CASE ( TRIM(ion_velocities) )
|
|
|
|
CASE ('default')
|
|
|
|
tzerop_ = .FALSE.
|
|
|
|
tv0rd_ = .FALSE.
|
2005-07-18 09:16:41 +08:00
|
|
|
tcap_ = .FALSE.
|
2006-03-18 03:36:47 +08:00
|
|
|
CASE ('change_step')
|
|
|
|
tzerop_ = .FALSE.
|
|
|
|
tv0rd_ = .FALSE.
|
|
|
|
tcap_ = .FALSE.
|
|
|
|
dt_old_ = tolp
|
2005-01-15 18:53:46 +08:00
|
|
|
CASE ('zero')
|
|
|
|
tzerop_ = .TRUE.
|
|
|
|
tv0rd_ = .FALSE.
|
|
|
|
CASE ('from_input')
|
|
|
|
tzerop_ = .TRUE.
|
|
|
|
tv0rd_ = .TRUE.
|
|
|
|
CASE ('random')
|
2005-07-18 09:16:41 +08:00
|
|
|
tcap_ = .TRUE.
|
2005-01-15 18:53:46 +08:00
|
|
|
IF( program_name == 'FPMD' ) &
|
|
|
|
WRITE(stdout) " ion_velocities = '//TRIM(ion_velocities)//' has no effects "
|
|
|
|
CASE DEFAULT
|
|
|
|
CALL errore(' control_flags ',' unknown ion_velocities '//TRIM(ion_velocities), 1 )
|
|
|
|
END SELECT
|
|
|
|
|
|
|
|
! ... Ionic randomization
|
|
|
|
|
|
|
|
tranp_ ( 1 : ntyp ) = tranp ( 1 : ntyp )
|
|
|
|
amprp_ ( 1 : ntyp ) = amprp ( 1 : ntyp )
|
|
|
|
|
|
|
|
! ... Ionic/electronic step ratio
|
|
|
|
|
|
|
|
tionstep_ = .FALSE.
|
|
|
|
nstepe_ = 1
|
|
|
|
IF( ( ion_nstepe > 1 ) .OR. ( cell_nstepe > 1 ) ) THEN
|
|
|
|
! This card is used to control the ionic step, when active ionic step are
|
|
|
|
! allowed only when the two criteria are met, i.e. the ions are allowed
|
|
|
|
! to move if MOD( NFI, NSTEP ) == 0 and EKIN < EKIN_THR .
|
|
|
|
tionstep_ = .TRUE.
|
|
|
|
nstepe_ = MAX( ion_nstepe, cell_nstepe )
|
|
|
|
IF( program_name == 'CP90' ) &
|
2005-09-26 06:59:33 +08:00
|
|
|
WRITE(stdout, * ) " ion_nstepe or cell_nstepe have no effects "
|
2005-01-15 18:53:46 +08:00
|
|
|
END IF
|
|
|
|
|
|
|
|
! Cell dynamics
|
|
|
|
|
|
|
|
SELECT CASE ( TRIM(cell_dynamics) )
|
|
|
|
CASE ('sd')
|
|
|
|
tpre_ = .TRUE.
|
|
|
|
thdyn_ = .TRUE.
|
|
|
|
tsdc_ = .TRUE.
|
|
|
|
frich_= 0.d0
|
|
|
|
CASE ( 'damp', 'damp-pr' )
|
|
|
|
thdyn_ = .TRUE.
|
|
|
|
tsdc_ = .FALSE.
|
|
|
|
frich_ = cell_damping
|
|
|
|
tpre_ = .TRUE.
|
|
|
|
CASE ('pr')
|
|
|
|
thdyn_ = .TRUE.
|
|
|
|
tsdc_ = .FALSE.
|
|
|
|
tpre_ = .TRUE.
|
|
|
|
frich_= 0.d0
|
|
|
|
CASE ('none', 'default')
|
|
|
|
thdyn_ = .FALSE.
|
|
|
|
tsdc_ = .FALSE.
|
|
|
|
frich_= 0.d0
|
|
|
|
CASE DEFAULT
|
|
|
|
CALL errore(' control_flags ',' unknown cell_dynamics '//TRIM(cell_dynamics), 1 )
|
|
|
|
END SELECT
|
|
|
|
|
|
|
|
! ... Starting/Restarting Cell parameters
|
|
|
|
|
|
|
|
SELECT CASE ( TRIM(cell_parameters) )
|
|
|
|
CASE ('default')
|
|
|
|
tbeg_ = .FALSE.
|
|
|
|
CASE ('from_input')
|
|
|
|
tbeg_ = .TRUE.
|
|
|
|
IF( program_name == 'CP90' .AND. force_pairing_) &
|
|
|
|
WRITE(stdout) " cell_parameters have no effects "
|
|
|
|
CASE DEFAULT
|
|
|
|
CALL errore(' control_flags ',' unknown cell_parameters '//TRIM(cell_parameters), 1 )
|
|
|
|
END SELECT
|
|
|
|
|
|
|
|
! ... Cell initial velocities
|
|
|
|
|
|
|
|
SELECT CASE ( TRIM(cell_velocities) )
|
|
|
|
CASE ('default')
|
|
|
|
tzeroc_ = .FALSE.
|
|
|
|
CASE ('zero')
|
|
|
|
tzeroc_ = .TRUE.
|
|
|
|
CASE DEFAULT
|
|
|
|
CALL errore(' control_flags ',' unknown cell_velocities '//TRIM(cell_velocities), 1 )
|
|
|
|
END SELECT
|
|
|
|
|
|
|
|
! ... Cell Temperature
|
|
|
|
|
|
|
|
SELECT CASE ( TRIM(cell_temperature) )
|
|
|
|
! cell temperature control of ions via Nose' thermostat
|
|
|
|
CASE ('nose')
|
|
|
|
tnoseh_ = .TRUE.
|
|
|
|
CASE ('not_controlled', 'default')
|
|
|
|
tnoseh_ = .FALSE.
|
|
|
|
CASE DEFAULT
|
|
|
|
CALL errore(' control_flags ',' unknown cell_temperature '//TRIM(cell_temperature), 1 )
|
|
|
|
END SELECT
|
|
|
|
|
|
|
|
! .. If only electron are allowed to move
|
|
|
|
! .. check for SCF convergence on the ground state
|
|
|
|
|
|
|
|
IF( ion_dynamics == 'none' .AND. cell_dynamics == 'none' ) THEN
|
|
|
|
tconvthrs%ekin = ekin_conv_thr
|
|
|
|
tconvthrs%derho = etot_conv_thr
|
2005-06-28 04:21:19 +08:00
|
|
|
tconvthrs%force = 1.D+10
|
2005-01-15 18:53:46 +08:00
|
|
|
tconvthrs%active = .TRUE.
|
|
|
|
tconvthrs%nstep = 1
|
|
|
|
END IF
|
|
|
|
|
|
|
|
! force pairing
|
|
|
|
|
|
|
|
force_pairing_ = force_pairing
|
2006-05-03 22:19:57 +08:00
|
|
|
!
|
2006-04-14 05:38:16 +08:00
|
|
|
IF( ( nvb > 0 ) .and. ( program_name == 'FPMD' ) ) &
|
|
|
|
CALL errore(' iosys ',' USPP not yet implemented in FPMD ',1)
|
|
|
|
|
2005-01-15 18:53:46 +08:00
|
|
|
! ... the 'ATOMIC_SPECIES' card must be present, check it
|
|
|
|
|
|
|
|
IF( .NOT. taspc ) &
|
|
|
|
CALL errore(' iosys ',' ATOMIC_SPECIES not found in stdin ',1)
|
|
|
|
|
|
|
|
! ... the 'ATOMIC_POSITIONS' card must be present, check it
|
|
|
|
|
|
|
|
IF( .NOT. tapos ) &
|
|
|
|
CALL errore(' iosys ',' ATOMIC_POSITIONS not found in stdin ',1)
|
|
|
|
|
|
|
|
IF( .NOT. trd_ht .AND. TRIM(cell_parameters)=='from_input' ) &
|
|
|
|
CALL errore(' iosys ',' CELL_PARAMETERS not present in stdin ', 1 )
|
|
|
|
|
|
|
|
IF( .NOT. trd_ht .AND. ibrav == 0 ) &
|
|
|
|
CALL errore(' iosys ',' ibrav = 0 but CELL_PARAMETERS not present in stdin ', 1 )
|
|
|
|
|
|
|
|
IF( .NOT. tavel .AND. TRIM(ion_velocities)=='from_input' ) &
|
|
|
|
CALL errore(' iosys ',' ION_VELOCITIES not present in stdin ', 1 )
|
|
|
|
|
2005-03-02 18:03:55 +08:00
|
|
|
IF( ( TRIM( calculation ) == 'smd' ) .AND. ( TRIM( cell_dynamics ) /= 'none' ) ) THEN
|
2005-07-18 09:16:41 +08:00
|
|
|
CALL errore(' smiosys ',' cell_dynamics not implemented : '//TRIM(cell_dynamics), 1 )
|
2005-03-02 18:03:55 +08:00
|
|
|
END IF
|
2005-01-15 18:53:46 +08:00
|
|
|
|
|
|
|
RETURN
|
2005-05-18 16:49:38 +08:00
|
|
|
END SUBROUTINE set_control_flags
|
2005-03-02 18:03:55 +08:00
|
|
|
!
|
2005-07-18 09:16:41 +08:00
|
|
|
!-------------------------------------------------------------------------
|
2005-07-01 22:26:10 +08:00
|
|
|
SUBROUTINE modules_setup()
|
2005-07-18 09:16:41 +08:00
|
|
|
!-------------------------------------------------------------------------
|
2005-07-01 22:26:10 +08:00
|
|
|
!
|
2006-04-14 05:38:16 +08:00
|
|
|
USE control_flags, ONLY : program_name, lconstrain, lneb, lmetadyn, &
|
2007-02-26 22:48:03 +08:00
|
|
|
tpre, thdyn, tksw
|
2006-04-14 05:38:16 +08:00
|
|
|
|
2005-10-25 21:08:29 +08:00
|
|
|
USE constants, ONLY : amu_au, pi
|
2005-01-15 18:53:46 +08:00
|
|
|
!
|
2005-12-18 01:40:37 +08:00
|
|
|
USE input_parameters, ONLY: ibrav , celldm , trd_ht, dt, &
|
2005-01-15 18:53:46 +08:00
|
|
|
cell_symmetry, rd_ht, a, b, c, cosab, cosac, cosbc, ntyp , nat , &
|
|
|
|
na_inp , sp_pos , rd_pos , rd_vel, atom_mass, atom_label, if_pos, &
|
|
|
|
atomic_positions, id_loc, sic, sic_epsilon, sic_rloc, ecutwfc, &
|
2005-03-31 02:08:01 +08:00
|
|
|
ecutrho, ecfixed, qcutz, q2sigma, tk_inp, wmass, &
|
2005-01-15 18:53:46 +08:00
|
|
|
ion_radius, emass, emass_cutoff, temph, fnoseh, nr1b, nr2b, nr3b, &
|
|
|
|
tempw, fnosep, nr1, nr2, nr3, nr1s, nr2s, nr3s, ekincw, fnosee, &
|
2006-12-31 19:09:03 +08:00
|
|
|
tturbo_inp, nturbo_inp, outdir, prefix, &
|
|
|
|
k_points, nkstot, nk1, nk2, nk3, k1, k2, k3, &
|
2005-03-02 18:03:55 +08:00
|
|
|
xk, wk, occupations, n_inner, fermi_energy, rotmass, occmass, &
|
|
|
|
rotation_damping, occupation_damping, occupation_dynamics, &
|
2005-07-06 05:02:48 +08:00
|
|
|
rotation_dynamics, degauss, smearing, nhpcl, nhptyp, ndega, &
|
2007-03-22 07:46:22 +08:00
|
|
|
nhgrp, cell_units, restart_mode, sic_alpha , niter_cold_restart, &
|
|
|
|
lambda_cold
|
2005-07-04 18:34:44 +08:00
|
|
|
|
2006-12-31 19:09:03 +08:00
|
|
|
USE input_parameters, ONLY: empty_states_maxstep, &
|
2006-06-26 15:51:38 +08:00
|
|
|
empty_states_ethr, empty_states_nbnd, &
|
2006-08-11 16:29:52 +08:00
|
|
|
iprnks_empty, nconstr_inp, iprnks, nprnks, &
|
2005-01-26 18:15:04 +08:00
|
|
|
etot_conv_thr, ekin_conv_thr, nspin, f_inp, nelup, neldw, nbnd, &
|
2006-03-24 02:00:12 +08:00
|
|
|
nelec, press, cell_damping, cell_dofree, tf_inp, nprnks_empty, &
|
2006-05-19 00:09:47 +08:00
|
|
|
refg, greash, grease, greasp, epol, efield, tcg, maxiter, conv_thr, &
|
2007-03-22 07:46:22 +08:00
|
|
|
passop, tot_charge, multiplicity, tot_magnetization, ncolvar_inp, &
|
|
|
|
niter_cg_restart
|
2005-01-15 18:53:46 +08:00
|
|
|
!
|
2005-07-01 22:26:10 +08:00
|
|
|
USE input_parameters, ONLY : wf_efield, wf_switch, sw_len, efx0, efy0, &
|
|
|
|
efz0, efx1, efy1, efz1, wfsd, wfdt, maxwfdt, &
|
2005-08-24 02:42:25 +08:00
|
|
|
wf_q, wf_friction, nit, nsd, nsteps, tolw, &
|
|
|
|
adapt, calwf, nwf, wffort, writev, &
|
2005-07-02 04:39:45 +08:00
|
|
|
wannier_index
|
2005-01-15 18:53:46 +08:00
|
|
|
!
|
2006-12-12 23:35:11 +08:00
|
|
|
USE input_parameters, ONLY : abivol, abisur, pvar, fill_vac, &
|
|
|
|
scale_at, t_gauss, jellium, cntr, &
|
|
|
|
P_ext, P_in, P_fin, rho_thr, &
|
|
|
|
step_rad, Surf_t, dthr, R_j, h_j, &
|
2006-12-13 15:59:14 +08:00
|
|
|
delta_eps, delta_sigma, n_cntr, &
|
2006-12-13 16:50:19 +08:00
|
|
|
axis
|
2006-12-12 23:35:11 +08:00
|
|
|
!
|
2005-07-28 00:09:03 +08:00
|
|
|
USE ions_base, ONLY : tau, ityp, zv
|
2005-07-01 22:26:10 +08:00
|
|
|
USE cell_base, ONLY : cell_base_init, a1, a2, a3, cell_alat
|
|
|
|
USE cell_nose, ONLY : cell_nose_init
|
|
|
|
USE ions_base, ONLY : ions_base_init, greasp_ => greasp
|
|
|
|
USE sic_module, ONLY : sic_initval
|
|
|
|
USE ions_nose, ONLY : ions_nose_init
|
|
|
|
USE wave_base, ONLY : grease_ => grease
|
|
|
|
USE electrons_nose, ONLY : electrons_nose_init
|
|
|
|
USE printout_base, ONLY : printout_base_init
|
|
|
|
USE turbo, ONLY : turbo_init
|
|
|
|
USE efield_module, ONLY : efield_init
|
|
|
|
USE cg_module, ONLY : cg_init
|
2006-12-12 23:35:11 +08:00
|
|
|
USE pres_ai_mod, ONLY : pres_ai_init
|
2005-01-15 18:53:46 +08:00
|
|
|
!
|
|
|
|
USE smallbox_grid_dimensions, ONLY: &
|
|
|
|
nnrbx, & ! variable is used to workaround internal compiler error (IBM xlf)
|
|
|
|
nr1b_ => nr1b, &
|
|
|
|
nr2b_ => nr2b, &
|
|
|
|
nr3b_ => nr3b
|
|
|
|
USE grid_dimensions, ONLY: &
|
|
|
|
nnrx, & ! variable is used to workaround internal compiler error (IBM xlf)
|
|
|
|
nr1_ => nr1, &
|
|
|
|
nr2_ => nr2, &
|
|
|
|
nr3_ => nr3
|
|
|
|
USE smooth_grid_dimensions, ONLY: &
|
|
|
|
nnrsx, & ! variable is used to workaround internal compiler error (IBM xlf)
|
|
|
|
nr1s_ => nr1s, &
|
|
|
|
nr2s_ => nr2s, &
|
|
|
|
nr3s_ => nr3s
|
2005-12-07 12:22:30 +08:00
|
|
|
USE guess, ONLY : guess_setup
|
|
|
|
USE charge_mix, ONLY : charge_mix_setup
|
|
|
|
USE kohn_sham_states, ONLY : ks_states_init
|
2006-08-04 01:47:35 +08:00
|
|
|
USE electrons_module, ONLY : electrons_setup, empty_init
|
2005-12-07 12:22:30 +08:00
|
|
|
USE electrons_base, ONLY : electrons_base_initval
|
|
|
|
USE ensemble_dft, ONLY : ensemble_initval,tens
|
|
|
|
USE wannier_base, ONLY : wannier_init
|
2005-12-18 01:40:37 +08:00
|
|
|
USE efield_module, ONLY : tefield
|
2005-04-29 07:30:51 +08:00
|
|
|
!
|
2004-12-21 23:48:19 +08:00
|
|
|
IMPLICIT NONE
|
2005-07-01 22:26:10 +08:00
|
|
|
!
|
2005-08-28 22:09:42 +08:00
|
|
|
REAL(DP) :: alat_ , massa_totale
|
2006-06-26 15:51:38 +08:00
|
|
|
REAL(DP) :: ethr_emp_inp
|
2005-01-26 18:15:04 +08:00
|
|
|
! ... DIIS
|
2007-02-26 22:48:03 +08:00
|
|
|
INTEGER :: ia, iss
|
2005-04-29 07:30:51 +08:00
|
|
|
LOGICAL :: ltest
|
2005-01-15 18:53:46 +08:00
|
|
|
!
|
|
|
|
! Subroutine Body
|
|
|
|
!
|
2005-01-26 18:15:04 +08:00
|
|
|
IF( .NOT. has_been_read ) &
|
|
|
|
CALL errore( ' modules_setup ', ' input file has not been read yet! ', 1 )
|
|
|
|
!
|
2005-01-15 18:53:46 +08:00
|
|
|
! ... Set cell base module
|
2005-12-18 01:40:37 +08:00
|
|
|
!
|
2005-07-18 09:16:41 +08:00
|
|
|
massa_totale = SUM( atom_mass(1:ntyp)*na_inp(1:ntyp) )
|
|
|
|
!
|
|
|
|
CALL cell_base_init( ibrav , celldm , trd_ht, cell_symmetry, rd_ht, &
|
|
|
|
cell_units, a, b, c, cosab, cosac, cosbc , wmass, &
|
|
|
|
massa_totale, press, cell_damping, greash, &
|
|
|
|
cell_dofree )
|
|
|
|
!
|
2005-01-26 18:15:04 +08:00
|
|
|
alat_ = cell_alat()
|
|
|
|
|
2005-01-15 18:53:46 +08:00
|
|
|
! ... Set ions base module
|
|
|
|
|
2005-07-18 09:16:41 +08:00
|
|
|
CALL ions_base_init( ntyp , nat , na_inp , sp_pos , rd_pos , rd_vel, &
|
|
|
|
atom_mass, atom_label, if_pos, atomic_positions, &
|
|
|
|
alat_ , a1, a2, a3, ion_radius )
|
2005-01-15 18:53:46 +08:00
|
|
|
|
|
|
|
! ... Set Values for the cutoff
|
|
|
|
|
2005-09-06 17:27:34 +08:00
|
|
|
CALL ecutoffs_setup( ecutwfc, ecutrho, ecfixed, qcutz, q2sigma, refg )
|
2005-01-15 18:53:46 +08:00
|
|
|
|
|
|
|
CALL gcutoffs_setup( alat_ , tk_inp, nkstot, xk )
|
|
|
|
|
2005-01-26 18:15:04 +08:00
|
|
|
! ...
|
2005-07-18 09:16:41 +08:00
|
|
|
|
2005-01-26 18:15:04 +08:00
|
|
|
grease_ = grease
|
|
|
|
greasp_ = greasp
|
2005-07-18 09:16:41 +08:00
|
|
|
!
|
|
|
|
! ... set thermostat parameter for cell, ions and electrons
|
|
|
|
!
|
2005-01-15 18:53:46 +08:00
|
|
|
CALL cell_nose_init( temph, fnoseh )
|
2005-07-18 09:16:41 +08:00
|
|
|
!
|
2006-06-30 06:43:58 +08:00
|
|
|
CALL ions_nose_init( tempw, fnosep, nhpcl, nhptyp, ndega, nhgrp)
|
2005-07-18 09:16:41 +08:00
|
|
|
!
|
2005-01-15 18:53:46 +08:00
|
|
|
CALL electrons_nose_init( ekincw , fnosee )
|
|
|
|
|
|
|
|
! set box grid module variables
|
|
|
|
|
|
|
|
nr1b_ = nr1b
|
|
|
|
nr2b_ = nr2b
|
|
|
|
nr3b_ = nr3b
|
|
|
|
|
|
|
|
! set size for potentials and charge density
|
|
|
|
! (re-calculated automatically)
|
|
|
|
|
|
|
|
nr1_ = nr1
|
|
|
|
nr2_ = nr2
|
|
|
|
nr3_ = nr3
|
|
|
|
|
|
|
|
! set size for wavefunctions
|
|
|
|
! (re-calculated automatically)
|
|
|
|
|
|
|
|
nr1s_ = nr1s
|
|
|
|
nr2s_ = nr2s
|
|
|
|
nr3s_ = nr3s
|
|
|
|
|
|
|
|
CALL turbo_init( tturbo_inp, nturbo_inp )
|
|
|
|
|
2005-08-24 02:42:25 +08:00
|
|
|
IF ( .NOT. lneb ) &
|
2005-07-28 00:09:03 +08:00
|
|
|
CALL printout_base_init( outdir, prefix )
|
2005-01-15 18:53:46 +08:00
|
|
|
|
2005-01-26 18:15:04 +08:00
|
|
|
CALL efield_init( epol, efield )
|
2005-01-15 18:53:46 +08:00
|
|
|
|
2007-03-22 07:46:22 +08:00
|
|
|
CALL cg_init( tcg , maxiter , conv_thr , passop ,niter_cg_restart)
|
2005-11-12 01:31:43 +08:00
|
|
|
|
2005-03-15 22:35:47 +08:00
|
|
|
!
|
2006-04-14 05:38:16 +08:00
|
|
|
IF( ( TRIM( sic ) /= 'none' ) .and. ( tpre .or. thdyn ) ) &
|
|
|
|
CALL errore( ' module setup ', ' Stress is not yet implemented with SIC ', 1 )
|
2005-11-10 00:33:07 +08:00
|
|
|
!
|
2005-12-06 22:55:23 +08:00
|
|
|
CALL sic_initval( nat, id_loc, sic, sic_epsilon, sic_alpha, sic_rloc )
|
2005-03-15 22:35:47 +08:00
|
|
|
|
2005-01-26 18:15:04 +08:00
|
|
|
!
|
|
|
|
! empty states
|
|
|
|
!
|
|
|
|
ethr_emp_inp = ekin_conv_thr
|
|
|
|
IF( empty_states_ethr > 0.d0 ) ethr_emp_inp = empty_states_ethr
|
2006-06-26 15:51:38 +08:00
|
|
|
CALL empty_init( empty_states_maxstep, ethr_emp_inp )
|
2005-01-15 18:53:46 +08:00
|
|
|
|
2005-01-26 18:15:04 +08:00
|
|
|
!
|
2006-03-24 02:00:12 +08:00
|
|
|
CALL ks_states_init( nspin, nprnks, iprnks, nprnks_empty, iprnks_empty )
|
2007-02-26 22:48:03 +08:00
|
|
|
!
|
|
|
|
! kohn-sham states implies disk-io = 'high'
|
|
|
|
!
|
|
|
|
DO iss = 1, nspin
|
|
|
|
tksw = tksw .OR. ( nprnks(iss) > 0 )
|
|
|
|
tksw = tksw .OR. ( nprnks_empty(iss) > 0 )
|
|
|
|
END DO
|
2005-01-15 18:53:46 +08:00
|
|
|
|
2005-12-12 16:03:28 +08:00
|
|
|
CALL electrons_base_initval( zv, na_inp, ntyp, nelec, nelup, &
|
2005-12-12 08:17:09 +08:00
|
|
|
neldw, nbnd, nspin, occupations, f_inp, &
|
2006-01-01 07:41:08 +08:00
|
|
|
tot_charge, multiplicity, tot_magnetization )
|
2005-03-02 18:03:55 +08:00
|
|
|
|
2006-06-01 18:51:33 +08:00
|
|
|
CALL electrons_setup( empty_states_nbnd, emass, emass_cutoff )
|
2005-04-22 23:23:19 +08:00
|
|
|
|
2007-03-22 07:46:22 +08:00
|
|
|
CALL ensemble_initval( occupations, n_inner, fermi_energy,&
|
|
|
|
niter_cold_restart, lambda_cold, rotmass, &
|
2005-07-18 09:16:41 +08:00
|
|
|
occmass, rotation_damping, occupation_damping, &
|
|
|
|
occupation_dynamics, rotation_dynamics, degauss, &
|
2006-12-30 23:48:33 +08:00
|
|
|
smearing )
|
2005-11-14 06:17:23 +08:00
|
|
|
IF( ( program_name == 'CP90' ) .AND. .NOT.tcg .AND. tens ) &
|
|
|
|
CALL errore(' modules_setup ', 'Ensemble DFT implemented only with CG ', 1 )
|
2005-04-29 07:30:51 +08:00
|
|
|
!
|
2005-05-03 07:14:06 +08:00
|
|
|
! ... variables for constrained dynamics are set here
|
|
|
|
!
|
2006-05-01 09:07:57 +08:00
|
|
|
lconstrain = ( ncolvar_inp + nconstr_inp > 0 )
|
2005-05-03 07:14:06 +08:00
|
|
|
!
|
2005-04-29 07:30:51 +08:00
|
|
|
!
|
2005-08-24 02:42:25 +08:00
|
|
|
CALL wannier_init( wf_efield, wf_switch, sw_len, efx0, efy0, efz0, &
|
|
|
|
efx1, efy1, efz1, wfsd, wfdt, maxwfdt, wf_q, &
|
|
|
|
wf_friction, nit, nsd, nsteps, tolw, adapt, &
|
|
|
|
calwf, nwf, wffort, writev, wannier_index, &
|
2005-07-02 04:39:45 +08:00
|
|
|
restart_mode )
|
2005-07-01 22:26:10 +08:00
|
|
|
!
|
2006-12-12 23:35:11 +08:00
|
|
|
! ... initialize variables for clusters under pressure
|
|
|
|
!
|
2006-12-13 16:50:19 +08:00
|
|
|
CALL pres_ai_init( abivol, abisur, pvar, fill_vac, scale_at, &
|
|
|
|
t_gauss, jellium, cntr, P_ext, P_in, P_fin, &
|
|
|
|
rho_thr, step_rad, Surf_t, dthr, R_j, h_j, &
|
|
|
|
delta_eps, delta_sigma, n_cntr, axis )
|
|
|
|
!
|
2005-01-26 18:15:04 +08:00
|
|
|
RETURN
|
2005-04-29 07:30:51 +08:00
|
|
|
!
|
2005-03-02 18:03:55 +08:00
|
|
|
END SUBROUTINE modules_setup
|
|
|
|
!
|
|
|
|
! --------------------------------------------------------
|
|
|
|
!
|
|
|
|
! print out heading
|
|
|
|
!
|
2004-11-25 22:51:47 +08:00
|
|
|
SUBROUTINE input_info()
|
|
|
|
|
2005-01-15 18:53:46 +08:00
|
|
|
! this subroutine print to standard output some parameters read from input
|
|
|
|
! ----------------------------------------------
|
2004-11-25 22:51:47 +08:00
|
|
|
|
2005-03-31 02:08:01 +08:00
|
|
|
USE input_parameters, ONLY: restart_mode
|
|
|
|
USE control_flags, ONLY: nbeg, iprint, ndr, ndw, nomore
|
|
|
|
USE time_step, ONLY: delt
|
|
|
|
USE cp_electronic_mass, ONLY: emass, emass_cutoff
|
2006-05-03 22:19:57 +08:00
|
|
|
USE io_global, ONLY: meta_ionode, stdout
|
2004-11-25 22:51:47 +08:00
|
|
|
|
|
|
|
IMPLICIT NONE
|
|
|
|
|
2005-03-31 02:08:01 +08:00
|
|
|
IF( .NOT. has_been_read ) &
|
|
|
|
CALL errore( ' iosys ', ' input file has not been read yet! ', 1 )
|
|
|
|
|
2006-05-03 22:19:57 +08:00
|
|
|
IF( meta_ionode ) THEN
|
2005-03-31 02:08:01 +08:00
|
|
|
WRITE( stdout, 500) nbeg, restart_mode, nomore, iprint, ndr, ndw
|
|
|
|
WRITE( stdout, 505) delt
|
2004-11-25 22:51:47 +08:00
|
|
|
WRITE( stdout, 510) emass
|
2005-03-31 02:08:01 +08:00
|
|
|
WRITE( stdout, 511) emass_cutoff
|
2004-11-25 22:51:47 +08:00
|
|
|
END IF
|
|
|
|
|
2005-03-31 02:08:01 +08:00
|
|
|
500 FORMAT( 3X,'Restart Mode = ',I7, 3X, A15, /, &
|
|
|
|
3X,'Number of MD Steps = ',I7, /, &
|
|
|
|
3X,'Print out every ',I7, ' MD Steps',/ &
|
|
|
|
3X,'Reads from unit = ',I7, /, &
|
|
|
|
3X,'Writes to unit = ',I7)
|
|
|
|
505 FORMAT( 3X,'MD Simulation time step = ',F10.2)
|
|
|
|
510 FORMAT( 3X,'Electronic fictitious mass (emass) = ',F10.2)
|
|
|
|
511 FORMAT( 3X,'emass cut-off = ',F10.2)
|
|
|
|
509 FORMAT( 3X,'Verlet algorithm for electron dynamics')
|
|
|
|
502 FORMAT( 3X,'An initial quench is performed')
|
2004-11-25 22:51:47 +08:00
|
|
|
|
2005-03-31 02:08:01 +08:00
|
|
|
RETURN
|
2004-11-25 22:51:47 +08:00
|
|
|
END SUBROUTINE input_info
|
2005-03-02 18:03:55 +08:00
|
|
|
!
|
|
|
|
! ----------------------------------------------------------------
|
|
|
|
!
|
2004-11-25 22:51:47 +08:00
|
|
|
SUBROUTINE modules_info()
|
|
|
|
|
2005-01-15 18:53:46 +08:00
|
|
|
USE input_parameters, ONLY: electron_dynamics, electron_temperature, &
|
2004-11-25 22:51:47 +08:00
|
|
|
orthogonalization
|
|
|
|
|
2005-03-31 02:08:01 +08:00
|
|
|
USE control_flags, ONLY: program_name, tortho, tnosee, trane, ampre, &
|
2007-02-22 16:45:23 +08:00
|
|
|
trhor, tksw, tfor, tnosep, iprsta, &
|
2005-03-31 02:08:01 +08:00
|
|
|
thdyn, tnoseh
|
|
|
|
!
|
|
|
|
USE electrons_nose, ONLY: electrons_nose_info
|
2006-08-04 01:47:35 +08:00
|
|
|
USE electrons_module, ONLY: empty_print_info
|
2005-03-31 02:08:01 +08:00
|
|
|
USE sic_module, ONLY: sic_info
|
|
|
|
USE wave_base, ONLY: frice, grease
|
|
|
|
USE ions_base, ONLY: fricp
|
|
|
|
USE ions_nose, ONLY: ions_nose_info
|
|
|
|
USE cell_nose, ONLY: cell_nose_info
|
|
|
|
USE cell_base, ONLY: frich
|
2006-02-02 02:01:04 +08:00
|
|
|
USE efield_module, ONLY: tefield, efield_info, tefield2, efield_info2
|
2006-05-03 22:19:57 +08:00
|
|
|
USE io_global, ONLY: meta_ionode, stdout
|
2006-04-14 05:38:16 +08:00
|
|
|
!
|
|
|
|
!
|
2004-11-25 22:51:47 +08:00
|
|
|
IMPLICIT NONE
|
|
|
|
|
2005-03-31 02:08:01 +08:00
|
|
|
INTEGER :: is
|
|
|
|
|
|
|
|
IF( .NOT. has_been_read ) &
|
|
|
|
CALL errore( ' iosys ', ' input file has not been read yet! ', 1 )
|
|
|
|
|
2006-05-03 22:19:57 +08:00
|
|
|
IF( meta_ionode ) THEN
|
2005-03-31 02:08:01 +08:00
|
|
|
!
|
|
|
|
CALL cutoffs_print_info( )
|
|
|
|
!
|
|
|
|
IF( tortho ) THEN
|
|
|
|
CALL orthogonalize_info( )
|
|
|
|
ELSE
|
|
|
|
WRITE( stdout,512)
|
|
|
|
END IF
|
|
|
|
!
|
2006-12-31 19:09:03 +08:00
|
|
|
IF( TRIM(electron_dynamics) == 'sd' ) THEN
|
2004-11-25 22:51:47 +08:00
|
|
|
WRITE( stdout,513)
|
2005-03-31 02:08:01 +08:00
|
|
|
ELSE IF( TRIM(electron_dynamics) == 'verlet' ) THEN
|
|
|
|
WRITE( stdout,510)
|
2006-12-14 16:53:47 +08:00
|
|
|
frice = 0.d0
|
2005-03-31 02:08:01 +08:00
|
|
|
ELSE IF( TRIM(electron_dynamics) == 'damp' ) THEN
|
2005-07-18 09:16:41 +08:00
|
|
|
tnosee = .FALSE.
|
2005-03-31 02:08:01 +08:00
|
|
|
WRITE( stdout,509)
|
|
|
|
WRITE( stdout,514) frice, grease
|
2007-09-17 17:04:55 +08:00
|
|
|
ELSE IF( TRIM(electron_dynamics) == 'cg' ) THEN
|
|
|
|
WRITE( stdout,511)
|
2005-03-31 02:08:01 +08:00
|
|
|
ELSE
|
|
|
|
CALL errore(' input_info ', ' unknown electron dynamics ', 1 )
|
|
|
|
END IF
|
|
|
|
!
|
|
|
|
IF( tnosee ) THEN
|
|
|
|
WRITE( stdout,590)
|
2005-03-26 23:29:07 +08:00
|
|
|
CALL electrons_nose_info()
|
2005-03-31 02:08:01 +08:00
|
|
|
ELSE
|
|
|
|
WRITE( stdout,535)
|
|
|
|
END IF
|
|
|
|
!
|
2005-07-18 09:16:41 +08:00
|
|
|
IF( trane ) THEN
|
2005-03-31 02:08:01 +08:00
|
|
|
WRITE( stdout,515) ampre
|
2005-07-18 09:16:41 +08:00
|
|
|
ENDIF
|
2005-03-31 02:08:01 +08:00
|
|
|
!
|
|
|
|
CALL electrons_print_info( )
|
|
|
|
!
|
|
|
|
CALL exch_corr_print_info( )
|
|
|
|
|
2005-07-18 09:16:41 +08:00
|
|
|
IF ( trhor ) THEN
|
2005-03-31 02:08:01 +08:00
|
|
|
WRITE( stdout,720)
|
2005-07-18 09:16:41 +08:00
|
|
|
ENDIF
|
2007-02-22 16:45:23 +08:00
|
|
|
IF( tksw )THEN
|
2005-03-31 02:08:01 +08:00
|
|
|
WRITE( stdout,722)
|
2005-07-18 09:16:41 +08:00
|
|
|
ENDIF
|
2005-03-31 02:08:01 +08:00
|
|
|
!
|
|
|
|
IF( program_name == 'FPMD' ) THEN
|
|
|
|
CALL empty_print_info( stdout )
|
|
|
|
END IF
|
|
|
|
!
|
2005-07-18 09:16:41 +08:00
|
|
|
IF( tfor .AND. tnosep ) fricp = 0.0d0
|
2005-03-31 02:08:01 +08:00
|
|
|
!
|
|
|
|
CALL ions_print_info( )
|
|
|
|
!
|
2005-07-18 09:16:41 +08:00
|
|
|
IF( tfor .AND. tnosep ) CALL ions_nose_info()
|
2005-03-31 02:08:01 +08:00
|
|
|
!
|
2006-09-11 19:06:42 +08:00
|
|
|
CALL constraint_info( )
|
|
|
|
!
|
2005-07-18 09:16:41 +08:00
|
|
|
IF( thdyn .AND. tnoseh ) frich = 0.0d0
|
2005-03-31 02:08:01 +08:00
|
|
|
!
|
|
|
|
CALL cell_print_info( )
|
|
|
|
!
|
2005-07-18 09:16:41 +08:00
|
|
|
IF( thdyn .AND. tnoseh ) CALL cell_nose_info()
|
2005-03-31 02:08:01 +08:00
|
|
|
!
|
2005-10-20 23:22:12 +08:00
|
|
|
IF ( program_name == 'FPMD' ) THEN
|
|
|
|
!
|
|
|
|
CALL potential_print_info( stdout )
|
|
|
|
CALL sic_info()
|
|
|
|
!
|
2004-11-25 22:51:47 +08:00
|
|
|
END IF
|
2005-03-31 02:08:01 +08:00
|
|
|
!
|
2005-10-22 02:14:30 +08:00
|
|
|
IF(tefield) call efield_info( )
|
2006-02-02 02:01:04 +08:00
|
|
|
IF(tefield2) call efield_info2( )
|
|
|
|
|
2005-10-22 02:14:30 +08:00
|
|
|
WRITE( stdout,700) iprsta
|
|
|
|
|
2005-03-31 02:08:01 +08:00
|
|
|
END IF
|
2005-10-20 23:22:12 +08:00
|
|
|
!
|
2004-11-25 22:51:47 +08:00
|
|
|
RETURN
|
2005-03-02 18:03:55 +08:00
|
|
|
!
|
2005-10-20 23:22:12 +08:00
|
|
|
509 FORMAT( 3X,'verlet algorithm for electron dynamics')
|
|
|
|
510 FORMAT( 3X,'Electron dynamics with newton equations')
|
2007-09-17 17:04:55 +08:00
|
|
|
511 FORMAT( 3X,'Electron dynamics with conjugate gradient')
|
2005-10-20 23:22:12 +08:00
|
|
|
512 FORMAT( 3X,'Orthog. with Gram-Schmidt')
|
|
|
|
513 FORMAT( 3X,'Electron dynamics with steepest descent')
|
|
|
|
514 FORMAT( 3X,'with friction frice = ',f7.4,' , grease = ',f7.4)
|
|
|
|
515 FORMAT( 3X,'initial random displacement of el. coordinates with ', &
|
2005-11-02 00:42:06 +08:00
|
|
|
' amplitude=',f10.6)
|
2005-10-20 23:22:12 +08:00
|
|
|
535 FORMAT( 3X,'Electron dynamics : the temperature is not controlled')
|
|
|
|
590 FORMAT( 3X,'Electron temperature control via nose thermostat')
|
|
|
|
!
|
|
|
|
700 FORMAT( /,3X, 'Verbosity: iprsta = ',i2,/)
|
2006-01-10 22:04:13 +08:00
|
|
|
720 FORMAT( 3X, 'charge density is read from file')
|
2007-02-22 16:45:23 +08:00
|
|
|
722 FORMAT( 3X, 'Wavefunctions will be written to file as Kohn-Sham states')
|
2005-10-20 23:22:12 +08:00
|
|
|
!
|
2005-03-02 18:03:55 +08:00
|
|
|
END SUBROUTINE modules_info
|
2005-07-18 09:16:41 +08:00
|
|
|
!
|
|
|
|
END MODULE input
|