Skip to content
Snippets Groups Projects
SOAP_similarity.bkr 201.44 KiB
{
    "beaker": "2",
    "evaluators": [
        {
            "name": "HTML",
            "plugin": "HTML",
            "view": {
                "cm": {
                    "mode": "htmlmixed"
                }
            }
        },
        {
            "name": "TeX",
            "plugin": "TeX",
            "view": {
                "cm": {
                    "mode": "stex"
                }
            }
        },
        {
            "name": "IPython",
            "plugin": "IPython",
            "imports": "",
            "supplementalClassPath": "",
            "view": {
                "cm": {
                    "mode": "python"
                }
            },
            "setup": "%matplotlib inline\nimport numpy\nimport matplotlib\nfrom matplotlib import pylab, mlab, pyplot\nnp = numpy\nplt = pyplot\nfrom IPython.display import display\nfrom IPython.core.pylabtools import figsize, getfigs\nfrom pylab import *\nfrom numpy import *\n"
        },
        {
            "name": "JavaScript",
            "plugin": "JavaScript",
            "jsSetting2": "",
            "jsSetting1": "",
            "view": {
                "cm": {
                    "mode": "javascript",
                    "background": "#FFE0F0"
                }
            },
            "languageVersion": "ES2015"
        }
    ],
    "cells": [
        {
            "id": "markdownRBGLQA",
            "type": "markdown",
            "body": [
                "<p style=\"color: #20335d;;font-weight: 900; font-size: 22pt;\">  NOMAD Analytics Toolkit</p>",
                "<label style=\"text-align: center; color: #20335d; font-weight: 900; font-size: 18pt;\">Database mapping via global similarity measures</label>",
                "<!--label style=\"color: #20335d;font-weight: 900; font-size: 15pt;\"> Visualizing global similarity</label-->",
                " </p>",
                "  <hr style=\"border-width:2px\">",
                " <p style=\"font-size: 15px;\"> developed by Carl Poelking, Angelo Ziletti, Luca Ghiringhelli and Gábor Csányi [version 12-04-2017]</p>",
                " ",
                " <p style=\"font-size: 15px;\"> <b> Machine learning method: </b> Nonlinear dimensionality reduction based on SOAP similarity kernel<br>",
                " ",
                " <p style=\"font-size: 15px;\"> <b> Reference: </b>  <a href=\"https://arxiv.org/abs/1601.04077\" target=\"_blank\"> S. De, A. Bartók, G. Csányi, and M. Ceriotti: \"Comparing molecules and solids across structural and chemical space\", Phys. Chem. Chem. Phys. (2016)</a> </p>"
            ],
            "evaluatorReader": false
        },
        {
            "id": "codeubF2um",
            "type": "code",
            "evaluator": "HTML",
            "input": {
                "body": [
                    "<style type=\"text/css\">",
                    " .lasso_instructions{",
                    "    font-size: 15px;",
                    "  } ",
                    "</style>",
                    "<!-- Button trigger modal -->",
                    "<button type=\"button\" class=\"btn btn-default\" data-toggle=\"modal\" data-target=\"#glosim-intro-modal\">",
                    " Motivation",
                    "</button>&nbsp",
                    "",
                    "<!-- Modal -->",
                    "<div class=\"modal fade\" id=\"glosim-intro-modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"glosim-intro-modal-label\">",
                    "  <div class=\"modal-dialog\" role=\"document\">",
                    "    <div class=\"modal-content\">",
                    "      <div class=\"modal-header\">",
                    "        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">×</span></button>",
                    "        <h4 class=\"modal-title\" id=\"glosim-intro-modal-label\">Motivation</h4>",
                    "        <hr>",
                    "      </div>",
                    "      <div class=\"modal-body glosim_instructions\">",
                    "        <!--p> In this tutorial we present a tool for ...</p-->",
                    "        <p>",
                    "          The initial compilation and early-stage analysis of materials datasets relies on generic tools that enable",
                    "          <ul>",
                    "            <li>insight into how materials within the dataset relate to each other in terms of chemical composition and structure, </li>",
                    "            <li>feedback on whether or not the selection covers the intended configurational space (or whether it perhaps has \"holes\" that need to be filled),</li>",
                    "            <li>identification of potential subsets/-classes within the chosen data for further subselection and analysis.</li>",
                    "          </ul>         ",
                    "        </p>",
                    "        ",
                    "        <p>",
                    "          Tailored to this purpose, the toolchain presented in this tutorial helps to map and visualize materials databases using generic",
                    "          kernel- and graph-based similarity measures together with the powerful SOAP descriptor for atomic environments.",
                    "          As such it also serves as a basis for a range of automated, quantitative data-mining techniques:",
                    "        </p>",
                    "        ",
                    "        <p> \"Evaluating the <a href=\"http://pubs.rsc.org/is/content/articlelanding/2016/cp/c6cp00415f#!divAbstract\" target=\"_blank\">(dis)similarity of crystalline, disordered and molecular compounds</a> is a critical ",
                    "          step in the development of algorithms to navigate automatically the configuration space of complex materials. ",
                    "          For instance, a structural similarity metric is crucial for classifying structures, searching chemical space for ",
                    "          better compounds and materials, and to drive the next generation of machine-learning techniques for predicting the",
                    "          stability and properties of molecules and materials. In the last few years several strategies have been designed to ",
                    "          compare atomic coordination environments. In particular, the <a href=\"http://journals.aps.org/prb/abstract/10.1103/PhysRevB.87.184115\" target=\"_blank\">Smooth Overlap of Atomic Positions (SOAP)</a> has emerged as ",
                    "          a natural framework to obtain translation, rotation and permutation-invariant descriptors of groups of atoms, driven by ",
                    "          the design of various classes of machine-learned inter-atomic potentials.\"",
                    "        </p>",
                    "         ",
                    "        ",
                    "        <!--img style=\"width:33%;height:33%\"  src=\"https://www.../mnt/pair_1.png\"-->",
                    "        <br/>",
                    "        <br/>",
                    "",
                    "        <p>",
                    "          References:</p>",
                    "        <ol>",
                    "          <li>",
                    "            Sandip De, Albert P. Bartók, Gábor Csányi, Michele Ceriotti: \"Comparing molecules and ",
                    "            solids across structural and alchemical space\". Phys. Chem. Chem. Phys. 18, 13754-13769 (2016)</li>",
                    "          <li>Albert Bartók, Risi Kondor, Gábor Csányi: \"On Representing Chemical Environments\". Physical Review B 87, 184115 (2013)</li>",
                    "        </ol>",
                    "      </div>",
                    "      <div class=\"modal-footer\">",
                    "        <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Close</button>",
                    "<!--         <button type=\"button\" class=\"btn btn-primary\">Save changes</button> -->",
                    "      </div>",
                    "    </div>",
                    "  </div>",
                    "</div>",
                    "",
                    "<button type=\"button\" class=\"btn btn-default\" data-toggle=\"modal\" data-target=\"#glosim-instructions-modal\">",
                    " Instructions",
                    "</button>",
                    "",
                    "<!-- Modal -->",
                    "<div class=\"modal fade\" id=\"glosim-instructions-modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"glosim-instructions-modal-label\">",
                    "  <div class=\"modal-dialog\" role=\"document\">",
                    "    <div class=\"modal-content\">",
                    "      <div class=\"modal-header\">",
                    "        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">×</span></button>",
                    "        <h4 class=\"modal-title\" id=\"glosim-instructions-modal-label\" style=\"color:#000000\">Instructions</h4>",
                    "        <hr>",
                    "      </div>",
                    "      <div class=\"modal-body glosim_instructions\">       ",
                    "      <p>The task is to build structural similarity models for the navigation and exploration of materials datasets. The construction proceeds in five steps, reflected in the control panel further below:</p>",
                    "        <br>        ",
                    "        <ul>",
                    "          <li> <b>Definition of the atomic density</b> ",
                    "            Within the SOAP framework, the atomic density is modelled as a linear superposition of atom-centered spherical Gaussians.",
                    "            The density coefficient of these Gaussians as well as their width can be chosen atom-type-dependent (based on, e.g., covalent radius, ",
                    "            core charge, valence charge, etc.) or be set constant. Additionally, the density expansions can be performed separately for each atomic type ",
                    "            (leading to an element-specific representation and hence cross-terms in the power spectrum) or for the total, summed density (leading to an element-agnostic representation).</li>",
                    "          <br>",
                    "          <li> <b>Specification of the basis set</b> ",
                    "            Prior to rotational averaging, the atomic density is expanded in terms of radial Gaussians and spherical harmonics. The radial basis set can be chosen ",
                    "            equispaced or adaptive. In the latter case, the centres and widths of the Gaussians are optimized such that radial and angular resolution are matched, while providing",
                    "            sufficient overlap between neighbouring Gaussians. The effective radial cutoff is then determined by the number of radial basis functions and the width of the innermost Gaussian.",
                    "            The angular basis set is fully specified by the angular-momentum cutoff <i>L</i>. </li>",
                    "          <br>",
                    "          <li> <b>Configuration of the base kernel</b> ",
                    "            The base kernel defines how the similarity between pairs of atomic environments is to be computed. ",
                    "            SOAP has a native kernel, which is simply the dot-product between the descriptor vectors, raised to some positive power (3 is usually a good choice).  </li>",
                    "          <br>",
                    "          <li> <b>Configuration of the top kernel</b> ",
                    "            The top kernel specifies how two sets of atomic environments (i.e., structures rather than individual atomic environments) should be compared. ",
                    "            A straightforward way to accomplish this is to compute an \"average\" descriptor for both structures, and submit these to the base kernel. This \"average\" can either be formed",
                    "           coherently (in which case the rotational averaging is performed after summation of the atomic density expansions) or incoherently (through direct averaging of the atomic descriptor vectors).",
                    "           Other options in this tutorial include the regularized-entropy kernel, which interpolates between the incoherent average above and an atomic pairwise best match, ",
                    "           and a spectral graph kernel computed from the spectral overlap of the Markov random field induced by the graph Laplacian of a structure. ",
                    "           The top kernel can be applied hierarchically: In this case, \"super-atom\" environments/kernels are recursively built from the original atomic environments ",
                    "           via a sequence of subgraphs. The subgraphs are obtained sequentially, starting from a base cutoff radius, which is then scaled by a constant factor from ",
                    "            one level of the hierarchy to the next.</li><br>",
                    "          <li> <b>Specification of the embedding procedure</b> ",
                    "            The similarity/distance between structures can be visualized through decomposition of the kernel/distance matrix. Here, this is achieved either",
                    "            via a spectral decomposition of the kernel matrix and subsequent projection onto principal components (Kernel PCA) or via multi-dimensional scaling, i.e., ",
                    "            by an approximate representation of relative distances as induced by the kernel in a low-dimensional space. </li>          ",
                    "        </ul>",
                    "        ",
                    "        This tutorial invites you to apply your custom-built similarity model to two datasets: an excerpt from the molecular database GDB7 ",
                    "        and a dataset of octet binaries with either rocksalt or zincblende structure.",
                    "",
                    "      </div>",
                    "      <div class=\"modal-footer\">",
                    "        <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Close</button>",
                    "<!--         <button type=\"button\" class=\"btn btn-primary\">Save changes</button> -->",
                    "      </div>",
                    "    </div>",
                    "  </div>",
                    "</div>"
                ],
                "hidden": true
            },
            "output": {
                "state": {},
                "result": {
                    "type": "BeakerDisplay",
                    "innertype": "Html",
                    "object": "<script>\nvar beaker = bkHelper.getBeakerObject().beakerObj;\n</script>\n<style type=\"text/css\">\n .lasso_instructions{\n    font-size: 15px;\n  } \n</style>\n<!-- Button trigger modal -->\n<button type=\"button\" class=\"btn btn-default\" data-toggle=\"modal\" data-target=\"#glosim-intro-modal\">\n Motivation\n</button>&nbsp;\n\n<!-- Modal -->\n<div class=\"modal fade\" id=\"glosim-intro-modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"glosim-intro-modal-label\">\n  <div class=\"modal-dialog\" role=\"document\">\n    <div class=\"modal-content\">\n      <div class=\"modal-header\">\n        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">×</span></button>\n        <h4 class=\"modal-title\" id=\"glosim-intro-modal-label\">Motivation</h4>\n        <hr>\n      </div>\n      <div class=\"modal-body glosim_instructions\">\n        <!--p> In this tutorial we present a tool for ...</p-->\n        <p>\n          The initial compilation and early-stage analysis of materials datasets relies on generic tools that enable\n          </p><ul>\n            <li>insight into how materials within the dataset relate to each other in terms of chemical composition and structure, </li>\n            <li>feedback on whether or not the selection covers the intended configurational space (or whether it perhaps has \"holes\" that need to be filled),</li>\n            <li>identification of potential subsets/-classes within the chosen data for further subselection and analysis.</li>\n          </ul>         \n        <p></p>\n        \n        <p>\n          Tailored to this purpose, the toolchain presented in this tutorial helps to map and visualize materials databases using generic\n          kernel- and graph-based similarity measures together with the powerful SOAP descriptor for atomic environments.\n          As such it also serves as a basis for a range of automated, quantitative data-mining techniques:\n        </p>\n        \n        <p> \"Evaluating the <a href=\"http://pubs.rsc.org/is/content/articlelanding/2016/cp/c6cp00415f#!divAbstract\" target=\"_blank\">(dis)similarity of crystalline, disordered and molecular compounds</a> is a critical \n          step in the development of algorithms to navigate automatically the configuration space of complex materials. \n          For instance, a structural similarity metric is crucial for classifying structures, searching chemical space for \n          better compounds and materials, and to drive the next generation of machine-learning techniques for predicting the\n          stability and properties of molecules and materials. In the last few years several strategies have been designed to \n          compare atomic coordination environments. In particular, the <a href=\"http://journals.aps.org/prb/abstract/10.1103/PhysRevB.87.184115\" target=\"_blank\">Smooth Overlap of Atomic Positions (SOAP)</a> has emerged as \n          a natural framework to obtain translation, rotation and permutation-invariant descriptors of groups of atoms, driven by \n          the design of various classes of machine-learned inter-atomic potentials.\"\n        </p>\n         \n        \n        <!--img style=\"width:33%;height:33%\"  src=\"https://www.../mnt/pair_1.png\"-->\n        <br>\n        <br>\n\n        <p>\n          References:</p>\n        <ol>\n          <li>\n            Sandip De, Albert P. Bartók, Gábor Csányi, Michele Ceriotti: \"Comparing molecules and \n            solids across structural and alchemical space\". Phys. Chem. Chem. Phys. 18, 13754-13769 (2016)</li>\n          <li>Albert Bartók, Risi Kondor, Gábor Csányi: \"On Representing Chemical Environments\". Physical Review B 87, 184115 (2013)</li>\n        </ol>\n      </div>\n      <div class=\"modal-footer\">\n        <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Close</button>\n<!--         <button type=\"button\" class=\"btn btn-primary\">Save changes</button> -->\n      </div>\n    </div>\n  </div>\n</div>\n\n<button type=\"button\" class=\"btn btn-default\" data-toggle=\"modal\" data-target=\"#glosim-instructions-modal\">\n Instructions\n</button>\n\n<!-- Modal -->\n<div class=\"modal fade\" id=\"glosim-instructions-modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"glosim-instructions-modal-label\">\n  <div class=\"modal-dialog\" role=\"document\">\n    <div class=\"modal-content\">\n      <div class=\"modal-header\">\n        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">×</span></button>\n        <h4 class=\"modal-title\" id=\"glosim-instructions-modal-label\" style=\"color:#000000\">Instructions</h4>\n        <hr>\n      </div>\n      <div class=\"modal-body glosim_instructions\">       \n      <p>The task is to build structural similarity models for the navigation and exploration of materials datasets. The construction proceeds in five steps, reflected in the control panel further below:</p>\n        <br>        \n        <ul>\n          <li> <b>Definition of the atomic density</b> \n            Within the SOAP framework, the atomic density is modelled as a linear superposition of atom-centered spherical Gaussians.\n            The density coefficient of these Gaussians as well as their width can be chosen atom-type-dependent (based on, e.g., covalent radius, \n            core charge, valence charge, etc.) or be set constant. Additionally, the density expansions can be performed separately for each atomic type \n            (leading to an element-specific representation and hence cross-terms in the power spectrum) or for the total, summed density (leading to an element-agnostic representation).</li>\n          <br>\n          <li> <b>Specification of the basis set</b> \n            Prior to rotational averaging, the atomic density is expanded in terms of radial Gaussians and spherical harmonics. The radial basis set can be chosen \n            equispaced or adaptive. In the latter case, the centres and widths of the Gaussians are optimized such that radial and angular resolution are matched, while providing\n            sufficient overlap between neighbouring Gaussians. The effective radial cutoff is then determined by the number of radial basis functions and the width of the innermost Gaussian.\n            The angular basis set is fully specified by the angular-momentum cutoff <i>L</i>. </li>\n          <br>\n          <li> <b>Configuration of the base kernel</b> \n            The base kernel defines how the similarity between pairs of atomic environments is to be computed. \n            SOAP has a native kernel, which is simply the dot-product between the descriptor vectors, raised to some positive power (3 is usually a good choice).  </li>\n          <br>\n          <li> <b>Configuration of the top kernel</b> \n            The top kernel specifies how two sets of atomic environments (i.e., structures rather than individual atomic environments) should be compared. \n            A straightforward way to accomplish this is to compute an \"average\" descriptor for both structures, and submit these to the base kernel. This \"average\" can either be formed\n           coherently (in which case the rotational averaging is performed after summation of the atomic density expansions) or incoherently (through direct averaging of the atomic descriptor vectors).\n           Other options in this tutorial include the regularized-entropy kernel, which interpolates between the incoherent average above and an atomic pairwise best match, \n           and a spectral graph kernel computed from the spectral overlap of the Markov random field induced by the graph Laplacian of a structure. \n           The top kernel can be applied hierarchically: In this case, \"super-atom\" environments/kernels are recursively built from the original atomic environments \n           via a sequence of subgraphs. The subgraphs are obtained sequentially, starting from a base cutoff radius, which is then scaled by a constant factor from \n            one level of the hierarchy to the next.</li><br>\n          <li> <b>Specification of the embedding procedure</b> \n            The similarity/distance between structures can be visualized through decomposition of the kernel/distance matrix. Here, this is achieved either\n            via a spectral decomposition of the kernel matrix and subsequent projection onto principal components (Kernel PCA) or via multi-dimensional scaling, i.e., \n            by an approximate representation of relative distances as induced by the kernel in a low-dimensional space. </li>          \n        </ul>\n        \n        This tutorial invites you to apply your custom-built similarity model to two datasets: an excerpt from the molecular database GDB7 \n        and a dataset of octet binaries with either rocksalt or zincblende structure.\n\n      </div>\n      <div class=\"modal-footer\">\n        <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Close</button>\n<!--         <button type=\"button\" class=\"btn btn-primary\">Save changes</button> -->\n      </div>\n    </div>\n  </div>\n</div>"
                },
                "selectedType": "BeakerDisplay",
                "elapsedTime": 0,
                "height": 72
            },
            "evaluatorReader": true,
            "lineCount": 127
        },
        {
            "id": "codexKRN3M",
            "type": "code",
            "evaluator": "HTML",
            "input": {
                "body": [
                    "<script>",
                    "var run_soap = function() {",
                    "  $(\"#plot_result_button\").removeClass(\"active\").addClass(\"disabled\");",
                    "  get_options();",
                    "  beaker.evaluate(\"cell_soap_run\");",
                    "};",
                    "  ",
                    "var show_hide = function(tag, bt_tag) {",
                    "  $(\"#\"+tag).toggle();",
                    "  $(\"#\"+bt_tag).toggleClass(\"active\");",
                    "  /*if ($(\"#\"+bt_tag).attr(\"clicked\")) {",
                    "    $(\"#\"+bt_tag).css('background-color','lightgray');",
                    "    $(\"#\"+bt_tag).attr(\"clicked\", 0)",
                    "  }",
                    "  else {",
                    "    $(\"#\"+bt_tag).css('background-color','red');",
                    "    $(\"#\"+bt_tag).attr(\"clicked\", 1)",
                    "  }*/",
                    "}",
                    "",
                    "var allow = function(yesno) {",
                    "  if (yesno) {",
                    "    $(\"#option_el_spec_dens\").removeAttr('disabled');",
                    "    $(\"#atomic_density_type\").val('number_density').change();",
                    "  }",
                    "  else {",
                    "    if ($(\"#atomic_density_type\").val() == \"number_density\") {",
                    "      $(\"#atomic_density_type\").val('number_density_generic').change();",
                    "    }",
                    "    $(\"#option_el_spec_dens\").attr('disabled', 'disabled');",
                    "  }",
                    "}",
                    "  ",
                    "var reset_soap = function() {",
                    "  beaker.evaluate(\"cell_soap_gui\");",
                    "};",
                    "  ",
                    "var get_options = function() {",
                    "  ",
                    "    // Determine kernel adaptor function",
                    "    // [i.e., choose from specific/generic/global-specific/global-generic]    ",
                    "    var density_type = $(\"#atomic_density_type\").val();  ",
                    "    var adaptor_type = \"?\";",
                    "    if (density_type == \"number_density\") {",
                    "        adaptor_type = \"specific\";",
                    "    }",
                    "    else { // element-agnostic, core charge, valence charge, electronegativity",
                    "        adaptor_type = \"generic\";",
                    "    }",
                    "    var kernel_method = $(\"#kernel_method\").val();",
                    "    if (kernel_method == \"global\") {",
                    "        adaptor_type = \"global-\" + adaptor_type;",
                    "    }",
                    "  ",
                    "    var n_procs = parseInt($(\"#exe_n_procs\").val());",
                    "    if ($(\"#threading_mode\").val() == \"single_threaded\") n_procs = 1;",
                    "    ",
                    "    beaker.options = {",
                    "      \"run\": {",
                    "        \"config_folder\": $(\"#dataset_example\").val(),",
                    "        \"n_configs\": -1,",
                    "        \"n_procs\": n_procs,",
                    "        \"n_blocksize\": parseInt($(\"#exe_batch_size\").val()),",
                    "        \"queue\": \"?\",",
                    "        \"walltime\": 12,",
                    "        \"out_folder\": \"out.kernel\",",
                    "        \"verbose\": false",
                    "      },",
                    "      \"atomic_density\": {",
                    "        \"density_type\": $(\"#atomic_density_type\").val(),",
                    "        \"atomic_radius\": parseFloat($(\"#atomic_density_atomic_radius\").val()),",
                    "        \"use_covrad\": $(\"#atomic_density_use_covrad:checked\").val() == \"true\"",
                    "      },",
                    "      \"kernel\": {",
                    "        \"method\": kernel_method",
                    "      },",
                    "      \"basekernel\": {",
                    "        \"kernel.type\": \"dot\",",
                    "        \"kernel.delta\": 1.0,",
                    "        \"kernel.xi\": parseFloat($(\"#basekernel_kernel_xi\").val())",
                    "      },",
                    "      \"laplacian\": {",
                    "        \"inverse_dist\": true,",
                    "        \"coulomb\": true,",
                    "        \"scale\": 0.01,",
                    "        \"eta\": 1.0,",
                    "        \"gamma\": 0.01,",
                    "        \"optimize_eta_gamma\": false",
                    "      },",
                    "      \"dimred\": {",
                    "        \"method\": $(\"#dimred_method\").val()",
                    "      },",
                    "      \"graph\": {",
                    "        \"descriptor\": \"soap\",",
                    "        \"pca\": \"none\",",
                    "        \"hierarchical\": $(\"#kernel_hierarchical\").val() == \"true\",",
                    "        \"r0\": 1.0,",
                    "        \"alpha\": 2.0,",
                    "        \"n_levels\": 3,",
                    "        \"optimize_hierarchy\": false",
                    "      },",
                    "      \"lamatch\": {",
                    "        \"gamma\": 0.3,",
                    "        \"optimize_rematch\": false",
                    "      },",
                    "      \"descriptor\": {",
                    "        \"soap\": {",
                    "          \"spectrum.gradients\": false,",
                    "          \"spectrum.2l1_norm\": false,",
                    "          \"radialbasis.type\" : \"gaussian\",",
                    "          \"radialbasis.mode\" : $(\"#soap_radialbasis_mode\").val(),",
                    "          \"radialbasis.N\" : parseInt($(\"#soap_radialbasis_N\").val()),",
                    "          \"radialbasis.sigma\": parseFloat($(\"#soap_radialbasis_sigma\").val()),",
                    "          \"radialbasis.integration_steps\": 15,",
                    "          \"radialcutoff.Rc\": parseFloat($(\"#soap_radialbasis_Rc\").val()),",
                    "          \"radialcutoff.Rc_width\": parseFloat($(\"#soap_radialbasis_sigma\").val()),",
                    "          \"radialcutoff.type\": \"heaviside\",",
                    "          \"radialcutoff.center_weight\": 1.0,",
                    "          \"angularbasis.type\": \"spherical-harmonic\",",
                    "          \"angularbasis.L\": parseInt($(\"#soap_angularbasis_L\").val()),",
                    "          \"kernel.type\": \"dot\",",
                    "          \"kernel.adaptor\": adaptor_type,",
                    "          \"kernel.delta\": 1.0,",
                    "          \"kernel.xi\": parseFloat($(\"#basekernel_kernel_xi\").val()),",
                    "          \"exclude_centers\": [],",
                    "          \"exclude_targets\": [],",
                    "          \"type_list\": [\"C\"]",
                    "        }",
                    "      }",
                    "    };",
                    "",
                    "}; ",
                    "  ",
                    "beaker.view_result = function(result_link) {",
                    "    $(\"#plot_result_button\").attr(\"href\", result_link);",
                    "    $(\"#plot_result_button\").removeClass(\"disabled\"); //.addClass(\"active\");",
                    "}",
                    "</script>",
                    "<style type=\"text/css\">",
                    "    .in11f {",
                    "        width: 3.5em;",
                    "    }",
                    "    .in3d {",
                    "        width: 5em;",
                    "    }",
                    "    .select_main {",
                    "        width: 20em;",
                    "    }",
                    "   .btn.active, .btn:active {",
                    "    background: #cecece;",
                    "    text-decoration: none;",
                    "   }",
                    "</style>",
                    "",
                    "  <p style=\"color:#20335d; font-weight:900; font-size:18pt;\"> Control options <br> <hr style=\"border-width:2px\"> </p>",
                    "  ",
                    "  ",
                    "  <table class=\"glosim_control\">",
                    "    ",
                    "    <!-- DATASETS -->",
                    "  <tr style=\"line-height:40px\">",
                    "    <td><b>Dataset examples</b> </td>",
                    "    <td>",
                    "        <select class=\"select_main\" id=\"dataset_example\">",
                    "        <option value=\"zcrs\" onclick='allow(0)' SELECTED> Zincblende / Rocksalt </option>",
                    "        <option value=\"gdb\" onclick='allow(1)'> GDB7 </option>        ",
                    "      </select>",
                    "      <!--button class=\"btn btn-xs active\" onclick='show_hide(\"in_detail_1\")' style=\"border:1;\" >\\></button-->",
                    "       <button id=\"toggle_detail_1\"type=\"button\" class=\"btn btn-xs\" onclick='show_hide(\"in_detail_1\", \"toggle_detail_1\")'>Configure</button>",
                    "      <!--button id=\"toggle_detail_1\"type=\"button\" onclick='show_hide(\"in_detail_1\", \"toggle_detail_1\")'>Configure</button-->",
                    "      <g id=\"in_detail_1\" hidden>     Subsample structures   <input id=\"exe_batch_size\" type=\"number\" value=\"200\" min=\"50\" max=\"1000\" step=\"50\" class=\"in3d\" /> </g>",
                    "    </td>",
                    "  </tr>   ",
                    "    ",
                    "    <!-- ATOMIC DENSITY -->  ",
                    "  <tr style=\"line-height:40px\">",
                    "    <td><b>Atomic density</b> </td>",
                    "    <td>",
                    "        <select class=\"select_main\" id=\"atomic_density_type\">",
                    "        <option id=\"option_el_agno_dens\" value=\"number_density_generic\" SELECTED> Density type: element-agnostic density </option>",
                    "        <option id=\"option_el_spec_dens\" value=\"number_density\" DISABLED> Density type: element-specific density </option>        ",
                    "        <option value=\"valence_charge_density\"> Density type: valence charge </option>",
                    "        <option value=\"z_density\"> Density type: core charge </option>",
                    "        <option value=\"elneg_density\"> Density type: electronegativity </option>",
                    "      </select>",
                    "       <button id=\"toggle_detail_2\"type=\"button\" class=\"btn btn-xs\" onclick='show_hide(\"in_detail_2\", \"toggle_detail_2\")'>Configure</button>",
                    "      <g id=\"in_detail_2\" hidden>    Use covalent radii   <input id=\"atomic_density_use_covrad\" type=\"checkbox\" value=\"true\" UNCHECKED/>",
                    "          Constant atomic radius (Angstrom)   <input id=\"atomic_density_atomic_radius\" type=\"number\" value=\"0.5\" min=\"0.0\" max=\"2.0\" step=\"0.1\" class=\"in11f\" /> </g>",
                    "    </td>",
                    "  </tr>",
                    "  ",
                    "  <!-- BASIS SET -->  ",
                    "  <tr style=\"line-height:40px\">",
                    "    <td><b>Basis set</b> </td>",
                    "    <td>",
                    "        <select class=\"select_main\" id=\"soap_radialbasis_mode\">",
                    "        <option value=\"adaptive\"> Radial basis: adaptive </option>",
                    "        <option value=\"equispaced\"> Radial basis: equispaced </option>",
                    "      </select>",
                    "       <button id=\"toggle_detail_3\"type=\"button\" class=\"btn btn-xs\" onclick='show_hide(\"in_detail_3\", \"toggle_detail_3\")'>Configure</button>",
                    "      <g id=\"in_detail_3\" hidden>",
                    "          Radial functions N =   <input id=\"soap_radialbasis_N\" type=\"number\" value=\"9\" min=\"1\" max=\"14\" step=\"1\" class=\"in11f\" />",
                    "              Radial cutoff (equispaced only)   <input id=\"soap_radialbasis_Rc\" type=\"number\" value=\"3.5\" min=\"0.1\" max=\"10.0\" step=\"0.1\" class=\"in11f\" />",
                    "              Radial Gaussian width   <input id=\"soap_radialbasis_sigma\" type=\"number\" value=\"0.5\" min=\"0.1\" max=\"3.0\" step=\"0.1\" class=\"in11f\" />",
                    "          Angular functions L =   <input id=\"soap_angularbasis_L\" type=\"number\" value=\"6\" min=\"1\" max=\"14\" step=\"1\" class=\"in11f\" /> ",
                    "      </g>",
                    "    </td>",
                    "  </tr>    ",
                    "    ",
                    "    <!-- BASE KERNEL -->    ",
                    "    <tr style=\"line-height:40px\">",
                    "      <td><b>Base kernel</b> </td>",
                    "      <td>",
                    "          <select class=\"select_main\" id=\"basekernel_method\">",
                    "          <option value=\"dot\"> Dot-product kernel </option>",
                    "          <option value=\"laplacian\" DISABLED> Laplacian kernel </option>",
                    "          <option value=\"gaussian\" DISABLED> Gaussian kernel </option>",
                    "        </select>",
                    "         <button id=\"toggle_detail_4\"type=\"button\" class=\"btn btn-xs\" onclick='show_hide(\"in_detail_4\", \"toggle_detail_4\")'>Configure</button>",
                    "        <g id=\"in_detail_4\" hidden>",
                    "            Exponent   <input id=\"basekernel_kernel_xi\" type=\"number\" value=\"3.0\" min=\"0.1\" max=\"5.0\" step=\"0.1\" class=\"in11f\" />",
                    "        </g>",
                    "      </td>",
                    "    </tr>    ",
                    "    ",
                    "    <!-- TOP KERNEL -->",
                    "    <tr style=\"line-height:40px\">",
                    "      <td><b>Top kernel</b> </td>",
                    "      <td>",
                    "          <select class=\"select_main\" id=\"kernel_method\">",
                    "          <option value=\"global\" SELECTED> Global average (coherent)</option>",
                    "          <option value=\"average\" > Global average (incoherent)</option>",
                    "          <option value=\"rematch\" > Regularized-entropy match</option>          ",
                    "          <option value=\"laplacian\" > Laplacian Markov random field</option>",
                    "        </select>",
                    "         <button id=\"toggle_detail_5\"type=\"button\" class=\"btn btn-xs\" onclick='show_hide(\"in_detail_5\", \"toggle_detail_5\")'>Configure</button>",
                    "        <g id=\"in_detail_5\" hidden>",
                    "            Mode    ",
                    "        <select id=\"kernel_hierarchical\">",
                    "          <option value=\"false\" > single-level</option>",
                    "          <option value=\"true\" > hierarchical</option>",
                    "        </select>",
                    "            Graph Laplacian    ",
                    "        <select id=\"opt_top_kernel_hierarchy\">",
                    "          <option value=\"invdist\" > inverse distance</option>",
                    "          <option value=\"coulomb\" > Coulomb matrix</option>",
                    "        </select>",
                    "            Levels   <input id=\"graph:n_levels\" type=\"number\" value=\"1\" min=\"1\" max=\"5\" step=\"1\" class=\"in11f\" />",
                    "            Base radius   <input id=\"graph:r0\" type=\"number\" value=\"1.0\" min=\"0.1\" max=\"5.0\" step=\"0.1\" class=\"in11f\" />",
                    "            Scale   <input id=\"graph:alpha\" type=\"number\" value=\"2.0\" min=\"0.1\" max=\"5.0\" step=\"0.1\" class=\"in11f\" />",
                    "        </g>",
                    "      </td>",
                    "    </tr> ",
                    "  ",
                    "  <!-- KERNEL DECOMPOSITION -->",
                    "  <tr style=\"line-height:40px\">",
                    "    <td><b>Embedding</b> </td>",
                    "    <td>",
                    "        <select class=\"select_main\" id=\"dimred_method\">",
                    "        <option value=\"kernelpca\" SELECTED> Kernel PCA </option>",
                    "        <option value=\"mds\"> Multi-dimensional scaling </option>        ",
                    "      </select>",
                    "       <button id=\"toggle_detail_6\"type=\"button\" class=\"btn btn-xs\" onclick='show_hide(\"in_detail_6\", \"toggle_detail_6\")'>Configure</button>",
                    "      <g id=\"in_detail_6\" hidden>",
                    "           Distance metric (MDS)  ",
                    "      <select id=\"dimred_distance\">",
                    "        <option value=\"dot\"> Hypersphere chord </option>",
                    "      </select>",
                    "      </g>",
                    "    </td>",
                    "  </tr>",
                    "    ",
                    "  <!-- EXECUTION -->",
                    "  <tr style=\"line-height:40px\">",
                    "    <td><b>Parallel execution</b></td>",
                    "    <td>",
                    "      &nbsp&nbsp<select class=\"select_main\" id=\"threading_mode\">",
                    "        <option value=\"single_threaded\"> Single-threaded </option>",
                    "        <option value=\"multi_threaded\" SELECTED> Multi-threaded </option>        ",
                    "      </select>",
                    "      &nbsp<button id=\"toggle_detail_7\"type=\"button\" class=\"btn btn-xs\" onclick='show_hide(\"in_detail_7\", \"toggle_detail_7\")'>Configure</button>",
                    "      <g id=\"in_detail_7\" hidden>",
                    "          Number of cores   <input id=\"exe_n_procs\" type=\"number\" value=\"2\" min=\"1\" max=\"4\" step=\"1\" class=\"in11f\" />",
                    "          Batch size   <input id=\"exe_batch_size_parallel\" type=\"number\" value=\"200\" min=\"50\" max=\"1000\" step=\"50\" class=\"in3d\" /> </g>",
                    "    </td>",
                    "  </tr>",
                    "    ",
                    "</table>",
                    "  ",
                    "<hr style=\"border-width:2px\">",
                    "  ",
                    "  <button class=\"btn btn-default\" onclick='run_soap()' >RUN SOAP</button> ",
                    "  <button class=\"btn btn-default\" onclick='reset_soap()'>RESET SOAP</button> ",
                    "  <label title=\"Activate once run is complete.\"> ",
                    "    <a href=\"#\" target=\"_blank\" class=\"btn btn-primary disabled\" id=\"plot_result_button\" >View 2D similarity map</a> ",
                    "  </label>",
                    "",
                    "<!-- ",
                    "GDB7:",
                    "el-spec + cov-radii + re-match + pca",
                    "el-agno - cov-radii + re-match + pca",
                    "",
                    "RS/ZB",
                    "core-chrg + cov-radii + re-match + pca",
                    "el-agno - cov-radii + re-match + pca",
                    "-->"
                ],
                "hidden": true
            },
            "output": {
                "state": {},
                "result": {
                    "type": "BeakerDisplay",
                    "innertype": "Html",
                    "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,
                "height": 465
            },
            "evaluatorReader": true,
            "lineCount": 306,
            "tags": "cell_soap_gui"
        },
        {
            "id": "id_cell_soap_run",
            "type": "code",
            "evaluator": "IPython",
            "input": {
                "body": [
                    "import os",
                    "import sys",
                    "import datetime",
                    "import hashlib",
                    "import ase.io",
                    "import logging",
                    "import json",
                    "import time",
                    "import multiprocessing as mp",
                    "",
                    "import soap",
                    "import soap.soapy.util",
                    "import soap.soapy.lagraph",
                    "import soap.soapy.lamatch",
                    "",
                    "from soap.soapy.momo import osio, endl, flush",
                    "from soap.tools import AseConfig",
                    "from nomad_sim.nomad_structures import NOMADStructure",
                    "from nomad_sim.wrappers import get_json_list",
                    "from nomad_sim.wrappers import plot, logger",
                    "",
                    "verbose = False",
                    "logger.setLevel(logging.INFO)",
                    "soap.silence()",
                    "np.set_printoptions(precision=2)",
                    "",
                    "logger.info(\"Started @ %s\" % str(datetime.datetime.now()))",
                    "",
                    "# LOAD OPTIONS",
                    "logger.info(\"Loading options ...\")",
                    "options = beaker.options # soap.soapy.util.json_load_utf8(open(options_file))",
                    "kernel_method = options['kernel']['method']",
                    "dimred_method = options['dimred']['method']",
                    "adaptor_type = options['descriptor']['soap']['kernel.adaptor']",
                    "density_type = options['atomic_density']['density_type']",
                    "",
                    "options_file = '/home/beaker/mnt/options.json'",
                    "tmp_folder = '/home/beaker/.beaker/v1/web/tmp/'",
                    "control_file = '/home/beaker/.beaker/v1/web/tmp/control.json'",
                    "",
                    "logger.debug(options)",
                    "logger.info(\"Kernel method:    %s\" % kernel_method)",
                    "logger.info(\"Kernel adaptor:   %s\" % adaptor_type)",
                    "logger.info(\"Density type:     %s\" % density_type)",
                    "logger.info(\"Dim.-red. method: %s\" % dimred_method)",
                    "",
                    "# HANDLE SPECIAL CASES",
                    "if options['graph']['hierarchical'] and kernel_method == 'laplacian':",
                    "    logger.warn(\"Hierarchical laplacian kernel requested, evaluation may take several minutes. You have 10s to abort ...\")",
                    "    for i in range(10):",
                    "        osio << i << osio.flush",
                    "        time.sleep(1)",
                    "",
                    "# 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/'    ",
                    "    json_list = get_json_list(",
                    "        method='folder', ",
                    "        drop_duplicates=True, ",
                    "        data_folder=data_folder, ",
                    "        tmp_folder=tmp_folder)",
                    "    data_file_format = 'NOMAD'",
                    "    frame_list = None",
                    "    frame_list_idcs = [ (0,0) ]",
                    "    target_label_dict = {'Pr3FCvAQdEAhm50azZGFTika5ufc0.json': 0, 'PxHdhQW40tQ6oO-dlMLlhW06qetRo.json': 1, 'Phw2RDlr8RJrjY8nb2PfCE6Bf--N0.json': 1, 'PiL5ii9imlcqPiNaYBJ9tOcXcg56e.json': 0, 'PtpUsDnCNiVY4S9huagte8WgJsqW4.json': 1, 'PWkXOKoiw0iAE585QkElUZNCYOqYI.json': 1, 'P9sheCSX6Gol5L-IsCvDlnmT_MEGG.json': 1, 'Pl2qc7lsKm2JURV9VYH_4NvBTSSAm.json': 1, 'PkJJgsBeAbrdWgqxCqVxRPHqtzerU.json': 0, 'PMdcyic7VqZ-VnZCutL0yS32quixd.json': 1, 'PhF_jMdta8Ncok9i2JHC7G1ZM5KPP.json': 0, 'PLlJ5V_E4KaSGS-UidfeQ-jaPzqRK.json': 1, 'P7phsDEr7Yr60VY4pRQEh7JA3-BCU.json': 0, 'Pq1Tvh6kPeJ-PO77jXvOsp92PMK4P.json': 1, 'P5qW79CScZurGS9wr-JIkKCz97jD6.json': 1, 'PZuBrsUzsdX__rAeKn_JQgfX-YGoo.json': 1, 'PMzA-SS1rkEgFx1pxcPzphJxK3EAS.json': 0, 'P7JW4GQVa_xQ4YKM88F9LFzyVoXke.json': 1, 'PudM2fYFckG7O5R4BJqg04tK_l1bd.json': 1, 'PnDuMg7HQBdozot1Vju9mRHL145JQ.json': 1, 'P-4rlq5MeGBSt_WkDZ4GAlQk9K477.json': 0, 'P7kHL_6prXXdx5_MzMVmwsmStNoc0.json': 1, 'P6cnGQQxSVmVNSXGhmW0Eo3F05f0S.json': 1, 'Pst86UVhV07OfKDhwlp0PNxiMtXki.json': 0, 'Pv8lUdwjbTPis4RMoPukIK9ddyfN2.json': 0, 'PV-FWv2PmdvoxclC0V6wu19FLkmzS.json': 0, 'PvoFY-VPodUwjiYz4GC8oup1lgHE5.json': 1, 'Pp4wUDDucIEdS9euDT89Y6xQA_JPq.json': 1, 'PVFeviV3V9KpZKfv_PgHIwsJ55Cta.json': 1, 'Ppp1-jWodHR_jn9MYrya_8nTIzOYr.json': 1, 'PsJUIeSLEotoIZk6R54H-G2JWPnQG.json': 0, 'PCuUA5Okfb61uS21MtbACmRZRgg_S.json': 0, 'PvctQLLbVwTdrcOT414rRTdEee6te.json': 0, 'PguAhp1UagznD1eGM48s7Q1xhl356.json': 0, 'Pgg6lKW9mNnK_JsGGEZ3WcTE5hd8U.json': 1, 'PsK4ECtTc4sdm7Y2ItXj_PYIQ7Uxi.json': 1, 'P5I94-ZnwC4e19Q-2KL5peI-mHW-3.json': 1, 'PC0ikq0ulkygT2Co59UBAl9YcYxbG.json': 1, 'PItWNNwGWlKJ12UjZAOfNetX3xlkd.json': 1, 'Pn_JMZdRKlBskR5YNFU09ZPlI25yQ.json': 0, 'Pd23q1LJrA4DOKbForwH4cvHWRk6U.json': 0, 'PDZZd1lzu5VkgVNru0CvP5lPSFZdg.json': 1, 'PB-GqTDr-DZ-j4OKjRNJEp1hnOGvG.json': 0, 'Pz1nKnfqor_aI3wdO2eNlvwxf2XyM.json': 1, 'PHZfSFK_jwrcAKMVDKVl5zy0iG__7.json': 1, 'Pp5ld58IKi6ZKVY1FkOVHRNaxNGpM.json': 1, 'Pzu2Kvm9kVotZbNGSNJ5OkmX0Le9t.json': 0, 'PLjS4Nx2e4IwoVqRXYrH-BGLVHXwS.json': 0, 'P8DPriFsbkx1IdhnC9c16NAcCppu2.json': 1, 'PmILc9BsSYjJ9OKH4MkPr0D4LGYGC.json': 0, 'PcFm7oP4DMCvJbUYLToSGXkNYy50k.json': 1, 'P5whAMnW8HDZm5i8GQ1wgRE644Quu.json': 0, 'P-QTJ6i4RhVtV_HEWnRvoKI1yPv-B.json': 0, 'PwHXENkhp6tr2J1tcdoK0tU9Se9LY.json': 0, 'PLjYC5l5fCL50-cFTPGnS9UclPME5.json': 0, 'PoWlbXJuGJ4-22DclM15L_g44LN3P.json': 0, 'PsL8fyWYvrq6V0pE3zTfoNsWAVUd1.json': 1, 'Pu9uI6ldU3ZVgwfmy-Um0D7IBxTCK.json': 0, 'PJ3Gpn5xVzK4U8aQtVJuAdvEhaFjP.json': 1, 'PQemsbzVUUZnBviHLK9konFRXNBfK.json': 0, 'PjdQr7RggZTo1ANKDU3vhHwLp1d8J.json': 1, 'P3hSpXydSB6z3p79OEIOQK6llto1K.json': 0, 'PgemHvDiNrY7gsuhCx0VTL8kPb7AM.json': 1, 'Pu7OOtGbqWPeQV2ZbNjfoUMGW4oys.json': 1, 'Pkdm5rZI-cX_BWY4Bq09NcYznTCqd.json': 0, 'PWLuxEKWXmz7Y3wT-br7OM-X9VxmM.json': 1, 'P5UPXcXAkiL_6ikUAwosvjzHfyzlu.json': 1, 'P4Gy_0fwV4n6OG83Jn340W4slHTju.json': 0, 'PVH2AkTXt2QDVEfJdFkGPAMk1_dQO.json': 0, 'PFgtXShm-6DrWrYl2ZISJizeOQmCn.json': 1, 'PRw9pdI0xI55Nk_ojPTE-mpGfoWDb.json': 0, 'PW9EsWj207pCef0yaph3RiIBO6wW6.json': 0, 'PCmzvvjhPSzkp_bhkAuDWK375Fs9g.json': 0, 'PXQ314YBdt6WsqhX_PW5AbRaxPu1_.json': 1, 'PNavIaZhgwAeZM0-QhWHe_38iUgEF.json': 0, 'P-mzRP6Y6yNabaLHsO_pwO7E3P30h.json': 1, 'PLctw-IDoEDNVlPcPLVPCRMv0NNeT.json': 0, 'PZyVHtb8vYHOZz_p6iYEm5cEQ5jzA.json': 1, 'PpmfgC5ZDaUcwWRzf6Ce-QbT_5O9A.json': 0, 'PWNJV2eK0tIrw_AEg-EpXTggLH88h.json': 0, 'PYeYlDJb7j4qJ9ol38GSM_eYJsiSe.json': 0, 'PqdA32GG_8ba-mWLkTrQlRj5cxWkK.json': 0, 'PC8N-y0PPPHeAwhkYGyYYI9H1UUHy.json': 0, 'P0tj3NYHfrit7NB0ewfG-fIjRWuJD.json': 0, 'P6ssTxMTyxThJGKn_ifOxGgRZBZF7.json': 0, 'PkCJxvN03tcUxw9M3flhNtTqE6EXn.json': 1, 'Pb2tcxhtJ6kRqzA2t-15Ct0OXzx8o.json': 1, 'PJPCpa3El8jdJNTfLwle3GjTsVIgr.json': 0, 'PBIFq6uZafMX1RcVrcSlyjZzterhn.json': 0, 'PN_H25V3zQifk-peNCsQW28yb_ige.json': 1, 'Pz614Y-kx6C9bF1eY6S9TG0tuq7wT.json': 0, 'PMYhXp0hcj4DC-bz-Sb1E89QjMeVk.json': 1, 'POxIBtxFdG0IGijXzW2Hp9shzqwKN.json': 0, 'PwX4dQQ-a-gjnX7EjIdNnEC128OMT.json': 0, 'PwRvjHaf4NbUcbFQx_FSAMhAiiUAy.json': 0, 'PYDc2cDnu20427423p2Ka5aCYllD6.json': 0, 'PFu49uki1H9hJHnq2TunZladBw4tw.json': 0, 'PyukHM_doowQLr1Ipwa8feMxPVmI2.json': 1, 'PI6RuReyUeSkpBFGjTwn9oPThs7i1.json': 0, 'PGfmNACjoACx-z0jr-uRdkz98OQ6F.json': 0, 'P_1mfRE8eDZ7zCLQwGT_3n8YC34dE.json': 0, 'PaZE0mtoVdnoPr5NhGxHnimsqreau.json': 1, 'PbV7iF5sNHb5Y7MIF4vaxwqWLsHdh.json': 1, 'PSFkRUy6_MF7RoSq6FbJQPynxz-J2.json': 1, 'PSy2hA53Gi7wXfU9SCowqkmFWD2gp.json': 1, 'PUzjQT0patVJ9CyvEnKl_xQwoO7iX.json': 0, 'PCoaY63P6pgrLu2XM4Nup0AxDuWl-.json': 0, 'Pa8iTq3GGrEey5QwzgI3HXoTAdn-3.json': 0, 'Px8VpfH0LzX99ht06ME-0EsmmrSqe.json': 0, 'PYZqSZP1p7uagmixYdJO-0kSBpXre.json': 1, 'PjRgReTq5zUOsWMyucmBS5hZivVLW.json': 1, 'PqV8wZmRW_rDXTYfobwFreFFuQeVY.json': 1, 'PfJjCFuXjoHNKymJkLUmV4dvYqOpt.json': 1, 'PXkyz1MsXSn5AytDw7RrA-r6CZJYA.json': 0, 'PVlh5JoGn6jHWlE96SKt6eRMYTIVK.json': 0, 'PVYIDqiD6OslrGDcpUvuqvc0bD8Jr.json': 0, 'PIdTkOUggdYUNH6ldlAFpOu-uGfvc.json': 1, 'PO2LfZAqhVzYBfH4zcneU1SxSjPFL.json': 0, 'Pm0_fbKdKA2iyued6niH-AARk8hhM.json': 0, 'PAVG28R30ZOMaiSV4Rwy7GfwNiNnu.json': 0, 'PbOKiKkilayeLpobW9devFnBsTs2e.json': 1, 'Pz96Cs1-A-plTi_LygDfMGLVeHDP9.json': 1, 'PC5BqZqP-Zm7askXJRif6LtOFvB_k.json': 1, 'PWUb5FOctffJgZ2zEcETIcBC7aq_c.json': 1, 'P9a7_A_GE12alhE0IxWMXuPEUeJxX.json': 0, 'PiM_0Q7DAQ_Cs3Fmhiz8k47xreaBO.json': 0, 'PPwSJUtFRBKN4DPMuluQiHghZn2Wb.json': 1, 'P-wDNx-XThTnDp8z5-5fUELvisUUH.json': 0, 'POp4wlZ3WVUdMMw3p_gdCZsmXm2Bx.json': 1, 'Pr3fuw6xCJS5vZiUf9B5tW2KT_LQW.json': 1, 'PFk3S1txzRLwfhA3rUm_QTVGWIFzQ.json': 1, 'PHJms4Xk3ukF0iBPnS7GmQ59XMyyc.json': 0, 'PQB49fu8BN3kua7uLKQLlT5dWdHi0.json': 1, 'POL8lsjGueHjkLb9hMpptti6c8Phg.json': 0, 'PJT37PKBk6EMVDJw-l6xQQFJWNrTv.json': 0, 'PnvGCIZKt5zjIUTK1slH3GpJkID2r.json': 0, 'PrUAsiUSW6VW3fAX1Wtj9M2zMFvqo.json': 0, 'P4GxurJBrQmzdVPbS3PJSpxzA4sBA.json': 1, 'PcctN1UN2klEx4ZMKRqGSWzeqnhPY.json': 1, 'PFlKZ-zwrpn_05CZ6o7wsXml8ElyN.json': 0, 'Py_9TqcqD3vumoH7zJSI6X5qbhqGV.json': 0, 'PnhDURE4i9Q5yUaSUbEmarpPFd-oP.json': 1, 'PaD3JuI5oo_bSidb4LvM-LxGyar--.json': 0, 'PUAV3TfzEfkEMynAdx4DefR4s6sUK.json': 1, 'Pp8oNEgb5uyjpB8t8A4vEnBIarcXC.json': 0, 'PoAvNIBUzxIzAWIlCW3uaQjeiSA65.json': 1, 'PqmzGiDuYJ-Q8j-KfLDlQBvWb2Gjt.json': 1, 'POen9duqszwmd_HevXfMlDa3c6PfH.json': 0, 'PbwXvYD_AwyH0YedP9_wU9ENUfhDQ.json': 1, 'PTblqeFaxBY4OhtK_BQ60474ENeHk.json': 0, 'PuDDmYd8Oax5F_NvK_4rDfaEbBVqd.json': 0, 'PQhb3_h4Bo9e5xjhhTUBY_8uOEtTM.json': 0, 'PkmJmt76S878maPyhiUL_FbNxpk6Z.json': 0, 'Pm_gKerNRwP6Z6yCVP9nJ5T5MQ2_5.json': 0, 'PTho8pRX7nb_spITHw7_oOhWryIzg.json': 1, 'PKHGxoVZE7uUMI0keybyQT6-lcLxQ.json': 0, 'PPgM3bipjCBjdI31lxLk6hg_Pu_8q.json': 1, 'PMyKFz9gH1zWYigvAO9rYaLNJcTMP.json': 0, 'P1RtridQtubQWNyVOpkKw0J6sc2o2.json': 1, 'PsxNYHYtLMewiWNMAfTqzOc6NXwSv.json': 1, 'PcyDh6nCotXyohIHh5k1dx5L5D5X9.json': 1, 'P3Vxtm67xah5YCQbK6xkhudXb03b5.json': 0, 'P2of-qZ_Nv0b7vgXOhXW-GhI-zEJX.json': 0, 'PQUYoBu1tULTvysw2jz8XwBnIeewS.json': 1, 'PiOIHShEKCjdganj-Sd0MkJaLglGr.json': 0, 'PN6o4yrYlPuuFMhkcvEjiQOPEB5MA.json': 0, 'PPseNqg1AGjYCgMZGvmj3-ihBqjdE.json': 0, 'P_QhcDF6CsgYFzHKAgvRMsIjHCBdX.json': 0, 'PZQkSWOat-bIQV5IVle0tBtpUg_u-.json': 1, 'PbH4c6PM9zy_I5ZsrovthJUXl4jzP.json': 0, 'PxJnNtspUIcqGhneVuSJKposdVxH_.json': 1, 'P0FwG94OJfMUW8n8DwY8mgKN8iu37.json': 0, 'PzO4jwN5eHRIzxhbd8YL5hor204g1.json': 1, 'PtfospYsoDRBj6qDZ4_UggWAFLOvH.json': 1, 'PaX9wIStU24ziGTtLcnaClPc861Xg.json': 0, 'PTijdgDWu11E79tuyylukptiyCtv2.json': 0, 'PHpF1bT3NDnwjR2wfsDrKLRLp2HY4.json': 0, 'PGex81N1PxLHkRkSGopRqqLQ4tSkp.json': 1, 'P8hHbb7VcsyNQNESryGIQoU0Z1BA1.json': 0, 'P_bHvaGbhLj-mdvrITapsmN8WZwnk.json': 1, 'PcTpOOm27IhFh8Db8pVcDFNTWXVOC.json': 1, 'Pis31IuDqRhlKFCuNA2yYZSWzNsW1.json': 0, 'PhaEAJ72mzGm65KpjGcnVVlFax_l7.json': 0, 'P-26ns_c5lUjTmb35idkjN3y4tAf6.json': 0, 'P7dG4jpuAJY-9wUxrh9oCQeoQK_kd.json': 0, 'PgT84VncYJlEhKU2_UUjcZmKMwAMM.json': 1, 'P0KVR6NK-7BxgOXt-9FWllzZwD66-.json': 0, 'PO0XBfLZDwHJ-o7S8eX9F0blFbWgy.json': 0, 'PaxMr1WvAetZfWvfP7hXODqjE1935.json': 1, 'PvA5OwAEf62E22JsyxPL3AL_iMMb3.json': 0, 'Phb63KR9BOj86coXGS0bKGD2xq5O2.json': 0, 'PNrCobVjd2qZE3ESPD98ccm8Llvf6.json': 0, 'PBt29um0GZOaGYXx4RFSAD2TOhmFx.json': 1, 'PQFhJGR6USZg0MrTttQvXm1IiHIdq.json': 0, 'PlYlSQzIbxstpaKpJ45Ue7dFAQWDd.json': 1, 'Psc8NdMS8OjQ05Axace0L9mRR0TK5.json': 0, 'PpxTrTc6NkExiq1nzQkhd3cJ1-yRY.json': 0, 'PiuHbPDyPGxObhQgRAkqwgBmq3a8c.json': 1, 'PVVd1AiE3DVbQW9SEC2FZSTcLuMYT.json': 1, 'PxKTykm-5JPCqmeqXYVTKbFm8yTQo.json': 1, 'P7ALcbN3yRx5Mqw1px9lzL8LDbx3-.json': 1, 'PEYkIqgUpWfoq4Tcsy8_bFVUs9mko.json': 0, 'PN0pxdAiZpbbUV2jORc4LSy5MaYWe.json': 1, 'PDjDFM8OWbY0TtHCY-DBYRJmRQ8fO.json': 0, 'PYYa2sR-e12as1dS2L5QOKnjvwLxl.json': 0, 'Pdioj1Di0pWL1n2kx9yAlhqj2Q7a7.json': 1, 'P4dSQn4GKPhaTawz0JtVOyotDaGom.json': 0, 'P51AKUeSNYXrRBK_-uc8y1-bCfUNg.json': 1, 'PNf0wMfiw5J-Pm-yofzdOge-vgzTR.json': 1, 'P1cjW50CGsQC-wkw0ZfTGzpzrdXCQ.json': 1, 'PWohtcI8gkk6Z_Dvz2auP75ULHTCj.json': 0, 'PhC6OaXvZMO-uQRr0Yofxk-F92O82.json': 1, 'PNprwoCKi6KkQvdO-wcSIsVvsJSN9.json': 0, 'PVovV2Kw0mY5-ATGEazuoyfYfHIyk.json': 0, 'PYXnYV6iLtT_tNF3WPL3GHpNYniPB.json': 0, 'PSFiXUNv75SzlqJDfVZ0BFKrSsAax.json': 1, 'PCIBeG0aqiAwlCrHUAa4DNkXmDYa7.json': 1, 'P-vWvTKaYwwSu6Ny1jQFq7j7ohM8u.json': 1, 'P_rlThO8Jv0C2YIgYKLbCTM1rvfW-.json': 0, 'PoDvrHzd74Kq1J1lgbFnMhcwCr9Qb.json': 0, 'P0jhCJRBSAR0NBYy4xL385BB8JDQ9.json': 0, 'Pi-FdtdwAT2vRRFKcX3Qro40CuvFS.json': 1, 'PJdpHgCcYfaocqU1QZwcS_fuET7qX.json': 1, 'PhIFpA4bq2lzCf70CmqPyhvm_MI7i.json': 0, 'PJ4DkXB650Hd_gxWE1vQoVS0hSWW-.json': 0, 'PZpgpSkSltbUhJUCSbPqBKkIvQi8v.json': 1, 'PmqZTmH0qObQB53LxZj_-3ESMQCWw.json': 0, 'PCgNXVu7zVP-rO_jZl4Vc-Z0K_WPH.json': 1, 'PKCyiUMeNTeE2Qp-8ElDtGu3iDVh0.json': 0, 'PiAEpO1Xgjp2EQC0Hj-thyTrMJslU.json': 0, 'PzkPWSKWCQ14F1io7eGkOhK7h0O_Q.json': 1, 'PfDqq78NrVQ3Euaj8JhQHsDLbBAbB.json': 0, 'PPe2D7-Rc7Xet39bJMvagyRzhrO41.json': 0, 'PHiW0XWZCN8j4FL20b8tZzv7Vz59s.json': 1, 'PpyJZtNPyNqX3ofwfNMpvJU_9PEKI.json': 0, 'PAzUI8yZYRLJBVLRZs2stJcwMxICW.json': 1, 'PfqOdKHNogFkpG1FjjQenZT3KYSiK.json': 0, 'P8Be8uN0kLt4S8IAlHBB0VXGZ2Jz4.json': 0, 'PVWBT7Ip8-2-_E_tK-UlgGgKsh_9a.json': 0, 'PBdR--f6NHJFGn1RUJ9yACsPBDnqr.json': 0, 'PR4WzLvK6N7BiW799dZWxo4t262pR.json': 0, 'Pz-zWbbn5PNd-5CJdBVD60npmzSwn.json': 0, 'PMQX8aO0HCotMUnTDp8oF06AuUmt8.json': 0, 'PFgAOYUXJn0T4SwBUkudIOygcFML8.json': 0, 'PZIw-xDe6Bd2qe2K3tmowGhInUUxm.json': 1, 'PECdv9M8hpTqEWEx915X3qIcr15md.json': 0, 'PEKsAqq235Q_c2CYXUJ-1J3-wD62V.json': 1, 'PuYZsg10TctKI_SfOx4DCngxKIU63.json': 1, 'PbHPysltAdsNbrN5MX2g5YYkOnmXU.json': 0, 'P1LQfHFxFXgVnqTGoGAe36ISokh1A.json': 0, 'P1lJNru20aLP07THxgKsNYkge5gKX.json': 1, 'Px1ZOX6ulmibLQDHVf882HOQA4R-S.json': 1, 'PBgPvjKb5ydSIjMaFiqOPdyYZZZe6.json': 0, 'P31twUTCnHexWj-CiuAqsI6L11boV.json': 0, 'P1GZ5lcCsSJ5XKASLdn99D2VX7UtK.json': 1, 'Pg2fLE5tYdXe0evb60zGP2S1ZXIIk.json': 1, 'Pq_S1pMWXyVEwLQtS_CRQLruINQc7.json': 1, 'Pbb6tWhL8Cn4P0j4XcwS8O6oopygF.json': 0, 'PX39jEfgLeDPddrkPuTvUfVv4_thl.json': 0, 'PV--hzM8rvSS8a6LZBuuW6IPbqvY6.json': 0, 'PYwenjc0puK7nS2dQafufasyQt5Hg.json': 0, 'P2K_4Nm_Wx-m1p2eHnf6VIxkgpMpo.json': 1, 'PHB8utzkIC2KazQfE4U1g-E10K2S_.json': 0, 'PFcM-PlNGgLortQEgnZlzXnuoht6X.json': 1, 'P4O03WaxEd06OqWBJEV32mb7bSsdp.json': 0, 'PyCVEjNRmO6--kebMJ8LWxgjYEI1M.json': 1, 'PRGo4gODcM5Ig4OUzVrOH-RuCZySO.json': 1, 'PBoKVikRt4XQw0BosPth1vVqtvJrB.json': 1, 'PLrKzHXz51BVNZN9nyOkZ7dcgqhPM.json': 0, 'Ph-6A75k6v-qJ-tgzcs-BoIWFGqQb.json': 1, 'PaZ40qKQryxht5NHRaRacPyMBbW7t.json': 1, 'P2YttACjGEHnGzUsyFBlKE_DLPzy2.json': 0, 'POSbFETVKe1bQ8cHAmTdVoW0mK5nf.json': 0, 'PGvuYKpzVCcWnf33I4uy8fGyJVxXq.json': 0, 'PiE9kSk65rz7FUIJeq5Or-DMIdbJz.json': 1, 'PpHkh9ffPMJ9VRUbPFj2bYsQFRmvB.json': 1, 'PcpD0axNY3fEO1jmggSHMCtnWuX2q.json': 0, 'PD2VEz1-eaisBYrahLkieHT1lw74Z.json': 1, 'PIpXOj5_j5-oJkFhrcsErAvykqrkf.json': 0, 'Pv4rCPjxT02ucyz3vHilJVk7u08Ra.json': 0, 'Pkby2w2UwT4jvncY_ojBu3suVTit1.json': 1, 'PvXy3VrpadhZLQAwphJE6GVB_0OUp.json': 0, 'PxrF4NRKjX9jsmVIocs7uQuLwD_cS.json': 0, 'PUfCW975-6W0g6ibCsyAmMQgnQPv1.json': 0, 'PY0cKXUP_yoUP3kB28SdDDjUog4N9.json': 0, 'PB8zc5-R1ZXaxutxBRsD247NMyR2N.json': 0, 'PrXPnj5sXgXe-Vl3hyEUuLd-6mcW1.json': 0, 'Pr6E85ezTMa4WX-GTFoms6w0Rb0hT.json': 0, 'Pa7ltCNBQsk7Owlu0bJnsE8iY-Rmw.json': 0, 'PUDiBRLe2pg5Hjvd3kc_20wMbinMI.json': 0, 'Poo9mxo_et4PITgR791dqoeNgNtci.json': 0, 'POOgBdh-_tiNgQa-3C5z6DPWWgz4z.json': 1, 'PPzq306UOUtzOlWj9Z1n_u8jP2O-e.json': 0, 'PfA960McVCueQzY_t-TVT0wgbZCC5.json': 1, 'PkfMZbs3Gisz5a3Kf1468HakEs1YY.json': 1, 'PoXHWtsIc1BlQ7N2bsUiZ0PJnFa6O.json': 1, 'P0D0fsWw6q9IbXsCv0iV8VpYFyswv.json': 0, 'P-2Ags55Pqf72PZOkLUiSEbwGGUEg.json': 1, 'PJYTR_x-6ANZ-cAsi75D5h9Gvb1e-.json': 0, 'PSzD2TkeF0Gg9fnlc1cNvyK7NL24E.json': 1, 'PcEzW227FYLGI2t3jk-gLCgcEZWZe.json': 1, 'PNqxvK2l3qtDW_TiCXk-uEW7Nujwu.json': 1, 'PIiycErliEf03C19tBEoaKo7eh8Qd.json': 0, 'PJgH_dRdKDznEtOs5aFa3KJ-6gWys.json': 0, 'P1BRfygNtYTFuqhuQQ11YrcX3does.json': 0, 'PoyENuUjWp80ZT8lCAUgKp-jkMrsl.json': 1, 'Pb1tOxgNec6dtmCTsXpD67-aGQyB_.json': 1, 'PdslzTykdijS73UPcpzKwp4LMCzaA.json': 0, 'Pp01qYtPp9IBgbdf9e17MVvXGxGCu.json': 1, 'P6rc5ZYhOsKFAC8ce4o6I48mNhYVG.json': 1, 'PqxdRq-IDL3fq0FyEWiGCHi6A7Md_.json': 0, 'P81vIYtJtOEx4n865B86z-KvUb6hA.json': 0, 'PleD1AL4HSm48SHMVamKaMdll77TE.json': 0, 'Pis4DR_QiqTKQAaRTM8iEMSYyzen1.json': 1, 'PxU2qS4dyA4yBsjWX5dE4o8yxi-nR.json': 0, 'PZS4BbSu1o4G8Ux0yitWiIiXi1ELu.json': 1, 'Pjuot09gFYNURzHGDdDxWQkL0UDlU.json': 0, 'PxHacQmRqCnF99VmwKLvtbck4mbos.json': 0, 'PFJftMMZF7FQN0KJlcjtVOtyjO_mp.json': 0, 'PIAgXxjokMa4XK6WybCCrKLkZH6jV.json': 0, 'P_Lx9ePtVOK5MyoQBlUWA_kePKF_J.json': 1, 'PhZ9AlqEKoupBUKoEny71SrxloI3H.json': 1, 'Pc_CXcnqEP6-jRwWtVHU33J8XdWAL.json': 1, 'PNrpnjgMKA-I13p7BE45BmSkOdpQc.json': 1, 'Pqky2IgyYljS01KXKFanIV11nbcCT.json': 0, 'PHiJ12XhsabBkz2Jnqz31YP43NZ3o.json': 1, 'PiZTl1-v3bdCUDjxt-w2VxKMGW3-6.json': 0, 'P-70iigSqFlM9BO7d8xReToc2yoJL.json': 1, 'P_80H6vlBefw1U3rKFDPPtpJAX1GH.json': 0, 'PPH3jLInTUGSWvnez_u-r6ZJw_UDJ.json': 0, 'P7oSkZrV7zs3KG6S8IZyTSE_FmwBQ.json': 1, 'PAhExMpBKswvS0P8jOY7AsPvI-buA.json': 1, 'PnqNt6IkridscWAZFCdRgjRNVU2DH.json': 0, 'PKtzO0E8YJ_zRop9_0XnCXUs7TBVj.json': 1, 'P0gVIHy0tGyC9lzhmFSzNnvToZDbq.json': 0, 'PhdeA0g8C6BUUJPuYEkWp_2PPlOPI.json': 1, 'PlDIvjG5MY_O0Utb5Vo6CyhcYlqbI.json': 1, 'PcaeH7PKRtvx3jGz7J6MHAIVbvY8A.json': 1, 'PQBZOvOwgfTe-iY_R_rx_tAHD6FFC.json': 0, 'Pv8JhIvqHcOlPvZwLHyqOb8DDZJWF.json': 0, 'PEhSfJP0sxPF8lZqDoCUX6JtnamH2.json': 1, 'Pli-JbQ1LXwHOBl6WRtxKcyCiSY7c.json': 0, 'PS5Y9ybCdTDLFKtms5kQgqaCg31SW.json': 1, 'PXoBZDFv4BhXvWTO29YBcGBXXu1vS.json': 1, 'PCYJNpJCjdQTgaJEakM3yGgqmT6Ie.json': 0, 'PwAbEV6TMtldCAg5CpujuKz0M-sgz.json': 1, 'PdHoVKHCES7XtBpTVk0eihbo0kqmR.json': 0, 'PqzHstGBtmefskeVb3r70F205sUxv.json': 0, 'PF8Zb1nzPb5YMugWmjUm0gAS0JySC.json': 1, 'PuK1JNRVpRVOnXVjVy_4fxHIO0Nvd.json': 1, 'PiDYPjgGv-hsCy-j1XnAXEQ52XznJ.json': 1, 'PbLXfxMecAq_N233HA0-taXbbSaFt.json': 0, 'PLlOCjkEQ61Se5wdc_H7h4MP65gOC.json': 1, 'PZBK3DUQyzQY6WdFoVH8e9nLb-TXh.json': 1, 'P8K3hbEkR3WYhnA87yMeH9aDfOX6J.json': 1, 'PMfukAw2o5_yjCynjoLl2j5BUoU2z.json': 0, 'P-WFXv4pg5JXNw8v86SVKW9_gFrbO.json': 0, 'PVTUPQyCTvrAWV0DEN_xnPgrBPmM2.json': 0, 'PPk7fglKseG30erVLtpJv35IbPs50.json': 0, 'Pzl8jOEFAC45VXxnxMJ7_nf2xS6v2.json': 1, 'PVvk2rLGsl4Gd6Q3l0Cbnyi1bM4XO.json': 1, 'Pc8ZE5YLJ9F5CupJno_drLfiMXQnm.json': 1, 'PV9sU7-NrTJLv6apc4z2VGpyVBw4t.json': 1, 'PM_idrEJ_EVR1MBaB5eSMva1NDbYC.json': 1, 'PAy8gmVjhXEQxzCJ8LOWZakyvudO8.json': 1, 'Ppn_-f3QxBgeCwkICEO4BL62GIBx6.json': 0, 'PEhAEeu8aSPA_d3_dHCjTlAi1y09j.json': 0, 'PBpW-RJJRuCaol1KsTYxnESV5WSW2.json': 0, 'PokfYeddlBQJ8hEtuAlq7PhVKrNLA.json': 1, 'PkJFJIcZJju7YX9N9moBx7XQ3PBel.json': 0, 'PIBFA8Pnha2fNNGClWGxlI5pF-Nmh.json': 1, 'PZYMzFERMrDsOhwsVOy4WxbXlfoCI.json': 1, 'P_Nogq91Htj4m9fsHPi9qS1MacSWP.json': 1, 'PdiNe_1mugSKDXFNQ_5-BGBRy6Hv-.json': 1, 'PzpYp0zC2qdrHsKhR4EWyGNcZ4lbW.json': 1, 'PqWgAmv4b8k5DKGkxMdGOJzSuNAaH.json': 0, 'P-2Qjq55bnI9iriIIAztgV5GGgZqI.json': 1, 'PThXOtMKEYNQwDc4UpdzjCwZJpL9A.json': 1, 'PJ3I1j0vT2yred4h00i_748gSow4L.json': 0, 'PD9jwKVZG5DDrQjVr086z3njM8qya.json': 0, 'PdZ0jGtXoqbNsGyTTmX18AtSFVv7S.json': 0, 'PFvJLQd4N-p0O9ytP6TRzvEqM94gJ.json': 1, 'Pg87WK5n6CItweIOjATW_Xv395Ju-.json': 0, 'PKgFi_4-Ji6uTtkxhuEs6O6zYZG1y.json': 0, 'PMYtIQzdHW1_3muxjmvVX7LDkzfYw.json': 0, 'POIcDQE8HDY-VOlf4fXcktXXUZa6h.json': 0, 'PlQ7NfvecVk8-o2I_Fbz0hNtkAJAw.json': 1, 'PxW5ZSNhkXIpwbM1Pmv4Uf-sESTxk.json': 1, 'PXKfsi-hvt1R8XqvAzYi5-LmWs-YQ.json': 0, 'Ps4_Vy5vTMShdFdg24-dFqHa33BnX.json': 0, 'Ps_DB-gSwgdvTOX3HzRJjrOqD3H-X.json': 1, 'PBdEARr3VbwT7u2FmixrB7gpb0Szz.json': 1, 'PN0Q_OXA7e5yO6EkDKkOpGHM6hyCj.json': 1, 'PyizrsR40QyxopYKKk2jUtl7nElXJ.json': 0, 'P0bcbqETItNa3VfGh2YGODtdh_jpV.json': 1, 'PLtW61E-GHe1zyEyHZlwI07tXMXGp.json': 1, 'PmvQc2J6kz8-7IYQSskW2Q8rYjzdT.json': 0, 'PfDM8cgmHyz5otGdwfxaO3fotMmbA.json': 0, 'PgcLwBgzS9eh4A68JVbZrW8yh-aRq.json': 0, 'PpikjM2BVj1atNlsbkcJzK9TkUIox.json': 0, 'Pd4pMiESJcvh5FCM2X1aW9yoqqU6c.json': 0, 'P-M_DOn7irDwHG1ePgHRaceBv0aT2.json': 0, 'PIf3C_uyF48pBveWRZ-TOTkxY6iyf.json': 0, 'PMQf3hjdE12l3DivXyzQOe8hdBA58.json': 1, 'PbR6eeAMsjfqjxlW7YHerdXhBUIrh.json': 0, 'PbVMALFnpGdoEyabKhI_3DtbUX6W7.json': 1, 'PhKFZg2V7Xi2dR0d4Uqi3OkMEY6dP.json': 0, 'PrBjIBqkBqzC3QeOp1U99OO3oCfsK.json': 1, 'PNZ4rwVdmo_4pTrwp5fjmDL4hnkiu.json': 1, 'PJPHsPQicC0_ZaPA2wzADK2D_XZp4.json': 1, 'PUJUPZHk2jrE1KVUS7H13mKBH4oVR.json': 0, 'Po3qQRwJBqbLmDv8KGzCYhqZXSxx4.json': 0, 'Pr7eOkPr6yufEXzeGvi92T756oHSt.json': 0, 'PVshjrYqjAg_8QtgfGW2ABnR-mlIP.json': 0, 'PomJQS9nQ4WsUIr718n6H4YbM0Fi7.json': 0, 'PKmJzuNjx3TVhnGoqyqoWSnwEgjGm.json': 1, 'P_DFu-YobOdcOb1mfdI22vrtaSQAh.json': 1, 'PRzzJL7OHYeejsIvgfG1ph6BAeS_q.json': 0, 'Pt9_uljW5tp9YKHDhD15oLqlRILGC.json': 0, 'P6T6DLl3-Q1JdLVFwM4Eb7Fqx8cAo.json': 1, 'P1RXpIJmIprXumBAD3Lk20-RwmC19.json': 1, 'PK5EwBMnyyGjm5_lykmBBaMU7FzFl.json': 1, 'PmenrFglDQWoTWLNvVVobyI3dmkIe.json': 1, 'Pv7aXrwLqIwPAyT4s3SWlLV3NDFFZ.json': 1, 'PNi9CsJx8h-mI1tg2VGdjH3UBZRbD.json': 1, 'PMGwrN4xb6g65twIABJsMBHAfI7LP.json': 0, 'PlSTzHNscoAPUCm3biiLlARw4mun8.json': 1, 'PfFPGDGw6-cK5ARIXtsKl496E6A0G.json': 1, 'PVc9Pn-w-6MEpu41jV4p_keLeM-Yy.json': 0, 'Pj4jIPerqprBjHAT6ZKsbXGPsSmze.json': 1, 'PjAcFqeF4_NYTKs8FDqMz4jlOZKbO.json': 0, 'P36pL30yblwhze_vHZYZ_cybqeH4V.json': 1, 'PkngNUWF6DbB_68ZUlZ3vldFl3Ix9.json': 0, 'PrEhFOGkqLOSajxb-fI4i_CFYkoXo.json': 1, 'PWBxopsGbXEANMPDUxcMi-PzKvqxH.json': 1, 'P8sj5oHuBVu_wYm4T9qKo1jaReysw.json': 0, 'PSPzRDvSEgueaaIrq9vSI3c_6X1c4.json': 1, 'Pb0-IKoZYu3Pmbu323yUsGR8jQe_e.json': 0, 'PKu0vasdF5E6n3C3QydIjCtGOIla4.json': 1, 'Pq8j7xrFtmEMIzAkU34Q9pYY4XHDY.json': 1, 'PVQgfnLx6_iwg7AoMC0GB0VQmBJ6g.json': 0, 'PkpYUnJGIt3S0Kc8fy0f_R1MNKD5t.json': 1, 'PYi4vJaQTa3UsYky7BcvtvuwEQIPr.json': 1, 'Pq0gpi99XHDz4L10rfZOe1YlMTo5R.json': 1, 'PxbTr9GOcSWuv1eZsz2ikh7vtCBR0.json': 1, 'PngrJsWFmCCgcHGPh0_fy-UZLFk_f.json': 0, 'P1Ymj1uYmoRff-LXDREjnpqF5XCf9.json': 0, 'PiXlTrNF7DjBGR51QH87J8LUllNcb.json': 1, 'PvkvzEExTn8uE2HYyp39OAr0XeTVs.json': 1, 'Pt5thhX-pEWdlL6-DGsQe2r6Gr-lu.json': 1, 'PjrwqnA_c0WEceRgeQxUAQVYsEEyN.json': 0, 'PqWPF7Pn3u9LPGyrxipPfrpfm31zz.json': 0, 'P4buZebyNPvJwv3yVJhnefQ-sxA9C.json': 1, 'PT14hF0n9syjZ-2mtB4x2E6CigaTm.json': 0, 'PSwuESVth946XIEoMmqVaRlxIj2se.json': 0, 'PvRZLIcUNqftQnx61I8tQBlMgSk48.json': 1, 'PR2RhvtIMl_2vjNMbFbw9JNTBXQtt.json': 1, 'PtxkljA96YCpjc-DK74gM9LF4m3Wj.json': 1, 'PoeOw-4VHSi80c-wE3hjTDSwEnZYX.json': 0, 'POHjGTnYd8JGgqzKrI5tTc_o8GPAy.json': 0, 'P9k8p_byyFV_ox5XQsu0s9o0w_miq.json': 1, 'PK3-3e-av7nkv5AOEwjZyyjkI9Hgy.json': 0, 'PWoElPtI5U48PFUHK-yXJfn4JaasP.json': 1, 'P193lN1yQuxeBQsc8g14Y3-hhMPVn.json': 0, 'PS3i4SxrlnWE9AUgOmy00D3f5dMgE.json': 1, 'PXjTMJJVqp4wNDRSsY8yGfUg7s-vB.json': 1, 'PQESlzgesuFywpq09x-vZ0gikcjPf.json': 1, 'PsSeIDk6uhcGoW866GKAE5f4Gdtqm.json': 1, 'PA3s37bS9VLUzI5wYL_ntZ6RIM6IJ.json': 0, 'Pd8NbWESyDFGm755Jm6U61hsrazlN.json': 0, 'Pq7vNFBP5E7P8VFyPzOthtZooKSuM.json': 1, 'PZi1a-gfYEBLSrXqseQD-dlnlazge.json': 1, 'Pr--SRlH1qFR2AnYbF4MR1y_OUXms.json': 0, 'PM3KjHYJjTA26va4uYXD8homH7pUm.json': 0, 'PBdCHzVuP82DDSDC9glLQkEkRX_Dg.json': 1, 'P6N-eaR5japcqjIGylr67mAGo9L-S.json': 0, 'P3D-yjWlplr00iJzD0jpj6xnK_pnt.json': 0, 'P7iYCa5JevBLGADoCKAoOaF0nFUO4.json': 0, 'PKjQBZH36_3OFR3sS9X5LDFapa7_l.json': 1, 'P6GMfPCT_Fa40hXkVKpqnygEBt4PG.json': 0, 'P7tDShYhctLDctLbOtKmcyqPSKb8F.json': 1, 'PaVXpIzbRprasYL7BRTZmwlVsDhOg.json': 0, 'POIYfYCEIron9yzowfHWhVea-VEFW.json': 0, 'PeXgyF2iElVtNWSX9xZhroKK8nJJ4.json': 1, 'PshguFKUbvULqOUN80QC-M3xQvrmJ.json': 1, 'PTMsm75_4_mTeOp-ZqKwELi5AZJjG.json': 0, 'PjttX917PdvN23OPbP4meFLTxFyiA.json': 0, 'P1npjtbQvYJryIdCVr7A5bLuB92I8.json': 0, 'PE-xWTZBGVPbkB3pEz13pBVGfuQ9V.json': 1, 'PULp85M-UCJ52e4UaGcyeLDmUeq2Z.json': 0, 'PgokXXW-4n2bjifiDJOlcPmRvR_gx.json': 1, 'P61syuVJiwpDUi_iFXsTiR8A4_Ept.json': 1, 'Px5L7vFfYAzveTc64X7aBPpaeAIXQ.json': 1, 'P5q6OPnbkCI9OZnxRMmigkwjECTEe.json': 1, 'PcEVZM__6FdZcBl5qRX2AhXVwATd6.json': 0, 'PSJLaDGG-ZjQ2AbtLBMh16MMahqq0.json': 1, 'PyZx6YXIIL_k6TI2P2L5ruaEybXQ0.json': 1, 'PKgyvXgvh16SMPSfMST5MEZb7gz2m.json': 0, 'PUekKvRUYVY2izaU6s1-zuu1HOuEB.json': 0, 'PfriiStl-VsdutzxaiQ6gu0GrEo8j.json': 0, 'P4cO4pMN37FYnUUXkndLeppSKPSug.json': 1, 'PpaIiiL3hNHhTqnEvBluE99enMJzC.json': 1, 'P9MApYPzfTiXtNapthDJsWbmS5DsK.json': 0, 'PC4jwHwSTdNEilYtIDuuNIRBUH_Df.json': 0, 'PcYC-NeMnx_goUeYg8PmaNVo0chDc.json': 0, 'PNncnrrFjKexj2npi9IYt2nFQtb0C.json': 1, 'P2R2zt0BhVSznHmW3cpI9l0P1mBrw.json': 0, 'PvEU0OOwFN7eFqiwt9m9S_SmhCJUm.json': 0, 'PeXUCf_QcDwfIhLJTg61D3lsjvJQu.json': 0, 'PIwvZmuUIIrtn2HcPLoozMo73I4uz.json': 1, 'Pd0rxgG8--j5fJtD3DAYEFPOuNkQ9.json': 0, 'Pfn7jiSSIeavylABbul8tjCNPqnd2.json': 0, 'P1QuPWYnx2aHsxcIXA6OV2PlWJhs0.json': 0, 'Pw3ao50E0u9EV1Kb8W3-o-fSnuyxs.json': 1, 'PvnvogMtS10NbBK9FldNY5dQdHw59.json': 0, 'PKfJHS4WQGppgde2dACUjMuVoL2sB.json': 1, 'PmE5o-ZLwkq-n_SH-wIAZLJGubKVL.json': 1, 'PDFmpTq6fMFhnFRo7ELE213yB7pTB.json': 1, 'PnEsMeo-vlIeTtWv24tRFU-Q1EftP.json': 1, 'P8BMwwn-g_0Xezs6oK3ay6ZRXIRR-.json': 0, 'PdD-UDb1jYtTKkeoz5Zw6p_et-Qk_.json': 1, 'P-M1B6jU_t-kPPKkoFU9kZkEbx332.json': 1, 'PmDSCGduCzT1NUDTc7_F7GUYKwMSl.json': 0, 'PM_ADyGOaL4e2biSXvxQWrEDM78Z3.json': 0, 'PXMJlwAWsJ0P9OvddIPOp-T-GFSpQ.json': 0, 'PNk66wVTDAlR3N8YkBb09KkYDaAqO.json': 0, 'PKU0qwquN5MyjzxNfs9CmVg3lgPnN.json': 1, 'PU4cjVlkSYM6E2rZddqNYsFc6qVLr.json': 1, 'PX9Gfq-52QFCVvObVISfB1mGSC5lk.json': 0, 'PEzbospti8vAm5rZ3goW14pH5N84g.json': 0, 'PlrW3wNN03bq-G8TLkXHpALwSTUUg.json': 0, 'Pgp41lL_llCr0J_pPbjFLZ8vJtVcW.json': 0, 'Pd5Tx2nPg7dFY-jys9XwKne6OQtKX.json': 1, 'P59cqRWbaOzmGSJM1lmhu49MnHVPJ.json': 0, 'PB2d6p5N6fZlv52diulCvGiI5ZnXF.json': 0, 'P_Gi0Du_EimFdtkdUQo60Pnb74AwK.json': 0, 'PbEBUdSky5x2sDA27S7gDzzi_ZCqy.json': 0, 'PHfNgOoPEHjzs9iOh900vIUv-GVJl.json': 0, 'Pp0PwQW4BESg-ugUEIswLJCK9bfRX.json': 0, 'PN3Luxvm6NoKZf6r_dUMtTmBll7fl.json': 0, 'PwvCCPJoEa2GCNIdF92L3ogye-l9W.json': 1, 'PyfSb77pMQdeAtLtlfyrha1KsJcU-.json': 0, 'PLPdSXNacNTguhHkUvVUcFxVKvRkb.json': 0, 'PaRKW4ABNyoYx0yzRpj4m37mE3dRL.json': 0, 'PIMuiMibtaFE7AUR9V9fwWcB3gGlk.json': 1, 'PLoQIJtvhgUQcXFhb0k_6mWOPV9NI.json': 1, 'PvVO9tQLBCG0HkDvYoSa7pZi8L03V.json': 0, 'P9nX3aGiN1wL4gjkBXHckFEKF-C-0.json': 1, 'P3T-5q-WY5kicRwq68Z5vt9r9UQOZ.json': 1, 'PrTcNbJ50u8bqAFWGjPJKqnuuEvY7.json': 1, 'PrZEVfU48Ok0DkJYiZWjo7Uu4ZNPM.json': 1, 'PjGykEyzLOFynTPTNDcycF0GYg1PE.json': 0, 'PaqU_UGMSvVN6niB3zqMYchjsLHRX.json': 1, 'PUC2t35p9KOEdmaAyB7I91DoUyae7.json': 1, 'PE1nwSdSH7CjEtpj369FF7Ub224CS.json': 1, 'PntsftgOxbpDkBPfVA5M-3L1gltnF.json': 0, 'PI1l6EUW49lM0yqNfKIW_8YNz43cD.json': 0, 'Pbuu5vBZ5l9XZgNoome_SAog3R6_P.json': 1, 'Ps_usjdVG82_PRXwbzTSXPNLbqTM4.json': 1, 'PWFy-zDYkLeeQwiJkNeD4dmbc2_RM.json': 1, 'PTKoi_zgEHYBObh_mAofPkL0WcxfV.json': 0, 'PD5kT_UMiDnnDqw5Fii6EJnvDAhu5.json': 1, 'PgwIwxduxdSYh7VUI5Cin8VPwog-U.json': 1, 'PUstkc3k93VJEpzaCQckqXYxoY9d5.json': 1, 'Pv4l5-nI7xyQQgnAULtpVXTuXvZo9.json': 1, 'P-HEsan-20QaX7zom4pOECxn93Xuv.json': 1, 'Po3ciNtT6VKrKZ_GUD9Ngs1P_pWdB.json': 1, 'P637RHpEFTPACk1tU2hjnyV8jabHZ.json': 1, 'PTj4JdUchb1YV8Ot1EuQz9RRZ_zsi.json': 1, 'PtaqvfbaCJBTdJ-D6pOBWQFY4TA92.json': 1, 'PvdyoUeHjzvXOsNHVJ0DzCA4-OLgU.json': 0, 'PwTh1t979bFWSWD2gFWLF_rVtJKv8.json': 1, 'P_50hcPodt1aNmFzsITuX7AtXgFm8.json': 1, 'P98cJ4COrE0nC49_f6J_8oXadcvQ5.json': 0, 'P3lAsieEKDHMCWGzij8oBKHuLxdhQ.json': 1, 'PDo80JzU-2kWoslVbytJn5K06MCDB.json': 1, 'PuDaQiKxiQDb7zTJDgoR7d68HaHZ-.json': 0, 'PIg7fVwercF8ppzNV9Xc-D6rHrPBt.json': 0, 'P2R4Ds9DFm8USF_AgHtQnWK1TkQiR.json': 0, 'P2i3OEfdoAe9zE6h_UjlwVBAFnhR4.json': 1, 'PqcFQ9G87WK6Bknt7CIg3Fs1RpcOg.json': 0, 'PObnJFy28ZEVFLwGtKU0mvkRRQZjL.json': 1, 'PM6SFemuLMJTn86Hwq3pK4qUIz1FO.json': 1, 'P5kWJ-_IA0esNnHEVKmyB8YThboGM.json': 1, 'PvXv1VaHYDuXDtBjOvVFHSIo8KDe_.json': 1, 'PG-8-aU3tGwQOpQAkXpDE4kh7oFUu.json': 0, 'PRGn8J2bANEg34dg6ZexE0vtuC9qS.json': 0, 'PKUz1_qykpLy_iKM-at6yErVDGuXD.json': 0, 'PGRvHpDj8bRbzvIL0c9yfOmeZjfah.json': 1, 'Psp5ems1_6Ym4LxSMMccmniNRwqmG.json': 1, 'Pah-IsYOZaVexXAAnva9AI9g4K7J4.json': 1, 'PLJBz0uY-AywnUhGMCXMounM-_Af3.json': 0, 'Pp-9DTkK5y5w7fFZOf-5JJc9SCPD1.json': 1, 'PfGXdJkORwLQ-aX-d9bla7obqtnkt.json': 0, 'PxHkLq1KNzXy50hbEPelPan0cCrsH.json': 1, 'PtPzGOtC64C9WwpqoUjnlET1liwRP.json': 1, 'PGXDWl2OQ0kgll1vPxgzVIsqkZRVw.json': 1, 'PHVp92aBkGfm0k9hHegF1jV8-yvTB.json': 0, 'PMJpnG8BCILqYJnchIW33Ed_UuJMp.json': 1, 'PGaBejXgXHOs8UZRXsVhWRCQbkxcM.json': 0, 'PpirYHOsv5hWdfS67NmlLQnsErVtE.json': 1, 'P968a3UNnlWxITFmln20QhkHjZw5g.json': 1, 'PQop2sIonKVP1brGc_Tyc2w-tXgWC.json': 0, 'PeNVJMwKP2vxA1csj3ud2aAy6_IXu.json': 0, 'PoEQrdbxDvcCldS5_cpSOcAS57svB.json': 1, 'PPPP6oMBhLin2e8blRUq-HCgMPPnN.json': 1, 'PePY_AxnNesGLT-oXSQ6YrfL3KQ51.json': 1, 'PyYs922_77iFm7C9Hkmrm3WVCgJVz.json': 1, 'PksL8WMjeyH48ASaf_2N2rArnbcpm.json': 1, 'PZo5v3_KRI2CARrYsoiYNun-FaJCd.json': 0, 'PWNXU92VwL7KkuoxItglRiuifcOnk.json': 0, 'P39GmzBY478BzuXrZM-0i2Z-njyb9.json': 0, 'Ptpvh5js0VFVoWzSUEDFHTlBfHVNY.json': 0, 'PLEVKXGFK3tSrsoxI239OUDT-BhlK.json': 0, 'PNJZdIRPWJec5fnfTQeqjAl1bz9HE.json': 1, 'PXzBJpz_9Xm8but9lAU-QTG1l3JG-.json': 1, 'PtK2dVkfkkAecxHR-fu9nM7xJMBBe.json': 0, 'PME2sPwrfVW7U0veuObWai6ryPqou.json': 1, 'PCzbqK1n6GzX8GyWEPgewdRB7D28r.json': 1, 'PpW4Sdukh9x0m4oi-ylmZGthwggDC.json': 0, 'PnGFgLyi8ym270zZvki0lXK9YWZ5v.json': 0, 'PM31UDFGVjFJNN7iE3LqiFn0e9VWo.json': 1, 'P2ze0u76hy01VhI72b5xsEElnwoMW.json': 1, 'Pws96oc5f7jIltD9Vvqc3svzL4mcW.json': 0, 'PezFp7D_Pzi-KwwYE9WlnFWtpTP_2.json': 1, 'PO_XGXqigFL99ylxexVNhDZ5PfKvu.json': 1, 'PpO7f29KViq-m94_iFOCm3MWNHNsm.json': 1, 'Ph0s_j9HFJx7teShXuRgk5kfqwkd7.json': 0, 'PpX-O7CcJE9rsHhYvihgOK6zXZhy7.json': 1, 'P2UWUM0j7OZdo6gHhUenhSEbeJz3s.json': 0, 'P8nQ1bSGP4pyRMOa4i5Uhjpb1Mord.json': 0, 'PMbzdub7JONozp5LPWlPqLbGuLt3F.json': 1, 'P7cszL7O262ikDi1WReqYl2TxhmtY.json': 0, 'PoUAXow1mqwtcC9bm7GCB3lc3wJ2T.json': 1, 'PCeh79N53GyBSPmZQQJ97G0eAHaDT.json': 1, 'PiK-8qiH845cNG77MSGGJyAea1WS0.json': 1, 'Ps2X-UggBtvP5-cTr-LtiDuiGCyd_.json': 1, 'Ph7OdXYR4ndMpTcR0zX4mqRoBZpP9.json': 1, 'PAzsSjYMU1-CdGulNpG_KzgFlfRrK.json': 0, 'PIVf93pzkgomPNmJAqjF8jgnPxgEx.json': 1, 'PYOw5h3ttt0tMyUPOvqDPc6yArPTy.json': 1, 'Pb4Ku0TY7IkW9pjHBECQguVhvtd6Q.json': 0, 'PwXFVrN5zPsZq5W93S0r3XPR3O7kq.json': 0, 'P3h_7kvACoe6Y_tCqn7qv1WBF6VVu.json': 1, 'P-eZyP4BB8uo0pdmQIIrat2mhXQBN.json': 1, 'PTpMBViuehNYAOAo5ox_vXvwdEWD1.json': 1, 'PHQG6-EPlnROo0wmc11YFOLefErCO.json': 1, 'PYIo6-sZn8haekxnm1M7mCyFTamwn.json': 0, 'PQjeViDKC6seu_D6IlPOz-_SWPsHO.json': 1, 'PkUwSxY7ro62M6SUfGJGZJTa1z1G0.json': 0, 'PKgIDFRZLvLCMTdUG7t_ES-lD1QlV.json': 1, 'Pjd19lro2qcM4zsli3h0nZPAhUOU-.json': 0, 'Pbbk1pS1BouVz38e8KIWOc9qTCCVy.json': 0, 'Pi_wnaQYizXhKxBGC5WG_WnoyePzR.json': 0, 'PNXyczNslCGZT642R9ZFYGvidFvua.json': 0, 'PgB09qOYS0rEZnG1SnckisCEC92FU.json': 1, 'PKSpxMXqdSstTt6Es26kroYBYENnq.json': 1, 'PFs1SxWG79Zqj0jssdOIqUicZk9aH.json': 0, 'PLhyjPYNTBhFrbHsiXMEzsGfSy2wW.json': 0, 'PtLaAh7PvZNi48u-deMZN1_FpyFhr.json': 0, 'PB0yzgD_PWA0LKTKGJ8ZZuD33YEUG.json': 1, 'PreRz39OuZP3DFXY_VGzWEhXd-hvl.json': 0, 'P9hPe8YxrhWURUdo95fGT6lJrqjjS.json': 1, 'P5ZXcG85MQ71av4TAhPdi1-yjULV2.json': 1, 'PN7Y9yOIWA8rPdhvXupDFyvuZazWn.json': 0, 'Ps87AQ5hXB3Xv9fQeCbQui2uPWmQa.json': 0, 'PxmxLPfPb9ZBnqwyYd-a9_tAZwG5k.json': 0, 'POiIM9Mn0vj2CQLl9fS7-ivqpF6BE.json': 1, 'PfgDGZGQLelhbTh9ZtsKqWGFxvhJ9.json': 1, 'Pi1rNqBwWwWQBy5RoGVMcJaix-ISM.json': 0, 'PEC0GOHh7MviqeJkG1qukjk4bALIS.json': 0, 'Pw_IIkH2JKiMVfEPudN-2fgwQic-U.json': 0, 'P-f58FRyhOpCOSEIlDGqoZccFhm10.json': 1, 'PSsOgAYb96UbwSxoXNthXWpL4QVjn.json': 0, 'PnHs4FfrK6z9qKJ02NfGlnTNd3UY-.json': 0, 'P93H-Xi385RvOeiNOl9pG1-KUaUu-.json': 1, 'PRFauEFX8CcvxDcSr16cBOWKwrCpP.json': 0, 'PV-EaLkHV7U3gBdLBLIWo_dJcp5z_.json': 1, 'POkiC3-2nH73ON7WCEvCEJmExK4km.json': 0, 'PIc69NUMUydBe0gKZCwXZodCQyiEx.json': 1, 'POuF9dKizFs7vX5_QEHwYXIrPdaOn.json': 1, 'PUcFCGgEnxeFQIWTg8qeByla9jJJg.json': 1, 'PBZzfPkZSAGi6I1RlGOhxsf1mJlPX.json': 1, 'PAlWHa4oJtvotPEJZkbrlNC_sn0h2.json': 1, 'PMxYGoRCMDXQWrNytWJHc-vUgRKTT.json': 0, 'Pg4Lo5RY8cWWojQUOg9ikurdCqPnb.json': 0, 'PxkyksXrwYuxnJ_wD7qN890rycd67.json': 0, 'P0e8gRRxOvcJquPDa7SeYFk2OCiFS.json': 0, 'P5jJtVTioJjwBMP2PW_IsNKKVdW7Z.json': 0, 'PFA5P5DSBZ2zFKpQzBcoS-RbxTvRH.json': 0, 'P_18Q5thpEagvBD-4tUdeTopJwCTV.json': 1, 'Pc7rmjLYL-lHCvp0Ju4eVJz4c_HVT.json': 0, 'PwkG3AIkoRlHzcqvNLvBUhDV3QjE7.json': 1, 'PN0ekL4w0k3A5OXacRBScDJ9KlGMf.json': 0, 'Pl7aTuAjyxpsJM7vLAOVHYwJm-QE6.json': 1, 'PdT5H12KAPM2kUpdKJh8FKk9EqbnQ.json': 1, 'P88rL_6LG-nPA6rCsmkYVB9bbRJ-E.json': 1, 'PJCQRMG3IdKvMM1DR4porlYnzjl1_.json': 1, 'P6jwD2mlOGFmfLghkR9DrrClb3ps6.json': 1, 'PbkfMbBiCHK_OMYyAQBlwTstfBC7r.json': 0, 'PUT_umVDXGUamLH1R7nkazwKz95dz.json': 0, 'PXBRH00-vIBocEX5U_R9WSMSHxViy.json': 0, 'PKvGAclzzmH11irjVh9Dw4nk1OM1-.json': 1, 'P04Ncsa25MiZvghu5LhvC9fRBisNV.json': 0, 'PavCzBt15bIH5NeKUXulmwe7uQyAM.json': 0, 'PtUMWvtXY0rBUsbqbZHaIA1RGrg-e.json': 1, 'P1VHP65IGnLTwiEbMx8lvR4sp1f-M.json': 0, 'PzrDSosEgg4xxfhsY5YLcIn4fnCkK.json': 0, 'Pbcm08hn7AyrDM-4QacqryJezG4-e.json': 1, 'PpSDMwJm8GTUsJU6qRYQM569ENs-u.json': 0, 'PuWb_MONq5iNGnOd5BGSPwre3CdAA.json': 1, 'PSpjyp1ll14qfZF4iQ-fq8tdDa-yj.json': 1, 'PIuDLVu3WXtuPhrJjiOYQ_4NxSEDQ.json': 0, 'P6Fee4lNtTjJ86jkMza-ssDM0uWck.json': 0, 'PLtqc8pXS8VUbIW6ZlBHndHrNnnJD.json': 0, 'Pk3n3PTL3LWgxmxpob6yx0tIcTHYk.json': 0, 'P6hbXXBKRbqAzJR2ZpCo7Y0VgPycH.json': 0, 'P6cR7s5zutDkCpkL5_ISynE5REluF.json': 1, 'PHG50HtPjrXvkxeCITsjzFtq9N4hK.json': 1, 'PWhzi9DNdlLhbFvwBSbZjI0PduSUI.json': 1, 'PL29ez9ZeDWGozHzOxGU_C8_7eQAl.json': 1, 'PaS_PmxIz-YpWUjS9jvwRRtAysL9u.json': 0, 'PNAsDREwnbkpZVF_9QJrFNljp--lG.json': 1, 'PsmYUa8-6qr40jG7XJhUIynL1Ue8b.json': 1, 'Pw2L4z04vahlUrc8ky3zD6FJ7sSMJ.json': 1, 'PJeug39TJz_09ykZWJOOb0E8SyuQ_.json': 1, 'PBCUEqHB1NtCUecpCJ7m8IW0L5Yob.json': 1, 'PbkJ-LOXCmwltwIWDXwnHWXpySRVi.json': 1, 'PemnJb7MwviOIbaNQsIOOrpTV1LTK.json': 1, 'PLZ6DdwR1_Z_Q3UESPBeT1cUI8RNG.json': 0, 'PudDm0on_-EHhn0SHX20l2vdbSQ1x.json': 1, 'P6yphNyqSkgI5fn1BBSG7gx1z5JXM.json': 1, 'PGsPQn1h36VyBTthr3CnA6yAtlzs3.json': 1, 'P70Lde1aQgrCKmHfwD5D05nSo6t_G.json': 1, 'PmdwXyuKIfDeCUp_449wd2Gu16oS4.json': 1, 'PPX3SLLIpN1rvy6fbMdip6F6y-pE9.json': 0, 'PKxrqhmCuAk9Wx7BrTJoNmuOpdcwL.json': 0, 'PJz4SOdD_cp-YPSfaJ0QWYOzYiZB7.json': 0, 'PZDqowWXfPeAJlyWl-BfykTcmMyxU.json': 1, 'P1BAEb65EOUGQVqFJdH6qMrEU0v_D.json': 1, 'PmUPyOR8xmkEw1fRGQWCqcXcKy1Za.json': 1, 'P7bJxHCBQEGA1DMS1cEFZw732CvhU.json': 0, 'PvVLlR_Pq2Ibks3hWK2HOSJ1GgVRY.json': 1, 'Po4TFqVuLhanZRORPTA7dDA2sdbrg.json': 1, 'Pik5iISOEpKagpEazTUTYzeYt9g0E.json': 1, 'PaFwH6Mxuc4Fm1VOwffnIw4bMYJSA.json': 1, 'PyBnwEdQ98isxcx9_miHJ2Tr82JrN.json': 1, 'PRsNV08fCo-3wKSAzyIYfTUV62Is8.json': 0, 'P5zIe832SKPcGzRZm12e-EwE2dbtO.json': 0, 'P7D0j_J53oLmtlviT_Cefsr4Vg5bV.json': 1, 'PkP9vxbD_d5in7JZZd-W-Rv7yvYzJ.json': 0, 'PzZe8HJ1RoiT6LBluiHmTN9IDP6vE.json': 0, 'PC1VFDrupGK9MpjO0l8P2A4dkIXls.json': 0, 'PwauU7FX0xX0l8t0x9-rBv-jfhX43.json': 1, 'PtKO4J_Hkg38-7_w3akAcgfQtZFJf.json': 0, 'P3486jK16L4wlXG0B4v1-csMQ6oJ3.json': 0, 'PsOQOxi1mHPSx77u-Z3IheNYKwZuR.json': 1, 'PmmsPJ6ouZjFnoIdGfis_3AHs9clP.json': 1, 'P32Cr0nNUje-awEBA_iYhB5E8k0LF.json': 0, 'PsXvQuNrE_kWf3m5gZMW3oCbwfjIR.json': 1, 'PmkSmszyXIzY3yIzTUnkvOCwqNFFg.json': 1, 'PjnYo1reGivMhNCaIuP2LLa2uce0d.json': 1, 'PSvyfO0p4QEfhh7dUujLdUg8lCNs0.json': 1, 'P4UTuxP1N454rqYkrE0I2MlX-IASm.json': 1, 'PKDq0yCCgH8VdiPOaL2TvAkEpPptZ.json': 0, 'PmoMXOUaB34pREbdVVtkGycE5zDvI.json': 0, 'Pdq_8SfcqhpOYcIVCC-3lyCNxLohI.json': 1, 'PVts8uHqxpDbU2yflInkvA1njw6tb.json': 1, 'P2QIwEybzk3teZ1wJAuDAgbo3-06j.json': 1, 'PkF7foQ21N_jNoFZLZYgDT_bXRqDy.json': 0, 'PXg9kxgGnvMgfgMR8cHy0NpWTgy7t.json': 0, 'PMQV58NoHJ5PKgXMdogKIRF_6bd0l.json': 1, 'PWf1IVKCutMHwlGwn00mSQT0TBVFu.json': 0, 'PokNGy5MbvPoNIi4g95YgX_oF4AI6.json': 0, 'PRZdkORGZio1WUV8YMccbmPB9omU3.json': 0, 'Py-J0ezaQ_Fdsh_196hT-XgsYNQAs.json': 0, 'Pm0Gf6lIzPue8OAEpIj2CY-MjrW1_.json': 0, 'P1hsRXZoO31fZ726zPC19M2IchBjD.json': 1, 'P-1SH_T1kd13-U3MEB7Xz-_eToBHT.json': 0, 'PctpEiY3VdEmVYwH7UjqZpiDWZtpM.json': 1, 'PggxgoQvTcvQ_OziM0ALxuIlEW4zv.json': 1, 'PSxDwmOLijdBpg8SE7aLTMbLH_M2B.json': 0, 'PKhAdygZBTTTF8uvQjKv1RdaX-cR-.json': 1, 'PhrmrSwFsUZS43HVYEIwNwIcH_bGL.json': 0, 'P-5a3HM2tzm4TZRT8MqHUORDThaxZ.json': 1, 'PGGv1zwW5aHnCvE2vuE3vTi7YLI7m.json': 0, 'P9HwBVH9CaRy6exyTIGnjtUmzmRxD.json': 1, 'PHQ9WIyu3N7whYM_ykFZunv5to3l2.json': 0, 'Pb8vuZvDnRf7L1t9-HYL1SA-cBznx.json': 1, 'Pkole11VWAOiu91qHeq6lOzIM2Y1Y.json': 0, 'PRakENtX-ME-LrbIo19w0RDyRE6Bi.json': 1, 'P2_H4gO4T7T7jknE474jzrc1Y4Tjm.json': 0, 'PECMSMMNgxQUVLxlv5IWYEvWOatMh.json': 1, 'PMdwb8G6qE_w9GV73s4WADUUiO3Ow.json': 0, 'P0Zgt21TvKKb18vKKFKXYNI-bDofb.json': 1, 'PmZXzuUS9tBEsY3cQ1ppLlFBBylKK.json': 1, 'PwNFktthJ7FAQ-kdfIaE1FTHKm16k.json': 0, 'PrBk6Yk4imlzJ3ZkTHw5wQzzhSpa9.json': 0, 'PlIiyctCzbm5lbDOxpwEi3GbORHRD.json': 1, 'Pbi4eA_5TNj-4lc02-e4UchS2JLOE.json': 1, 'Pd59Ct9NquOpVlnBWzHIkqL-KCpPY.json': 0, 'Px1TG1Yl6-GfyUKPALB2XCyQL-3Vb.json': 1, 'PiUK-dm7gGHW6S2PY1e2VHjmZKNo9.json': 1, 'PYFKq_eZqBOQ_HP_slre4S73GifoV.json': 1, 'P1nqQs-SCZqNmquE38tL8yCjwlNlq.json': 0, 'P-R6dmrIaT8iFyy2ObACxIHGWnNOy.json': 1, 'P49a5P12dU5LYRyFCHIIWWy_T06lE.json': 1, 'PCixWw2N1oGLRxmKipJTwVacQaqeB.json': 0, 'PaMvDXJtsbfDgbdvrFdiFSKpXNYyC.json': 1, 'PHa_j8Evb4M9D5M-HJH9W35Xb9ZYN.json': 0, 'PMYyd4kzUba5KWtNGyKi2wRxPDYIT.json': 0, 'PfRliiluIbFP2-oOilrPeaJ03C2PF.json': 1, 'P5Dt8zW_iTRbBVDA9ni75tK04cnY-.json': 0, 'PkUHwbLggPfSBV-l0Y0MueTrDl9QZ.json': 0, 'Pb4jnAWzhAL1kkV-J0QHJTsWUtBCj.json': 0, 'PmIckQn6O363Kc-OiU_12SGgiRDKs.json': 0, 'P9Yuhn2S6hqpJ0cf9E9uw5G5bJlzV.json': 1, 'Po9WRiXMFfObrZOxtjQRghRgJeGke.json': 1, 'Pn-jKNaG1IM7sKsxBh-ekfl3M3hIa.json': 0, 'P1V7ir8w84gGjrpqH5-nhYkTy5VuH.json': 1}",
                    "    #target_labels = [1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1]",
                    "    def get_set_target(ase_struct, nmd_struct, frame_idx, json_idx, json_file):        ",
                    "        return target_label_dict[os.path.basename(json_file)]",
                    "        #return nmd_struct.energy_eV[(0,0)]/1e5",
                    "    def get_set_label(ase_struct, nmd_struct, frame_idx, json_idx, json_file):",
                    "        return 'Rocksalt' if target_label_dict[os.path.basename(json_file)] == 1 else 'Zincblende'",
                    "    label_name = 'Structure'",
                    "    target_name = 'Structure type'",
                    "    target_type = str",
                    "    target_unit = '' #'0=ZB, 1=RS'",
                    "    legend_title = 'Energy'",
                    "elif options['run']['config_folder'] == 'gdb':",
                    "    data_folder = None",
                    "    json_list = ['/home/beaker/test/nomad_sim/gdb13_7k/dsgdb7njp_ase_attributes.xyz']",
                    "    data_file_format = 'xyz'",
                    "    frame_list = [ i for i in range(options['run']['n_blocksize']) ]",
                    "    frame_list_idcs = [ (0,i) for i in frame_list ]",
                    "    def get_set_target(ase_struct, nmd_struct, frame_idx, json_idx, json_file):",
                    "        target = float(ase_struct.info['ae_pbe0'])",
                    "        nmd_struct.energy_total__eV[frame_idx] = target",
                    "        return target/23.045108 # convert from kcal/mol to eV",
                    "    def get_set_label(ase_struct, nmd_struct, frame_idx, json_idx, json_file):",
                    "        return None",
                    "    label_name = None",
                    "    target_name = 'Atomization energy'",
                    "    target_unit = 'eV'",
                    "    target_type = float",
                    "    legend_title = target_name",
                    "else:",
                    "    assert False # Unexpected config_folder",
                    "",
                    "logger.info(\"Converting data (%d archives)...\" % len(json_list))",
                    "ase_config_list = []",
                    "nmd_struct_list = []",
                    "frame_list_idx_list = []",
                    "target_list = []",
                    "label_list = []",
                    "z_count_global = {}",
                    "for json_idx, json_file in enumerate(json_list):",
                    "    nmd_struct = NOMADStructure(in_file=json_file, frame_list=frame_list, file_format=data_file_format)",
                    "    frame_list_idx_list.append([])",
                    "    for idx in frame_list_idcs:",
                    "        ase_atoms = nmd_struct.atoms[idx]",
                    "        ase_config = AseConfig(",
                    "            ase_config=ase_atoms, ",
                    "            config_idx=idx, ",
                    "            config_file=json_file,",
                    "            datastring='') ",
                    "        ase_config_list.append(ase_config)",
                    "        frame_list_idx_list[-1].append(idx[1])",
                    "        target_list.append(get_set_target(ase_atoms, nmd_struct, idx, json_idx, json_file))",
                    "        label_list.append(get_set_label(ase_atoms, nmd_struct, idx, json_idx, json_file))",
                    "        for z, n_z in ase_config.z_count.items():",
                    "            if not z in z_count_global or z_count_global[z] < n_z:",
                    "                z_count_global[z] = n_z",
                    "    nmd_struct_list.append(nmd_struct)    ",
                    "    if len(ase_config_list) == options['run']['n_blocksize']: break",
                    "",
                    "# COMPILE ELEMENT TYPE LIST",
                    "if 'specific' in adaptor_type:    ",
                    "    element_types = [ soap.soapy.elements.periodic_table[int(z)].name for z in sorted(z_count_global.keys()) ]",
                    "    options['descriptor']['soap']['type_list'] = element_types",
                    "    logger.info(\"Have element types: %s\" % element_types)",
                    "    if len(options['descriptor']['soap']['type_list']) > 10:",
                    "        raise RuntimeError(\"Element-specific density requested, which is unadvisable for the chosen dataset (too many distinct types). Abort.\")",
                    "json_list = json_list[:len(ase_config_list)]",
                    "",
                    "# CREATE GRAPHS",
                    "logger.info(\"Processing data (%d structures) ...\" % len(ase_config_list))",
                    "logger.info(\"[MP] Computing SOAP fingerprints ...\")",
                    "",
                    "#soap.soapy.lagraph.mp_create_graph(ase_config_list[0], options, osio)",
                    "graphs = soap.soapy.util.mp_compute_vector(",
                    "    kfct=soap.soapy.lagraph.mp_create_graph,",
                    "    g_list=ase_config_list,",
                    "    n_procs=options['run']['n_procs'],",
                    "    options=options,",
                    "    log=osio if verbose else None)",
                    "",
                    "logger.debug(\"Descriptor dimension: %d\" % graphs[0].P.shape[1])",
                    "logger.info(\"[MP] Computing kernel matrix ...\")",
                    "",
                    "# COMPUTE KERNEL & DISTANCE MATRIX",
                    "kmat = soap.soapy.util.mp_compute_upper_triangle(                                                          ",
                    "        kfct=soap.soapy.lamatch.GraphKernelFactory[kernel_method], ",
                    "        g_list=graphs,                                                                         ",
                    "        n_procs=options['run']['n_procs'] if not options['graph']['hierarchical'] else 1, # TODO Tell numpy not to run multithreaded                                ",
                    "        n_blocks=1,                                                                       ",
                    "        mplog=osio if verbose else None, ",
                    "        tstart_twall=(None,None),                                                       ",
                    "        backup=False,",
                    "        verbose=verbose,                                                                   ",
                    "        options=options)",
                    "",
                    "kmat = kmat + kmat.T",
                    "np.fill_diagonal(kmat, 0.5*kmat.diagonal())",
                    "logger.debug(kmat[0:7,0:7])",
                    "dmat = (1. - kmat**2 + 1e-10)**0.5",
                    ""
                ],
                "hidden": true
            },
            "output": {
                "selectedType": "BeakerDisplay",
                "state": {},
                "pluginName": "IPython",
                "shellId": "A179D6D7C6984E69B25D8133A9B03D3A",
                "height": 81,
                "dataresult": [
                    "HARTREE_TO_EV",
                    "HARTREE_TO_KCALMOL",
                    "IPCA",
                    "KernelAdaptorFactory",
                    "KernelAdaptorGeneric",
                    "KernelAdaptorGlobalGeneric",
                    "KernelAdaptorGlobalSpecific",
                    "KernelAdaptorSpecific",
                    "KernelAdaptorSpecificUnique",
                    "KernelFunctionDot",
                    "KernelFunctionDot3Harmonic",
                    "KernelFunctionDot3HarmonicDist",
                    "KernelFunctionDotHarmonic",
                    "KernelFunctionDotHarmonicDist",
                    "KernelFunctionDotLj",
                    "KernelFunctionDotShifted",
                    "KernelFunctionFactory",
                    "KernelPotential",
                    "LJRepulsive",
                    "MP_LOCK",
                    "PCA",
                    "SimSpaceJoint",
                    "SimSpaceNode",
                    "SimSpacePotential",
                    "SimSpaceThreePotential",
                    "SimSpaceTopology",
                    "SimSpaceTree",
                    "TrajectoryLogger",
                    "Xnklab",
                    "__builtins__",
                    "__doc__",
                    "__file__",
                    "__name__",
                    "__package__",
                    "__path__",
                    "apply_force_norm_step",
                    "apply_force_step",
                    "datetime",
                    "dimred",
                    "dimred_matrix",
                    "endl",
                    "evaluate_energy",
                    "evaluate_energy_gradient",
                    "evaluate_potential_energy",
                    "evaluate_potential_gradient",
                    "fct",
                    "flush",
                    "idcs_select_complement",
                    "idcs_select_stride",
                    "idcs_shift_pbc",
                    "idcs_split_train_test",
                    "io",
                    "json",
                    "json_load_utf8",
                    "json_loads_utf8",
                    "kernel",
                    "kernel_statistics",
                    "logging",
                    "math",
                    "mp",
                    "mp_compute_column_block",
                    "mp_compute_upper_triangle",
                    "mp_compute_vector",
                    "multi_evaluate_potential_energy",
                    "multi_evaluate_potential_gradient",
                    "multi_optimize_node",
                    "np",
                    "optimize_node",
                    "os",
                    "osio",
                    "pca",
                    "pca_compute",
                    "pca_epsilon_threshold",
                    "perturb_positions",
                    "random_positions",
                    "reduce_xnklab_atomic",
                    "resource",
                    "restore_positions",
                    "scipy",
                    "shannon_entropy",
                    "simspace",
                    "sklearn",
                    "soap",
                    "sys",
                    "update_node",
                    "util"
                ],
                "elapsedTime": 2500
            },
            "evaluatorReader": true,
            "lineCount": 165,
            "tags": "cell_soap_run"
        },
        {
            "id": "codeGhm2pa",
            "type": "code",
            "evaluator": "IPython",
            "input": {
                "body": [
                    "#!/usr/bin/python",
                    "# -*- coding: utf-8 -*-",
                    "import logging, os, sys",
                    "import numpy as np",
                    "import itertools",
                    "import pandas as pd",
                    "",
                    "from jinja2 import Template",
                    "from bokeh.embed import components",
                    "from sklearn import preprocessing",
                    "from bokeh.plotting import figure",
                    "from bokeh.models import ColumnDataSource, HoverTool, CustomJS, TapTool, Rect",
                    "from six.moves import zip",
                    "from bokeh.models import Circle",
                    "from nomad_sim.patch_names_rs_zb import rename_material",
                    "",
                    "# global variable to switch between local and Beaker usage",
                    "# DEPRECATED",
                    "global isBeaker",
                    "isBeaker=True",
                    "",
                    "class CustomViewer(object):",
                    "    \"\"\" Generate the NOMAD viewer from a loookup file. ",
                    "    ",
                    "    By default, the lookup file needs to be called 'lookup.dat' and needs to be in the",
                    "    `tmp_folder`. This file is a space separated file where each row correspond to a ",
                    "    crystal structure with same parameters for the visualization. \\n",
                    "    Such file needs to have the following columns: \\n",
                    "    json | step_number | X | Y | target | label |chemical_formula | \\n",
                    "",
                    "    json: string",
                    "        Absolute path to the json file that we wish to read structures from. ",
                    "    ",
                    "    step_number: int",
                    "        For each json file, the frame number (relative to that ",
                    "        json file) of the structure we want to read.",
                    "        If only one frame is present, step_number=0",
                    "            ",
                    "    X: float",
                    "        x position on the NOMAD viewer clustering plot of the structure of this row.",
                    "",
                    "    Y: float",
                    "        y position on the NOMAD viewer clustering plot of the structure of this row.",
                    "    ",
                    "    target: float, optional",
                    "        Value of the target property that it is going to be used to create the ",
                    "        color palette in the NOMAD viewer.",
                    "        For example, in the rocksalt/zincblend example, the target is (E_rs - E_zb)",
                    "",
                    "    label: float, optional",
                    "        For classification, specifies the class associated with the sample (row).",
                    "        At the moment, it is not used by the NOMAD Viewer.",
                    "        For example, in the rocksalt/zincblend example, ",
                    "        label=1.0 if the structure is 'zincblend'",
                    "        label=0.0 if the structure is 'rocksalt'",
                    "        ",
                    "    chemical_formula: string, optional",
                    "        Chemical formula of the material corresponding to the sample (row)",
                    "        At the moment, it is not used by the NOMAD Viewer",
                    "        ",
                    "        ",
                    "        ",
                    "    Attributes",
                    "    ----------",
                    "    ",
                    "    title : None or string",
                    "        Title of the viewer.",
                    "        ",
                    "    width : float, default 600",
                    "        Width in pixels (?) of the webpage containing the NOMAD viewer ",
                    "        ",
                    "    height : float, default 700",
                    "        Height in pixels (?) of the webpage containing the NOMAD viewer     ",
                    "            ",
                    "    \"\"\"    ",
                    "        ",
                    "",
                    "    def __init__(self, title=None, name=None, width=600, height=700):",
                    "",
                    "        if name is None:",
                    "            name = 'viewer'",
                    "",
                    "        self.title = title",
                    "        self.width = width",
                    "        self.height = height",
                    "        self.name = name        ",
                    "",
                    "    def plot(self, archive=None, colors=None, frames=None, frame_list=None, clustering_x_list=None, ",
                    "             clustering_y_list=None, ",
                    "             target_list=None, target_pred_list=None, target_unit=None, target_name=None, target_type=None,",
                    "             label_list=None, label_name=None,",
                    "             legend_title=None, ",
                    "             x_axis_label=None, y_axis_label=None, plot_title=None,",
                    "             clustering_point_size=None, map_point_size=None, html_folder=None, tmp_folder=None, log_string=''):",
                    "                 ",
                    "        \"\"\" Plot the NOMAD Viewer using a given list of structures",
                    "        ",
                    "        Parameters ",
                    "        ----------",
                    "        archive : string, list of `NOMADStructure` objects ",
                    "            List of structures from the class `NOMADStructure`. Each instance of ",
                    "            the class `NOMADStructure` can contain multiple frames         ",
                    "            ",
                    "        colors : string, list ",
                    "            Color palette used for the points in the plot. Hardcoded to 5 values.",
                    "            Uses percentiles to be robust to outliers.",
                    "",
                    "        frames : string, optional, {'all', 'first', 'last', 'list'}",
                    "            Define which frames should be shown.\\n",
                    "            'all': show all the frames in the NOMADstucture \\n",
                    "            'first': show only 1st frame \\n",
                    "            'last': show only last frame \\n",
                    "            'list': show user-specified list of frames. ",
                    "",
                    "        frame_list : int, list (or list of lists)",
                    "            Specifies for each `NOMADstructure` the frames to load.",
                    "            It is a list if only one frame for each json file needs to be loaded,",
                    "            while it is a list of lists otherwise. Negative indeces are supported.",
                    "",
                    "        clustering_x_list : float, list or list of list",
                    "            For each frame in a given `NOMADstructure`, it is the x_coord of the",
                    "            clustering plot of the NOMAD Viewer.",
                    "            If multiple frames need to be loaded by `NOMADstructure`, it is a list of lists.",
                    "    ",
                    "        clustering_y_list : float, list or list of list",
                    "            For each frame in a given `NOMADstructure`, it is the y_coord of the",
                    "            clustering plot of the NOMAD Viewer.",
                    "            If multiple frames need to be loaded by `NOMADstructure`, it is a list of lists.",
                    "        ",
                    "        target_list : float, list (or list of lists), optional        ",
                    "            Used to define the colors of the points in the plot.",
                    "            If not specified, the total energy (`energy_tot`) is used as color code.",
                    "        ",
                    "        x_axis_label : ",
                    "            .. todo:: Add documentation.",
                    "        ",
                    "        y_axis_label : ",
                    "            .. todo:: Add documentation.        ",
                    "        ",
                    "        clustering_point_size : float, default 12",
                    "            Size of the points (in pt?) in the clustering plot.",
                    "",
                    "        map_point_size : float, default `clustering_point_size`*0.75",
                    "            Size of the points (in pt?) in the map plot.       ",
                    "        ",
                    "        html_folder : string, default `tmp_folder`",
                    "            Path to the folder where the generated html page is saved.",
                    "        ",
                    "        tmp_folder : string, default './tmp/'",
                    "            Path to the temporary folder where the images, the input files, ",
                    "            the descriptor files, and the similarity matrix are written.",
                    "            ",
                    "            ",
                    "        Returns",
                    "        -------",
                    "        ",
                    "        file_html_link : string",
                    "            html string that in the Beaker notebook generates the html link to the ",
                    "            viewer (name.html). For example,",
                    "            <a target=_blank href='/path/to/file/viewer.html'>Click here to open the Viewer</a>",
                    "",
                    "            .. todo:: Add shaw support.      ",
                    "        ",
                    "        file_html_name : string",
                    "            Absolute path to where the NOMAD Viewer (html page) is generated.        ",
                    "        ",
                    "",
                    "        \"\"\"",
                    "",
                    "        energy_list = []",
                    "        png_file_list =[]",
                    "        geo_file_list =[]",
                    "        name_list = [] ",
                    "        chemical_formula_list = []",
                    "        ",
                    "        ",
                    "        if tmp_folder is None:",
                    "            tmp_folder = './tmp'            ",
                    "            ",
                    "        if html_folder is None:",
                    "            html_folder = tmp_folder",
                    "",
                    "        if target_list is None:",
                    "            target_list = energy_list",
                    "",
                    "        if target_unit is not None:",
                    "            target_unit_legend = target_unit",
                    "        else:",
                    "            target_unit = 'arb. units'",
                    "            target_unit_legend = ''",
                    "            ",
                    "        if target_name is None:",
                    "            target_name = 'Target'",
                    "            ",
                    "        if legend_title is None:",
                    "            legend_title = ''",
                    "            ",
                    "        if frames is None:",
                    "            frames = 'all'",
                    "",
                    "        if clustering_point_size is None:",
                    "            clustering_point_size = 12",
                    "",
                    "        if map_point_size is None:",
                    "            map_point_size = clustering_point_size*0.75",
                    "            ",
                    "        if plot_title is None:",
                    "            plot_title = 'Structural-similarity plot'",
                    "            ",
                    "        if (x_axis_label is not None) and (x_axis_label is not None):",
                    "            show_axis = True",
                    "        else:",
                    "            show_axis = False",
                    "            ",
                    "        # read output log and substitute html end of line characters",
                    "        out_log = os.path.join(tmp_folder, 'output.log')   ",
                    "        outf = open(out_log, 'r')        ",
                    "        outf_string = log_string #'' # str(outf.read()).replace(\"\\n\", \"<br>\")        ",
                    "        ",
                    "        ",
                    "        # extract the structure from the archive (list of structures)",
                    "        for archive_id, archive_item in enumerate(archive):",
                    "            structure = archive_item",
                    "            # obtain number of frames",
                    "            N_runs = structure.gIndexRunMax+1",
                    "            N_frames = structure.gIndexDescMax+1",
                    " ",
                    "            # make sure each element is a list, to have each element iterable for later use",
                    "            if clustering_x_list is not None and clustering_y_list is not None:",
                    "                if isinstance(clustering_x_list[archive_id], list)==False:",
                    "                    clustering_x_list[archive_id] = [clustering_x_list[archive_id]]",
                    "",
                    "                if isinstance(clustering_y_list[archive_id], list)==False:",
                    "                    clustering_y_list[archive_id] = [clustering_y_list[archive_id]]",
                    "            ",
                    "            if target_list is not None:",
                    "                if isinstance(target_list[archive_id], list)==False:",
                    "                    target_list[archive_id] = [target_list[archive_id]]",
                    " ",
                    "            if target_pred_list is not None:",
                    "                if isinstance(target_pred_list[archive_id], list)==False:",
                    "                    target_pred_list[archive_id] = [target_pred_list[archive_id]]                                   ",
                    "",
                    "            # read-in attributes from structure",
                    "            # structure[i,j] returns energy, png_file, geo_file, name in position i,j in type Structure         ",
                    "            # see the method __getitem__ in Class Structure from more details",
                    "            if frames=='all':",
                    "                structure_attributes =  [structure[i,j] for i in range(N_runs) for j in range(N_frames)]",
                    "            elif frames=='first':",
                    "                structure_attributes =  [structure[i,0] for i in range(N_runs)]",
                    "            elif frames=='first-last':",
                    "                # if only one structure first and last structures are the same - show only one",
                    "                if (N_frames-1) == 0:",
                    "                    structure_attributes =  [structure[i,0] for i in range(N_runs)] ",
                    "                else:",
                    "                    structure_attributes =  [structure[i,0] for i in range(N_runs)] + [structure[i,N_frames-1] for i in range(N_runs)]",
                    "            elif frames=='last':",
                    "                structure_attributes =  [structure[i, N_frames-1] for i in range(N_runs)]",
                    "            elif frames=='list':",
                    "                # extract frame_list if present",
                    "                if frame_list is not None:",
                    "                    # check if frame_list is a list or list of lists",
                    "                    if any(isinstance(el, list) for el in frame_list):",
                    "                        # frame is a list of lists -> extract the list referring to each archive",
                    "                        frame_slice = frame_list[archive_id]",
                    "                    else:",
                    "                        # frame is a list -> the frame_slice is the list itself",
                    "                        frame_slice = frame_list",
                    "",
                    "                    # check for negative values of the list",
                    "                    try:",
                    "                        frame_slice = [x+structure.gIndexDescMax if x < 0 else x for x in frame_slice]",
                    "                    except:",
                    "                        if frame_slice < 0:",
                    "                            frame_slice = frame_slice+structure.gIndexDescMax ",
                    "        ",
                    "                    # check if index is not out-of-bound",
                    "                    if isinstance(frame_slice, list):",
                    "                        if all((i<= structure.gIndexDescMax and i>=0) for i in frame_slice):",
                    "                            structure_attributes =  [structure[i, frame] for i in range(N_runs) for frame in frame_slice]",
                    "                        else:",
                    "                            logger.error(\"Frame_list contains at least one element out-of-bound. \" + ",
                    "                                \"For that sequence, the frame number needs to be between {0} and {1}. Maybe you have switched the order between the JSON files and the frame_list?\"",
                    "                                .format(-structure.gIndexDescMax, structure.gIndexDescMax))",
                    "                            sys.exit(1)",
                    "                    elif isinstance(frame_slice, int):",
                    "                        if frame_slice<=structure.gIndexDescMax and frame_slice>=0:",
                    "                            structure_attributes =  [structure[i, frame_slice] for i in range(N_runs)]",
                    "                        else:",
                    "                            logger.error(\"Frame_list is an integer out-of-bound. For that sequence, \\nthe frame number needs to be between {0} and {1}.\"",
                    "                                .format(-structure.gIndexDescMax, structure.gIndexDescMax))",
                    "                            sys.exit(1)",
                    "                        ",
                    "                    else:",
                    "                        logger.error(\"Frame_slice is not valid. Please check the frame_list provided\")",
                    "                        sys.exit(1)",
                    "",
                    "                else:",
                    "                    logger.error(\"Please specify a valid list of frames to be shown.\")",
                    "                    sys.exit(1)",
                    "",
                    "            else:",
                    "                logger.error(\"Please specify a valid option for frames. Options available: 'all', 'first', 'first-last', 'last', 'list'.\")",
                    "                sys.exit(1)",
                    "",
                    "            # unpack the tuple structure_attributes",
                    "            energy, png_file, geo_file, chemical_formula, name = zip(*structure_attributes)",
                    "",
                    "            # create a list of list appending all the frames in the structures present in the archive",
                    "            energy_list.append(energy)",
                    "            png_file_list.append(png_file)",
                    "            geo_file_list.append(geo_file)",
                    "            chemical_formula_list.append(chemical_formula)",
                    "            name_list.append(name)",
                    "",
                    "            ",
                    "",
                    "        # flatten the lists",
                    "        energy = list(itertools.chain(*energy_list))",
                    "        geo_file = list(itertools.chain(*geo_file_list))",
                    "        png_file = list(itertools.chain(*png_file_list))",
                    "        chemical_formula = list(itertools.chain(*chemical_formula_list))",
                    "        label = label_list",
                    "        name = list(itertools.chain(*name_list))",
                    "",
                    "        chemical_formula = rename_material(chemical_formula)",
                    "",
                    "",
                    "        if clustering_x_list is not None and clustering_y_list is not None:",
                    "            x = list(itertools.chain(*clustering_x_list))",
                    "            y = list(itertools.chain(*clustering_y_list))",
                    "        else:",
                    "            x = None",
                    "            y = None",
                    "            ",
                    "        if target_list is not None:",
                    "            target = list(itertools.chain(*target_list))",
                    "",
                    "        if target_pred_list is not None:",
                    "            target_pred = list(itertools.chain(*target_pred_list))",
                    "",
                    "        # set the total number of frames in the archive",
                    "        if len(energy) == len(geo_file) == len(png_file) == len(chemical_formula) == len(name):",
                    "            N_arch = len(energy)",
                    "        else:",
                    "            logger.error(\"Inconsistent list lengths in atomic structures.\")",
                    "",
                    "        if (x is None or y is None):",
                    "            logger.warning(\"Please provide x and y clustering coordinates for the plot.\\nGenerating random coordinates.\")",
                    "            #sys.exit(1)",
                    "            # create random x and y (later they will be read from an actual calculation)",
                    "            x = np.random.rand(N_arch)",
                    "            y = np.random.rand(N_arch)",
                    "",
                    "        # define a predefinite JSmol window",
                    "        whichJSmol = np.zeros(N_arch)",
                    "",
                    "        # shift the energy",
                    "        #energy = energy - np.nanmin(energy)",
                    "            ",
                    "        # define energy for hover tools for correct format visualization",
                    "        energy_hover = np.around(energy, decimals=4)",
                    "        target_hover = np.around(target, decimals=3)",
                    "        if target_pred_list is not None:",
                    "            target_pred_hover = np.around(target_pred, decimals=3)",
                    "",
                    "",
                    "",
                    "        # manipulate the target to use it in the color palette definition",
                    "        # reshape for use in the MinMaxScaler (single feature convention)",
                    "        target = np.asarray(target)",
                    "        target = target.reshape(-1,1) ",
                    "",
                    "        ",
                    "        # scale the energy range between 0 and 1 to represent colors",
                    "        #min_max_scaler = preprocessing.MinMaxScaler(feature_range=(0,1))",
                    "        #robust_scaler = preprocessing.RobustScaler()",
                    "        #target_scaled = min_max_scaler.fit_transform(target)",
                    "        #target_scaled = target        ",
                    "        # provide a default color palette",
                    "        #if colors is None:",
                    "        #    # convert RGB tuple in hexadecimal text",
                    "        #    colors = [\"#%02x%02x%02x\" % (r, g, 0) for r, g in zip(np.floor(200*target_bin), 20+np.floor(0*target_bin))]        ",
                    "",
                    "        # Quantile-based discretization function",
                    "        # Discretize variable into equal-sized buckets",
                    "        df_target = pd.DataFrame(target, columns=['target'])",
                    "        df_energy = pd.DataFrame(energy, columns=['energy'])",
                    "",
                    "",
                    "        '''        ",
                    "        #7 colors",
                    "        try:",
                    "            target_bin = (pd.qcut(df_target['target'], 7, labels=False)).values",
                    "        except:",
                    "            target_bin = (pd.qcut(df_energy['energy'], 7, labels=False)).values",
                    "            ",
                    "        # one color for each bin        ",
                    "        palette = ['#000099','#004d99','#009999','#009900','#999900','#994d00', '#990000']",
                    "        colors = [ palette[idx] for idx in target_bin ]",
                    "        '''",
                    "",
                    "        ",
                    "        # 5 colors",
                    "        ",
                    "        # one color for each bin        ",
                    "        if label_name == None:",
                    "            try:",
                    "                target_bin = (pd.qcut(df_target['target'], 5, labels=False)).values",
                    "                logger.info('The color in the plot is given by the target value.')",
                    "                bins = list((pd.qcut(df_target['target'], 5, labels=False, retbins=True))[1])",
                    "            except:",
                    "                target_bin = (pd.qcut(df_energy['energy'], 5, labels=False)).values",
                    "                logger.info('The color in the plot is given by the total energy.')",
                    "                bins = list((pd.qcut(df_energy['energy'], 5, labels=False, retbins=True))[1])",
                    "                target_unit_legend = 'eV'",
                    "",
                    "            bins = np.around(bins, decimals=3)       ",
                    "            palette = ['#000099','#004d99','#009900','#994d00', '#990000']",
                    "            colors = [ palette[idx] for idx in target_bin ]",
                    "        else:",
                    "            palette = ['#004d99', '#990000']",
                    "            colors = [ palette[int(idx+0.1)] for idx in target ]            ",
                    "            label_int_0 = label[list(target).index(0)] if 0 in list(target) else '-not sampled-'",
                    "            label_int_1 = label[list(target).index(1)] if 1 in list(target) else '-not sampled-'",
                    "            ",
                    "",
                    "        #palette = ['#000000', '#990000']",
                    "        #colors = [ palette[idx] for idx in target_bin ]",
                    "        ",
                    "        ",
                    "        # initialize the zoom window to zero",
                    "        x_zoom = np.zeros(N_arch)",
                    "        y_zoom = np.zeros(N_arch)",
                    "        width_zoom = np.zeros(N_arch)",
                    "        height_zoom = np.zeros(N_arch)",
                    "",
                    "        # put the necessary info in a ColumnDataSource to use in the plot",
                    "",
                    "        if target_pred_list is not None:",
                    "            source = ColumnDataSource(",
                    "                    data=dict(",
                    "                        x = x,",
                    "                        y = y,",
                    "                        jmol_file = [],",
                    "                        name = name,",
                    "                        chemical_formula = chemical_formula,",
                    "                        energy = energy_hover, ",
                    "                        target = target_hover,",
                    "                        target_pred = target_pred_hover,",
                    "                        label = label,",
                    "                        imgs = png_file, ",
                    "                        geo_file = geo_file, ",
                    "                        colors = colors,",
                    "                        whichJSmol = whichJSmol ",
                    "                        )",
                    "                    )",
                    "        else:",
                    "            source = ColumnDataSource(",
                    "                    data=dict(",
                    "                        x = x,",
                    "                        y = y,",
                    "                        jmol_file = [],",
                    "                        name = name,",
                    "                        chemical_formula = chemical_formula,",
                    "                        energy = energy_hover, ",
                    "                        target = target_hover,",
                    "                        label = label,",
                    "                        imgs = png_file, ",
                    "                        geo_file = geo_file, ",
                    "                        colors = colors,",
                    "                        whichJSmol = whichJSmol ",
                    "                        )",
                    "                    )            ",
                    "",
                    "        # ColumnDataSource to use in the 'Map' plot",
                    "        # (we do not use the same because otherwise the glyph selection properties are passed automatically",
                    "        # and we loose the colors in the Map plot when a point is selected)",
                    "        sourceMap = ColumnDataSource(",
                    "                    data=dict(",
                    "                        x=x,",
                    "                        y=y,",
                    "                        colors=colors,",
                    "                        x_zoom = x_zoom,",
                    "                        y_zoom = y_zoom,",
                    "                        width_zoom = width_zoom,",
                    "                        height_zoom = height_zoom",
                    "                        )",
                    "                    )",
                    "",
                    "        # personalized Hover tool",
                    "",
                    "        if target_pred_list is not None:    ",
                    "            hover = HoverTool(",
                    "                    tooltips=\"\"\"",
                    "                    <div>",
                    "                        <div>",
                    "                            <img",
                    "                                src=\"@imgs\" height=\"150\" alt=\"@imgs\" width=\"150\"",
                    "                                style=\"float: center; margin: 15px 15px 15px 15px;\"",
                    "                                border=\"1\"",
                    "                            ></img>",
                    "                        </div>",
                    "                        <div>",
                    "                            <span style=\"font-size: 15px; font-weight: bold;\">@chemical_formula</span>",
                    "                            <span style=\"font-size: 15px; color: #666;\">[$index]</span>",
                    "                        </div>",
                    "                       <div>",
                    "                            <span style=\"font-size: 15px; color: black;\">(x, y) = </span>",
                    "                            <span style=\"font-size: 15px; color: black;\">(@x, @y) </span>",
                    "                        </div>  ",
                    "                        <div>",
                    "                            <span style=\"font-size: 15px; color: black;\"> Ref. \"\"\"+str(target_name)+\"\"\" = </span>",
                    "                            <span style=\"font-size: 15px; color: black;\">@target \"\"\"+ str(target_unit)+\"\"\" </span>",
                    "                        </div>",
                    "                        <div>",
                    "                            <span style=\"font-size: 15px; color: black;\"> Pred. \"\"\"+str(target_name)+\"\"\" = </span>",
                    "                            <span style=\"font-size: 15px; color: black;\">@target_pred \"\"\"+ str(target_unit)+\"\"\" </span>",
                    "                        </div>                        ",
                    "                    </div>",
                    "                    \"\"\"",
                    "                    )",
                    "                    ",
                    "        elif label_name == None:",
                    "            hover = HoverTool(",
                    "                    tooltips=\"\"\"",
                    "                    <div>",
                    "                        <div>",
                    "                            <img",
                    "                                src=\"@imgs\" width=\"150\"",
                    "                                style=\"float: center; margin: 15px 15px 15px 15px;\"",
                    "                                border=\"0\"",
                    "                            ></img>",
                    "                        </div>",
                    "                        <div>",
                    "                            <span style=\"font-size: 15px; font-weight: bold;\">@chemical_formula</span>",
                    "                            <span style=\"font-size: 15px; color: #666;\">[$index]</span>",
                    "                        </div>",
                    "                       <div>",
                    "                            <span style=\"font-size: 15px; color: black;\">(x, y) = </span>",
                    "                            <span style=\"font-size: 15px; color: black;\">(@x, @y) </span>",
                    "                        </div>  ",
                    "                        <div>",
                    "                            <span style=\"font-size: 15px; color: black;\"> \"\"\"+str(target_name)+\"\"\" = </span>",
                    "                            <span style=\"font-size: 15px; color: black;\">@target \"\"\"+ '['+str(target_unit)+']'+\"\"\" </span>",
                    "                        </div>",
                    "                        ",
                    "                    </div>",
                    "                    \"\"\"",
                    "                    )       ",
                    "        else:",
                    "            hover = HoverTool(",
                    "                    tooltips=\"\"\"",
                    "                    <div>",
                    "                        <div>",
                    "                            <img",
                    "                                src=\"@imgs\" width=\"150\"",
                    "                                style=\"float: center; margin: 15px 15px 15px 15px;\"",
                    "                                border=\"0\"",
                    "                            ></img>",
                    "                        </div>",
                    "                        <div>",
                    "                            <span style=\"font-size: 15px; font-weight: bold;\">@chemical_formula</span>",
                    "                            <span style=\"font-size: 15px; color: #666;\">[$index]</span>",
                    "                        </div>",
                    "                       <div>",
                    "                            <span style=\"font-size: 15px; color: black;\">(x, y) = </span>",
                    "                            <span style=\"font-size: 15px; color: black;\">(@x, @y) </span>",
                    "                        </div>  ",
                    "                        <div>",
                    "                            <span style=\"font-size: 15px; color: black;\"> \"\"\"+str(label_name)+\"\"\": </span>",
                    "                            <span style=\"font-size: 15px; color: black;\">@label </span>",
                    "                        </div>",
                    "                        ",
                    "                    </div>",
                    "                    \"\"\"",
                    "                    )  ",
                    "",
                    "        # Create a set of tools to use in the Bokeh plot",
                    "        tools_1=hover,\"wheel_zoom,box_zoom,pan,reset,tap,previewsave,resize\"",
                    "",
                    "        # create main clustering plot",
                    "        p1 = figure(title=plot_title, plot_width=600, plot_height=600, tools=tools_1, background_fill_color = '#f2f2f2',",
                    "            outline_line_width = 0.01, toolbar_location=\"left\")",
                    "            ",
                    "        p1.title_text_font =\"Trebuchet MS\";  p1.title_text_font_size = '30pt'; p1.title_text_color = '#20335d'",
                    "        p1.title_text_font_style = 'bold'; p1.title_text_baseline = 'bottom'",
                    "        p1.logo = None        ",
                    "        if not show_axis:",
                    "            p1.axis.visible = None; p1.xgrid.grid_line_color = None; p1.ygrid.grid_line_color = None            ",
                    "        else:",
                    "            p1.axis.visible = True",
                    "            p1.xaxis.axis_label  = x_axis_label",
                    "            p1.yaxis.axis_label  = y_axis_label",
                    "",
                    "",
                    "        # JS code to reset the plot area according to the selection of the user",
                    "        js_zoom=\"\"\"",
                    "                var data = source.get('data');",
                    "                ",
                    "                //read from cb_obj the start and end of the selection",
                    "                var start = cb_obj.get('start');",
                    "                var end = cb_obj.get('end');",
                    "                ",
                    "                // save the values in the data source ",
                    "                data['%s'] = [start + (end - start) / 2];",
                    "                data['%s'] = [end - start];",
                    "                source.trigger('change');",
                    "            \"\"\"",
                    "",
                    "        p1.x_range.callback = CustomJS(",
                    "                args=dict(source=source), code=js_zoom % ('x_zoom', 'width_zoom'))",
                    "        p1.y_range.callback = CustomJS(",
                    "                args=dict(source=source), code=js_zoom % ('y_zoom', 'height_zoom'))",
                    "",
                    "        # define the renderer and actually plot the point in figure p1 (Clustering plot)",
                    "        r1 = p1.circle('x', 'y', size=clustering_point_size, fill_color=colors, fill_alpha=1.0, source=source, line_color=None,",
                    "",
                    "                               # set visual properties for selected glyphs",
                    "",
                    "                               # set visual properties for non-selected glyphs",
                    "                               nonselection_fill_alpha=0.1,",
                    "                               nonselection_fill_color=\"blue\",",
                    "                               nonselection_line_color=None,",
                    "                               nonselection_line_alpha=0.0)",
                    "",
                    "        tools_2=\"pan,box_zoom,wheel_zoom,resize,reset\"",
                    "",
                    "        # create small figure with the Map of the clustering plot       ",
                    "        p2 = figure(title='Map', plot_width=350, plot_height=300, tools=tools_2, background_fill_color= \"#ffffff\",",
                    "            outline_line_width=0.01, toolbar_location=\"right\")",
                    "",
                    "        p2.title_text_font =\"Trebuchet MS\";  p2.title_text_font_size = '18pt'; p2.title_text_color = '#20335d'",
                    "        p2.title_text_font_style = 'bold'; p2.title_text_baseline = 'bottom'",
                    "        p2.axis.visible = None; p2.xgrid.grid_line_color = None; p2.ygrid.grid_line_color = None",
                    "        p2.logo = None",
                    "        ",
                    "        #p2.toolbar_location = None",
                    "",
                    "        # define the renderer and actually plot the point in figure p2 (Map plot)",
                    "        r2 = p2.circle('x', 'y', size=map_point_size, fill_color=colors, fill_alpha=1.0, source=sourceMap, line_color=None)",
                    "",
                    "        #r2.selection_glyph = Circle(fill_color='blue', line_color=None)",
                    "        r2.nonselection_glyph = Circle(fill_color='blue', fill_alpha=1.0, line_color=None)",
                    "        rect = Rect(x='x_zoom', y='y_zoom', width='width_zoom', height='height_zoom', fill_alpha=0.6,",
                    "                    line_color=None, fill_color='blue')",
                    "        # pass source (not sourceMap) otherwise the Box will not be shown on the Map plot",
                    "        p2.add_glyph(source, rect)",
                    "",
                    "",
                    "        # JS code to be used in the callback to load the corresponding structure in JSmol",
                    "        # when user clicks on a point of the Clustering plot ",
                    "        js_loadJmol_1 =\"\"\"",
                    "                // get data source from Callback args",
                    "                var data = source.get('data');",
                    " ",
                    "                // obtain the index of the point that was clicked",
                    "                // cb_obj contains information on the tool used",
                    "                var inds = cb_obj.get('selected')['1d'].indices;",
                    "                \"\"\"",
                    "        if target_pred_list:",
                    "            js_loadJmol_2 = \"\"\"",
                    "                    //pick from the data source the corresponding file",
                    "                    var geo_file = data['geo_file'][inds];",
                    "                    var chemical_formula = data['chemical_formula'][inds];",
                    "                    var energy = data['energy'][inds];",
                    "                    var target = data['target'][inds];",
                    "                    var target_pred = data['target_pred'][inds];",
                    "                    \"\"\"",
                    "        elif label_name == None:",
                    "            js_loadJmol_2 = \"\"\"",
                    "                    //pick from the data source the corresponding file",
                    "                    var geo_file = data['geo_file'][inds];",
                    "                    var chemical_formula = data['chemical_formula'][inds];",
                    "                    var energy = data['energy'][inds];",
                    "                    var target = data['target'][inds];",
                    "                    \"\"\"            ",
                    "        else:",
                    "            js_loadJmol_2 = \"\"\"",
                    "                    //pick from the data source the corresponding file",
                    "                    var geo_file = data['geo_file'][inds];",
                    "                    var chemical_formula = data['chemical_formula'][inds];",
                    "                    var energy = data['energy'][inds];",
                    "                    var target = data['target'][inds];",
                    "                    var label = data['label'][inds];",
                    "                    \"\"\"  ",
                    "        js_loadJmol_3 =\"\"\"    ",
                    "                // load in which JSmol applet the structure should be loaded",
                    "                // it is an array because it is included in the ColumnDataSource which needs to be iterable ",
                    "                var whichJSmol = data['whichJSmol'];",
                    "",
                    "                ",
                    "                // decide in which JSmol applet the structure should be loaded",
                    "                // swap the value between 0 and 1 to alternate the JSmol applet in which we should plot",
                    "                // only one value of the array is read (for convenience). It does not matter because the elements are all the same (either 0 or 1)",
                    "                // open the file in jsmol",
                    "",
                    "                if (whichJSmol[inds] == 0) {",
                    "                var file= \\\"javascript:Jmol.script(jmolApplet0,\" + \"'load \"+ geo_file + \" {3 3 3}; rotate x 0; rotate y 0; rotate z 0; set bondTolerance 0.45; ')\" ; ",
                    "                //var file= \\\"javascript:Jmol.script(jmolApplet0,\" + \"'load \"+ geo_file + \" {3 3 3}; rotate x 10; rotate y 12; rotate z 6; set bondTolerance 0.45; ')\" ; ",
                    "                location.href = file;",
                    "                // change all the values of the array",
                    "                for (var i = 0; i < whichJSmol.length; i++){         ",
                    "                       whichJSmol[i] = 1;",
                    "                }",
                    "                writeInfoApplet0(chemical_formula, 'NaN', geo_file);",
                    "                } ",
                    "                else if (whichJSmol[inds] == 1) {",
                    "                //var file= \\\"javascript:Jmol.script(jmolApplet1,\" + \"'load \"+ geo_file + \" {3 3 3}; rotate x 10; rotate y 12; rotate z 6; set bondTolerance 0.45; ')\" ; ",
                    "                var file= \\\"javascript:Jmol.script(jmolApplet1,\" + \"'load \"+ geo_file + \" {3 3 3}; rotate x 0; rotate y 0; rotate z 0; set bondTolerance 0.45; ')\" ; ",
                    "                location.href = file;",
                    "                for (var i = 0; i < whichJSmol.length; i++){",
                    "                    whichJSmol[i] = 0;",
                    "                } ",
                    "                writeInfoApplet1(chemical_formula, 'NaN', geo_file);",
                    "                }",
                    "                \"\"\"",
                    "        ",
                    "        if target_pred_list:",
                    "            js_loadJmol_4 = \"\"\"writeSummary(chemical_formula, target, target_pred);\"\"\"",
                    "        elif label_name == None:",
                    "            js_loadJmol_4 = \"\"\"writeSummary(chemical_formula, 'NaN', target);\"\"\"",
                    "        else:",
                    "            js_loadJmol_4 = \"\"\"writeSummary(chemical_formula, 'NaN', label);\"\"\"",
                    "",
                    "        js_loadJmol_5 = \"\"\"",
                    "                // save the modification in the ColumnDataSource to keep the information for the next user click",
                    "                data['whichJSmol'] = whichJSmol;",
                    "                source.trigger('change');",
                    "",
                    "        \"\"\"",
                    "",
                    "        js_loadJmol = js_loadJmol_1 + js_loadJmol_2 + js_loadJmol_3 + js_loadJmol_4 + js_loadJmol_5",
                    "",
                    "        # returns the TapTool objects of p1 (Clustering plot) ",
                    "        taptool = p1.select(type=TapTool)",
                    "",
                    "",
                    "        # load the corrsponding crystal structure when a point on the Clustering plot is clicked ",
                    "        # load in either 1st or 2nd JSmol applet",
                    "",
                    "        taptool.callback = CustomJS(args=dict(source=source), code=js_loadJmol)",
                    "",
                    "        # plots can be a single Bokeh model, a list/tuple, or even a dictionary",
                    "        plots = {'Clustering': p1, 'Map': p2}",
                    "",
                    "        script, div = components(plots)",
                    "",
                    "        # template for the HTML page to be generated        ",
                    "        html_template_viewer_1 = '''<!DOCTYPE html>",
                    "        <html lang=\"en\">",
                    "            <head>",
                    "                <meta charset=\"utf-8\">",
                    "            <script>",
                    "            document.title = \"NOMAD viewer\";",
                    "            </script>  ",
                    "",
                    "                <link rel=\"stylesheet\" href=\"https://cdn.pydata.org/bokeh/release/bokeh-0.11.1.min.css\" type=\"text/css\" />",
                    "                <!-- <link rel=\"stylesheet\" type=\"text/css\" href=\"../../python-modules/nomad_sim/nomad_viewer.css\"> -->",
                    "                 <link rel=\"stylesheet\" type=\"text/css\" href=\" /user/css/nomad_viewer.css\"> ",
                    " ",
                    "                <script src=\"https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js\"></script> ",
                    "               <script type=\"text/javascript\" src=\"https://cdn.pydata.org/bokeh/release/bokeh-0.11.1.min.js\"></script>",
                    "               <script src=\"https://code.jquery.com/jquery-1.11.2.js\"></script>",
                    "                    {{ js_resources }}",
                    "                    {{ css_resources }}",
                    "                    {{ script }}",
                    "",
                    "            <script>",
                    "                             ",
                    "            function writeInfoApplet0(chemical_formula_, energy_, geo_file_) {",
                    "            document.getElementById(\"chemical_formula0\").innerHTML = String(chemical_formula_);",
                    "            document.getElementById(\"energy0\").innerHTML = String(energy_);",
                    "            document.getElementById(\"geo_link0\").innerHTML = \"View\";",
                    "            document.getElementById(\"geo_link0\").href = String(geo_file_);",
                    "            document.getElementById(\"geo_link0\").target = \"_blank\";",
                    "            };",
                    "            ",
                    "            function writeInfoApplet1(chemical_formula_, energy_, geo_file_) {",
                    "            document.getElementById(\"chemical_formula1\").innerHTML = String(chemical_formula_);",
                    "            document.getElementById(\"energy1\").innerHTML = String(energy_);",
                    "            document.getElementById(\"geo_link1\").innerHTML = \"View\";",
                    "            document.getElementById(\"geo_link1\").href = String(geo_file_);",
                    "            document.getElementById(\"geo_link1\").target = \"_blank\";",
                    "            };'''",
                    "",
                    "        if target_pred_list:",
                    "            write_summary_function ='''",
                    "               function writeSummary(chemical_formula_, target_, target_pred_){",
                    "                //check if the user actually clicked on one point on the plot",
                    "                if (chemical_formula_ != null && target_pred_ != null){",
                    "                    $(\"#clustering_info tbody\").append(",
                    "                    \"<tr class='clickable-row' data-href='url://www.google.com'>\"+",
                    "                    \"<td>\" + String(chemical_formula_) + \"</td>\"+",
                    "                    \"<td>\" + String(target_) + \"</td>\"+",
                    "                    \"<td>\" + String(target_pred_) + \"</td>\"+",
                    "                    \"</tr>\");",
                    "                }",
                    "                }; ",
                    "            '''",
                    "        elif label_name == None:",
                    "            write_summary_function ='''            ",
                    "                function writeSummary(chemical_formula_, energy_, target_){",
                    "                //check if the user actually clicked on one point on the plot",
                    "                if (chemical_formula_ != null && energy_ != null){",
                    "                    $(\"#clustering_info tbody\").append(",
                    "                    \"<tr class='clickable-row' data-href='url://www.google.com'>\"+",
                    "                    \"<td>\" + String(chemical_formula_) + \"</td>\"+",
                    "                    \"<td>\" + String(energy_) + \"</td>\"+",
                    "                    \"<td>\" + String(target_) + \"</td>\"+",
                    "                    \"</tr>\");",
                    "                }",
                    "                }; ",
                    "            '''",
                    "        else:",
                    "            write_summary_function ='''            ",
                    "                function writeSummary(chemical_formula_, energy_, label_){",
                    "                //check if the user actually clicked on one point on the plot",
                    "                if (chemical_formula_ != null && energy_ != null){",
                    "                    $(\"#clustering_info tbody\").append(",
                    "                    \"<tr class='clickable-row' data-href='url://www.google.com'>\"+",
                    "                    \"<td>\" + String(chemical_formula_) + \"</td>\"+",
                    "                    \"<td>\" + String(energy_) + \"</td>\"+",
                    "                    \"<td>\" + String(label_) + \" </td>\"+",
                    "                    \"</tr>\");",
                    "                }",
                    "                }; ",
                    "            '''",
                    "        if label_name == None:",
                    "            html_template_viewer_2 = '''function deleteRow(tableID) {",
                    "                var table = document.getElementById(tableID);",
                    "                var rowCount = table.rows.length;",
                    " ",
                    "                for(var i=2; i<rowCount; i++) {",
                    "                    var row = table.rows[i];",
                    "                    table.deleteRow(i);",
                    "                    rowCount--;",
                    "                    i--;",
                    "                    }",
                    "                };",
                    "            ",
                    "            </script>  ",
                    "<style>",
                    "",
                    "",
                    "",
                    ".legend { list-style: none; }",
                    ".legend li { float: left; margin-right: 10px; }",
                    ".legend span { border: 1px solid #ccc; float: left; width: 12px; height: 12px; margin: 2px; ",
                    "}",
                    "/* your colors */",
                    ".legend .quintile_1 { background-color: #000099; }",
                    ".legend .quintile_2 { background-color: #004d99; }",
                    ".legend .quintile_3 { background-color: #009900; }",
                    ".legend .quintile_4 { background-color: #994d00; }",
                    ".legend .quintile_5 { background-color: #990000; }",
                    "",
                    " </style>",
                    " ",
                    "   </head><body id='fullwidth' class='fullwidth page-1'>",
                    "    <table style=\"width: 1024px;\">",
                    "        <tr>",
                    "            <table class=\"headerNOMAD\" border=\"2\">",
                    "                <tr>",
                    "                    <td class=\"label\">",
                    "                        <img id=\"nomad\" src=\"https://nomad-coe.eu/uploads/nomad/images/NOMAD_Logo2.png\" width=\"229\" height=\"100\" alt=\"NOMAD Logo\" />",
                    "                    </td>",
                    "                    <td class=\"input\">",
                    "                       <span class=\"header-large-text\">Viewer<br></span>",
                    "                        <span class=\"header-small-text\">The NOMAD Laboratory <br></span>",
                    "                        <span> </span>",
                    "                    </td>",
                    "                    <td style=\"vertical-align:bottom\">",
                    "                    ",
                    "\t<span style=\"font-size:25px\" title=\"By hovering over the 'Structural-similariy plot',  information over the data points is displayed.",
                    " By clicking over the data points, the jsmol vizualisation of the structure appears in the one of the bottom panels (alternating left and right panel at each click, for comparing the last two selections).\"> ",
                    " <img src=\"http://images.clipartpanda.com/question-purzen_Icon_with_question_mark_Vector_Clipart.png\"",
                    " style=\"height: 50px; width: 50px;\"> </span>",
                    "                    </td>",
                    "                </tr>",
                    "            </table>",
                    "        </tr>",
                    "        <tr>",
                    "",
                    "            <table align=\"center\">",
                    "                <tr>",
                    "                    <td style=\"vertical-align: top;\">",
                    "                        {{ div['Clustering'] }}",
                    "                        ",
                    "    <span class=\"results-small-text\"> <p align=\"center\"> '''+ str(legend_title) + '''</p></span>",
                    "    <p align=\"center\">",
                    "    <ul class=\"legend\">",
                    "    <li><span class=\"quintile_1\"></span><div class=\"legend-small-text\">''' +'['+('%+1.2e' % bins[0])+str(target_unit_legend)+', '+('%+1.2e' % bins[1])+str(target_unit_legend)+')' + '''</div> </li>",
                    "    <li><span class=\"quintile_2\"></span><div class=\"legend-small-text\">''' +'['+('%+1.2e' % bins[1])+str(target_unit_legend)+', '+('%+1.2e' % bins[2])+str(target_unit_legend)+')' + '''</div> </li>",
                    "    <br>",
                    "    <li><span class=\"quintile_3\"></span><div class=\"legend-small-text\">''' +'['+('%+1.2e' % bins[2])+str(target_unit_legend)+', '+('%+1.2e' % bins[3])+str(target_unit_legend)+')' + '''</div> </li>",
                    "    <li><span class=\"quintile_4\"></span><div class=\"legend-small-text\">''' +'['+('%+1.2e' % bins[3])+str(target_unit_legend)+', '+('%+1.2e' % bins[4])+str(target_unit_legend)+')' + '''</div> </li>",
                    "    <br>",
                    "    <li><span class=\"quintile_5\"></span><div class=\"legend-small-text\">''' +'['+('%+1.2e' % bins[4])+str(target_unit_legend)+', '+('%+1.2e' % bins[5])+str(target_unit_legend)+')' + '''</div> </li>",
                    "    </ul>",
                    "    </p>",
                    "",
                    "    </td> ",
                    "    ",
                    "",
                    "                    <td style=\"height:100%\">",
                    "                        <table style=\"height:100%\">",
                    "                            <tr>                            ",
                    "                                <td align=\"center\" style=\"width: 100%; height:320px; vertical-align: top\">",
                    "                                    {{ div['Map'] }} ",
                    "                                </td>",
                    "                            </tr>",
                    "                            <tr>",
                    "                                <td align=\"center\" style=\" vertical-align: top\">",
                    "                                    <table id=\"clustering_info\" align=\"center\">",
                    "                                            <tr class='clickablea-row' data-href='url://www.google.com'>",
                    "                                                <th colspan=3 class=\"selection\"> Selection </th>",
                    "                                            </tr>",
                    "                                            ",
                    "                                            '''",
                    "        else:",
                    "            html_template_viewer_2 = '''function deleteRow(tableID) {",
                    "                var table = document.getElementById(tableID);",
                    "                var rowCount = table.rows.length;",
                    " ",
                    "                for(var i=2; i<rowCount; i++) {",
                    "                    var row = table.rows[i];",
                    "                    table.deleteRow(i);",
                    "                    rowCount--;",
                    "                    i--;",
                    "                    }",
                    "                };",
                    "            ",
                    "            </script>  ",
                    "<style>",
                    "",
                    "",
                    "",
                    ".legend { list-style: none; display: flex; justify-content: center; }",
                    ".legend li { float: left; margin-right: 10px; padding: 0 8px; }",
                    ".legend span { border: 1px solid #ccc; float: left; width: 12px; height: 12px; margin: 2px; }",
                    "/* your colors */",
                    ".legend .quintile_1 { background-color: #004d99; }",
                    ".legend .quintile_2 { background-color: #990000; }",
                    "",
                    "",
                    " </style>",
                    " ",
                    "   </head><body id='fullwidth' class='fullwidth page-1'>",
                    "    <table style=\"width: 1024px;\">",
                    "        <tr>",
                    "            <table class=\"headerNOMAD\" border=\"2\">",
                    "                <tr>",
                    "                    <td class=\"label\">",
                    "                        <img id=\"nomad\" src=\"https://nomad-coe.eu/uploads/nomad/images/NOMAD_Logo2.png\" width=\"229\" height=\"100\" alt=\"NOMAD Logo\" />",
                    "                    </td>",
                    "                    <td class=\"input\">",
                    "                       <span class=\"header-large-text\">Viewer<br></span>",
                    "                        <span class=\"header-small-text\">The NOMAD Laboratory <br></span>",
                    "                        <span> </span>",
                    "                    </td>",
                    "                    <td style=\"vertical-align:bottom\">",
                    "                    ",
                    "\t<span style=\"font-size:25px\" title=\"By hovering over the 'Structural-similariy plot',  information over the data points is displayed.",
                    " By clicking over the data points, the jsmol vizualisation of the structure appears in the one of the bottom panels (alternating left and right panel at each click, for comparing the last two selections).\"> ",
                    " <img src=\"http://images.clipartpanda.com/question-purzen_Icon_with_question_mark_Vector_Clipart.png\"",
                    " style=\"height: 50px; width: 50px;\"> </span>",
                    "                    </td>",
                    "                </tr>",
                    "            </table>",
                    "        </tr>",
                    "        <tr>",
                    "",
                    "            <table align=\"center\">",
                    "                <tr>",
                    "                    <td style=\"vertical-align: top;\">",
                    "                        {{ div['Clustering'] }}",
                    "                        ",
                    "    <span class=\"results-small-text\"> <p align=\"center\"> '''+ str(label_name) + '''</p></span>",
                    "    <p align=\"center\">",
                    "    <ul class=\"legend\">",
                    "    <li><span class=\"quintile_1\"></span><div class=\"legend-small-text\">''' +label_int_0 + '''</div> </li>",
                    "    <li><span class=\"quintile_2\"></span><div class=\"legend-small-text\">''' +label_int_1 + '''</div> </li>",
                    "    ",
                    "    </ul>",
                    "    <br>",
                    "    </p>",
                    "",
                    "    </td> ",
                    "    ",
                    "",
                    "                    <td style=\"height:100%\">",
                    "                        <table style=\"height:100%\">",
                    "                            <tr>                            ",
                    "                                <td align=\"center\" style=\"width: 100%; height:320px; vertical-align: top\">",
                    "                                    {{ div['Map'] }} ",
                    "                                </td>",
                    "                            </tr>",
                    "                            <tr>",
                    "                                <td align=\"center\" style=\" vertical-align: top\">",
                    "                                    <table id=\"clustering_info\" align=\"center\">",
                    "                                            <tr class='clickablea-row' data-href='url://www.google.com'>",
                    "                                                <th colspan=3 class=\"selection\"> Selection </th>",
                    "                                            </tr>",
                    "                                            ",
                    "                                            '''",
                    "        if target_pred_list:",
                    "            html_template_viewer_3 = '''",
                    "                                                <tr>",
                    "                                                    <th> Name </th>",
                    "                                                    <th> Reference '''+str(target_name)+''' ['''+str(target_unit)+'''] </th>",
                    "                                                    <th> Predicted '''+str(target_name)+''' ['''+str(target_unit)+'''] </th>",
                    "                                                </tr>",
                    "                                      '''",
                    "        elif label_name == None:",
                    "            html_template_viewer_3 = '''",
                    "                                                <tr>",
                    "                                                    <th> Name </th>",
                    "                                                    <th> Energy [eV] </th>",
                    "                                                    <th> '''+str(target_name)+''' ['''+str(target_unit)+'''] </th>",
                    "                                                </tr>",
                    "                                      '''            ",
                    "        else:",
                    "            html_template_viewer_3 = '''",
                    "                                                <tr>",
                    "                                                    <th> Name </th>",
                    "                                                    <th> Energy [eV] </th>",
                    "                                                    <th> '''+str(label_name)+'''</th>",
                    "                                                </tr>",
                    "                                      '''",
                    "        html_template_viewer_4 = '''      ",
                    "                                            ",
                    "                                    </table>",
                    "                                  <INPUT type=\"button\" value=\"Clear Selection\" onclick=\"deleteRow('clustering_info')\" />",
                    "                                </td>",
                    "                            </tr>",
                    "                        </table>",
                    "                    </td>",
                    "                </tr>",
                    "                <tr>",
                    "                    <td align=\"center\">",
                    "                        <table id=\"jsmol_table\">",
                    "                        <tr>",
                    "                            <th>Name</th>",
                    "                            <th>Energy [eV]</th>",
                    "                            <th>Geometry File</th>",
                    "                        </tr>",
                    "                        <tr>",
                    "                            <td> <div id=\"chemical_formula0\">   </div> </td>    ",
                    "                            <td> <div id=\"energy0\">   </div> </td>    ",
                    "                            <td>   <a id=\"geo_link0\"></a>  </td>  ",
                    "                        </tr>",
                    "                        <tr>",
                    "                            <td colspan=3 class=\"none\"> ",
                    "                                <div id=\"appdiv0\"></div>",
                    "                            </td>  ",
                    "                        </tr>",
                    "                        </table>",
                    "                    </td>",
                    "",
                    "",
                    "                    <td align=\"center\">",
                    "                        <table id=\"jsmol_table\">",
                    "                        <tr>",
                    "                            <th>Name</th>",
                    "                            <th>Energy [eV]</th>",
                    "                            <th>Geometry File</th>",
                    "                        </tr>",
                    "                        <tr>",
                    "                            <td> <div id=\"chemical_formula1\">   </div> </td>    ",
                    "                            <td> <div id=\"energy1\">   </div> </td>    ",
                    "                            <td>   <a id=\"geo_link1\"></a>  </td>  ",
                    "                        </tr>",
                    "                        <tr>",
                    "                            <td colspan=3 class=\"none\"> ",
                    "                                <div id=\"appdiv1\"></div>",
                    "                            </td>  ",
                    "                        </tr>",
                    "                        </table>",
                    "                    </td>",
                    "                </tr>",
                    "        <tr>",
                    "            <td colspan=2>",
                    "                <table>",
                    "                    <tr>",
                    "                        <td style=\"width:10%\">    </td>    ",
                    "                        <td>",
                    "                            <span class=\"results-small-text\"><br>'''+ outf_string + '''</span>",
                    "                        </td>    ",
                    "                        <td>   </td>  ",
                    "                    </tr>",
                    "                </table>           ",
                    "            </td>",
                    "        </tr>",
                    "            </table>",
                    "",
                    "        </tr>",
                    "        <tr>",
                    "            <td>   </td>",
                    "        </tr>",
                    "",
                    "        </table>",
                    "    </body>",
                    "</html>",
                    "'''",
                    "",
                    "",
                    "        template = Template(html_template_viewer_1 + write_summary_function +",
                    "            html_template_viewer_2 + html_template_viewer_3 + html_template_viewer_4)",
                    "",
                    "        # javascript script to be included in the HTML page to load JSmol",
                    "        js_jsmol=\"\"\" ",
                    "        <script type=\"text/javascript\" src=\"./jsmol/JSmol.min.js\"></script>",
                    "        <script type=\"text/javascript\">",
                    "        Jmol._isAsync = false;",
                    "        Jmol.getProfile() // records repeat calls to overridden or overloaded Java methods",
                    "        var jmolApplet0; // set up in HTML table, below",
                    "        var jmolApplet1; // set up in HTML table, below",
                    "        var chemical_formula;",
                    "        // use ?_USE=JAVA or _USE=SIGNED or _USE=HTML5",
                    "        jmol_isReady = function(applet) {",
                    "            Jmol._getElement(applet, \"appletdiv\").style.border=\"0px solid black\"",
                    "         }      ",
                    "",
                    "        var  Info = {",
                    "            width: 400,",
                    "            height: 300,",
                    "            debug: false,",
                    "            color: \"#FFFFFF\",",
                    "            //color: \"#F0F0F0\",",
                    "            zIndexBase: 20000,",
                    "            z:{monitorZIndex:100},",
                    "            serverURL: \"./php/jsmol.php\",",
                    "            use: \"HTML5\",",
                    "            jarPath: \"./jsmol/java\",    // this needs to point to where the j2s directory is.",
                    "            j2sPath: \"./jsmol/j2s\",     // this needs to point to where the java directory is.",
                    "            jarFile: \"./jsmol/JmolApplet.jar\",",
                    "            isSigned: false,",
                    "            disableJ2SLoadMonitor: true,",
                    "            disableInitialConsole: true,",
                    "            readyFunction: jmol_isReady,",
                    "            allowjavascript: true,",
                    "            //script: \"set antialiasDisplay;load async /user/default_jsmol_aims.in; spin on\"",
                    "        }",
                    "",
                    "",
                    "              $(document).ready(function() {",
                    "             ",
                    "              $(\"#appdiv0\").html(Jmol.getAppletHtml(\"jmolApplet0\", Info));",
                    "              $(\"#appdiv1\").html(Jmol.getAppletHtml(\"jmolApplet1\", Info));",
                    "              }",
                    "              ); ",
                    "",
                    "",
                    "              var lastPrompt=0;",
                    "",
                    "              </script>",
                    "",
                    "            \"\"\"",
                    "",
                    "",
                    "",
                    "        # output static HTML file",
                    "        if isBeaker:",
                    "            #Beaker",
                    "            file_html_name = '/home/beaker/.beaker/v1/web/tmp/'+self.name+'.html'",
                    "            file_html_link = \"<a target=_blank href='/user/tmp/\"+self.name+\".html'>Click here to open the Viewer</a>\"",
                    "        else:",
                    "            # Local",
                    "            file_html_name = os.path.abspath(os.path.normpath(os.path.join(html_folder, ",
                    "                '%s.html' % (self.name))))        ",
                    "            file_html_link = \"<a target=_blank href='\"+file_html_name+\"'>Click here to open the Viewer</a>\"",
                    "",
                    "",
                    "        # build the page HTML",
                    "        html = template.render( js_resources=js_jsmol,",
                    "                                script=script,",
                    "                                div=div)",
                    "",
                    "        with open(file_html_name, 'w') as f:",
                    "            f.write(html)",
                    "            f.flush()",
                    "            f.close()",
                    "",
                    "        logger.info(\"Click on the button 'View interactive 2D scatter plot' to see the plot.\")",
                    "                ",
                    "        ",
                    "        return file_html_link, file_html_name",
                    "",
                    "# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4"
                ],
                "hidden": true
            },
            "output": {
                "state": {},
                "selectedType": "BeakerDisplay",
                "pluginName": "IPython",
                "shellId": "A1E72F9FF9EF4FA68AC9A7FD1424AD63",
                "elapsedTime": 2322,
                "height": 78
            },
            "evaluatorReader": true,
            "lineCount": 1190,
            "tags": "cell_soap_run"
        },
        {
            "id": "code68kGB5",
            "type": "code",
            "evaluator": "IPython",
            "input": {
                "body": [
                    "#from nomad_sim.viewer import Viewer",
                    "from nomad_sim.wrappers import view",
                    "",
                    "def _get_structures_local(",
                    "        json_list=None, ",
                    "        struct_list=[], ",
                    "        frame_list=None, ",
                    "        file_format=None, ",
                    "        png_path=None,",
                    "        geo_path=None, ",
                    "        tmp_folder=None):",
                    "    logger.info(\"Generating figures and geometry files ...\")",
                    "    structure_list = []",
                    "    # CONFIGURE PATHS",
                    "    if tmp_folder is None:",
                    "        tmp_folder = './tmp'",
                    "    if geo_path is None:",
                    "        geo_path = tmp_folder",
                    "    if png_path is None:",
                    "        png_path = tmp_folder",
                    "    # COMPILE STRUCTURES",
                    "    if struct_list == []:",
                    "        for idx, json_file in enumerate(json_list):",
                    "            # Read structure",
                    "            if file_format=='rdf' or file_format=='NOMAD':",
                    "                try:",
                    "                    # frame_list is a list of lists -> extract the list referring to each JSON file",
                    "                    frame_list_json = frame_list[idx]",
                    "                except:",
                    "                    # frame_list is a list -> the frame_list_json is the list itself",
                    "                    frame_list_json = frame_list",
                    "                structure = NOMADStructure(in_file=json_file, frame_list=frame_list_json, file_format=file_format)",
                    "            else:",
                    "                logger.error(\"Please specify a valid file format. Possible file formats are 'NOMAD' or 'rdf'.\")",
                    "                sys.exit(1)",
                    "",
                    "            # Write coordinates of structure & take snapshot",
                    "            structure.write_geometry(path=geo_path)",
                    "            structure.write_png(path=png_path, replicas=(3,3,3), rotation=True)",
                    "            structure_list.append(structure)",
                    "            if idx%(int(len(json_list)/10)+1)==0:",
                    "                logger.debug(\"Generating figures and geometries: file {0}/{1}\".format(idx+1,len(json_list)))",
                    "    else:",
                    "        for idx, structure in enumerate(struct_list):",
                    "            structure.write_geometry(path=geo_path)",
                    "            structure.write_png(path=png_path, replicas=(3,3,3), rotation=True)",
                    "            structure_list.append(structure)",
                    "    return structure_list        ",
                    "",
                    "def plot_local(",
                    "        json_list=None, ",
                    "        structure_list=[], ",
                    "        frames=None, ",
                    "        frame_list=None, ",
                    "        file_format=None, ",
                    "        png_path=None,",
                    "        geo_path=None, ",
                    "        desc_folder=None, ",
                    "        tmp_folder=None, ",
                    "        control_file=None,",
                    "        clustering_x_list=None, ",
                    "        clustering_y_list=None, ",
                    "        target_list=None, ",
                    "        target_pred_list=None,",
                    "        target_unit=None,",
                    "        target_type=float,",
                    "        label_list=None,",
                    "        label_name=None,",
                    "        legend_title=None, ",
                    "        plot_title=None, ",
                    "        target_name=None,",
                    "        clustering_point_size=None,",
                    "        name=None,",
                    "        html_folder=None,",
                    "        log_string=''):",
                    "    # COMPILE STRUCTURES & GEOM/PNG FILES",
                    "    structure_list = _get_structures_local(json_list=json_list, struct_list=structure_list, frame_list=frame_list,",
                    "        file_format=file_format, png_path=png_path, geo_path=geo_path,",
                    "        tmp_folder=tmp_folder)",
                    "    # CONFIGURE VIEWER",
                    "    viewer = CustomViewer(name=name)",
                    "    try:",
                    "        with open(control_file) as data_file:",
                    "            data = json.load(data_file)",
                    "",
                    "            for c in data['model_info']:",
                    "                x_axis_label = c[\"x_axis_label\"]",
                    "                y_axis_label = c[\"y_axis_label\"]",
                    "    except:",
                    "        x_axis_label = None",
                    "        y_axis_label = None",
                    "    # WRITE PLOT HTML",
                    "    file_html_link, file_html_name = viewer.plot(archive=structure_list, frames=frames,",
                    "        frame_list=frame_list, clustering_x_list=clustering_x_list, clustering_y_list=clustering_y_list,",
                    "        target_list=target_list, target_pred_list=target_pred_list,",
                    "        target_unit=target_unit, target_name=target_name, target_type=target_type, label_list=label_list, label_name=label_name,",
                    "        legend_title=legend_title,",
                    "        x_axis_label=x_axis_label, y_axis_label=y_axis_label, plot_title=plot_title,",
                    "        clustering_point_size=clustering_point_size, html_folder=html_folder, tmp_folder=tmp_folder, log_string=log_string)",
                    "    # OPEN BROWSER, SHOW PLOT",
                    "    view(file_html_name)",
                    "    return file_html_link",
                    ""
                ],
                "hidden": true
            },
            "output": {
                "state": {},
                "selectedType": "BeakerDisplay",
                "pluginName": "IPython",
                "shellId": "A1E72F9FF9EF4FA68AC9A7FD1424AD63",
                "height": 78,
                "elapsedTime": 428
            },
            "evaluatorReader": true,
            "lineCount": 103,
            "tags": "cell_soap_run"
        },
        {
            "id": "codeLlSWnZ",
            "type": "code",
            "evaluator": "IPython",
            "input": {
                "body": [
                    "# DECOMPOSE KERNEL MATRIX",
                    "dimred_positions = soap.soapy.dimred_matrix(dimred_method, kmat=kmat, distmat=dmat)",
                    "#print dimred_positions[:,0:4]",
                    "x_list = list(dimred_positions[:,0])",
                    "y_list = list(dimred_positions[:,1])",
                    "",
                    "# PLOT OPTIONS",
                    "plot_options = {",
                    "    'model_info': [ ",
                    "        { 'x_axis_label' : \"x (%s)\" % dimred_method, ",
                    "          'y_axis_label' : 'y (%s)' % dimred_method } ",
                    "    ]",
                    "}",
                    "json.dump(plot_options, open(control_file, 'w'))",
                    "",
                    "# CONFIGURE DATA",
                    "name_html_page = 'similarity-map'",
                    "json_list = json_list",
                    "frame_list = frame_list_idx_list",
                    "target_list = target_list",
                    "for s in nmd_struct_list:",
                    "    s.file_format = 'NOMAD'",
                    "",
                    "# EMBEDDING & TARGETS",
                    "global_idx = 0",
                    "clust_x_list = []",
                    "clust_y_list = []",
                    "targ_list = []",
                    "for struct_idx, idx_list in enumerate(frame_list):",
                    "    clust_x_list.append([])",
                    "    clust_y_list.append([])",
                    "    targ_list.append([])",
                    "    for idx in idx_list:",
                    "        clust_x_list[-1].append(x_list[global_idx])",
                    "        clust_y_list[-1].append(y_list[global_idx])",
                    "        targ_list[-1].append(target_list[global_idx])",
                    "        global_idx += 1",
                    "",
                    "        ",
                    "# GENERATE PLOT",
                    "plot_result = plot_local(",
                    "    name=name_html_page,",
                    "    structure_list=nmd_struct_list,",
                    "    json_list=json_list, ",
                    "    frames='list', ",
                    "    frame_list=frame_list, ",
                    "    file_format='NOMAD', ",
                    "    clustering_x_list=clust_x_list, ",
                    "    clustering_y_list=clust_y_list, ",
                    "    target_list=targ_list,",
                    "    target_name=target_name,",
                    "    target_unit='eV',",
                    "    target_type=target_type,",
                    "    label_list = label_list,",
                    "    label_name = label_name,",
                    "    clustering_point_size=12, ",
                    "    tmp_folder=tmp_folder, ",
                    "    control_file=control_file,",
                    "    plot_title='Similarity map',",
                    "    legend_title=legend_title,",
                    "    log_string=('\\n Options for this run:\\n'+json.dumps(options, indent=2)).replace('\\n','<br>').replace('  ', '&nbsp '))",
                    "",
                    "# ACTIVATE VIEWER",
                    "beaker.viewer_result = name_html_page",
                    "logger.info(\"Finished @ %s\" % datetime.datetime.now())"
                ],
                "hidden": true
            },
            "output": {
                "state": {},
                "selectedType": "BeakerDisplay",
                "pluginName": "IPython",
                "shellId": "A1E72F9FF9EF4FA68AC9A7FD1424AD63",
                "height": 78,
                "elapsedTime": 9310
            },
            "evaluatorReader": true,
            "lineCount": 65,
            "tags": "cell_soap_run"
        },
        {
            "id": "codeegX9Y2",
            "type": "code",
            "evaluator": "JavaScript",
            "input": {
                "body": [
                    "var result_link = '/user/tmp/' + beaker.viewer_result + '.html';",
                    "beaker.view_result(result_link);"
                ],
                "hidden": true
            },
            "output": {
                "state": {},
                "selectedType": "BeakerDisplay",
                "pluginName": "JavaScript",
                "height": 78,
                "elapsedTime": 65
            },
            "evaluatorReader": true,
            "lineCount": 2,
            "tags": "cell_soap_run"
        }
    ],
    "namespace": {
        "selected_feature_list": [
            "IP(A)",
            "IP(B)",
            "EA(A)",
            "EA(B)",
            "HOMO(A)",
            "HOMO(B)",
            "LUMO(A)",
            "LUMO(B)",
            "rs(A)",
            "rs(B)",
            "rp(A)",
            "rp(B)",
            "rd(A)",
            "rd(B)",
            "val(A)",
            "val(B)"
        ],
        "allowed_operations": [
            "|-|",
            "/",
            "^2",
            "exp"
        ],
        "maxDim": null,
        "max_dim": "2",
        "max_dim2": 18,
        "max_dim3": [
            11
        ],
        "runInfo": "running Lasso",
        "viewer_result": "similarity-map",
        "options": {
            "run": {
                "config_folder": "zcrs",
                "n_configs": -1,
                "n_procs": 2,
                "n_blocksize": 200,
                "queue": "?",
                "walltime": 12,
                "out_folder": "out.kernel",
                "verbose": false
            },
            "atomic_density": {
                "density_type": "number_density_generic",
                "atomic_radius": 0.5,
                "use_covrad": false
            },
            "kernel": {
                "method": "global"
            },
            "basekernel": {
                "kernel.type": "dot",
                "kernel.delta": 1,
                "kernel.xi": 3
            },
            "laplacian": {
                "inverse_dist": true,
                "coulomb": true,
                "scale": 0.01,
                "eta": 1,
                "gamma": 0.01,
                "optimize_eta_gamma": false
            },
            "dimred": {
                "method": "kernelpca"
            },
            "graph": {
                "descriptor": "soap",
                "pca": "none",
                "hierarchical": false,
                "r0": 1,
                "alpha": 2,
                "n_levels": 3,
                "optimize_hierarchy": false
            },
            "lamatch": {
                "gamma": 0.3,
                "optimize_rematch": false
            },
            "descriptor": {
                "soap": {
                    "spectrum.gradients": false,
                    "spectrum.2l1_norm": false,
                    "radialbasis.type": "gaussian",
                    "radialbasis.mode": "adaptive",
                    "radialbasis.N": 9,
                    "radialbasis.sigma": 0.5,
                    "radialbasis.integration_steps": 15,
                    "radialcutoff.Rc": 3.5,
                    "radialcutoff.Rc_width": 0.5,
                    "radialcutoff.type": "heaviside",
                    "radialcutoff.center_weight": 1,
                    "angularbasis.type": "spherical-harmonic",
                    "angularbasis.L": 6,
                    "kernel.type": "dot",
                    "kernel.adaptor": "global-generic",
                    "kernel.delta": 1,
                    "kernel.xi": 3,
                    "exclude_centers": [],
                    "exclude_targets": [],
                    "type_list": [
                        "C"
                    ]
                }
            }
        }
    },
    "locked": true
}