Commit 44b9d4d6 authored by Emre Ahmetcik's avatar Emre Ahmetcik

Updating all tutorials according to newest version

parent 62c2b4a9
......@@ -143,7 +143,7 @@
},
"selectedType": "BeakerDisplay",
"elapsedTime": 0,
"height": 366
"height": 367
},
"evaluatorReader": true,
"lineCount": 32
......@@ -448,7 +448,7 @@
"innertype": "Html",
"object": "<script>\nvar beaker = bkHelper.getBeakerObject().beakerObj;\n</script>\n<script>\nvar run_lasso = function() {\n $(\"#lasso_result_button\").removeClass(\"active\").addClass(\"disabled\");\n getFeatures();\n getEmbedMethod();\n getStandardize();\n getUnits();\n beaker.evaluate(\"lasso_cell\"); // evaluate cells with tag \"lasso_cell\"\n // view_result()\n};\nvar reset_lasso = function(){\n beaker.evaluate(\"lasso_gui\");\n};\nvar getFeatures = function() {\n beaker.selected_feature_list = [];\n $('#lasso_features_select input:checkbox').each(function () {\n if(this.checked )\n beaker.selected_feature_list.push(this.value);\n });\n};\n \nvar getUnits = function() {\n beaker.units = $(\"#units_select\").val();\n};\n \nvar getEmbedMethod = function() {\n beaker.embed_method = \"pca\";\n $('#embed_method_selector input:radio').each(function () {\n if(this.checked )\n beaker.embed_method = this.value;\n });\n};\n \nvar getStandardize = function() {\n beaker.standardize = \"yes\";\n $('#standardize input:radio').each(function () {\n if(this.checked )\n beaker.standardize = this.value;\n });\n};\n \nbeaker.view_result = function(result_link) {\n// beaker.evaluate(\"lasso_viewer_result\").then(function(x) {\n $(\"#lasso_result_button\").attr(\"href\", result_link);\n// }); \n $(\"#lasso_result_button\").removeClass(\"disabled\").addClass(\"active\");\n}\n</script>\n<style type=\"text/css\">\n label {\n font-size: 18px;\n }\n .lasso_control{\n font-size: 18px;\n } \n.lasso_form_group input {\n width: 15px;\n height: 15px;\n padding: 0;\n margin:0;\n padding-right:5px; \n vertical-align: bottom;\n top: -1px;\n} \n .lasso_selection_description{\n padding: 10px 15px;\n }\n</style>\n<div class=\"lasso_control\">\n <div class=\"row\">\n <p class=\"lasso_selection_description\"><b>Primary features </b>\n (hover the mouse pointer over the feature names to see a full description):</p>\n <form id=\"lasso_features_select\">\n <div class=\"lasso_form_group\">\n <label class=\"col-xs-4 col-md-4 col-lg-3\"> <input value=\"atomic_ionization_potential\" checked=\"\" type=\"checkbox\"> <span title=\"Atomic ionization potential\"><i>IP</i> </span></label>\n <label class=\"col-xs-4 col-md-4 col-lg-3\"> <input value=\"atomic_electron_affinity\" checked=\"\" type=\"checkbox\"> <span title=\"Atomic electron affinity\"> <i>EA</i></span></label>\n <label class=\"col-xs-4 col-md-4 col-lg-3\"> <input value=\"atomic_homo\" type=\"checkbox\"> <span title=\"Energy of highest occupied molecular orbital\"><i>E</i> <sub>HOMO</sub></span> </label>\n <label class=\"col-xs-4 col-md-4 col-lg-2\"> <input value=\"atomic_lumo\" type=\"checkbox\"> <span title=\"Energy of lowest unoccupied molecular orbital\"> <i>E</i> <sub>LUMO</sub> </span> </label>\n \n <label class=\"col-xs-4 col-md-4 col-lg-3\"> <input value=\"atomic_rs_max\" checked=\"\" type=\"checkbox\"> <span title=\"Radius at which the radial probability density of the valence s orbital is maximum\"> <i>r</i><sub>s</sub> </span> </label>\n <label class=\"col-xs-4 col-md-4 col-lg-3\"> <input value=\"atomic_rp_max\" checked=\"\" type=\"checkbox\"> <span title=\"Radius at which the radial probability density of the valence p orbital is maximum\"> <i>r</i><sub>p</sub> </span> </label>\n <label class=\"col-xs-4 col-md-4 col-lg-3\"> <input value=\"atomic_rd_max\" checked=\"\" type=\"checkbox\"> <span title=\"Radius at which the radial probability density of the valence d orbital is maximum\"> <i>r</i><sub>d</sub> </span> </label>\n <label class=\"col-xs-4 col-md-4 col-lg-3\"> <input value=\"atomic_number\" type=\"checkbox\"> <span title=\"Atomic number\"> <i>Z</i> </span> </label>\n <label class=\"col-xs-4 col-md-4 col-lg-3\"> <input value=\"atomic_number_valence_electrons\" type=\"checkbox\"> <span title=\"Number of valence electrons\"> <i>Z</i><sub>val</sub> </span> </label>\n <label class=\"col-xs-4 col-md-4 col-lg-3\"> <input value=\"period\" type=\"checkbox\"> <span title=\"Period (in the periodic table)\"> <i>n</i> <sub>period</sub> </span> </label>\n <label class=\"col-xs-4 col-md-4 col-lg-3\"> <input value=\"atomic_r_by_2_dimer\" type=\"checkbox\"> <span title=\"Bond length of the dimer\"> <i>d</i> <sub>dimer</sub> </span> </label>\n <label class=\"col-xs-4 col-md-4 col-lg-3\"> <input value=\"atomic_electronic_binding_energy_dimer\" type=\"checkbox\"> <span title=\"Binding energy of the dimer\"> <i>E</i> <sub>b</sub> </span> </label>\n <label class=\"col-xs-4 col-md-4 col-lg-3\"> <input value=\"atomic_homo_lumo_diff\" type=\"checkbox\"> <span title=\"HOMO-LUMO gap of the dimer\"> Δ<i>E</i><sub>HL</sub> </span> </label>\n \n<!--- <label class =\"col-xs-4 col-md-4 col-lg-3\"> <input type=\"checkbox\" value=\"Es/sqrt(Zval)\" > \n <span title=\"Energy of the valence s orbital(s) divided by the square root of the number of valence electrons. [Phys. Rev. B 85, 104104 (2012)]\"> <i>E</i><sub>s</sub>/sqrt(<i>Z</i> <sub>val</sub>) </span> </label>\n <label class =\"col-xs-4 col-md-4 col-lg-3\"> <input type=\"checkbox\" value=\"Ep/sqrt(Zval)\" > \n <span title=\"Energy of the valence p orbital(s) divided by the square root of the number of valence electrons. [Phys. Rev. B 85, 104104 (2012)]\"> <i>E</i><sub>p</sub>/sqrt(<i>Z</i> <sub>val</sub>) </span> </label>\n--> \n </div>\n </form>\n </div> <!-- End of row-->\n \n <br>\n <div class=\"row\"> <!-- Start of row-->\n <p class=\"lasso_selection_description\"><b>Units of measurement: </b> \n <select id=\"units_select\">\n <option value=\"eV_angstrom\"> [energy]=eV;&nbsp;&nbsp;[length]=angstrom</option>\n <option value=\"J_m\"> [energy]=J;&nbsp;&nbsp;[length]=m</option>\n <option value=\"kcal/mol_angstrom\"> [energy]=kcal/mol;&nbsp;&nbsp;[length]=angstrom</option>\n </select> </p>\n </div><!-- End of row-->\n \n <br>\n <div class=\"row\"> <!-- Start of second row-->\n <div class=\"lasso_form_group\">\n <p class=\"lasso_selection_description\"><b>Embedding methods:</b> </p>\n <div id=\"embed_method_selector\">\n <label class=\"col-xs-4 col-md-4 col-lg-4\"><input name=\"inlineRadioOptions\" id=\"inlineRadio1\" value=\"pca\" checked=\"\" type=\"radio\"> Principal Component Analysis (PCA) [<a href=\"https://en.wikipedia.org/wiki/Principal_component_analysis\" target=\"_blank\">more info</a>]</label>\n <label class=\"col-xs-4 col-md-4 col-lg-4\"><input name=\"inlineRadioOptions\" id=\"inlineRadio2\" value=\"mds\" type=\"radio\"> Multidimensional scaling (MDS) [<a href=\"https://en.wikipedia.org/wiki/Multidimensional_scaling\" target=\"_blank\">more info</a>]</label>\n <label class=\"col-xs-4 col-md-4 col-lg-4\"><input name=\"inlineRadioOptions\" id=\"inlineRadio3\" value=\"tsne_pca\" type=\"radio\"> t-Distributed Stochastic Neighbor Embedding (t-SNE) [<a href=\"https://en.wikipedia.org/wiki/T-distributed_stochastic_neighbor_embedding\" target=\"_blank\">more info</a>]</label>\n </div> \n </div>\n </div><!-- End of row--> \n <div class=\"row\"> <!-- Start of second row-->\n <div class=\"lasso_form_group\">\n <p class=\"lasso_selection_description\"><b>Scale data to unit-variance:</b>\n (data are centered around the mean in any case) [<a href=\"https://en.wikipedia.org/wiki/Feature_scaling\" target=\"_blank\">more info</a>]</p>\n <div id=\"standardize\">\n <label class=\"col-xs-4 col-md-4 col-lg-4\"><input name=\"inlineRadioOptionsStandardize\" id=\"inlineRadio4\" value=\"True\" checked=\"\" type=\"radio\"> yes </label>\n <label class=\"col-xs-4 col-md-4 col-lg-4\"><input name=\"inlineRadioOptionsStandardize\" id=\"inlineRadio5\" value=\"False\" type=\"radio\"> no </label>\n </div> \n </div>\n </div><!-- End of row--> \n <br>\n\n<!-- <span title=''> <img src=\"http://images.clipartpanda.com/question-purzen_Icon_with_question_mark_Vector_Clipart.png\" style=\"height: 30px; width: 30px;\"> </span> -->\n <button class=\"btn btn-default\" onclick=\"run_lasso()\">RUN TWO-DIMENSIONAL EMBEDDING</button>\n <button class=\"btn btn-default\" onclick=\"reset_lasso()\">RESET</button>\n <label title=\"This button becomes active when the run is finished. By clicking it, an interactive structural-similarity plot will be opened\"> <a href=\"#\" target=\"_blank\" class=\"btn btn-primary disabled\" id=\"lasso_result_button\">View interactive 2D scatter plot</a> </label>\n</div> <!-- End of lasso_control -->\n"
},
"height": 609
"height": 592
},
"evaluatorReader": true,
"lineCount": 137
......@@ -485,6 +485,9 @@
"evaluator": "IPython",
"input": {
"body": [
"import warnings",
"warnings.filterwarnings(\"ignore\")",
"import h5py",
"from IPython.core.display import HTML ",
"from nomad_sim.wrappers import get_json_list, calc_descriptor ",
"from nomad_sim.wrappers import calc_model, calc_embedding, plot",
......@@ -511,10 +514,10 @@
"# define paths",
"tmp_folder = '/home/beaker/.beaker/v1/web/tmp/'",
"control_file = '/home/beaker/.beaker/v1/web/tmp/control.json'",
"data_folder='/parsed/prod-022/FhiAimsParser2.0.0-2-gf9335c4/RWApItBGtGUDsfMVlHKqrjUQ4rShT/'",
"data_folder='/parsed/prod-032/FhiAimsParser2.0.0-17-g1384da3/RWApItBGtGUDsfMVlHKqrjUQ4rShT/'",
"lookup_file = '/home/beaker/.beaker/v1/web/tmp/lookup.dat'",
"collection_path = '/home/beaker/test/nomad_sim/data_zcrs/ExtendedBinaries_Dimers_Atoms_new.json'",
"path_to_collection = '/home/beaker/test/nomad_sim/data_zcrs/ExtendedBinaries_Dimers_Atoms_new.json'",
"collection_path = '/data/shared/tutorials/nomad_sim/data_zcrs/ExtendedBinaries_Dimers_Atoms_new.json'",
"path_to_collection = '/data/shared/tutorials/nomad_sim/data_zcrs/ExtendedBinaries_Dimers_Atoms_new.json'",
"",
"# define units",
"if beaker.units == 'eV_angstrom':",
......@@ -538,7 +541,7 @@
"elapsedTime": 25150
},
"evaluatorReader": true,
"lineCount": 41,
"lineCount": 44,
"tags": "lasso_cell"
},
{
......
......@@ -188,7 +188,7 @@
"#ply.offline.init_notebook_mode() # allows output in notebook",
"",
"# Path to files",
"base_path='/home/beaker/test/errorbars/'",
"base_path='/data/shared/tutorials/errorbars/'",
"",
"sys.path.insert(1,base_path)",
"from errorbar_base import *",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
......@@ -124,7 +124,7 @@
"output": {
"state": {},
"selectedType": "BeakerDisplay",
"height": 368,
"height": 367,
"result": {
"type": "BeakerDisplay",
"innertype": "Html",
......@@ -143,7 +143,8 @@
"",
"This tutorial shows how to find descriptive parameters (short formulas) for the classification of materials properties. As an example, we address the classification of elemental and binary systems A$_x$B$_y$ into metals and non metals using experimental data extracted from the SpringerMaterials data base. The method is based on the algorithm <u>s</u>ure <i><u>i</u>ndependence <u>s</u>creening and <u>s</u>parsifying <u>o</u>perator</i> (SISSO), which enables to search for optimal descriptors by scanning huge feature spaces. ",
" <div style=\"padding: 1ex; margin-top: 1ex; margin-bottom: 1ex; border-style: dotted; border-width: 1pt; border-color: blue; border-radius: 3px;\">",
"R. Ouyang, S. Curtarolo, E. Ahmetcik, M. Scheffler, L. M. Ghiringhelli: <span style=\"font-style: italic;\">SISSO: a compressed-sensing method for systematically identifying efficient physical models of materials properties, </span> <a href=\"https://arxiv.org/abs/1710.03319\">https://arxiv.org/abs/1710.03319</a> (2017). <br>",
"R. Ouyang, S. Curtarolo, E. Ahmetcik, M. Scheffler, L. M. Ghiringhelli: <span style=\"font-style: italic;\">SISSO: a compressed-sensing method for identifying the best low-dimensional descriptor in an immensity of offered candidates</span>, Phys. Rev. Materials 2, 083802 (2018) <a href=\"https://journals.aps.org/prmaterials/abstract/10.1103/PhysRevMaterials.2.083802\" target=\"_blank\">[PDF]</a>",
". <br>",
"You can download the code <a href=\"https://github.com/rouyang2017/SISSO\">here</a> .",
"</div>",
" Click first <b>Reference settings</b> and afterwards <b>RUN</b> to reproduce the results from this publication; click <b>Background</b> for an explanation of the approach; or, modify <b>Settings</b> to produce your own results.",
......@@ -168,12 +169,13 @@
"",
" <p>We present a tool for predicting the metal-insulator classification of elemental and binary systems, by using a set of descriptive parameters (a descriptor) based on free-atom data of the atomic species constituting the elemental/binary materials as well as a unit cell dependentent packing parameter (the normalized ratio between the volume of spherical atoms and the unit cell). The data is extracted from the <a href=\" http://materials.springer.com/\">SpringerMaterials</a> data base. We apply a newly developed method: sure independence screening and sparsifying operator (SISSO), that allows to find an optimal descriptor in a huge feature space containing billions of features. In this tutorial an $\\ell_0$-optimization is used as the sparsifying operator. The method is described in:",
"<div style=\"padding: 1ex; margin-top: 1ex; margin-bottom: 1ex; border-style: dotted; border-width: 1pt; border-color: blue; border-radius: 3px;\">",
"R. Ouyang, S. Curtarolo, E. Ahmetcik, M. Scheffler, L. M. Ghiringhelli: <span style=\"font-style: italic;\">SISSO: a compressed-sensing method for systematically identifying efficient physical models of materials properties, </span> <a href=\" https://arxiv.org/abs/1710.03319\">https://arxiv.org/abs/1710.03319</a> (2017). <br>",
"R. Ouyang, S. Curtarolo, E. Ahmetcik, M. Scheffler, L. M. Ghiringhelli: <span style=\"font-style: italic;\">SISSO: a compressed-sensing method for identifying the best low-dimensional descriptor in an immensity of offered candidates</span>, Phys. Rev. Materials 2, 083802 (2018) <a href=\"https://journals.aps.org/prmaterials/abstract/10.1103/PhysRevMaterials.2.083802\" target=\"_blank\">[PDF]</a>",
". <br>",
"</div>",
"By running the tutorial with the reference settings ( click <b>Reference settings</b> , then <b>RUN</b>) the results of this publication can be recovered. In particular, by clicking on “View interactive 2D plot”, an interactive classification map (a chart where metals and non metals are separated into different regions of a low-dimensional representation, here two dimensional) will be opened in a new tab, similar to the following ( Fig. 3. (a) in <a href=\" https://arxiv.org/abs/1710.03319\">https://arxiv.org/abs/1710.03319</a>):",
"By running the tutorial with the reference settings ( click <b>Reference settings</b> , then <b>RUN</b>) the results of this publication can be recovered. In particular, by clicking on “View interactive 2D plot”, an interactive classification map (a chart where metals and non metals are separated into different regions of a low-dimensional representation, here two dimensional) will be opened in a new tab, similar to the following ( Fig. 4 (a) in the PRM):",
"<center>",
"<figure>",
"<img src=\"/user/SISSO-binaries-metal-nonmetal.png\" style=\"width:60%;height:60%\" >",
"<img src=\"https://gitlab.mpcdf.mpg.de/nomad-lab/public-wiki/uploads/a856eab0c7ab745fc56daac95e3ba316/SISSO-binaries-metal-nonmetal.png\" style=\"width:60%;height:60%\" >",
"<figcaption>An almost perfect classification (99.2\\%) of metal/non metal for 363 materials (299 binaries and 64 elements (A=B)). Symbols: $\\chi$ Pauling electronegativity, $IE$ ionization energy, $x$ atomic composition, $\\sum V_{\\text{ atom}}/V_{\\text{ cell}}$ packing factor. Red circles, blue squares, and open blue squares represent metals, non-metals, and the three erroneously characterized non-metals, respectively.</figcaption>",
"<figure>",
"</center>",
......@@ -326,7 +328,7 @@
"output": {
"state": {},
"selectedType": "BeakerDisplay",
"height": 81,
"height": 80,
"result": {
"type": "BeakerDisplay",
"innertype": "Html",
......@@ -415,7 +417,7 @@
"output": {
"state": {},
"selectedType": "BeakerDisplay",
"height": 386,
"height": 373,
"result": {
"type": "BeakerDisplay",
"innertype": "Html",
......@@ -477,7 +479,7 @@
"output": {
"state": {},
"selectedType": "BeakerDisplay",
"height": 230,
"height": 261,
"result": {
"type": "BeakerDisplay",
"innertype": "Html",
......@@ -876,6 +878,9 @@
"input": {
"body": [
"### Setting data",
"import warnings",
"warnings.filterwarnings(\"ignore\")",
"import h5py",
"import pandas as pd",
"df = pd.DataFrame(data[1:], columns=data[0])",
"",
......@@ -914,7 +919,7 @@
"elapsedTime": 535
},
"evaluatorReader": true,
"lineCount": 27,
"lineCount": 30,
"tags": "calc_cell"
},
{
......@@ -957,8 +962,8 @@
"output": {
"state": {},
"pluginName": "IPython",
"shellId": "80B9DDCD77D74A0195DBF47292E6F5EF",
"elapsedTime": 307,
"shellId": "F84381D35A344B079D8906B11FF16746",
"elapsedTime": 304,
"selectedType": "Hidden"
},
"evaluatorReader": true,
......@@ -1058,8 +1063,7 @@
"evaluator": "IPython",
"input": {
"body": [
"results = sis.get_results()",
"Des, D_selected, overlap = results[-1]",
"Des, D_selected, overlap = sis.get_results(ith_descriptor=1)",
"print \"INFO: Identified descriptor: %s, %s\" %(Des[0], Des[1])",
"print \"INFO: Number of samples in the overlap region: %s\" %overlap"
],
......@@ -1074,7 +1078,7 @@
"elapsedTime": 7540
},
"evaluatorReader": true,
"lineCount": 4,
"lineCount": 3,
"tags": "calc_cell"
},
{
......
......@@ -143,7 +143,7 @@
},
"selectedType": "BeakerDisplay",
"elapsedTime": 0,
"height": 389
"height": 390
},
"evaluatorReader": true,
"lineCount": 32
......@@ -632,7 +632,7 @@
},
"selectedType": "BeakerDisplay",
"elapsedTime": 0,
"height": 483
"height": 484
},
"evaluatorReader": true,
"lineCount": 306,
......@@ -644,6 +644,8 @@
"evaluator": "IPython",
"input": {
"body": [
"import warnings",
"warnings.filterwarnings(\"ignore\")",
"import os",
"import sys",
"import datetime",
......@@ -703,7 +705,7 @@
"# LOAD DATA, CONVERT TO ASE",
"logger.info(\"Loading data (%s) ...\" % options['run']['config_folder'])",
"if options['run']['config_folder'] == 'zcrs':",
" data_folder='/parsed/prod-022/FhiAimsParser2.0.0-2-gf9335c4/RWApItBGtGUDsfMVlHKqrjUQ4rShT/' ",
" data_folder='/parsed/prod-032/FhiAimsParser2.0.0-17-g1384da3/RWApItBGtGUDsfMVlHKqrjUQ4rShT/' ",
" json_list = get_json_list(",
" method='folder', ",
" drop_duplicates=True, ",
......@@ -912,7 +914,7 @@
"elapsedTime": 45544
},
"evaluatorReader": true,
"lineCount": 168,
"lineCount": 170,
"tags": "cell_soap_run"
},
{
......
This diff is collapsed.
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