Bug fix for RESTART keyword.. Bug fix for restart metadynamics.. resetting few regtests of metadynamics..

svn-origin-rev: 6305
This commit is contained in:
Teodoro Laino 2007-08-18 14:34:50 +00:00
parent 96c8a68f4f
commit 10f17602f0
15 changed files with 42 additions and 29 deletions

View file

@ -23,10 +23,10 @@
!! SOURCE
!****************************************************************************
MODULE input_cp2k_dft
USE bibliography, ONLY: VandeVondele2003,Lippert1997,Lippert1999, &
VandeVondele2005a,Krack2000,Krack2002,&
Iannuzzi2005,Iannuzzi2006,Iannuzzi2007,&
VandeVondele2005b,Perdew1981,Avezac2005
USE bibliography, ONLY: &
Avezac2005, Iannuzzi2005, Iannuzzi2006, Iannuzzi2007, Krack2002, &
Lippert1997, Lippert1999, Perdew1981, VandeVondele2003, &
VandeVondele2005a, VandeVondele2005b
USE cp_output_handling, ONLY: cp_print_key_section_create
USE cp_units, ONLY: cp_unit_to_cp2k
USE input_constants
@ -3514,7 +3514,7 @@ CONTAINS
description="Controls the dumping of the MO restart file during scf."//&
"By default keeps a short history of three restarts."//&
"See also RESTART_HISTORY", &
print_level=silent_print_level, common_iter_levels=2, each=(/1,1/), &
print_level=silent_print_level, common_iter_levels=3, each=(/1,1,1/), &
filename="RESTART",error=error)
CALL keyword_create(keyword, name="BACKUP_COPIES",&
description="Specifies the maximum index of backup copies.",&
@ -3527,7 +3527,7 @@ CONTAINS
CALL cp_print_key_section_create(print_key,"RESTART_HISTORY",&
description="Dumps unique MO restart files during the run keeping all of them.",&
print_level=silent_print_level, common_iter_levels=0, each=(/500,500/), &
print_level=silent_print_level, common_iter_levels=0, each=(/500,500,500/), &
filename="RESTART",error=error)
CALL keyword_create(keyword, name="BACKUP_COPIES",&
description="Specifies the maximum index of backup copies.",&

View file

@ -313,7 +313,7 @@ CONTAINS
description="Controls the dumping of the restart file during runs."//&
"By default keeps a short history of three restarts."//&
"See also RESTART_HISTORY", &
print_level=silent_print_level, common_iter_levels=1,&
print_level=silent_print_level, common_iter_levels=1, each=(/1/), &
filename="",error=error)
CALL keyword_create(keyword, name="BACKUP_COPIES",&
@ -329,7 +329,7 @@ CONTAINS
CALL cp_print_key_section_create(print_key,"RESTART_HISTORY",&
description="Dumps unique restart files during the run keeping all of them."//&
"Most useful if recovery is needed at a later point.",&
print_level=silent_print_level, common_iter_levels=1, each=(/500/), &
print_level=silent_print_level, common_iter_levels=0, each=(/500/), &
filename="",error=error)
CALL section_add_subsection(subsection,print_key,error=error)
CALL section_release(print_key,error=error)

View file

@ -605,7 +605,8 @@ CONTAINS
INTEGER :: i, ih, iter_level, iw, j, &
n_colvar, n_step, ndum, stat
INTEGER, POINTER :: n_hills
LOGICAL :: explicit, failure
LOGICAL :: explicit, failure, &
skip_this_point
REAL(dp) :: dfunc, dp2, rval
REAL(dp), DIMENSION(:), POINTER :: ddp
REAL(dp), DIMENSION(:, :), POINTER :: delta_s_history, ss_history, &
@ -626,6 +627,7 @@ CONTAINS
ww_history => hills_env%ww_history
n_hills => hills_env%n_hills
colvars => meta_env%metavar
skip_this_point = .FALSE.
! Create a temporary logger level specific for metadynamics
CALL cp_add_iter_level(logger%iter_info,"METADYNAMICS",n_rlevel_new=iter_level,&
error=error)
@ -644,6 +646,7 @@ CONTAINS
hills_history => section_vals_get_subs_vals(meta_env%metadyn_section,"SPAWNED_HILLS_POS",error=error)
CALL section_vals_get(hills_history, explicit=explicit, error=error)
IF (explicit) THEN
skip_this_point = .TRUE.
CALL section_vals_val_get( hills_history,"_DEFAULT_KEYWORD_",n_rep_val=ndum, error=error)
!
! ss_history
@ -718,7 +721,7 @@ CONTAINS
!
! Proceed with normal calculation
!
IF(MODULO(n_step,hills_env%nt_hills)==0)THEN
IF((MODULO(n_step,hills_env%nt_hills)==0).AND.(.NOT.skip_this_point))THEN
IF(SIZE(ss_history,2)< n_hills+1)THEN
ALLOCATE(tmp(n_colvar,n_hills+100), stat=stat)
CPPostcondition(stat==0,cp_failure_level,routinep,error,failure)

View file

@ -71,11 +71,13 @@ MODULE qs_scf
cp_fm_release,&
cp_fm_to_fm,&
cp_fm_type
USE cp_output_handling, ONLY: cp_iterate,&
USE cp_output_handling, ONLY: cp_add_iter_level,&
cp_iterate,&
cp_p_file,&
cp_print_key_finished_output,&
cp_print_key_should_output,&
cp_print_key_unit_nr
cp_print_key_unit_nr,&
cp_rm_iter_level
USE cp_para_types, ONLY: cp_para_env_type
USE cp_sm_fm_interactions, ONLY: copy_sm_to_fm,&
cp_sm_fm_multiply
@ -375,8 +377,8 @@ CONTAINS
routineP = moduleN//':'//routineN
INTEGER :: handle, handle2, i, ispin, &
iter_count, output_unit, &
total_steps
iter_count, iter_level, &
output_unit, total_steps
LOGICAL :: diis_step, energy_only, exit_inner_loop, failure, gapw, &
gapw_xc, harris_energy, harris_flag, has_unit_metric, &
outer_loop_converged, use_jacobi, use_virial
@ -463,7 +465,8 @@ CONTAINS
"Step","Update method","Time","Convergence","Total energy",&
REPEAT("-",77)
END IF
CALL cp_add_iter_level(logger%iter_info,"SCF",n_rlevel_new=iter_level,&
error=error)
! *** outer loop of the scf, can treat other variables,
! *** such as lagrangian multipliers
scf_env%outer_scf%iter_count=0
@ -730,6 +733,8 @@ CONTAINS
qs_env%dft_control%qs_control%becke_control%becke_pot,error=error)
qs_env%dft_control%qs_control%becke_control%need_pot=.TRUE.
END IF
CALL cp_rm_iter_level(logger%iter_info,n_rlevel_att=iter_level,&
error=error)
CALL timestop(0.0_dp,handle)
END SUBROUTINE scf_env_do_scf

View file

@ -22,7 +22,7 @@
&PRINT
&RESTART
FILENAME =RESTART
EACH 1 100
EACH 1 1 100
&END
&END
&END SCF

View file

@ -24,7 +24,7 @@
&PRINT
&RESTART
FILENAME =RESTART
EACH 1 100
EACH 1 1 100
&END
&END
&END SCF

View file

@ -24,7 +24,7 @@
&PRINT
&RESTART
FILENAME =RESTART
EACH 1 100
EACH 1 1 100
&END
&END
&END SCF

View file

@ -21,7 +21,7 @@
&PRINT
&RESTART
FILENAME =RESTART
EACH 1 100
EACH 1 1 100
&END
&END
&END SCF

View file

@ -23,7 +23,7 @@
&PRINT
&RESTART
FILENAME =RESTART
EACH 1 100
EACH 1 1 100
&END
&END
&END SCF

View file

@ -6,7 +6,6 @@
MULTIPLICITY 1
POTENTIAL_FILE_NAME ../POTENTIAL
RESTART_FILE_NAME ../RESTART
&MGRID
CUTOFF 5
COMMENSURATE
@ -21,7 +20,7 @@
EPS_SCF 1.0E-6
&PRINT
&RESTART
EACH 1 0
EACH 1 1 0
COMMON_ITERATION_LEVELS 0
&END
&END

View file

@ -55,7 +55,7 @@
&MOTION
&MD
ENSEMBLE NVT
STEPS 30
STEPS 10
TIMESTEP 0.5
TEMPERATURE 300.0
&NOSE
@ -68,7 +68,7 @@
&FREE_ENERGY
&METADYN
DO_HILLS
NT_HILLS 3
NT_HILLS 2
WW 1.0e-3
&METAVAR
SCALE 0.02

View file

@ -55,7 +55,7 @@
&MOTION
&MD
ENSEMBLE NVT
STEPS 15
STEPS 5
TIMESTEP 0.5
TEMPERATURE 300.0
&NOSE
@ -68,7 +68,7 @@
&FREE_ENERGY
&METADYN
DO_HILLS
NT_HILLS 3
NT_HILLS 2
WW 1.0e-3
&METAVAR
SCALE 0.02

View file

@ -55,7 +55,7 @@
&MOTION
&MD
ENSEMBLE NVT
STEPS 15
STEPS 5
TIMESTEP 0.5
TEMPERATURE 300.0
&NOSE
@ -68,7 +68,7 @@
&FREE_ENERGY
&METADYN
DO_HILLS
NT_HILLS 3
NT_HILLS 2
WW 1.0e-3
&METAVAR
SCALE 0.02

View file

@ -180,3 +180,9 @@ C2H4-meta.inp
# bug fix restart metadynamics
H2O-meta_res2.inp
H2O-meta_res3.inp
#bug fix metadyn and making the regtests shorter..
H2O-meta_coord.inp
H2O-meta_coord_1.inp
H2O-meta_coord_2.inp
H2O-meta_res2.inp
H2O-meta_res3.inp

View file

@ -22,7 +22,7 @@
BACKUP_COPIES 0
&END
&RESTART_HISTORY
EACH 1 0
EACH 1 1 0
ADD_LAST NUMERIC
FILENAME =RESTART
BACKUP_COPIES 4