forked from JuliaMolSim/DFTK.jl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support band structures for 1D systems (JuliaMolSim#492)
- Loading branch information
Showing
5 changed files
with
39 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using DFTK | ||
using Plots | ||
|
||
# This example plots the free-electron bands for a 1D system. | ||
# TODO Convert into an example in the docs | ||
# show how one could add a potential to this and see the bands change. | ||
|
||
lattice = diagm([5., 0, 0]) | ||
model = Model(lattice; n_electrons=4, terms=[Kinetic()]) | ||
basis = PlaneWaveBasis(model; Ecut=300, kgrid=(1, 1, 1)); | ||
|
||
n_bands = 6 | ||
ρ0 = guess_density(basis) # Just dummy, has no meaning in this model | ||
p = plot_bandstructure(basis, ρ0, n_bands, kline_density=15) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters