From 5d781ae1f32cf62dbacb5c1bf5df47319ac97f95 Mon Sep 17 00:00:00 2001 From: guanjihuan <34735497+guanjihuan@users.noreply.github.com> Date: Mon, 9 Aug 2021 16:25:38 +0800 Subject: [PATCH] update --- .../flat_bands_of_kagome lattice.py | 21 +++++ ...flat_bands_of_kagome lattice_with_sympy.nb | 90 +++++++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 academic_codes/2021.08.09_flat_bands_of_kagome lattice/flat_bands_of_kagome lattice.py create mode 100644 academic_codes/2021.08.09_flat_bands_of_kagome lattice/flat_bands_of_kagome lattice_with_sympy.nb diff --git a/academic_codes/2021.08.09_flat_bands_of_kagome lattice/flat_bands_of_kagome lattice.py b/academic_codes/2021.08.09_flat_bands_of_kagome lattice/flat_bands_of_kagome lattice.py new file mode 100644 index 0000000..29ec15b --- /dev/null +++ b/academic_codes/2021.08.09_flat_bands_of_kagome lattice/flat_bands_of_kagome lattice.py @@ -0,0 +1,21 @@ +import numpy as np +from math import * +import guan + +def hamiltonian(kx, ky): # kagome lattice + k1 = kx + k2 = kx/2+ky*sqrt(3)/2 + k3 = -kx/2+ky*sqrt(3)/2 + h = np.zeros((3, 3), dtype=complex) + h[0, 1] = cos(k1) + h[0, 2] = cos(k2) + h[1, 2] = cos(k3) + h = h + h.transpose().conj() + t = 1 + h = -2*t*h + return h + +kx_array = np.linspace(-pi ,pi, 100) +ky_array = np.linspace(-pi ,pi, 100) +eigenvalue_array = guan.calculate_eigenvalue_with_two_parameters(kx_array, ky_array, hamiltonian) +guan.plot_3d_surface(kx_array, ky_array, eigenvalue_array, xlabel='kx', ylabel='ky', zlabel='E') \ No newline at end of file diff --git a/academic_codes/2021.08.09_flat_bands_of_kagome lattice/flat_bands_of_kagome lattice_with_sympy.nb b/academic_codes/2021.08.09_flat_bands_of_kagome lattice/flat_bands_of_kagome lattice_with_sympy.nb new file mode 100644 index 0000000..742560a --- /dev/null +++ b/academic_codes/2021.08.09_flat_bands_of_kagome lattice/flat_bands_of_kagome lattice_with_sympy.nb @@ -0,0 +1,90 @@ +(* Content-type: application/vnd.wolfram.mathematica *) + +(*** Wolfram Notebook File ***) +(* http://www.wolfram.com/nb *) + +(* CreatedBy='Mathematica 12.0' *) + +(*CacheID: 234*) +(* Internal cache information: +NotebookFileLineBreakTest +NotebookFileLineBreakTest +NotebookDataPosition[ 158, 7] +NotebookDataLength[ 2340, 82] +NotebookOptionsPosition[ 2002, 67] +NotebookOutlinePosition[ 2387, 84] +CellTagsIndexPosition[ 2344, 81] +WindowFrame->Normal*) + +(* Beginning of Notebook Content *) +Notebook[{ +Cell[BoxData[{ + RowBox[{"Clear", "[", "\"\<`*\>\"", "]"}], "\n", + RowBox[{ + RowBox[{"k1", "=", "kx"}], ";"}], "\n", + RowBox[{ + RowBox[{"k2", "=", + RowBox[{ + RowBox[{"kx", "/", "2"}], "+", + RowBox[{"ky", "*", + RowBox[{ + RowBox[{"Sqrt", "[", "3", "]"}], "/", "2"}]}]}]}], ";"}], "\n", + RowBox[{ + RowBox[{"k3", "=", + RowBox[{ + RowBox[{ + RowBox[{"-", "kx"}], "/", "2"}], "+", + RowBox[{"ky", "*", + RowBox[{ + RowBox[{"Sqrt", "[", "3", "]"}], "/", "2"}]}]}]}], ";"}], "\n", + RowBox[{ + RowBox[{"H", "=", + RowBox[{ + RowBox[{"-", "2"}], "*", "t", "*", + RowBox[{"(", + RowBox[{"{", + RowBox[{ + RowBox[{"{", + RowBox[{"0", ",", + RowBox[{"Cos", "[", "k1", "]"}], ",", + RowBox[{"Cos", "[", "k2", "]"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"Cos", "[", "k1", "]"}], ",", "0", ",", + RowBox[{"Cos", "[", "k3", "]"}]}], "}"}], ",", + RowBox[{"{", + RowBox[{ + RowBox[{"Cos", "[", "k2", "]"}], ",", + RowBox[{"Cos", "[", "k3", "]"}], ",", "0"}], "}"}]}], "}"}], + ")"}]}]}], ";"}], "\n", + RowBox[{"MatrixForm", "[", "H", "]"}], "\n", + RowBox[{"eigenvalue", "=", + RowBox[{"MatrixForm", "[", + RowBox[{"Eigenvalues", "[", "H", "]"}], "]"}]}]}], "Input", + CellChangeTimes->{{3.837485198864452*^9, + 3.837485198867505*^9}},ExpressionUUID->"a7abdb4e-e7ef-4556-9d32-\ +d94836d031ca"] +}, +WindowSize->{1904, 997}, +WindowMargins->{{-8, Automatic}, {Automatic, 0}}, +Magnification:>1.7 Inherited, +FrontEndVersion->"12.0 for Microsoft Windows (64-bit) (2019\:5e744\:67088\ +\:65e5)", +StyleDefinitions->"Default.nb" +] +(* End of Notebook Content *) + +(* Internal cache information *) +(*CellTagsOutline +CellTagsIndex->{} +*) +(*CellTagsIndex +CellTagsIndex->{} +*) +(*NotebookFileOutline +Notebook[{ +Cell[558, 20, 1440, 45, 419, "Input",ExpressionUUID->"a7abdb4e-e7ef-4556-9d32-d94836d031ca"] +} +] +*) +