Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of Stengel-Spaldin Functional in Wannierization #498

Merged
merged 43 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
80fa9d1
Implemented SS functional for spread
sjhong6230 Mar 25, 2024
1208a84
Implemented Stengel-Spaldin for initial states
sjhong6230 Mar 25, 2024
9c998ea
Sorting neighbors in same order
sjhong6230 Mar 25, 2024
6337ca4
Revised Stengel-Spaldin
sjhong6230 Mar 25, 2024
c804883
Implemented gradient for wannierization
sjhong6230 Mar 25, 2024
451f9f6
Revised MPI issue
sjhong6230 Mar 26, 2024
192ad66
Revised MPI issue
sjhong6230 Mar 27, 2024
2ac6c68
Implementation of new functional for isolated bands
sjhong6230 Mar 29, 2024
b829c7e
Implementation of new functional for disentanglement
sjhong6230 Mar 31, 2024
5d743a5
pre-commit
sjhong6230 Apr 4, 2024
3a0467f
Modify test 54 chk data
sjhong6230 Apr 4, 2024
77d950b
Sort wb in order
sjhong6230 Apr 4, 2024
969030a
Tutorials, docs, tests
sjhong6230 Apr 12, 2024
bba96a0
Move sorting from kmesh.f90 to overlap.f90
sjhong6230 Apr 13, 2024
1531e36
Add subroutine
sjhong6230 Apr 13, 2024
501024d
Passed all tests
sjhong6230 Apr 13, 2024
0753cce
Cleanup
sjhong6230 Apr 13, 2024
d8ecfa4
Revised chk file for restart test
sjhong6230 Apr 13, 2024
05af85c
Cleanup
sjhong6230 Apr 13, 2024
3340d7a
Rename parameter and revised for guiding centres
sjhong6230 Apr 15, 2024
a49f38a
Tutorial 34 valence+conduction
sjhong6230 Apr 15, 2024
f8527df
Revised arrays to allocatable for many kpoints
sjhong6230 Apr 16, 2024
e2794ed
Arrays to allocatable in disentangle for many k points
sjhong6230 Apr 16, 2024
07ca035
Revert "Arrays to allocatable in disentangle for many k points"
sjhong6230 Jun 14, 2024
b571e66
Revert "Revised arrays to allocatable for many kpoints"
sjhong6230 Jun 14, 2024
b0ffbc9
Merge branch 'wannier-developers:develop' into develop
sjhong6230 Jun 24, 2024
06f7f2d
Merge branch 'develop' into Stengel-Spaldin
sjhong6230 Jun 24, 2024
d3db9ca
Fixed Bug
sjhong6230 Jun 24, 2024
f2ec252
Merge branch 'develop' into Stengel-Spaldin
sjhong6230 Jun 24, 2024
d556647
pre-commit
sjhong6230 Jun 24, 2024
ced93df
Fixed bug
sjhong6230 Jun 24, 2024
f3001bf
Changed name of test directory
sjhong6230 Jun 24, 2024
302b156
Merge branch 'develop' into Stengel-Spaldin
sjhong6230 Jun 24, 2024
bba1ec9
Merge branch 'develop' into Stengel-Spaldin
sjhong6230 Jun 24, 2024
e2cf21e
Merge branch 'wannier-developers:develop' into develop
sjhong6230 Jun 24, 2024
3f7e2de
Merge branch 'develop' into Stengel-Spaldin
sjhong6230 Jun 25, 2024
1cb756c
Merge branch 'Stengel-Spaldin' of https://github.com/sjhong6230/wanni…
sjhong6230 Jun 25, 2024
b709486
Add test for higher order+Stengel-Spaldin
sjhong6230 Jul 2, 2024
62525d6
Merge branch 'develop' into Stengel-Spaldin
sjhong6230 Nov 12, 2024
1a272ec
Update w90-wannierise-parameters.csv
sjhong6230 Nov 12, 2024
54d655d
Update parameters.md
sjhong6230 Nov 12, 2024
84c34c3
Merge branch 'develop' into Stengel-Spaldin
sjhong6230 Nov 20, 2024
41a1d07
Merge branch 'develop' into Stengel-Spaldin
jryates Jan 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/docs/parameters/w90-wannierise-parameters.csv
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ slwf_num,I,"The number of objective WFs for selective localization"
slwf_constrain,L,"Whether to constrain the centres of the objective WFs"
slwf_lambda,R,"Value of the Lagrange multiplier for constraining the objective WFs"
slwf_centres,P,"The centres to which the objective WFs are to be constrained"
use_ss_functional, L,"If `true`, use Stengel-Spaldin functional and if `false`, use Marzari-Vanderbilt functional"
113 changes: 113 additions & 0 deletions docs/docs/tutorials/tutorial_36.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# 34: Silicon — Valence and low-lying conduction states

