@@ -50,7 +50,6 @@ def __init__(
50
50
id : str = None ,
51
51
** kwargs ,
52
52
) -> None :
53
-
54
53
# this is a compound component, can be fed by mpid or
55
54
# by the BandStructure itself
56
55
super ().__init__ (
@@ -65,7 +64,6 @@ def __init__(
65
64
66
65
@property
67
66
def _sub_layouts (self ) -> dict [str , Component ]:
68
-
69
67
# defaults
70
68
state = {"label-select" : "lm" , "dos-select" : "ap" }
71
69
@@ -191,9 +189,7 @@ def _get_bs_dos(
191
189
return None , None
192
190
193
191
if mpid :
194
-
195
192
with MPRester () as mpr :
196
-
197
193
try :
198
194
bandstructure_symm_line = mpr .get_bandstructure_by_material_id (mpid )
199
195
except Exception as exc :
@@ -207,7 +203,6 @@ def _get_bs_dos(
207
203
density_of_states = None
208
204
209
205
else :
210
-
211
206
if bandstructure_symm_line and isinstance (bandstructure_symm_line , dict ):
212
207
bandstructure_symm_line = BandStructureSymmLine .from_dict (
213
208
bandstructure_symm_line
@@ -224,7 +219,6 @@ def get_ifermi_scene(bs: BandStructure) -> Scene:
224
219
225
220
@staticmethod
226
221
def get_brillouin_zone_scene (bs : BandStructureSymmLine ) -> Scene :
227
-
228
222
if not bs :
229
223
return Scene (name = "brillouin_zone" , contents = [])
230
224
@@ -281,7 +275,6 @@ def get_brillouin_zone_scene(bs: BandStructureSymmLine) -> Scene:
281
275
vbm = bs .get_vbm ()["kpoint" ]
282
276
283
277
if cbm and vbm :
284
-
285
278
if cbm .label :
286
279
cbm_label = cbm .label
287
280
for orig , new in pretty_labels .items ():
@@ -325,7 +318,6 @@ def get_brillouin_zone_scene(bs: BandStructureSymmLine) -> Scene:
325
318
def get_bandstructure_traces (
326
319
bs , path_convention : str , energy_window : tuple [float , float ] = (- 6.0 , 10.0 )
327
320
) -> tuple :
328
-
329
321
if path_convention == "lm" :
330
322
bs = HighSymmKpath .get_continuous_path (bs )
331
323
@@ -350,7 +342,6 @@ def get_bandstructure_traces(
350
342
vbm_new = bs_data ["vbm" ]
351
343
352
344
for d , dist_val in enumerate (bs_data ["distances" ]):
353
-
354
345
x_dat = dist_val
355
346
356
347
traces_for_segment = []
@@ -474,7 +465,6 @@ def get_dos_traces(
474
465
energy_window : tuple [float , float ] = (- 6.0 , 10.0 ),
475
466
horizontal : bool = False ,
476
467
) -> list :
477
-
478
468
if horizontal :
479
469
dos_axis , en_axis = "y" , "x"
480
470
else :
@@ -548,7 +538,6 @@ def get_dos_traces(
548
538
]
549
539
550
540
for label in proj_data :
551
-
552
541
if spin_polarized :
553
542
trace = {
554
543
dos_axis : - 1.0
@@ -594,9 +583,7 @@ def get_figure(
594
583
bs_domain = None ,
595
584
dos_domain = None ,
596
585
) -> go .Figure :
597
-
598
586
if (not dos ) and (not bs ):
599
-
600
587
empty_plot_style = {
601
588
"xaxis" : {"visible" : False },
602
589
"yaxis" : {"visible" : False },
@@ -777,7 +764,6 @@ def get_figure(
777
764
778
765
@staticmethod
779
766
def _get_data_list_dict (bs , dos ):
780
-
781
767
return {
782
768
"Band Gap" : "... eV" ,
783
769
"Direct Gap" : "..." ,
@@ -791,7 +777,6 @@ def generate_callbacks(self, app, cache):
791
777
Output (self .id ("bsdos-div" ), "children" ), [Input (self .id ("traces" ), "data" )]
792
778
)
793
779
def update_graph (traces ):
794
-
795
780
if traces == "error" :
796
781
body = MessageBody (
797
782
dcc .Markdown (
@@ -822,7 +807,6 @@ def update_label_select(mpid, path_convention):
822
807
if not mpid :
823
808
raise PreventUpdate
824
809
else :
825
-
826
810
label_value = path_convention
827
811
label_style = {"maxWidth" : "200" }
828
812
@@ -887,7 +871,6 @@ def update_select(elements, mpid):
887
871
Input (self .id ("label-select" ), "value" ),
888
872
)
889
873
def bs_dos_data (data , path_convention , dos_select , label_select ):
890
-
891
874
# Obtain bands to plot over and generate traces for bs data:
892
875
energy_window = (- 6.0 , 10.0 )
893
876
0 commit comments