mirror of https://gitlab.com/QEF/q-e.git
added the nstep field to input/control_variables
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@12548 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
parent
3ebfa2139a
commit
39c00b3eb1
|
@ -6090,6 +6090,12 @@ SUBROUTINE qes_write_control_variables(iun, obj)
|
|||
CALL iotk_write_begin(iun, 'max_seconds')
|
||||
WRITE(iun, '(I12)') obj%max_seconds
|
||||
CALL iotk_write_end(iun, 'max_seconds')
|
||||
IF(obj%nstep_ispresent) THEN
|
||||
CALL iotk_write_begin(iun, 'nstep')
|
||||
WRITE(iun, '(I12)') obj%nstep
|
||||
CALL iotk_write_end(iun, 'nstep')
|
||||
ENDIF
|
||||
!
|
||||
CALL iotk_write_begin(iun, 'etot_conv_thr')
|
||||
WRITE(iun, '(E20.7)') obj%etot_conv_thr
|
||||
CALL iotk_write_end(iun, 'etot_conv_thr')
|
||||
|
@ -6111,8 +6117,8 @@ END SUBROUTINE qes_write_control_variables
|
|||
|
||||
SUBROUTINE qes_init_control_variables(obj, tagname, title, calculation, restart_mode, &
|
||||
prefix, pseudo_dir, outdir, stress, forces, wf_collect, &
|
||||
disk_io, max_seconds, etot_conv_thr, forc_conv_thr, &
|
||||
press_conv_thr, verbosity, print_every)
|
||||
disk_io, max_seconds, nstep_ispresent, nstep, etot_conv_thr, &
|
||||
forc_conv_thr, press_conv_thr, verbosity, print_every)
|
||||
IMPLICIT NONE
|
||||
|
||||
TYPE(control_variables_type) :: obj
|
||||
|
@ -6129,6 +6135,8 @@ SUBROUTINE qes_init_control_variables(obj, tagname, title, calculation, restart_
|
|||
LOGICAL :: wf_collect
|
||||
CHARACTER(len=*) :: disk_io
|
||||
INTEGER :: max_seconds
|
||||
LOGICAL :: nstep_ispresent
|
||||
INTEGER :: nstep
|
||||
REAL(DP) :: etot_conv_thr
|
||||
REAL(DP) :: forc_conv_thr
|
||||
REAL(DP) :: press_conv_thr
|
||||
|
@ -6147,6 +6155,10 @@ SUBROUTINE qes_init_control_variables(obj, tagname, title, calculation, restart_
|
|||
obj%wf_collect = wf_collect
|
||||
obj%disk_io = disk_io
|
||||
obj%max_seconds = max_seconds
|
||||
obj%nstep_ispresent = nstep_ispresent
|
||||
IF(obj%nstep_ispresent) THEN
|
||||
obj%nstep = nstep
|
||||
ENDIF
|
||||
obj%etot_conv_thr = etot_conv_thr
|
||||
obj%forc_conv_thr = forc_conv_thr
|
||||
obj%press_conv_thr = press_conv_thr
|
||||
|
@ -6162,6 +6174,9 @@ SUBROUTINE qes_reset_control_variables(obj)
|
|||
|
||||
obj%tagname = ""
|
||||
|
||||
IF(obj%nstep_ispresent) THEN
|
||||
obj%nstep_ispresent = .FALSE.
|
||||
ENDIF
|
||||
|
||||
END SUBROUTINE qes_reset_control_variables
|
||||
|
||||
|
|
|
@ -1211,6 +1211,8 @@ TYPE :: control_variables_type
|
|||
LOGICAL :: wf_collect
|
||||
CHARACTER(len=256) :: disk_io
|
||||
INTEGER :: max_seconds
|
||||
LOGICAL :: nstep_ispresent
|
||||
INTEGER :: nstep
|
||||
REAL(DP) :: etot_conv_thr
|
||||
REAL(DP) :: forc_conv_thr
|
||||
REAL(DP) :: press_conv_thr
|
||||
|
|
|
@ -35,7 +35,7 @@ MODULE qexsd_input
|
|||
SUBROUTINE qexsd_init_control_variables(obj,title,calculation,restart_mode,&
|
||||
prefix,pseudo_dir,outdir,stress,forces,wf_collect,disk_io, &
|
||||
max_seconds,etot_conv_thr,forc_conv_thr,press_conv_thr,verbosity, &
|
||||
iprint)
|
||||
iprint, nstep)
|
||||
!---------------------------------------------------------------------------------------------------------------------
|
||||
!
|
||||
TYPE(control_variables_type) :: obj
|
||||
|
@ -44,12 +44,13 @@ MODULE qexsd_input
|
|||
LOGICAL,INTENT(IN) :: stress,forces,wf_collect
|
||||
REAL(DP),INTENT(IN) :: max_seconds,etot_conv_thr,forc_conv_thr,&
|
||||
press_conv_thr
|
||||
INTEGER,INTENT(IN) :: iprint
|
||||
INTEGER,INTENT(IN) :: iprint, nstep
|
||||
!
|
||||
!
|
||||
CHARACTER(LEN=*),PARAMETER :: TAGNAME='control_variables'
|
||||
CHARACTER(LEN=256) :: verbosity_value, disk_io_value
|
||||
INTEGER :: int_max_seconds
|
||||
LOGICAL :: nstep_ispresent
|
||||
|
||||
int_max_seconds=nint(max_seconds)
|
||||
IF ( TRIM( verbosity ) .EQ. 'default' ) THEN
|
||||
|
@ -62,13 +63,30 @@ MODULE qexsd_input
|
|||
ELSE
|
||||
disk_io_value=TRIM(disk_io)
|
||||
END IF
|
||||
!
|
||||
SELECT CASE ( TRIM (calculation))
|
||||
CASE ('scf', 'nscf', 'bands')
|
||||
IF ( nstep == 1) THEN
|
||||
nstep_ispresent = .FALSE.
|
||||
ELSE
|
||||
nstep_ispresent = .TRUE.
|
||||
END IF
|
||||
CASE DEFAULT
|
||||
IF ( nstep == 50 ) THEN
|
||||
nstep_ispresent = .FALSE.
|
||||
ELSE
|
||||
nstep_ispresent = .TRUE.
|
||||
END IF
|
||||
END SELECT
|
||||
!
|
||||
CALL qes_init_control_variables(obj,tagname,title=title,calculation=calculation,&
|
||||
restart_mode=restart_mode,prefix=prefix, &
|
||||
pseudo_dir=pseudo_dir,outdir=outdir,disk_io=disk_io_value,&
|
||||
verbosity=TRIM(verbosity_value),stress=stress,forces=forces, &
|
||||
wf_collect=wf_collect,max_seconds=int_max_seconds, &
|
||||
etot_conv_thr=etot_conv_thr,forc_conv_thr=forc_conv_thr, &
|
||||
press_conv_thr=press_conv_thr,print_every=iprint)
|
||||
press_conv_thr=press_conv_thr,print_every=iprint, NSTEP = nstep, &
|
||||
NSTEP_ISPRESENT = nstep_ispresent )
|
||||
|
||||
END SUBROUTINE qexsd_init_control_variables
|
||||
!
|
||||
|
|
|
@ -68,6 +68,7 @@
|
|||
USE funct, ONLY: get_dft_is_hybrid => dft_is_hybrid, get_inlc, &
|
||||
get_dft_is_nonlocc => dft_is_nonlocc, get_nonlocc_name, get_dft_short
|
||||
USE uspp_param, ONLY: upf
|
||||
USE control_flags, ONLY: cf_nstep => nstep
|
||||
USE qes_module
|
||||
USE qexsd_module, ONLY: qexsd_init_atomic_species, qexsd_init_atomic_structure, qexsd_init_dft
|
||||
USE qexsd_input
|
||||
|
@ -103,7 +104,7 @@
|
|||
restart_mode=restart_mode,prefix=prefix,pseudo_dir=pseudo_dir,outdir=outdir, &
|
||||
stress=tstress,forces=tprnfor, wf_collect=wf_collect,disk_io=disk_io, &
|
||||
max_seconds=max_seconds,etot_conv_thr=etot_conv_thr,forc_conv_thr=forc_conv_thr, &
|
||||
press_conv_thr=press_conv_thr,verbosity=verbosity,iprint=iprint)
|
||||
press_conv_thr=press_conv_thr,verbosity=verbosity,iprint=iprint, NSTEP = cf_nstep )
|
||||
!------------------------------------------------------------------------------------------------------------------------
|
||||
! ATOMIC SPECIES
|
||||
!------------------------------------------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue