Commit 06a51dc2 authored by Luigi Sbailo's avatar Luigi Sbailo
Browse files

Change default settings

parent 991c797c
......@@ -45,8 +45,8 @@
"execution_count": 1,
"metadata": {
"ExecuteTime": {
"end_time": "2020-09-28T16:29:21.821237Z",
"start_time": "2020-09-28T16:29:21.811355Z"
"end_time": "2020-09-28T19:53:34.137950Z",
"start_time": "2020-09-28T19:53:34.116781Z"
},
"init_cell": true
},
......@@ -123,8 +123,8 @@
"execution_count": 2,
"metadata": {
"ExecuteTime": {
"end_time": "2020-09-28T16:29:22.312658Z",
"start_time": "2020-09-28T16:29:21.823064Z"
"end_time": "2020-09-28T19:53:34.602766Z",
"start_time": "2020-09-28T19:53:34.139606Z"
},
"init_cell": true
},
......@@ -162,8 +162,8 @@
"execution_count": 3,
"metadata": {
"ExecuteTime": {
"end_time": "2020-09-28T16:29:22.335555Z",
"start_time": "2020-09-28T16:29:22.314325Z"
"end_time": "2020-09-28T19:53:34.628561Z",
"start_time": "2020-09-28T19:53:34.604762Z"
},
"init_cell": true
},
......@@ -251,8 +251,8 @@
"execution_count": 4,
"metadata": {
"ExecuteTime": {
"end_time": "2020-09-28T16:29:22.463936Z",
"start_time": "2020-09-28T16:29:22.337130Z"
"end_time": "2020-09-28T19:53:34.760705Z",
"start_time": "2020-09-28T19:53:34.630161Z"
},
"init_cell": true
},
......@@ -300,8 +300,8 @@
"execution_count": 5,
"metadata": {
"ExecuteTime": {
"end_time": "2020-09-28T16:29:22.470868Z",
"start_time": "2020-09-28T16:29:22.465327Z"
"end_time": "2020-09-28T19:53:34.768344Z",
"start_time": "2020-09-28T19:53:34.762196Z"
},
"init_cell": true
},
......@@ -368,8 +368,8 @@
"execution_count": 6,
"metadata": {
"ExecuteTime": {
"end_time": "2020-09-28T16:29:22.491252Z",
"start_time": "2020-09-28T16:29:22.472488Z"
"end_time": "2020-09-28T19:53:34.790059Z",
"start_time": "2020-09-28T19:53:34.770183Z"
},
"init_cell": true
},
......@@ -392,7 +392,7 @@
" visualizer.show()\n",
" \n",
"def prm_select(change):\n",
" if change['new'] == 'PRM2015':\n",
" if change['new'] == 'PRM2020':\n",
" default_operations = ['add', 'sub', 'abs_diff', 'mult', 'div', 'exp', 'neg_exp', 'inv', 'sq', 'cb', \n",
" 'sqrt', 'cbrt', 'log', 'abs']\n",
" default_features = ['z_AB','chi_AB','lambda_AB','z_LMN','chi_LMN','lambda_LMN']\n",
......@@ -403,7 +403,7 @@
" for feat, widget in zip(possible_features, feat_list):\n",
" widget.value = feat in default_features\n",
" widget.disabled = True\n",
" tier_selection.value = 'PRM2015'\n",
" tier_selection.value = 'PRM2020'\n",
" feat_per_iter_selection.value = 50\n",
" dimension_selection.value = 2 \n",
" else:\n",
......@@ -417,12 +417,12 @@
" default_features = ['z_AB','chi_AB','lambda_AB','z_LMN','chi_LMN','lambda_LMN']\n",
" for op, widget in zip(possible_operations, op_list):\n",
" widget.value = op in default_operations\n",
" widget.disabled = True\n",
" widget.disabled = False\n",
" for feat, widget in zip(possible_features, feat_list):\n",
" widget.value = feat in default_features\n",
" widget.disabled = True\n",
" tier_selection.value = 'PRM2020'\n",
" feat_per_iter_selection.value = 50\n",
" widget.disabled = False\n",
" tier_selection.value = 2\n",
" feat_per_iter_selection.value = 30\n",
" dimension_selection.value = 2\n",
" \n",
"def find_descriptors(b):\n",
......@@ -453,40 +453,40 @@
" global feat_space\n",
" global sisso\n",
" \n",
"# try:\n",
" feat_space, sisso = get_feat_space_and_sr(\n",
" df = df_train,\n",
" ops = allowed_operations,\n",
" cols = selected_features,\n",
" max_phi = tier,\n",
" n_sis_select = feat_per_iter_selection.value,\n",
" remove_double_divison=True,\n",
" max_dim = dimension_selection.value,\n",
" n_residual = 1,\n",
" default = default)\n",
" clear_output()\n",
" if (dimension_selection.value>1):\n",
" plot_button.disabled=False\n",
" else:\n",
" plot_button.disabled=True\n",
" try:\n",
" feat_space, sisso = get_feat_space_and_sr(\n",
" df = df_train,\n",
" ops = allowed_operations,\n",
" cols = selected_features,\n",
" max_phi = tier,\n",
" n_sis_select = feat_per_iter_selection.value,\n",
" remove_double_divison=True,\n",
" max_dim = dimension_selection.value,\n",
" n_residual = 1,\n",
" default = default)\n",
" clear_output()\n",
" if (dimension_selection.value>1):\n",
" plot_button.disabled=False\n",
" else:\n",
" plot_button.disabled=True\n",
"\n",
" print(\"Number of features generated: \" + str(feat_space.n_feat))\n",
" print(\"Number of features generated: \" + str(feat_space.n_feat))\n",
"\n",
" try:\n",
" sisso.fit()\n",
" for i in range(dimension_selection.value):\n",
" print(str(i+1)+'D model')\n",
"# print(\"RMSE: {:.4} | Descriptor: {}\".format(sisso.models[i][0].rmse, sisso.models[i][0]))\n",
" string = \"c0:{:.4}\".format(sisso.models[i][0].coefs[0][-1])\n",
" for j in range(i+1):\n",
" string = string + str(\" | a\"+str(j)+\":{:.4}\".format(sisso.models[i][0].coefs[0][j]))\n",
" print(string + '\\n')\n",
" global df\n",
" try:\n",
" sisso.fit()\n",
" for i in range(dimension_selection.value):\n",
" print(str(i+1)+'D model')\n",
" # print(\"RMSE: {:.4} | Descriptor: {}\".format(sisso.models[i][0].rmse, sisso.models[i][0]))\n",
" string = \"c0:{:.4}\".format(sisso.models[i][0].coefs[0][-1])\n",
" for j in range(i+1):\n",
" string = string + str(\" | a\"+str(j)+\":{:.4}\".format(sisso.models[i][0].coefs[0][j]))\n",
" print(string + '\\n')\n",
" global df\n",
"\n",
" except RuntimeError:\n",
" print(\"\\nThe number of selected features per SIS iteration is bigger than the number of features available. Please reduce the number of selected features per SIS iteration (number of features generated / max number of dimensions) or increase the number of selected features and operations.\")\n",
"# except:\n",
"# print('The present selection does not lead to the creation of any derived features in the highest selected rung, please select at least one binary or power operator, or reduce the maximum rung')"
" except RuntimeError:\n",
" print(\"\\nThe number of selected features per SIS iteration is bigger than the number of features available. Please reduce the number of selected features per SIS iteration (number of features generated / max number of dimensions) or increase the number of selected features and operations.\")\n",
" except:\n",
" print('The present selection does not lead to the creation of any derived features in the highest selected rung, please select at least one binary or power operator, or reduce the maximum rung')"
]
},
{
......@@ -494,8 +494,8 @@
"execution_count": 7,
"metadata": {
"ExecuteTime": {
"end_time": "2020-09-28T16:29:22.749289Z",
"start_time": "2020-09-28T16:29:22.492553Z"
"end_time": "2020-09-28T19:53:35.052348Z",
"start_time": "2020-09-28T19:53:34.791718Z"
},
"init_cell": true,
"scrolled": false
......@@ -504,12 +504,12 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "db66a946fda449bf9fb691a810eedb38",
"model_id": "7ac43ed8db6c4e7e9ed51d856551b2fa",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"VBox(children=(HBox(children=(VBox(children=(Label(value=''), Checkbox(value=True, disabled=True, indent=False…"
"VBox(children=(HBox(children=(VBox(children=(Label(value=''), Checkbox(value=True, indent=False, layout=Layout…"
]
},
"metadata": {},
......@@ -591,13 +591,6 @@
"default_selection('')\n",
"display(out_box)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
......
%% Cell type:markdown id: tags:
<div id="teaser" style=' background-position: right center; background-size: 00px; background-repeat: no-repeat;
padding-top: 20px;
padding-right: 10px;
padding-bottom: 170px;
padding-left: 10px;
border-bottom: 14px double #333;
border-top: 14px double #333;' >
<div style="text-align:center">
<b><font size="6.4">Artificial intelligence for high-throughput discovery of topological insulators</font></b>
</div>
<p>
<span class="nomad--last-updated" data-version="v1.0.0">[Last updated: Sep 17, 2020]</span>
<div>
<img style="float: left;" src="assets/tetradymite_PRM2020/Logo_MPG.png" width="200">
<img style="float: right;" src="assets/tetradymite_PRM2020/Logo_NOMAD.png" width="250">
</div>
</div>
%% Cell type:markdown id: tags:
Insulator discovery
%% Cell type:code id: tags:
``` python
%%HTML
<script>
code_show=true;
function code_toggle() {
if (code_show)
{
$('div.input').hide();
}
else
{
$('div.input').show();
}
code_show = !code_show
}
$( document ).ready(code_toggle);
window.runCells("startup");
</script>
The raw code for this notebook is by default hidden for easier reading.
To toggle on/off the raw code, click <a href="javascript:code_toggle()">here</a>.
```
%%%% Output: display_data
%% Cell type:code id: tags:
``` python
%load_ext autoreload
%autoreload 2
```
%% Cell type:code id: tags:
``` python
from cpp_sisso import get_max_number_feats, get_estimate_n_feat_next_rung, generate_fs, SISSOClassifier, generate_phi_0_from_csv, FeatureSpace
from tetradymite_PRM2020.visualizer import Visualizer
import numpy as np
import pandas as pd
import os
```
%% Cell type:code id: tags:
``` python
from nomad import client, config
config.client.url = 'http://nomad-lab.eu/prod/rae/api'
query = client.query_archive(query={
'dataset_id': ['BjT-NFK0QdOx81_z5TmyeQ']},
per_page=100,
)
print(query)
```
%% Cell type:code id: tags:
``` python
df_train = pd.read_pickle('./data/tetradymite_PRM2020/training_set')
```
%% Cell type:code id: tags:
``` python
path_structure = './data/tetradymite_PRM2020/structures/'
try:
os.mkdir(path_structure)
except OSError:
!rm ./data/tetradymite_PRM2020/structures/*
compounds=df_train.index.to_list()
scale_factor = 10**10
alist = []
for compound in compounds:
for entry in range (1581):
labels = query[entry].section_run[0].section_system[-1].atom_labels
if (len(labels)>5):
continue
labels_1 = str(labels[0])+'_'+str(labels[1])+'_'+str(labels[3])+'_'+str(labels[4])+'_'+str(labels[2])
labels_2 = str(labels[0])+'_'+str(labels[1])+'_'+str(labels[4])+'_'+str(labels[3])+'_'+str(labels[2])
labels_3 = str(labels[1])+'_'+str(labels[0])+'_'+str(labels[3])+'_'+str(labels[4])+'_'+str(labels[2])
labels_4 = str(labels[1])+'_'+str(labels[0])+'_'+str(labels[4])+'_'+str(labels[3])+'_'+str(labels[2])
if compound in list([labels_1, labels_2, labels_3, labels_4]):
n_atoms = len (labels)
lat_x, lat_y, lat_z = query[entry].section_run[0].section_system[-1].lattice_vectors.magnitude * scale_factor
file = open(path_structure + str(compound) +".xyz","w")
file.write("%d\n\n"%(n_atoms*8))
for i in [0,1,2]:
for j in [0,1,2]:
for k in [0,1,2]:
for n in range (n_atoms):
el = query[entry].section_run[0].section_system[-1].atom_labels[n]
xyz = query[entry].section_run[0].section_system[-1].atom_positions[n].magnitude * scale_factor
xyz += i*lat_x
xyz += j*lat_y
xyz += k*lat_z
file.write (el)
file.write ("\t%f\t%f\t%f\n"%(xyz[0],xyz[1],xyz[2]))
file.close()
alist.append(compound)
break
```
%% Cell type:code id: tags:
``` python
# col_00 = 0
# col_01 = 10000
# col_10 = 95000
# col_11 = 100000
# df_red = pd.concat([df_train[df_train.columns[col_00:col_01].to_list()],df_train[df_train.columns[col_10:col_11].to_list()],df_train['Class']],axis=1)
# df_red.to_pickle('./data/tetradymite_PRM2020/training_set')
```
%% Cell type:code id: tags:
``` python
zeta = {'S':16, 'As':33, 'Se':34, 'Sb':51, 'Te':52, 'Bi':83}
chi = {'S':2.58, 'As':2.18, 'Se':2.55, 'Sb':2.05, 'Te':2.12, 'Bi':2.02}
lambd = {'S':0.05, 'As':0.19, 'Se':0.22, 'Sb':0.4, 'Te':0.49, 'Bi':1.25}
df_feat = pd.DataFrame(index=df_train.index, columns=['A','B','L','M','N',
'z_A','z_B','z_L','z_M','z_N',
'x_A','x_B','x_L','x_M','x_N',
'l_A','l_B','l_L','l_M','l_N',
])
for comp in df_train.index:
ablmn = comp.split('_')
df_feat.loc[comp] = pd.Series({
# 'A':ablmn[0],
# 'B':ablmn[1],
# 'L':ablmn[2],
# 'M':ablmn[3],
# 'N':ablmn[4],
'z_A':zeta[ablmn[0]],
'z_B':zeta[ablmn[1]],
'z_L':zeta[ablmn[2]],
'z_M':zeta[ablmn[3]],
'z_N':zeta[ablmn[4]],
'x_A':chi[ablmn[0]],
'x_B':chi[ablmn[1]],
'x_L':chi[ablmn[2]],
'x_M':chi[ablmn[3]],
'x_N':chi[ablmn[4]],
'l_A':lambd[ablmn[0]],
'l_B':lambd[ablmn[1]],
'l_L':lambd[ablmn[2]],
'l_M':lambd[ablmn[3]],
'l_N':lambd[ablmn[4]],
})
df_feat['Class'] = df_train['Class']
```
%% Cell type:code id: tags:
``` python
def get_feat_space_and_sr(
df,
ops= ['add', 'sub', 'abs_diff', 'mult', 'div', 'exp', 'neg_exp', 'inv', 'sq', 'cb',
'sqrt', 'cbrt', 'log', 'abs'],
cols="all",
max_phi=2,
n_sis_select=50,
remove_double_divison=True,
max_dim=3,
n_residual=1,
default=True,
):
if default:
phi_0, prop_unit, prop, prop_test, task_sizes_train, task_sizes_test, leave_out_inds = generate_phi_0_from_csv(
df_train, "Class", cols='all', task_key=None, leave_out_frac=0.0
)
feat_space = generate_fs(
phi_0,
prop,
task_sizes_train,
["add", "sub", "mult", "div", "abs_diff", "sq", "cb", "sqrt", "cbrt", "inv", "abs"],
"classification",
0,
50
)
else:
phi_0, prop_unit, prop, prop_test, task_sizes_train, task_sizes_test, leave_out_inds = generate_phi_0_from_csv(
df_feat, "Class", cols=cols, task_key=None, leave_out_frac=0.0, leave_out_inds=None
)
feat_space = generate_fs(
phi_0,
prop,
task_sizes_train,
ops,
"classification",
max_phi,
n_sis_select
)
sisso = SISSOClassifier(
feat_space,
prop_unit,
prop,
prop_test,
task_sizes_train,
task_sizes_test,
leave_out_inds,
max_dim,
10,
10
)
return feat_space, sisso
```
%% Cell type:code id: tags:
``` python
from ipywidgets import widgets, interactive
from IPython.display import HTML, clear_output
def plot_2d_solution(b):
with out2:
model = sisso.models[1][0]
classified=model.prop_train
compounds = df_train.index.to_list()
df=pd.DataFrame(data={
"Compound":compounds,
"Classification":classified})
for feat in sisso.models[sisso.n_dim-1][0].feats:
df[str(feat)]=feat.value
visualizer=Visualizer(df, sisso)
visualizer.show()
def prm_select(change):
if change['new'] == 'PRM2015':
if change['new'] == 'PRM2020':
default_operations = ['add', 'sub', 'abs_diff', 'mult', 'div', 'exp', 'neg_exp', 'inv', 'sq', 'cb',
'sqrt', 'cbrt', 'log', 'abs']
default_features = ['z_AB','chi_AB','lambda_AB','z_LMN','chi_LMN','lambda_LMN']
for op, widget in zip(possible_operations, op_list):
widget.value = op in default_operations
widget.disabled = True
for feat, widget in zip(possible_features, feat_list):
widget.value = feat in default_features
widget.disabled = True
tier_selection.value = 'PRM2015'
tier_selection.value = 'PRM2020'
feat_per_iter_selection.value = 50
dimension_selection.value = 2
else:
for widget in op_list+feat_list:
widget.disabled = False
def default_selection(b):
default_operations = ['add', 'sub', 'abs_diff', 'mult', 'div', 'exp', 'neg_exp', 'inv', 'sq', 'cb',
'sqrt', 'cbrt', 'log', 'abs']
default_features = ['z_AB','chi_AB','lambda_AB','z_LMN','chi_LMN','lambda_LMN']
for op, widget in zip(possible_operations, op_list):
widget.value = op in default_operations
widget.disabled = True
widget.disabled = False
for feat, widget in zip(possible_features, feat_list):
widget.value = feat in default_features
widget.disabled = True
tier_selection.value = 'PRM2020'
feat_per_iter_selection.value = 50
widget.disabled = False
tier_selection.value = 2
feat_per_iter_selection.value = 30
dimension_selection.value = 2
def find_descriptors(b):
with out2:
clear_output()
with out1:
clear_output()
print('Calculating...', flush=True)
selected_features = []
allowed_operations = []
for op, widget in zip(possible_operations, op_list):
if widget.value:
allowed_operations.append(op)
for sel_feat, widget in zip(possible_features, feat_list):
if widget.value:
feat = sel_feat.split('_')[0]
for char in sel_feat.split('_')[1]:
selected_features.append(feat + '_'+ char)
if tier_selection.value == 'PRM2020':
selected_features = "all"
tier = 0
default = True
else:
tier = tier_selection.value
default = False
global feat_space
global sisso
# try:
feat_space, sisso = get_feat_space_and_sr(
df = df_train,
ops = allowed_operations,
cols = selected_features,
max_phi = tier,
n_sis_select = feat_per_iter_selection.value,
remove_double_divison=True,
max_dim = dimension_selection.value,
n_residual = 1,
default = default)
clear_output()
if (dimension_selection.value>1):
plot_button.disabled=False
else:
plot_button.disabled=True
print("Number of features generated: " + str(feat_space.n_feat))
try:
sisso.fit()
for i in range(dimension_selection.value):
print(str(i+1)+'D model')
# print("RMSE: {:.4} | Descriptor: {}".format(sisso.models[i][0].rmse, sisso.models[i][0]))
string = "c0:{:.4}".format(sisso.models[i][0].coefs[0][-1])
for j in range(i+1):
string = string + str(" | a"+str(j)+":{:.4}".format(sisso.models[i][0].coefs[0][j]))
print(string + '\n')
global df
except RuntimeError:
print("\nThe number of selected features per SIS iteration is bigger than the number of features available. Please reduce the number of selected features per SIS iteration (number of features generated / max number of dimensions) or increase the number of selected features and operations.")
# except:
# print('The present selection does not lead to the creation of any derived features in the highest selected rung, please select at least one binary or power operator, or reduce the maximum rung')
feat_space, sisso = get_feat_space_and_sr(
df = df_train,
ops = allowed_operations,
cols = selected_features,
max_phi = tier,
n_sis_select = feat_per_iter_selection.value,
remove_double_divison=True,
max_dim = dimension_selection.value,
n_residual = 1,
default = default)
clear_output()
if (dimension_selection.value>1):
plot_button.disabled=False
else:
plot_button.disabled=True
print("Number of features generated: " + str(feat_space.n_feat))
try:
sisso.fit()
for i in range(dimension_selection.value):
print(str(i+1)+'D model')
# print("RMSE: {:.4} | Descriptor: {}".format(sisso.models[i][0].rmse, sisso.models[i][0]))
string = "c0:{:.4}".format(sisso.models[i][0].coefs[0][-1])
for j in range(i+1):
string = string + str(" | a"+str(j)+":{:.4}".format(sisso.models[i][0].coefs[0][j]))
print(string + '\n')
global df
except RuntimeError:
print("\nThe number of selected features per SIS iteration is bigger than the number of features available. Please reduce the number of selected features per SIS iteration (number of features generated / max number of dimensions) or increase the number of selected features and operations.")
except:
print('The present selection does not lead to the creation of any derived features in the highest selected rung, please select at least one binary or power operator, or reduce the maximum rung')
```
%% Cell type:code id: tags:
``` python
cb_layout = widgets.Layout(width = '15px')
thin_layout = widgets.Layout(width = '100px')
mid_layout = widgets.Layout(width = '200px')
wide_layout = widgets.Layout(width = '300px')
possible_operations = ['add', 'sub', 'abs_diff', 'mult', 'div', 'exp', 'neg_exp', 'inv', 'sq', 'cb',
'sqrt', 'cbrt', 'log', 'abs']
possible_features = ['z_AB','chi_AB','lambda_AB','z_LMN','chi_LMN','lambda_LMN']
tooltips = {
"z_AB" : "Atomic number cations",
"chi_AB" : "Pauling electronegativit cations",
"lambda_AB" : "Atomic SOC constant cations",
"z_LMN" : "Atomic number anions",
"chi_LMN" : "Pauling electronegativity anions",
"lambda_LMN" : "Atomic SOC constant anions",
}
labels = {
'add' : '$x + y$', 'sub' : '$x - y$', 'abs_diff' : '$|x - y|$', 'mult' : '$x \cdot y$', 'div' : '$x / y$',
'exp' : '$\exp(x)$', 'neg_exp' : '$\exp(-x)$', 'inv' : '$1/x$', 'sq' : '$x^2$', 'cb' : '$x^3$',
'six_pow' : '$x^6$', 'sqrt' : '$\sqrt{x}$', 'cbrt' : '$\sqrt[3]{x}$', 'log' : '$\log(x)$',
'abs' : '$|x|$', 'sin' : '$\sin(x)$', 'cos' : '$\cos(x)$', 'z_AB' : '$Z_{AB}$', 'chi_AB' : '$\chi_{AB}$',
'lambda_AB' : '$\lambda_{AB}$', 'z_LMN' : '$Z_{LMN}$', 'chi_LMN' : '$\chi_{LMN}$', 'lambda_LMN' : '$\lambda_{LMN}$'
}
op_list = []
op_labels = []
feat_list = []
feat_labels = []
for operation in possible_operations:
op_list.append(widgets.Checkbox(description='', value=True, indent=False, layout=cb_layout))
op_labels.append(widgets.Label(value=labels[operation]))
for feature in possible_features:
feat_list.append(widgets.Checkbox(description=tooltips[feature], value=True, indent=False, layout=cb_layout))
feat_labels.append(widgets.Label(value=labels[feature]))
op_box = widgets.VBox([widgets.Label()]+op_list)
op_label_box = widgets.VBox([widgets.Label(value='Operations:', layout=thin_layout)]+op_labels)
feat_box = widgets.VBox([widgets.Label()]+feat_list)
feat_label_box = widgets.VBox([widgets.Label(value='Features:', layout=thin_layout)]+feat_labels)
tier_selection = widgets.Dropdown(options=['PRM2020', 1,2,3], layout=thin_layout)
feat_per_iter_selection = widgets.BoundedIntText(value=26, min=1, max=100, step=1, layout=thin_layout)
dimension_selection = widgets.BoundedIntText(value = 3, min=1, max=4, step=1, layout = thin_layout)
settings_box = widgets.VBox([
widgets.Label(value='Settings:', layout=wide_layout),
widgets.Label(value='SISSO rung:', layout=wide_layout),
tier_selection,
widgets.Label(value='Number of selected features per SIS iteration:', layout=wide_layout),
feat_per_iter_selection,
widgets.Label(value='Maximum number of dimensions:', layout=wide_layout),
dimension_selection])
default_button = widgets.Button(description = 'Default selection', layout=mid_layout)
descriptor_button = widgets.Button(description = 'Run', layout=mid_layout)
plot_button = widgets.Button(description = 'Plot interactive map', disabled=True, layout=mid_layout)
default_button.on_click(default_selection)
descriptor_button.on_click(find_descriptors)
plot_button.on_click(plot_2d_solution)
button_box = widgets.VBox([default_button, descriptor_button, plot_button])
out1 = widgets.Output()
out2 = widgets.Output()
gui_box = widgets.HBox([op_box, op_label_box, feat_box, feat_label_box, settings_box, button_box])
out_box = widgets.VBox([gui_box, out1, out2])
tier_selection.observe(prm_select, names='value')
default_selection('')
display(out_box)
```
%%%% Output: display_data
%% Cell type:code id: tags:
``` python
```
......
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