Skip to content

Commit a7ec219

Browse files
committed
remove "create Dash app as normal" comments
1 parent 845842d commit a7ec219

11 files changed

+7
-27
lines changed

crystal_toolkit/apps/examples/bandstructure.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
# dos and bs data from local jsons
66
from monty.serialization import loadfn
77

8-
# standard Crystal Toolkit import
98
import crystal_toolkit.components as ctc
109
from crystal_toolkit.helpers.layouts import H1, Container
1110
from crystal_toolkit.settings import SETTINGS
1211

13-
# create Dash app as normal, assets folder set for visual styles only
12+
# assets folder set for visual styles only
1413
app = dash.Dash(assets_folder=SETTINGS.ASSETS_PATH)
1514

1615
# If callbacks created dynamically they cannot be statically checked at app startup.

crystal_toolkit/apps/examples/basic_hello_world.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import dash
22
from dash import html
33

4-
# create Dash app as normal
54
app = dash.Dash()
65

76
# create your layout

crystal_toolkit/apps/examples/diffraction.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@
44
from pymatgen.core.lattice import Lattice
55
from pymatgen.core.structure import Structure
66

7-
# standard Crystal Toolkit import
87
import crystal_toolkit.components as ctc
98
from crystal_toolkit.helpers.layouts import H1, H3, Container
109
from crystal_toolkit.settings import SETTINGS
1110

12-
# create Dash app as normal
1311
app = dash.Dash(assets_folder=SETTINGS.ASSETS_PATH)
1412

1513

crystal_toolkit/apps/examples/diffraction_dynamic.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@
55
from pymatgen.core.lattice import Lattice
66
from pymatgen.core.structure import Structure
77

8-
# standard Crystal Toolkit import
98
import crystal_toolkit.components as ctc
109
from crystal_toolkit.helpers.layouts import H1, Button, Container
1110
from crystal_toolkit.settings import SETTINGS
1211

13-
# create Dash app as normal
1412
app = dash.Dash(assets_folder=SETTINGS.ASSETS_PATH)
1513

1614
xrd_component = ctc.XRayDiffractionComponent(id="xrd-diffraction")

crystal_toolkit/apps/examples/diffraction_empty.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@
44
from pymatgen.core.lattice import Lattice
55
from pymatgen.core.structure import Structure
66

7-
# standard Crystal Toolkit import
87
import crystal_toolkit.components as ctc
98
from crystal_toolkit.helpers.layouts import H1, Container
109
from crystal_toolkit.settings import SETTINGS
1110

12-
# create Dash app as normal
1311
app = dash.Dash(assets_folder=SETTINGS.ASSETS_PATH)
1412

1513
structure = Structure(Lattice.cubic(4.2), ["Na", "K"], [[0, 0, 0], [0.5, 0.5, 0.5]])

crystal_toolkit/apps/examples/phase_diagram.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
from pymatgen.analysis.phase_diagram import PhaseDiagram
44
from pymatgen.ext.matproj import MPRester
55

6-
# standard Crystal Toolkit import
76
import crystal_toolkit.components as ctc
87

9-
# create Dash app as normal
108
app = dash.Dash()
119

1210
# If callbacks created dynamically they cannot be statically checked at app startup.
@@ -20,10 +18,10 @@
2018

2119
# first, retrieve entries from Materials Project
2220
with MPRester() as mpr:
23-
# li_entries = mpr.get_entries_in_chemsys(["Li"])
24-
# li_o_entries = mpr.get_entries_in_chemsys(["Li", "O"])
25-
li_co_o_entries = mpr.get_entries_in_chemsys(["Li", "O", "Co"])
26-
# li_co_o_fe_entries = mpr.get_entries_in_chemsys(["Li", "O", "Co", "Fe"])
21+
# li_entries = mpr.get_entries_in_chemsys("Li")
22+
# li_o_entries = mpr.get_entries_in_chemsys("Li-O")
23+
li_co_o_entries = mpr.get_entries_in_chemsys("Li-O-Co")
24+
# li_co_o_fe_entries = mpr.get_entries_in_chemsys("Li-O-Co-Fe")
2725

2826
# and then create the phase diagrams
2927
# li_phase_diagram = PhaseDiagram(li_entries)
@@ -39,7 +37,6 @@
3937
li_co_o_phase_diagram_component = ctc.PhaseDiagramComponent(li_co_o_phase_diagram)
4038
# li_co_o_fe_phase_diagram_component = ctc.PhaseDiagramComponent(li_co_o_fe_phase_diagram)
4139

42-
print(li_co_o_entries)
4340

4441
# example layout to demonstrate capabilities of component
4542
my_layout = html.Div(

crystal_toolkit/apps/examples/pourbaix.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
from dash import html
33
from pymatgen.ext.matproj import MPRester
44

5-
# standard Crystal Toolkit import
65
import crystal_toolkit.components as ctc
6+
from crystal_toolkit.settings import SETTINGS
77

8-
# create Dash app as normal
9-
app = dash.Dash()
8+
app = dash.Dash(assets_folder=SETTINGS.ASSETS_PATH)
109

1110
# If callbacks created dynamically they cannot be statically checked at app startup.
1211
# For this simple example this is not a problem, but if creating a complicated,

crystal_toolkit/apps/examples/structure.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
from pymatgen.core.lattice import Lattice
44
from pymatgen.core.structure import Structure
55

6-
# standard Crystal Toolkit import
76
import crystal_toolkit.components as ctc
87
from crystal_toolkit.settings import SETTINGS
98

10-
# create Dash app as normal
119
app = dash.Dash(assets_folder=SETTINGS.ASSETS_PATH)
1210

1311
# create the Structure object

crystal_toolkit/apps/examples/structure_magnetic.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
from pymatgen.core.lattice import Lattice
44
from pymatgen.core.structure import Structure
55

6-
# standard Crystal Toolkit import
76
import crystal_toolkit.components as ctc
87

9-
# create Dash app as normal
108
app = dash.Dash()
119

1210
# create the Structure object

crystal_toolkit/apps/examples/transformations.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66
from pymatgen.core.structure import Structure
77
from pymatgen.ext.matproj import MPRester
88

9-
# standard Crystal Toolkit import
109
import crystal_toolkit.components as ctc
1110

12-
# create Dash app as normal
1311
app = dash.Dash()
1412

1513
# create the Structure object

0 commit comments

Comments
 (0)