Skip to content

Commit

Permalink
update the bz visualizer notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
Dou Du committed Jun 6, 2024
1 parent 9fbff87 commit a0b7533
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 92 deletions.
49 changes: 3 additions & 46 deletions widgets/.ipynb_checkpoints/widget_bzvisualizer-checkpoint.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@
"metadata": {},
"outputs": [],
"source": [
"from widget_bzvisualizer import BZVisualizer\n",
"import numpy as np\n",
"from ase.dft.kpoints import *"
"from widget_bzvisualizer import BZVisualizer"
]
},
{
Expand All @@ -42,8 +40,8 @@
"## 2. Initialize the parameters for the widget\n",
"\n",
"* cell: the cell vectors a, b, c\n",
"* positions: the coordinates of the atoms\n",
"* elements: the elements of the atoms in an array"
"* rel_coods: the coordinates of the atoms in unit vectors\n",
"* atom_numbers: element numbers of the atoms"
]
},
{
Expand Down Expand Up @@ -76,47 +74,6 @@
"display(bz)"
]
},
{
"cell_type": "markdown",
"id": "2bcdc82d-4f4a-4a68-bfac-fa2ca5c553c9",
"metadata": {},
"source": [
"```{image} ./images/widget_bzvisualizer.png\n",
":alt: image periodictable\n",
":class: bg-primary mb-1\n",
":width: 500px\n",
":align: center\n",
"```"
]
},
{
"cell_type": "markdown",
"id": "fa2d7943-3705-4d56-8e06-e75c3cc1776f",
"metadata": {},
"source": [
"### One can also change the kpoints coordinates in the widget"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "veterinary-objective",
"metadata": {},
"outputs": [],
"source": [
"bz.kpts = (monkhorst_pack((8, 8, 8))*2*np.pi).tolist()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "stretch-animal",
"metadata": {},
"outputs": [],
"source": [
"bz.kpts"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
49 changes: 3 additions & 46 deletions widgets/widget_bzvisualizer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@
"metadata": {},
"outputs": [],
"source": [
"from widget_bzvisualizer import BZVisualizer\n",
"import numpy as np\n",
"from ase.dft.kpoints import *"
"from widget_bzvisualizer import BZVisualizer"
]
},
{
Expand All @@ -42,8 +40,8 @@
"## 2. Initialize the parameters for the widget\n",
"\n",
"* cell: the cell vectors a, b, c\n",
"* positions: the coordinates of the atoms\n",
"* elements: the elements of the atoms in an array"
"* rel_coods: the coordinates of the atoms in unit vectors\n",
"* atom_numbers: element numbers of the atoms"
]
},
{
Expand Down Expand Up @@ -76,47 +74,6 @@
"display(bz)"
]
},
{
"cell_type": "markdown",
"id": "2bcdc82d-4f4a-4a68-bfac-fa2ca5c553c9",
"metadata": {},
"source": [
"```{image} ./images/widget_bzvisualizer.png\n",
":alt: image periodictable\n",
":class: bg-primary mb-1\n",
":width: 500px\n",
":align: center\n",
"```"
]
},
{
"cell_type": "markdown",
"id": "fa2d7943-3705-4d56-8e06-e75c3cc1776f",
"metadata": {},
"source": [
"### One can also change the kpoints coordinates in the widget"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "veterinary-objective",
"metadata": {},
"outputs": [],
"source": [
"bz.kpts = (monkhorst_pack((8, 8, 8))*2*np.pi).tolist()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "stretch-animal",
"metadata": {},
"outputs": [],
"source": [
"bz.kpts"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down

0 comments on commit a0b7533

Please sign in to comment.