-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: xquan818 <[email protected]>
- Loading branch information
1 parent
5b5e214
commit d8a5454
Showing
7 changed files
with
266 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# # Densities of states (DOS) | ||
# In this example, we'll plot the DOS, local DOS, and projected DOS of Silicon. | ||
# DOS computation only supports finite temperature. | ||
|
||
using DFTK | ||
using Unitful | ||
using Plots | ||
using LazyArtifacts | ||
|
||
## Define the geometry and pseudopotential | ||
a = 10.26 # Silicon lattice constant in Bohr | ||
lattice = a / 2 * [[0 1 1.0]; | ||
[1 0 1.0]; | ||
[1 1 0.0]] | ||
Si = ElementPsp(:Si; psp=load_psp(artifact"pd_nc_sr_lda_standard_0.4.1_upf", "Si.upf")) | ||
atoms = [Si, Si] | ||
positions = [ones(3) / 8, -ones(3) / 8] | ||
|
||
## Run SCF | ||
model = model_LDA(lattice, atoms, positions; temperature=5e-3) | ||
basis = PlaneWaveBasis(model; Ecut=15, kgrid=[4, 4, 4], symmetries_respect_rgrid=true) | ||
scfres = self_consistent_field(basis, tol=1e-8) | ||
|
||
## Plot the DOS | ||
plot_dos(scfres) | ||
|
||
## Plot the local DOS along one direction | ||
plot_ldos(scfres; n_points=100, ldos_xyz=[:, 10, 10]) | ||
|
||
## Plot the projected DOS | ||
plot_pdos(scfres; εrange=(-0.3, 0.5)) |
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
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