## Marzari-Vanderbilt functional

- Outline: *Obtain MLWFs for the valence and low-lying conduction-band
states of Si by minimizing the Marzari-Vanderbilt functional.
Plot the interpolated bandstructure.*

- Directory: `tutorials/tutorial34/Marzari-Vanderbilt`
*Files can be downloaded from
[here](https://github.com/wannier-developers/wannier90/tree/develop/tutorials/tutorial34)*

- Input Files

- `silicon.scf` *The `pwscf` input file for ground
state calculation*

- `silicon.nscf` *The `pwscf` input file to obtain
Bloch states on a uniform grid*

- `silicon.pw2wan` *Input file for `pw2wannier90`*

- `silicon.win` *The `wannier90` input file*

1. Run `pwscf` to obtain the ground state of silicon

```bash title="Terminal"
pw.x < silicon.scf > scf.out
```

2. Run `pwscf` to obtain the Bloch states on a uniform
k-point grid. Note that we request the lower 4 (valence) bands

```bash title="Terminal"
pw.x < silicon.nscf > nscf.out
```

3. Run `wannier90` to generate a list of the required overlaps (written
into the `silicon.nnkp` file).

```bash title="Terminal"
wannier90.x -pp silicon
```

4. Run `pw2wannier90` to compute the overlap between Bloch states and
the projections for the starting guess (written in the `silicon.mmn`
and `silicon.amn` files).

```bash title="Terminal"
pw2wannier90.x < silicon.pw2wan > pw2wan.out
```

5. Run `wannier90` to compute the MLWFs.

```bash title="Terminal"
wannier90.x silicon
```

6. Plot the bandstructure by adding the following commands to the input
file `silicon.win`

```vi title="Input file"
restart = plot

bands_plot = true
```

and re-running `wannier90`. The files `silicon_band.dat` and
`silicon_band.gnu` are created. To plot the bandstructure using
gnuplot

```bash title="Terminal"
gnuplot
```

```gnuplot title="Gnuplot shell"
load 'silicon_band.gnu'
```

The k-point path for the bandstructure interpolation is set in the
`kpoint_path` block. Try plotting along different paths.

## Stengel-Spaldin functional

- Outline: *Obtain MLWFs for the valence and low-lying conduction-band
states of Si by minimizing the Stengel-Spaldin functional.
Plot the interpolated bandstructure.*

- Directory: `tutorials/tutorial34/Stengel-Spaldin`
*Files can be downloaded from [here]
(<https://github.com/wannier-developers/wannier90/tree/develop/tutorials/tutorial34>)*

- Input Files

- `silicon.scf` *The `pwscf` input file for ground
state calculation*

- `silicon.nscf` *The `pwscf` input file to obtain
Bloch states on a uniform grid*

- `silicon.pw2wan` *Input file for `pw2wannier90`*

- `silicon.win` *The `wannier90` input file*

- To run, the procedure is the same as the MV functional case.

## Further ideas

- Compare the spreads obtained by both functionals.
Increase the grid and find out that the two functionals converges to the same behavior.

- Compare the Wannier-interpolated bandstructure with the both functionals.
Find out that the interpolated bandstructures are almost the same.
13 changes: 13 additions & 0 deletions docs/docs/user_guide/wannier90/parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,19 @@ not possible if an explicit projection block is not defined).

The default value is `false`.

### `logical :: use_ss_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.

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

The default value is `false`.

### `integer :: num_guide_cycles`

If `guiding_centres` is set to `true`, then the guiding centres are used
Expand Down
4 changes: 4 additions & 0 deletions src/wannier90_readwrite.F90
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,10 @@ 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, '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, &
i_value=wann_control%guiding_centres%num_guide_cycles)
if (allocated(error)) return
Expand Down
1 change: 1 addition & 0 deletions src/wannier90_types.F90
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +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 :: 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
Loading
Loading