Skip to content

Commit

Permalink
Print the full covariance matrix of the Wannier spreads
Browse files Browse the repository at this point in the history
Print the upper diagonal part of the full covariance matrix of position over a Wannier center. Add support to both the local position operator and the periodic 'twist' (Berry-phase) operator.
  • Loading branch information
hossamelgabarty committed Dec 22, 2021
1 parent 1a364cd commit a65146a
Show file tree
Hide file tree
Showing 3 changed files with 437 additions and 5 deletions.
17 changes: 17 additions & 0 deletions src/input_cp2k_loc.F
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,23 @@ SUBROUTINE print_wanniers(section)
CALL cp_print_key_section_create(print_key, __LOCATION__, "WANNIER_SPREADS", &
description="Controls the printing of the wannier functions", &
print_level=high_print_level, add_last=add_last_numeric, filename="")

CALL keyword_create(keyword, __LOCATION__, name="SECOND_MOMENTS", &
description="Prints out the upper triangular part of the position covariance matrix. "// &
"Default is to use a non-periodic position operator. ", &
usage="SECOND_MOMENTS", default_l_val=.FALSE., &
lone_keyword_l_val=.TRUE.)
CALL section_add_keyword(print_key, keyword)
CALL keyword_release(keyword)

CALL keyword_create(keyword, __LOCATION__, name="PERIODIC", &
description="For the covariance matrix, use the periodic position operator."// &
" Requires setting LMAXN1 in QS section to 6 or higher.", &
usage="PERIODIC", default_l_val=.FALSE., &
lone_keyword_l_val=.TRUE.)
CALL section_add_keyword(print_key, keyword)
CALL keyword_release(keyword)

CALL section_add_subsection(section, print_key)
CALL section_release(print_key)

Expand Down

0 comments on commit a65146a

Please sign in to comment.