Commit bd584ff0 authored by Luigi Sbailo's avatar Luigi Sbailo
Browse files

Change name into tetradymite_PRM2020

Trainign set reduced
parent 99528e01
......@@ -6,9 +6,9 @@
"email": "ghiringhelli@fhi-berlin.mpg.de",
"title": "Artificial intelligence for high-throughput discovery of topological insulators",
"description": "In this tutorial... ",
"url": "https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-topological-insulators",
"link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/topological_insulators.ipynb",
"link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/topological_insulators.ipynb",
"url": "https://gitlab.mpcdf.mpg.de/nomad-lab/analytics-tetradymite-PRM2020",
"link": "https://analytics-toolkit.nomad-coe.eu/hub/user-redirect/notebooks/tutorials/tetradymite_PRM2020.ipynb",
"link_public": "https://analytics-toolkit.nomad-coe.eu/public/user-redirect/notebooks/tutorials/tetradymite_PRM2020.ipynb",
"updated": "2020-26-08",
"flags":{
"featured": true,
......
......@@ -5,7 +5,7 @@ with open('metainfo.json') as file:
metainfo = json.load(file)
setup(
name='topological_insulators',
name='tetradymite_PRM2020',
version='1.0',
author=', '.join(metainfo['authors']),
author_email=metainfo['email'],
......
This diff is collapsed.
This diff is collapsed.
......@@ -74,19 +74,18 @@ class Visualizer:
self.viewer_l = JsmolView()
self.viewer_r = JsmolView()
self.instantiate_widgets()
x_cls0 = df[self.features[0]][self.df_cls0]
y_cls0 = df[self.features[1]][self.df_cls0]
x_cls1 = df[self.features[0]][self.df_cls1]
y_cls1 = df[self.features[1]][self.df_cls1]
line_x, line_y = self.f_x(self.features[0], self.features[1])
hullx_cls0, hully_cls0, hullx_cls1, hully_cls1 = self.make_hull(self.features[0], self.features[1])
# custom_cls0 = np.dstack((self.target_train[self.df_cls0],
# self.target_predict[self.df_cls0]))[0]
# custom_cls1 = np.dstack((self.target_train[self.df_cls1],
# self.target_predict[self.df_cls1]))[0]
# the final plot is the sum of two traces, respectively containing the RS vs ZB materials
x_cls0 = df[self.features[0]][self.df_cls0]
y_cls0 = df[self.features[1]][self.df_cls0]
x_cls1 = df[self.features[0]][self.df_cls1]
y_cls1 = df[self.features[1]][self.df_cls1]
self.fig.add_trace(
(
go.Scatter(
......@@ -129,7 +128,7 @@ class Visualizer:
y=hully_cls0,
line=dict(color='Grey', width=1, dash=self.line_styles[0]),
name=r'Convex' + '<br>' + 'hull 0',
visible=True
visible=False
),
)
self.fig.add_trace(
......@@ -138,7 +137,7 @@ class Visualizer:
y=hully_cls1,
line=dict(color='Grey', width=1, dash=self.line_styles[0]),
name=r'Convex' + '<br>' + 'hull 1',
visible=True
visible=False
),
)
......@@ -148,7 +147,7 @@ class Visualizer:
y=line_y,
line=dict(color='Black', width=1, dash='solid'),
name=r'Classification' + '<br>' + 'line',
visible=True
visible=False
),
)
......@@ -193,6 +192,7 @@ class Visualizer:
if self.total_features == 2:
self.scatter_hull0.visible = True
self.scatter_hull1.visible = True
self.scatter_clsline.visible = True
else:
self.widg_hullslinewidth.disabled = True
self.widg_hullslinestyle.disabled = True
......@@ -417,7 +417,6 @@ class Visualizer:
self.scatter_hull1['x'] = hullx_cls1
self.scatter_hull1['y'] = hully_cls1
def handle_yfeat_change(self, change):
# changes the feature plotted on the x-axis
# separating line is modified accordingly
......@@ -450,8 +449,6 @@ class Visualizer:
self.scatter_hull1['x'] = hullx_cls1
self.scatter_hull1['y'] = hully_cls1
def handle_markerfeat_change(self, change):
self.set_markers_size(feature=change.new)
self.update_markers()
......@@ -477,7 +474,7 @@ class Visualizer:
structure_l = self.df[self.df['Chem Formula'] ==
self.widg_compound_text_l.value]['Structure'].values[0]
self.viewer_l.script(
"load data/topological_insulators/structures/" + structure_l + "_structures/"
"load data/tetradymite_PRM2020/structures/" + structure_l + "_structures/"
+ self.widg_compound_text_l.value + ".xyz")
symbols_cls0 = self.symbols_cls0
......@@ -511,7 +508,7 @@ class Visualizer:
structure_r = self.df[self.df['Chem Formula'] ==
self.widg_compound_text_r.value]['Structure'].values[0]
self.viewer_r.script(
"load data/topological_insulators/structures/" + structure_r + "_structures/"
"load data/tetradymite_PRM2020/structures/" + structure_r + "_structures/"
+ self.widg_compound_text_r.value + ".xyz")
symbols_cls0 = self.symbols_cls0
......@@ -648,7 +645,7 @@ class Visualizer:
text = "A download link will appear soon."
with self.widg_print_out:
print(text)
path = "./data/topological_insulators/plots/"
path = "./data/tetradymite_PRM2020/plots/"
try:
os.mkdir(path)
except:
......@@ -693,16 +690,16 @@ class Visualizer:
self.widg_checkbox_l.value = True
def view_structure_cls0_l(self, formula):
self.viewer_l.script("load data/topological_insulators/structures/RS_structures/" + formula + ".xyz")
self.viewer_l.script("load data/tetradymite_PRM2020/structures/RS_structures/" + formula + ".xyz")
def view_structure_cls0_r(self, formula):
self.viewer_r.script("load data/topological_insulators/structures/RS_structures/" + formula + ".xyz")
self.viewer_r.script("load data/tetradymite_PRM2020/structures/RS_structures/" + formula + ".xyz")
def view_structure_cls1_l(self, formula):
self.viewer_l.script("load data/topological_insulators/structures/ZB_structures/" + formula + ".xyz")
self.viewer_l.script("load data/tetradymite_PRM2020/structures/ZB_structures/" + formula + ".xyz")
def view_structure_cls1_r(self, formula):
self.viewer_r.script("load data/topological_insulators/structures/ZB_structures/" + formula + ".xyz")
self.viewer_r.script("load data/tetradymite_PRM2020/structures/ZB_structures/" + formula + ".xyz")
def update_point_cls0(self, trace, points, selector):
# changes the points labeled with a cross on the map.
......@@ -1078,7 +1075,7 @@ class Visualizer:
self.widg_print_button, self.widg_print_out,
])
file1 = open("./assets/topological_insulators/cross.png", "rb")
file1 = open("./assets/tetradymite_PRM2020/cross.png", "rb")
image1 = file1.read()
self.widg_img1 = widgets.Image(
value=image1,
......@@ -1086,7 +1083,7 @@ class Visualizer:
width=30,
height=30,
)
file2 = open("./assets/topological_insulators/cross2.png", "rb")
file2 = open("./assets/tetradymite_PRM2020/cross2.png", "rb")
image2 = file2.read()
self.widg_img2 = widgets.Image(
value=image2,
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment