Skip to content

Commit

Permalink
Rename parameter and revised for guiding centres
Browse files Browse the repository at this point in the history
  • Loading branch information
sjhong6230 committed Apr 15, 2024
1 parent 05af85c commit 3340d7a
Show file tree
Hide file tree
Showing 8 changed files with 148 additions and 123 deletions.
13 changes: 8 additions & 5 deletions docs/docs/user_guide/wannier90/parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ physical value, L for a logical value and S for a text string.
| num_print_cycles | I | Control frequency of printing |
| write_r2mn | L | Write matrix elements of $r^2$ between WF to file |
| guiding_centres | L | Use guiding centres |
| mv_functional | L | If `true`, use Marzari-Vanderbilt functional and if `false`, use Stengel-Spaldin functional |
| use_ss_functional | L | If `true`, use Stengel-Spaldin functional and if `false`, use Marzari-Vanderbilt functional |
| num_guide_cycles | I | Frequency of guiding centres |
| num_no_guide_iter | I | The number of iterations after which guiding centres are used |
| trial_step \* | R | The trial step length for the parabolic line search during the minimisation of $\Omega$ |
Expand Down Expand Up @@ -947,15 +947,18 @@ not possible if an explicit projection block is not defined).

The default value is `false`.

### `logical :: mv_functional`
### `logical :: use_ss_functional`

If `true`, use Marzari-Vanderbilt functional and if `false`, use Stengel-Spaldin functional.
If `true`, use Stengel-Spaldin spread functional and if `false`,
use Marzari-Vanderbilt spread functional.

Both functionals converge to the same behavior if infinitely fine grid is used. Both of them are translationally invariant, but only Stengel-Spaldin functional is size consistent.
Both functionals converge to the same behavior if infinitely fine grid is used.
Both of them are translationally invariant,
but only Stengel-Spaldin functional is size consistent.

For more information, refer to Phys. Rev. B 73, 075121.

The default value is `true`.
The default value is `false`.

### `integer :: num_guide_cycles`

Expand Down
2 changes: 1 addition & 1 deletion src/readwrite.F90
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ subroutine w90_readwrite_clear_keywords(settings, comm)
call w90_readwrite_get_keyword(settings, 'num_shells', found, error, comm)
call w90_readwrite_get_keyword(settings, 'num_valence_bands', found, error, comm)
call w90_readwrite_get_keyword(settings, 'num_wann', found, error, comm)
call w90_readwrite_get_keyword(settings, 'mv_functional', found, error, comm)
call w90_readwrite_get_keyword(settings, 'use_ss_functional', found, error, comm)
call w90_readwrite_get_keyword(settings, 'one_dim_axis', found, error, comm)
call w90_readwrite_get_keyword(settings, 'optimisation', found, error, comm)
call w90_readwrite_get_keyword(settings, 'postproc_setup', found, error, comm)
Expand Down
4 changes: 2 additions & 2 deletions src/wannier90_readwrite.F90
Original file line number Diff line number Diff line change
Expand Up @@ -713,8 +713,8 @@ subroutine w90_wannier90_readwrite_read_wannierise(settings, wann_control, num_w
l_value=wann_control%guiding_centres%enable)
if (allocated(error)) return

call w90_readwrite_get_keyword(settings, 'mv_functional', found, error, comm, &
l_value=wann_control%mv_functional)
call w90_readwrite_get_keyword(settings, 'use_ss_functional', found, error, comm, &
l_value=wann_control%use_ss_functional)
if (allocated(error)) return

call w90_readwrite_get_keyword(settings, 'num_guide_cycles', found, error, comm, &
Expand Down
2 changes: 1 addition & 1 deletion src/wannier90_types.F90
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ module w90_wannier90_types
real(kind=dp) :: conv_tol = 1.0e-10_dp
integer :: conv_window
type(guiding_centres_type) :: guiding_centres
logical :: mv_functional = .true.
logical :: use_ss_functional = .false.
real(kind=dp) :: fixed_step = -999.0_dp
real(kind=dp) :: trial_step = 2.0_dp
logical :: precond = .false.
Expand Down
244 changes: 133 additions & 111 deletions src/wannierise.F90

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion test-suite/tests/testw90_example34_2/silicon.win
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ num_print_cycles = 10

length_unit = bohr

mv_functional = .false.
use_ss_functional = .true.

begin projections
!! !! Bond-centred s-orbitals
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tutorial34/Marzari-Vanderbilt/silicon.win
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ num_print_cycles = 10

length_unit = bohr

mv_functional = .true.
use_ss_functional = .false.

begin projections
!! !! Bond-centred s-orbitals
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tutorial34/Stengel-Spaldin/silicon.win
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ num_print_cycles = 10

length_unit = bohr

mv_functional = .false.
use_ss_functional = .true.

begin projections
!! !! Bond-centred s-orbitals
Expand Down

0 comments on commit 3340d7a

Please sign in to comment.