Commit f4c28ab8 authored by Emre Ahmetcik's avatar Emre Ahmetcik
Browse files

adjusted to the new viewer design (archive=None)

parent 6d1cc1cd
......@@ -519,7 +519,7 @@
"result": {
"type": "BeakerDisplay",
"innertype": "Html",
"object": "<script>\nvar beaker = bkHelper.getBeakerObject().beakerObj;\n</script>\n<div class=\"lasso_control\">\n\n<button type=\"button\" class=\"btn btn-info\" style=\"font-size:larger; color: #ffffff; font-weight: bold;\" onclick=\"run_lasso()\">RUN</button>\n\n<button type=\"button\" class=\"btn btn-default\" style=\"font-size:larger;\" onclick=\"reset_lasso()\">Reset</button>\n\n<label title=\"This button becomes active when the\nrun is finished. By clicking it, an interactive plot of the first 2\ndimensions of the optimized descriptor will be opened\"> \n<a href=\"/user/tmp/a74b7d2f6d0952af.html\" target=\"_blank\" class=\"btn btn-primary active\" style=\"font-size:larger;\" id=\"lasso_result_button\">View interactive 2D scatter plot</a> </label>\n </div>"
"object": "<script>\nvar beaker = bkHelper.getBeakerObject().beakerObj;\n</script>\n<div class=\"lasso_control\">\n\n<button type=\"button\" class=\"btn btn-info\" style=\"font-size:larger; color: #ffffff; font-weight: bold;\" onclick=\"run_lasso()\">RUN</button>\n\n<button type=\"button\" class=\"btn btn-default\" style=\"font-size:larger;\" onclick=\"reset_lasso()\">Reset</button>\n\n<label title=\"This button becomes active when the\nrun is finished. By clicking it, an interactive plot of the first 2\ndimensions of the optimized descriptor will be opened\"> \n<a href=\"/user/tmp/a74b7d2f6d0952af.html\" target=\"_blank\" class=\"btn btn-primary disabled\" style=\"font-size:larger;\" id=\"lasso_result_button\">View interactive 2D scatter plot</a> </label>\n </div>"
},
"elapsedTime": 0
},
......@@ -927,8 +927,8 @@
"state": {},
"selectedType": "BeakerDisplay",
"pluginName": "IPython",
"shellId": "8CE349A8F6AB447C8CAA5B71C70F7177",
"elapsedTime": 5004
"shellId": "59C8CB8F684A4ECE864B4DD816EB9C0D",
"elapsedTime": 4175
},
"evaluatorReader": true,
"lineCount": 361,
......@@ -974,14 +974,49 @@
"state": {},
"selectedType": "Hidden",
"pluginName": "IPython",
"shellId": "8CE349A8F6AB447C8CAA5B71C70F7177",
"shellId": "59C8CB8F684A4ECE864B4DD816EB9C0D",
"height": 117,
"elapsedTime": 332
"elapsedTime": 533
},
"evaluatorReader": true,
"lineCount": 27,
"tags": "calc_cell"
},
{
"id": "codeBgdsMv",
"type": "code",
"evaluator": "IPython",
"input": {
"body": [
"def calculation_time_warning(feature_space_size, l0_steps):",
" # This estimates correctly only for this tutorial, e.g. 24 cpus, 2D descritpor, classification",
" # reference calculation time",
" l0_steps_3700 = 27380000",
" minutes_3700 = 35.",
" steps_per_minute = l0_steps_3700 / minutes_3700 # on 24 cores",
"",
" time_l0 = l0_steps / steps_per_minute",
" time_sis = 0.",
"",
" calc_time = time_l0 + time_sis",
" ",
" if calc_time < 1.:",
" print \"INFO: Estimated calculation time: below 1 min\" ",
" else:",
" print \"WARNING: Estimated calculation time: %s min\" % int(round(calc_time))"
],
"hidden": true
},
"output": {
"state": {},
"pluginName": "IPython",
"shellId": "59C8CB8F684A4ECE864B4DD816EB9C0D",
"elapsedTime": 313
},
"evaluatorReader": true,
"lineCount": 16,
"initialization": true
},
{
"id": "codeiQ8ElK",
"type": "code",
......@@ -1011,7 +1046,7 @@
"}",
"# 2) for ssh connection",
"Remote_run = {",
" 'mpi_command':'mpirun -np 2',",
" 'mpi_command':'mpirun -np 24',",
" 'remote_path' : '/home/tutorial/',",
" 'SIS_code_path' : '/home/tutorial/src/',",
" 'hostname' : IP,",
......@@ -1026,34 +1061,30 @@
" 'desc_dim' : 2,",
" 'subs_sis' : int(beaker.n_sis),",
" 'ptype':'quali'}",
"# all together",
"sis_control = {'local_paths':Local_paths, 'remote_run':Remote_run, 'parameters':SIS_parameters}",
"",
"t1 = time()",
"sis_control = {'local_paths':Local_paths, 'remote_run':Remote_run, 'parameters':SIS_parameters}",
"#init",
"sis = SIS(P, D, selected_feature_list, feature_unit_classes=feature_unit_classes, target_unit='eV', control=sis_control, rm_existing_files=True)",
"# calculation time warning with function defined in the notebook",
"calculation_time_warning(sis.predicted_feature_space_size, sis.l0_steps)",
"#start calc",
"sis.start()",
"",
"#print \"Time\",time()-t1"
],
"hidden": true
]
},
"output": {
"state": {},
"selectedType": "Results",
"selectedType": "BeakerDisplay",
"pluginName": "IPython",
"shellId": "8CE349A8F6AB447C8CAA5B71C70F7177",
"height": 61,
"result": {
"type": "Results",
"outputdata": [
{
"type": "err",
"value": "INFO: The calculations are running on 2 CPUs.\n"
}
]
},
"elapsedTime": 13666
"shellId": "59C8CB8F684A4ECE864B4DD816EB9C0D",
"height": 62,
"elapsedTime": 357
},
"evaluatorReader": true,
"lineCount": 44,
"lineCount": 50,
"tags": "calc_cell"
},
{
......@@ -1064,40 +1095,7 @@
"body": [
"print \"INFO: CALCULATION FINISHED\"",
"results = sis.get_results()",
"Des, D_selected, overlap = results[-1]"
]
},
"output": {
"state": {},
"selectedType": "Results",
"pluginName": "IPython",
"shellId": "8CE349A8F6AB447C8CAA5B71C70F7177",
"height": 84,
"result": {
"type": "Results",
"outputdata": [
{
"type": "err",
"value": "INFO: Estimated order of magnitude of feature space size: 10^3 - 10^4\n"
},
{
"type": "out",
"value": "INFO: CALCULATION FINISHED\n"
}
]
},
"elapsedTime": 7728
},
"evaluatorReader": true,
"lineCount": 3,
"tags": "calc_cell"
},
{
"id": "codeOaLlQR",
"type": "code",
"evaluator": "IPython",
"input": {
"body": [
"Des, D_selected, overlap = results[-1]",
"print \"INFO: Identified descriptor: %s, %s\" %(Des[0], Des[0])",
"print \"INFO: Number of samples in overlap region: %s\" %overlap"
],
......@@ -1105,12 +1103,15 @@
},
"output": {
"state": {},
"selectedType": "Results",
"selectedType": "BeakerDisplay",
"pluginName": "IPython",
"shellId": "8CE349A8F6AB447C8CAA5B71C70F7177"
"shellId": "CE552833FBAD408FB7F3D612A07C5623",
"height": 155,
"elapsedTime": 7419
},
"evaluatorReader": true,
"lineCount": 2
"lineCount": 5,
"tags": "calc_cell"
},
{
"id": "code6Zind4",
......@@ -1131,7 +1132,8 @@
"print ",
"# parameters for the nomad viewer",
"target_list = list(P)",
"chemical_formula_list = chemical_formula_list = [\"%s (%s structure)\" % (df['compound'].tolist()[i], df['structure'].tolist()[i]) for i in range(len(target_list))]",
"chemical_formula_list = df['compound'].tolist()",
"crystal_structure_list = df['structure'].tolist()",
"x_list, y_list = D_selected.transpose().tolist()",
"x_axis_label, y_axis_label = Des",
"legend_title='Metal/non metal class'",
......@@ -1150,36 +1152,25 @@
"viewer = Viewer(name=name_html_page)",
"file_html_link, file_html_name = viewer.plot(archive=None, clustering_x_list=x_list, clustering_y_list=y_list,",
" target_list=target_list, chemical_formula_list=chemical_formula_list,",
" crystal_structure_list=crystal_structure_list,",
" target_class_names=['metal','non metal'],target_unit='eV',",
" target_name=target_name, legend_title=legend_title,",
" plot_convex_hull=True, is_classification=True,",
" x_axis_label=x_axis_label, y_axis_label=y_axis_label, plot_title=plot_title,",
" tmp_folder=tmp_folder)"
]
],
"hidden": true
},
"output": {
"state": {},
"selectedType": "Results",
"selectedType": "BeakerDisplay",
"pluginName": "IPython",
"shellId": "8CE349A8F6AB447C8CAA5B71C70F7177",
"height": 84,
"result": {
"type": "Results",
"outputdata": [
{
"type": "err",
"value": "INFO: Click on the button 'View interactive 2D scatter plot' to see the plot.\n"
},
{
"type": "out",
"value": "\n"
}
]
},
"elapsedTime": 459
"shellId": "CE552833FBAD408FB7F3D612A07C5623",
"height": 108,
"elapsedTime": 2240
},
"evaluatorReader": true,
"lineCount": 37,
"lineCount": 39,
"tags": "calc_cell"
},
{
......@@ -1198,7 +1189,7 @@
"selectedType": "BeakerDisplay",
"pluginName": "JavaScript",
"height": 90,
"elapsedTime": 35
"elapsedTime": 31
},
"evaluatorReader": true,
"lineCount": 2,
......
Markdown is supported
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