Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
lectures
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Solid state physics
lectures
Commits
10e67c50
There was a problem fetching the pipeline summary.
Commit
10e67c50
authored
7 years ago
by
Anton Akhmerov
Browse files
Options
Downloads
Patches
Plain Diff
add numerical DOS plots
parent
3386feca
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
code/band_structures.py
+23
-0
23 additions, 0 deletions
code/band_structures.py
lecture_3.md
+9
-60
9 additions, 60 deletions
lecture_3.md
with
32 additions
and
60 deletions
code/band_structures.py
+
23
−
0
View file @
10e67c50
...
...
@@ -118,6 +118,25 @@ def phonons_1d_2masses():
draw_classic_axes
(
ax
,
xlabeloffset
=
.
2
)
pyplot
.
savefig
(
'
phonons6.svg
'
)
def
DOS_finite_phonon_chain
(
n
,
output_name
):
rhs
=
2
*
np
.
eye
(
n
)
-
np
.
eye
(
n
,
k
=
1
)
-
np
.
eye
(
n
,
k
=-
1
)
rhs
[
0
,
0
]
-=
1
rhs
[
-
1
,
-
1
]
-=
1
pyplot
.
figure
()
pyplot
.
hist
(
np
.
sqrt
(
np
.
abs
(
np
.
linalg
.
eigvalsh
(
rhs
))),
bins
=
30
)
pyplot
.
xlabel
(
"
$\omega$
"
)
pyplot
.
ylabel
(
"
Number of levels
"
)
pyplot
.
savefig
(
output_name
)
def
DOS_finite_electron_chain
(
n
,
output_name
):
rhs
=
-
np
.
eye
(
n
,
k
=
1
)
-
np
.
eye
(
n
,
k
=-
1
)
pyplot
.
figure
()
pyplot
.
hist
(
np
.
linalg
.
eigvalsh
(
rhs
),
bins
=
30
)
pyplot
.
xlabel
(
"
$E$
"
)
pyplot
.
ylabel
(
"
Number of levels
"
)
pyplot
.
savefig
(
output_name
)
def
main
():
os
.
chdir
(
'
figures
'
)
...
...
@@ -126,6 +145,10 @@ def main():
phonons_1d_2masses
()
meff_1d_tb
()
tight_binding_1d
()
DOS_finite_phonon_chain
(
3
,
3
_phonons
.
svg
)
DOS_finite_phonon_chain
(
300
,
300
_phonons
.
svg
)
DOS_finite_electron_chain
(
3
,
3
_electrons
.
svg
)
DOS_finite_electron_chain
(
300
,
300
_electrons
.
svg
)
if
__name__
==
"
__main__
"
:
main
()
This diff is collapsed.
Click to expand it.
lecture_3.md
+
9
−
60
View file @
10e67c50
...
...
@@ -261,74 +261,23 @@ $$
Diagonalizing large matrices is unwieldy, but let's try and check it numerically to see if we notice a trend.
Eigenfrequencies of 3 atoms:
`[0.0 1.0 1.732050]`
```
python
%
matplotlib
inline
import
numpy
as
np
from
matplotlib
import
pyplot

# Phonons
rhs
=
np
.
array
([[
1
,
-
1
,
0
],
[
-
1
,
2
,
-
1
],
[
0
,
-
1
,
1
]])
print
(
"
Eigenfrequencies of 3 atoms:
"
,
np
.
sqrt
(
np
.
linalg
.
eigvalsh
(
rhs
)))
pyplot
.
hist
(
np
.
sqrt
(
np
.
linalg
.
eigvalsh
(
rhs
)),
bins
=
30
)
pyplot
.
show
()
Energies of 3 orbitals:
`[-1.41421356 0.0 1.41421356]`
# E
lectrons

rhs
=
np
.
array
([[
0
,
-
1
,
0
],
[
-
1
,
0
,
-
1
],
[
0
,
-
1
,
0
]])
print
(
"
Energies of 3 orbitals:
"
,
np
.
linalg
.
eigvalsh
(
rhs
))
pyplot
.
hist
(
np
.
linalg
.
eigvalsh
(
rhs
),
bins
=
30
);
```
### From 3 atoms to 300
Eigenf
requencies of
3 atoms: [6.26502485e-09 1.00000000e+00 1.73205081e+00]
F
requencies of
many phonons:

Energies of many electrons:

Energies of 3 orbitals: [-1.41421356e+00 -8.06646416e-17 1.41421356e+00]

### From 3 atoms to 100
```
python
n
=
100
# Phonons
rhs
=
2
*
np
.
eye
(
100
)
-
np
.
eye
(
100
,
k
=
1
)
-
np
.
eye
(
100
,
k
=-
1
)
rhs
[
0
,
0
]
-=
1
rhs
[
-
1
,
-
1
]
-=
1
print
(
'
Frequencies of many phonons
'
)
pyplot
.
hist
(
np
.
sqrt
(
np
.
abs
(
np
.
linalg
.
eigvalsh
(
rhs
))),
bins
=
30
)
pyplot
.
show
()
# Electrons
rhs
=
-
np
.
eye
(
100
,
k
=
1
)
-
np
.
eye
(
100
,
k
=-
1
)
print
(
"
Energies of many electrons
"
)
pyplot
.
hist
(
np
.
linalg
.
eigvalsh
(
rhs
),
bins
=
30
);
```
Frequencies of many phonons

Energies of many electrons


## Summary
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment