Skip to content

Commit

Permalink
fab update for embedding
Browse files Browse the repository at this point in the history
  • Loading branch information
rybkinjr committed Apr 8, 2019
1 parent 612a322 commit 685e868
Show file tree
Hide file tree
Showing 5 changed files with 488 additions and 223 deletions.
2 changes: 1 addition & 1 deletion src/embed_types.F
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ MODULE embed_types
max_grid_step, max_subsys_dens_diff
INTEGER :: n_iter, i_iter, dimen_aux, last_accepted, dimen_var_aux
REAL(KIND=dp) :: lambda, allowed_decrease, max_trad, min_trad, &
grad_norm
grad_norm, vw_cutoff, vw_smooth_cutoff_range
TYPE(pw_p_type), POINTER :: const_pot, prev_embed_pot, prev_spin_embed_pot
TYPE(pw_p_type), DIMENSION(:), POINTER :: prev_grid_grad, prev_grid_pot, prev_subsys_dens, v_w
REAL(KIND=dp) :: reg_term, trust_rad, conv_max, conv_int, &
Expand Down
18 changes: 16 additions & 2 deletions src/input_cp2k_dft.F
Original file line number Diff line number Diff line change
Expand Up @@ -5909,12 +5909,26 @@ SUBROUTINE create_optimize_embed(section)
CALL keyword_release(keyword)

CALL keyword_create(keyword, name="FAB", &
description="Finzel-Ayers-Bultinck iterative update. Alternative to Wu-Yang. ", &
description="Finzel-Ayers-Bultinck iterative update. Generally, not reliable. ", &
usage="FAB .TRUE.", &
default_l_val=.FALSE.)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)

CALL keyword_create(keyword, name="VW_CUTOFF", &
description="Cutoff for von Weizsacker potential in "// &
"the FAB optimization procedure.", &
usage="VW_CUTOFF 0.01", default_r_val=0.01_dp)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)

CALL keyword_create(keyword, name="VW_SMOOTH_CUT_RANGE", &
description="Smooth cutoff range for von Weizsacker potential in "// &
"the FAB optimization procedure.", &
usage="VW_CUTOFF 1.0", default_r_val=1.0_dp)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)

CALL keyword_create(keyword, name="ADD_CONST_POT", &
description="Apply level shift in the "// &
"optimization of the embedding potential.", &
Expand Down Expand Up @@ -5998,7 +6012,7 @@ SUBROUTINE create_optimize_dmfet(section)
CALL keyword_release(keyword)

CALL keyword_create(keyword, name="TRUST_RAD", &
description="Maximum number of iterations "// &
description="Step length "// &
"in the optimization procedure.", &
usage="TRUST_RAD 0.5", default_r_val=0.5_dp)
CALL section_add_keyword(section, keyword)
Expand Down

0 comments on commit 685e868

Please sign in to comment.