Commit 0bc44fbd authored by Angelo Ziletti's avatar Angelo Ziletti
Browse files

Fix isBeaker variable error.

parent 5162562b
......@@ -121,7 +121,7 @@
" <sup>1</sup> Engineering Laboratory, University of Cambridge, Trumpington Street, Cambridge CB2 1PZ, UK",
" <sup>2</sup> Fritz Haber Institute of the Max Planck Society, Faradayweg 4-6, D-14195 Berlin, Germany <br>",
"",
" <span class=\"nomad--last-updated\" data-version=\"v1.0.0\">[Last updated: May 15, 2017]</span>",
" <span class=\"nomad--last-updated\" data-version=\"v1.0.0\">[Last updated: May 16, 2017]</span>",
" </p>",
"</div>",
"",
......@@ -131,14 +131,15 @@
"<a href=\"https://analytics-toolkit.nomad-coe.eu/home/\" class=\"btn btn-primary\" style=\"font-size:larger;\">Back to Analytics Home</a> ",
"<a href=\"https://www.nomad-coe.eu/\" class=\"btn btn-primary\" style=\"font-size:larger;\">Back to NOMAD CoE Home</a> ",
"</div>"
]
],
"hidden": true
},
"output": {
"state": {},
"result": {
"type": "BeakerDisplay",
"innertype": "Html",
"object": "<script>\nvar beaker = bkHelper.getBeakerObject().beakerObj;\n</script>\n<div id=\"teaser\" style=\"background-color: rgba(149,170,79, 1.0); background-position: right center; background-size: 200px; background-repeat: no-repeat; \n padding-top: 20px;\n padding-right: 10px;\n padding-bottom: 50px;\n padding-left: 80px;\"> \n\n <div class=\"nomad--header\">\n <div style=\"text-align:center\">\n <h2> <img id=\"nomad\" src=\"https://nomad-coe.eu/uploads/nomad/images/NOMAD_Logo2.png\" alt=\"NOMAD Logo\" height=\"100\"> NOMAD Analytics Toolkit \n <img id=\"nomad\" src=\"https://www.nomad-coe.eu/uploads/nomad/backgrounds/head_big-data_analytics_2.png\" alt=\"NOMAD Logo\" height=\"80\"> </h2>\n </div>\n <h3> Database mapping via global similarity measures</h3>\n <p class=\"nomad--description\">\n created by:\n C. Poelking<sup>1</sup>,\n A. Ziletti<sup>2</sup>, \n L. Ghiringhelli<sup>2</sup>,\n and G. Csányi <sup>1</sup> <br><br>\n \n <sup>1</sup> Engineering Laboratory, University of Cambridge, Trumpington Street, Cambridge CB2 1PZ, UK\n <sup>2</sup> Fritz Haber Institute of the Max Planck Society, Faradayweg 4-6, D-14195 Berlin, Germany <br>\n\n <span class=\"nomad--last-updated\" data-version=\"v1.0.0\">[Last updated: May 15, 2017]</span>\n </p>\n</div>\n\n</div> \n\n<div style=\"text-align: right;\">\n<a href=\"https://analytics-toolkit.nomad-coe.eu/home/\" class=\"btn btn-primary\" style=\"font-size:larger;\">Back to Analytics Home</a> \n<a href=\"https://www.nomad-coe.eu/\" class=\"btn btn-primary\" style=\"font-size:larger;\">Back to NOMAD CoE Home</a> \n</div>"
"object": "<script>\nvar beaker = bkHelper.getBeakerObject().beakerObj;\n</script>\n<div id=\"teaser\" style=\"background-color: rgba(149,170,79, 1.0); background-position: right center; background-size: 200px; background-repeat: no-repeat; \n padding-top: 20px;\n padding-right: 10px;\n padding-bottom: 50px;\n padding-left: 80px;\"> \n\n <div class=\"nomad--header\">\n <div style=\"text-align:center\">\n <h2> <img id=\"nomad\" src=\"https://nomad-coe.eu/uploads/nomad/images/NOMAD_Logo2.png\" alt=\"NOMAD Logo\" height=\"100\"> NOMAD Analytics Toolkit \n <img id=\"nomad\" src=\"https://www.nomad-coe.eu/uploads/nomad/backgrounds/head_big-data_analytics_2.png\" alt=\"NOMAD Logo\" height=\"80\"> </h2>\n </div>\n <h3> Database mapping via global similarity measures</h3>\n <p class=\"nomad--description\">\n created by:\n C. Poelking<sup>1</sup>,\n A. Ziletti<sup>2</sup>, \n L. Ghiringhelli<sup>2</sup>,\n and G. Csányi <sup>1</sup> <br><br>\n \n <sup>1</sup> Engineering Laboratory, University of Cambridge, Trumpington Street, Cambridge CB2 1PZ, UK\n <sup>2</sup> Fritz Haber Institute of the Max Planck Society, Faradayweg 4-6, D-14195 Berlin, Germany <br>\n\n <span class=\"nomad--last-updated\" data-version=\"v1.0.0\">[Last updated: May 16, 2017]</span>\n </p>\n</div>\n\n</div> \n\n<div style=\"text-align: right;\">\n<a href=\"https://analytics-toolkit.nomad-coe.eu/home/\" class=\"btn btn-primary\" style=\"font-size:larger;\">Back to Analytics Home</a> \n<a href=\"https://www.nomad-coe.eu/\" class=\"btn btn-primary\" style=\"font-size:larger;\">Back to NOMAD CoE Home</a> \n</div>"
},
"selectedType": "BeakerDisplay",
"elapsedTime": 0,
......@@ -630,7 +631,7 @@
"object": "<script>\nvar beaker = bkHelper.getBeakerObject().beakerObj;\n</script>\n<script>\nvar run_soap = function() {\n $(\"#plot_result_button\").removeClass(\"active\").addClass(\"disabled\");\n get_options();\n beaker.evaluate(\"cell_soap_run\");\n};\n \nvar show_hide = function(tag, bt_tag) {\n $(\"#\"+tag).toggle();\n $(\"#\"+bt_tag).toggleClass(\"active\");\n /*if ($(\"#\"+bt_tag).attr(\"clicked\")) {\n $(\"#\"+bt_tag).css('background-color','lightgray');\n $(\"#\"+bt_tag).attr(\"clicked\", 0)\n }\n else {\n $(\"#\"+bt_tag).css('background-color','red');\n $(\"#\"+bt_tag).attr(\"clicked\", 1)\n }*/\n}\n\nvar allow = function(yesno) {\n if (yesno) {\n $(\"#option_el_spec_dens\").removeAttr('disabled');\n $(\"#atomic_density_type\").val('number_density').change();\n }\n else {\n if ($(\"#atomic_density_type\").val() == \"number_density\") {\n $(\"#atomic_density_type\").val('number_density_generic').change();\n }\n $(\"#option_el_spec_dens\").attr('disabled', 'disabled');\n }\n}\n \nvar reset_soap = function() {\n beaker.evaluate(\"cell_soap_gui\");\n};\n \nvar get_options = function() {\n \n // Determine kernel adaptor function\n // [i.e., choose from specific/generic/global-specific/global-generic] \n var density_type = $(\"#atomic_density_type\").val(); \n var adaptor_type = \"?\";\n if (density_type == \"number_density\") {\n adaptor_type = \"specific\";\n }\n else { // element-agnostic, core charge, valence charge, electronegativity\n adaptor_type = \"generic\";\n }\n var kernel_method = $(\"#kernel_method\").val();\n if (kernel_method == \"global\") {\n adaptor_type = \"global-\" + adaptor_type;\n }\n \n var n_procs = parseInt($(\"#exe_n_procs\").val());\n if ($(\"#threading_mode\").val() == \"single_threaded\") n_procs = 1;\n \n beaker.options = {\n \"run\": {\n \"config_folder\": $(\"#dataset_example\").val(),\n \"n_configs\": -1,\n \"n_procs\": n_procs,\n \"n_blocksize\": parseInt($(\"#exe_batch_size\").val()),\n \"queue\": \"?\",\n \"walltime\": 12,\n \"out_folder\": \"out.kernel\",\n \"verbose\": false\n },\n \"atomic_density\": {\n \"density_type\": $(\"#atomic_density_type\").val(),\n \"atomic_radius\": parseFloat($(\"#atomic_density_atomic_radius\").val()),\n \"use_covrad\": $(\"#atomic_density_use_covrad:checked\").val() == \"true\"\n },\n \"kernel\": {\n \"method\": kernel_method\n },\n \"basekernel\": {\n \"kernel.type\": \"dot\",\n \"kernel.delta\": 1.0,\n \"kernel.xi\": parseFloat($(\"#basekernel_kernel_xi\").val())\n },\n \"laplacian\": {\n \"inverse_dist\": true,\n \"coulomb\": true,\n \"scale\": 0.01,\n \"eta\": 1.0,\n \"gamma\": 0.01,\n \"optimize_eta_gamma\": false\n },\n \"dimred\": {\n \"method\": $(\"#dimred_method\").val()\n },\n \"graph\": {\n \"descriptor\": \"soap\",\n \"pca\": \"none\",\n \"hierarchical\": $(\"#kernel_hierarchical\").val() == \"true\",\n \"r0\": 1.0,\n \"alpha\": 2.0,\n \"n_levels\": 3,\n \"optimize_hierarchy\": false\n },\n \"lamatch\": {\n \"gamma\": 0.3,\n \"optimize_rematch\": false\n },\n \"descriptor\": {\n \"soap\": {\n \"spectrum.gradients\": false,\n \"spectrum.2l1_norm\": false,\n \"radialbasis.type\" : \"gaussian\",\n \"radialbasis.mode\" : $(\"#soap_radialbasis_mode\").val(),\n \"radialbasis.N\" : parseInt($(\"#soap_radialbasis_N\").val()),\n \"radialbasis.sigma\": parseFloat($(\"#soap_radialbasis_sigma\").val()),\n \"radialbasis.integration_steps\": 15,\n \"radialcutoff.Rc\": parseFloat($(\"#soap_radialbasis_Rc\").val()),\n \"radialcutoff.Rc_width\": parseFloat($(\"#soap_radialbasis_sigma\").val()),\n \"radialcutoff.type\": \"heaviside\",\n \"radialcutoff.center_weight\": 1.0,\n \"angularbasis.type\": \"spherical-harmonic\",\n \"angularbasis.L\": parseInt($(\"#soap_angularbasis_L\").val()),\n \"kernel.type\": \"dot\",\n \"kernel.adaptor\": adaptor_type,\n \"kernel.delta\": 1.0,\n \"kernel.xi\": parseFloat($(\"#basekernel_kernel_xi\").val()),\n \"exclude_centers\": [],\n \"exclude_targets\": [],\n \"type_list\": [\"C\"]\n }\n }\n };\n\n}; \n \nbeaker.view_result = function(result_link) {\n $(\"#plot_result_button\").attr(\"href\", result_link);\n $(\"#plot_result_button\").removeClass(\"disabled\"); //.addClass(\"active\");\n}\n</script>\n<style type=\"text/css\">\n .in11f {\n width: 3.5em;\n }\n .in3d {\n width: 5em;\n }\n .select_main {\n width: 20em;\n }\n .btn.active, .btn:active {\n background: #cecece;\n text-decoration: none;\n }\n</style>\n\n <p style=\"color:#20335d; font-weight:900; font-size:18pt;\"> Control options <br> </p><hr style=\"border-width:2px\"> <p></p>\n \n \n <table class=\"glosim_control\">\n \n <!-- DATASETS -->\n <tbody><tr style=\"line-height:40px\">\n <td><b>Dataset examples</b>&nbsp;</td>\n <td>\n &nbsp;&nbsp;<select class=\"select_main\" id=\"dataset_example\">\n <option value=\"zcrs\" onclick=\"allow(0)\" selected=\"\"> Zincblende / Rocksalt </option>\n <option value=\"gdb\" onclick=\"allow(1)\"> GDB7 </option> \n </select>\n <!--button class=\"btn btn-xs active\" onclick='show_hide(\"in_detail_1\")' style=\"border:1;\" >\\></button-->\n &nbsp;<button id=\"toggle_detail_1\" type=\"button\" class=\"btn btn-xs\" onclick=\"show_hide(&quot;in_detail_1&quot;, &quot;toggle_detail_1&quot;)\">Configure</button>\n <!--button id=\"toggle_detail_1\"type=\"button\" onclick='show_hide(\"in_detail_1\", \"toggle_detail_1\")'>Configure</button-->\n <g id=\"in_detail_1\" hidden=\"\"> &nbsp;&nbsp;&nbsp; Subsample structures &nbsp; <input id=\"exe_batch_size\" value=\"200\" min=\"50\" max=\"1000\" step=\"50\" class=\"in3d\" type=\"number\"> </g>\n </td>\n </tr> \n \n <!-- ATOMIC DENSITY --> \n <tr style=\"line-height:40px\">\n <td><b>Atomic density</b>&nbsp;</td>\n <td>\n &nbsp;&nbsp;<select class=\"select_main\" id=\"atomic_density_type\">\n <option id=\"option_el_agno_dens\" value=\"number_density_generic\" selected=\"\"> Density type: element-agnostic density </option>\n <option id=\"option_el_spec_dens\" value=\"number_density\" disabled=\"\"> Density type: element-specific density </option> \n <option value=\"valence_charge_density\"> Density type: valence charge </option>\n <option value=\"z_density\"> Density type: core charge </option>\n <option value=\"elneg_density\"> Density type: electronegativity </option>\n </select>\n &nbsp;<button id=\"toggle_detail_2\" type=\"button\" class=\"btn btn-xs\" onclick=\"show_hide(&quot;in_detail_2&quot;, &quot;toggle_detail_2&quot;)\">Configure</button>\n <g id=\"in_detail_2\" hidden=\"\">&nbsp; &nbsp; Use covalent radii &nbsp; <input id=\"atomic_density_use_covrad\" value=\"true\" unchecked=\"\" type=\"checkbox\">\n &nbsp; &nbsp; Constant atomic radius (Angstrom) &nbsp; <input id=\"atomic_density_atomic_radius\" value=\"0.5\" min=\"0.0\" max=\"2.0\" step=\"0.1\" class=\"in11f\" type=\"number\"> </g>\n </td>\n </tr>\n \n <!-- BASIS SET --> \n <tr style=\"line-height:40px\">\n <td><b>Basis set</b>&nbsp;</td>\n <td>\n &nbsp;&nbsp;<select class=\"select_main\" id=\"soap_radialbasis_mode\">\n <option value=\"adaptive\"> Radial basis: adaptive </option>\n <option value=\"equispaced\"> Radial basis: equispaced </option>\n </select>\n &nbsp;<button id=\"toggle_detail_3\" type=\"button\" class=\"btn btn-xs\" onclick=\"show_hide(&quot;in_detail_3&quot;, &quot;toggle_detail_3&quot;)\">Configure</button>\n <g id=\"in_detail_3\" hidden=\"\">\n &nbsp; &nbsp; Radial functions N = &nbsp; <input id=\"soap_radialbasis_N\" value=\"9\" min=\"1\" max=\"14\" step=\"1\" class=\"in11f\" type=\"number\">\n &nbsp; &nbsp; Radial cutoff (equispaced only) &nbsp; <input id=\"soap_radialbasis_Rc\" value=\"3.5\" min=\"0.1\" max=\"10.0\" step=\"0.1\" class=\"in11f\" type=\"number\">\n &nbsp; &nbsp; Radial Gaussian width &nbsp; <input id=\"soap_radialbasis_sigma\" value=\"0.5\" min=\"0.1\" max=\"3.0\" step=\"0.1\" class=\"in11f\" type=\"number\">\n &nbsp; &nbsp; Angular functions L = &nbsp; <input id=\"soap_angularbasis_L\" value=\"6\" min=\"1\" max=\"14\" step=\"1\" class=\"in11f\" type=\"number\"> \n </g>\n </td>\n </tr> \n \n <!-- BASE KERNEL --> \n <tr style=\"line-height:40px\">\n <td><b>Base kernel</b>&nbsp;</td>\n <td>\n &nbsp;&nbsp;<select class=\"select_main\" id=\"basekernel_method\">\n <option value=\"dot\"> Dot-product kernel </option>\n <option value=\"laplacian\" disabled=\"\"> Laplacian kernel </option>\n <option value=\"gaussian\" disabled=\"\"> Gaussian kernel </option>\n </select>\n &nbsp;<button id=\"toggle_detail_4\" type=\"button\" class=\"btn btn-xs\" onclick=\"show_hide(&quot;in_detail_4&quot;, &quot;toggle_detail_4&quot;)\">Configure</button>\n <g id=\"in_detail_4\" hidden=\"\">\n &nbsp; &nbsp; Exponent &nbsp; <input id=\"basekernel_kernel_xi\" value=\"3.0\" min=\"0.1\" max=\"5.0\" step=\"0.1\" class=\"in11f\" type=\"number\">\n </g>\n </td>\n </tr> \n \n <!-- TOP KERNEL -->\n <tr style=\"line-height:40px\">\n <td><b>Top kernel</b>&nbsp;</td>\n <td>\n &nbsp;&nbsp;<select class=\"select_main\" id=\"kernel_method\">\n <option value=\"global\" selected=\"\"> Global average (coherent)</option>\n <option value=\"average\"> Global average (incoherent)</option>\n <option value=\"rematch\"> Regularized-entropy match</option> \n <option value=\"laplacian\"> Laplacian Markov random field</option>\n </select>\n &nbsp;<button id=\"toggle_detail_5\" type=\"button\" class=\"btn btn-xs\" onclick=\"show_hide(&quot;in_detail_5&quot;, &quot;toggle_detail_5&quot;)\">Configure</button>\n <g id=\"in_detail_5\" hidden=\"\">\n &nbsp; &nbsp; Mode &nbsp; \n <select id=\"kernel_hierarchical\">\n <option value=\"false\"> single-level</option>\n <option value=\"true\"> hierarchical</option>\n </select>\n &nbsp; &nbsp; Graph Laplacian &nbsp; \n <select id=\"opt_top_kernel_hierarchy\">\n <option value=\"invdist\"> inverse distance</option>\n <option value=\"coulomb\"> Coulomb matrix</option>\n </select>\n &nbsp; &nbsp; Levels &nbsp; <input id=\"graph:n_levels\" value=\"1\" min=\"1\" max=\"5\" step=\"1\" class=\"in11f\" type=\"number\">\n &nbsp; &nbsp; Base radius &nbsp; <input id=\"graph:r0\" value=\"1.0\" min=\"0.1\" max=\"5.0\" step=\"0.1\" class=\"in11f\" type=\"number\">\n &nbsp; &nbsp; Scale &nbsp; <input id=\"graph:alpha\" value=\"2.0\" min=\"0.1\" max=\"5.0\" step=\"0.1\" class=\"in11f\" type=\"number\">\n </g>\n </td>\n </tr> \n \n <!-- KERNEL DECOMPOSITION -->\n <tr style=\"line-height:40px\">\n <td><b>Embedding</b>&nbsp;</td>\n <td>\n &nbsp;&nbsp;<select class=\"select_main\" id=\"dimred_method\">\n <option value=\"kernelpca\" selected=\"\"> Kernel PCA </option>\n <option value=\"mds\"> Multi-dimensional scaling </option> \n </select>\n &nbsp;<button id=\"toggle_detail_6\" type=\"button\" class=\"btn btn-xs\" onclick=\"show_hide(&quot;in_detail_6&quot;, &quot;toggle_detail_6&quot;)\">Configure</button>\n <g id=\"in_detail_6\" hidden=\"\">\n &nbsp; &nbsp; Distance metric (MDS) &nbsp;\n <select id=\"dimred_distance\">\n <option value=\"dot\"> Hypersphere chord </option>\n </select>\n </g>\n </td>\n </tr>\n \n <!-- EXECUTION -->\n <tr style=\"line-height:40px\">\n <td><b>Parallel execution</b></td>\n <td>\n &nbsp;&nbsp;<select class=\"select_main\" id=\"threading_mode\">\n <option value=\"single_threaded\"> Single-threaded </option>\n <option value=\"multi_threaded\" selected=\"\"> Multi-threaded </option> \n </select>\n &nbsp;<button id=\"toggle_detail_7\" type=\"button\" class=\"btn btn-xs\" onclick=\"show_hide(&quot;in_detail_7&quot;, &quot;toggle_detail_7&quot;)\">Configure</button>\n <g id=\"in_detail_7\" hidden=\"\">\n &nbsp; &nbsp; Number of cores &nbsp; <input id=\"exe_n_procs\" value=\"2\" min=\"1\" max=\"4\" step=\"1\" class=\"in11f\" type=\"number\">\n &nbsp; &nbsp; Batch size &nbsp; <input id=\"exe_batch_size_parallel\" value=\"200\" min=\"50\" max=\"1000\" step=\"50\" class=\"in3d\" type=\"number\"> </g>\n </td>\n </tr>\n \n</tbody></table>\n \n<hr style=\"border-width:2px\">\n \n <button class=\"btn btn-default\" onclick=\"run_soap()\">RUN SOAP</button>&nbsp;\n <button class=\"btn btn-default\" onclick=\"reset_soap()\">RESET SOAP</button>&nbsp;\n <label title=\"Activate once run is complete.\"> \n <a href=\"#\" target=\"_blank\" class=\"btn btn-primary disabled\" id=\"plot_result_button\">View 2D similarity map</a> \n </label>\n\n<!-- \nGDB7:\nel-spec + cov-radii + re-match + pca\nel-agno - cov-radii + re-match + pca\n\nRS/ZB\ncore-chrg + cov-radii + re-match + pca\nel-agno - cov-radii + re-match + pca\n-->"
},
"selectedType": "BeakerDisplay",
"elapsedTime": 1,
"elapsedTime": 0,
"height": 483
},
"evaluatorReader": true,
......@@ -664,6 +665,9 @@
"from nomad_sim.wrappers import get_json_list",
"from nomad_sim.wrappers import plot, logger",
"",
"import __builtin__",
"__builtin__.isBeaker = True",
"",
"verbose = False",
"logger.setLevel(logging.INFO)",
"soap.silence()",
......@@ -812,10 +816,10 @@
"hidden": true
},
"output": {
"selectedType": "BeakerDisplay",
"selectedType": "Results",
"state": {},
"pluginName": "IPython",
"shellId": "A179D6D7C6984E69B25D8133A9B03D3A",
"shellId": "AD3B438BC0344542B4D6D83995F635FF",
"height": 81,
"dataresult": [
"HARTREE_TO_EV",
......@@ -905,10 +909,10 @@
"update_node",
"util"
],
"elapsedTime": 2500
"elapsedTime": 45544
},
"evaluatorReader": true,
"lineCount": 165,
"lineCount": 168,
"tags": "cell_soap_run"
},
{
......@@ -2112,10 +2116,10 @@
},
"output": {
"state": {},
"selectedType": "BeakerDisplay",
"selectedType": "Hidden",
"pluginName": "IPython",
"shellId": "A1E72F9FF9EF4FA68AC9A7FD1424AD63",
"elapsedTime": 2322,
"shellId": "AD3B438BC0344542B4D6D83995F635FF",
"elapsedTime": 1880,
"height": 78
},
"evaluatorReader": true,
......@@ -2236,11 +2240,11 @@
},
"output": {
"state": {},
"selectedType": "BeakerDisplay",
"selectedType": "Hidden",
"pluginName": "IPython",
"shellId": "A1E72F9FF9EF4FA68AC9A7FD1424AD63",
"shellId": "AD3B438BC0344542B4D6D83995F635FF",
"height": 78,
"elapsedTime": 428
"elapsedTime": 374
},
"evaluatorReader": true,
"lineCount": 103,
......@@ -2322,11 +2326,11 @@
},
"output": {
"state": {},
"selectedType": "BeakerDisplay",
"selectedType": "Results",
"pluginName": "IPython",
"shellId": "A1E72F9FF9EF4FA68AC9A7FD1424AD63",
"shellId": "AD3B438BC0344542B4D6D83995F635FF",
"height": 78,
"elapsedTime": 9310
"elapsedTime": 7590
},
"evaluatorReader": true,
"lineCount": 65,
......@@ -2348,7 +2352,7 @@
"selectedType": "BeakerDisplay",
"pluginName": "JavaScript",
"height": 78,
"elapsedTime": 65
"elapsedTime": 80
},
"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