Skip to content

Commit 2e0cddd

Browse files
author
Dou Du
committed
add demo GIF file
1 parent 2dc5074 commit 2e0cddd

File tree

2 files changed

+56
-9
lines changed

2 files changed

+56
-9
lines changed

example/demo.gif

1.88 MB
Loading

example/example.ipynb

Lines changed: 56 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,19 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": null,
5+
"execution_count": 13,
66
"metadata": {},
7-
"outputs": [],
7+
"outputs": [
8+
{
9+
"name": "stdout",
10+
"output_type": "stream",
11+
"text": [
12+
"The autoreload extension is already loaded. To reload it, use:\n",
13+
" %reload_ext autoreload\n",
14+
"env: ANYWIDGET_HMR=1\n"
15+
]
16+
}
17+
],
818
"source": [
919
"# This cell (autoloading & hot module replacement) is only needed for development!\n",
1020
"%load_ext autoreload\n",
@@ -14,9 +24,24 @@
1424
},
1525
{
1626
"cell_type": "code",
17-
"execution_count": null,
27+
"execution_count": 14,
1828
"metadata": {},
19-
"outputs": [],
29+
"outputs": [
30+
{
31+
"data": {
32+
"application/vnd.jupyter.widget-view+json": {
33+
"model_id": "067c689334a14910a7f11d529b60f922",
34+
"version_major": 2,
35+
"version_minor": 1
36+
},
37+
"text/plain": [
38+
"BZVisualizer(disable_interact_overlay=True, height='800px', seekpath_data={'faces_data': {'triangles_vertices'…"
39+
]
40+
},
41+
"metadata": {},
42+
"output_type": "display_data"
43+
}
44+
],
2045
"source": [
2146
"from widget_bzvisualizer import BZVisualizer\n",
2247
"\n",
@@ -32,7 +57,7 @@
3257
"\n",
3358
"bz = BZVisualizer(\n",
3459
" cell, rel_coords, atom_numbers,\n",
35-
" width=\"100%\", height=\"400px\",\n",
60+
" width=\"100%\", height=\"800px\",\n",
3661
" show_axes=True,\n",
3762
" show_bvectors=True,\n",
3863
" show_pathpoints=True,\n",
@@ -43,7 +68,7 @@
4368
},
4469
{
4570
"cell_type": "code",
46-
"execution_count": null,
71+
"execution_count": 15,
4772
"metadata": {},
4873
"outputs": [],
4974
"source": [
@@ -57,9 +82,24 @@
5782
},
5883
{
5984
"cell_type": "code",
60-
"execution_count": null,
85+
"execution_count": 17,
6186
"metadata": {},
62-
"outputs": [],
87+
"outputs": [
88+
{
89+
"data": {
90+
"application/vnd.jupyter.widget-view+json": {
91+
"model_id": "2acda8bf7ef946388c889d763521417b",
92+
"version_major": 2,
93+
"version_minor": 1
94+
},
95+
"text/plain": [
96+
"BZVisualizer(height='800px', seekpath_data={'faces_data': {'triangles_vertices': [[-1.1089190599406602, -2.220…"
97+
]
98+
},
99+
"metadata": {},
100+
"output_type": "display_data"
101+
}
102+
],
63103
"source": [
64104
"# Load info with ASE\n",
65105
"# NOTE: (ASE is not included as a direct dependency, needs to be installed separately)\n",
@@ -71,10 +111,17 @@
71111
" return struct.cell, struct.get_scaled_positions(), struct.numbers\n",
72112
"\n",
73113
"cell, rel_coords, atom_numbers = load_cell_info_ase(\"./mc3d-10016.cif\")\n",
74-
"bz2 = BZVisualizer(cell, rel_coords, atom_numbers)\n",
114+
"bz2 = BZVisualizer(cell, rel_coords, atom_numbers, width=\"100%\", height=\"800px\")\n",
75115
"display(bz2)"
76116
]
77117
},
118+
{
119+
"cell_type": "code",
120+
"execution_count": null,
121+
"metadata": {},
122+
"outputs": [],
123+
"source": []
124+
},
78125
{
79126
"cell_type": "code",
80127
"execution_count": null,

0 commit comments

Comments
 (0)