From 36707c474b67e6d0d8fd9db770f2080fe978e3e7 Mon Sep 17 00:00:00 2001
From: Angelo Ziletti <ziletti@fhi-berlin.mpg.de>
Date: Tue, 30 Jan 2018 14:36:15 +0100
Subject: [PATCH] Fix bug in handling non-periodic structures.

---
 .../custom-analytics-example-dev.bkr          | 3422 +++++++++++++++--
 1 file changed, 3187 insertions(+), 235 deletions(-)

diff --git a/custom-analytics-example/custom-analytics-example-dev.bkr b/custom-analytics-example/custom-analytics-example-dev.bkr
index 955c57a..f7b32e4 100644
--- a/custom-analytics-example/custom-analytics-example-dev.bkr
+++ b/custom-analytics-example/custom-analytics-example-dev.bkr
@@ -100,7 +100,7 @@
                     "   ",
                     "      <sup>1</sup> Fritz Haber Institute of the Max Planck Society, Faradayweg 4-6, D-14195 Berlin, Germany <br>",
                     "      <sup>2</sup> Engineering Laboratory, University of Cambridge, Trumpington Street, Cambridge CB2 1PZ, UK",
-                    "      <span class=\"nomad--last-updated\" data-version=\"v1.0.1\">[Last updated: January 30, 2018]</span>",
+                    "      <span class=\"nomad--last-updated\" data-version=\"v1.0.2\">[Last updated: January 30, 2018]</span>",
                     "    </p>",
                     "</div>"
                 ],
@@ -111,7 +111,7 @@
                 "result": {
                     "type": "BeakerDisplay",
                     "innertype": "Html",
-                    "object": "<script>\nvar beaker = bkHelper.getBeakerObject().beakerObj;\n</script>\n<div class=\"nomad--header\">\n    <h2>NOMAD Analytics Toolkit</h2>\n    <h3>On-the-fly data analysis for the NOMAD Archive</h3>\n    <p class=\"nomad--description\">\n      created by:\n  <a href=\"mailto:ziletti@fhi-berlin.mpg.de\">Angelo Ziletti</a><sup> 1</sup>,\n  Carl Poelking<sup>2</sup>, \n  Fawzi Mohamed<sup>1</sup>, \n  Gábor Csányi<sup>2</sup>,  \n  and Luca Ghiringhelli<sup>1</sup> <br><br>\n   \n      <sup>1</sup> Fritz Haber Institute of the Max Planck Society, Faradayweg 4-6, D-14195 Berlin, Germany <br>\n      <sup>2</sup> Engineering Laboratory, University of Cambridge, Trumpington Street, Cambridge CB2 1PZ, UK\n      <span class=\"nomad--last-updated\" data-version=\"v1.0.1\">[Last updated: January 30, 2018]</span>\n    </p>\n</div>"
+                    "object": "<script>\nvar beaker = bkHelper.getBeakerObject().beakerObj;\n</script>\n<div class=\"nomad--header\">\n    <h2>NOMAD Analytics Toolkit</h2>\n    <h3>On-the-fly data analysis for the NOMAD Archive</h3>\n    <p class=\"nomad--description\">\n      created by:\n  <a href=\"mailto:ziletti@fhi-berlin.mpg.de\">Angelo Ziletti</a><sup> 1</sup>,\n  Carl Poelking<sup>2</sup>, \n  Fawzi Mohamed<sup>1</sup>, \n  Gábor Csányi<sup>2</sup>,  \n  and Luca Ghiringhelli<sup>1</sup> <br><br>\n   \n      <sup>1</sup> Fritz Haber Institute of the Max Planck Society, Faradayweg 4-6, D-14195 Berlin, Germany <br>\n      <sup>2</sup> Engineering Laboratory, University of Cambridge, Trumpington Street, Cambridge CB2 1PZ, UK\n      <span class=\"nomad--last-updated\" data-version=\"v1.0.2\">[Last updated: January 30, 2018]</span>\n    </p>\n</div>"
                 },
                 "selectedType": "BeakerDisplay",
                 "elapsedTime": 0,
@@ -317,7 +317,7 @@
                     "import tempfile",
                     "import ase",
                     "from pymatgen.io.ase import AseAtomsAdaptor",
-                    "from pymatgen.symmetry.analyzer import SpacegroupAnalyzer",
+                    "from pymatgen.symmetry.analyzer import SpacegroupAnalyzer, PointGroupAnalyzer",
                     "",
                     "import soap",
                     "import soap.soapy.util",
@@ -326,10 +326,11 @@
                     "from soap.soapy.momo import osio, endl, flush",
                     "from soap.tools import AseConfig",
                     "",
-                    "from nomad_sim.nomad_structures import NOMADStructure",
+                    "#from nomad_sim.nomad_structures import NOMADStructure",
                     "from nomad_sim.wrappers import get_json_list",
                     "from nomad_sim.wrappers import plot, logger",
-                    "from nomad_sim.wrappers import _get_structures",
+                    "#from nomad_sim.wrappers import _get_structures",
+                    "from nomad_sim.wrappers import _apply_operations",
                     "from nomad_sim.utils_crystals import get_spacegroup",
                     "from nomad_sim.utils_crystals import create_supercell",
                     "from nomad_sim.utils_crystals import filter_json_list",
@@ -341,28 +342,15 @@
             },
             "output": {
                 "state": {},
-                "selectedType": "Results",
+                "selectedType": "Hidden",
                 "pluginName": "IPython",
-                "shellId": "32B7F85D85DA4B05AC8ABA4FA6E22968",
-                "elapsedTime": 3893,
-                "height": 50,
-                "hidden": true,
-                "result": {
-                    "type": "Results",
-                    "outputdata": [
-                        {
-                            "type": "err",
-                            "value": "/usr/local/lib/python2.7/dist-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.\n  from ._conv import register_converters as _register_converters\n/usr/local/lib/python2.7/dist-packages/pymatgen/__init__.py:87: UserWarning: \nPymatgen will drop Py2k support from v2019.1.1. Pls consult the documentation\nat https://www.pymatgen.org for more details.\n  at https://www.pymatgen.org for more details.\"\"\")\n"
-                        },
-                        {
-                            "type": "err",
-                            "value": "Using TensorFlow backend.\n"
-                        }
-                    ]
-                }
+                "shellId": "2ED595F8DAE142AD8F34EA76B35AF4BA",
+                "elapsedTime": 338,
+                "height": 51,
+                "hidden": true
             },
             "evaluatorReader": true,
-            "lineCount": 38,
+            "lineCount": 39,
             "initialization": true,
             "tags": "query_list"
         },
@@ -2443,8 +2431,8 @@
                 },
                 "selectedType": "Table",
                 "pluginName": "IPython",
-                "shellId": "32B7F85D85DA4B05AC8ABA4FA6E22968",
-                "elapsedTime": 1000,
+                "shellId": "2ED595F8DAE142AD8F34EA76B35AF4BA",
+                "elapsedTime": 258,
                 "dataresult": 1,
                 "height": 785
             },
@@ -2814,7 +2802,7 @@
                 "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}\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    var query_name = $(\"#query_name\").val();  \n    var max_nb_res = $(\"#max_nb_res\").val();  \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      \"query\": {\n        \"query_name\": $(\"#query_name\").val(),\n        \"max_nb_res\": $(\"#max_nb_res\").val()\n      },\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    \n      \"basekernel\": {\n      \"type\": \"dot\",\n      \"dot\": {\n        \"xi\": parseFloat($(\"#basekernel_kernel_xi\").val()),\n        \"delta\": 1.0\n        }\n      },\n      \n      \"topkernel\": {\n      \"type\": \"rematch\",\n      \"rematch\": {\n        \"gamma\": 0.01\n        },\n      \"rematch-atomic\": {\n        \"gamma\": 0.01\n        },\n      \"average\": {\n        \"xi\": 1.0,\n        \"delta\": 1.0\n        }\n       },\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\n    \"descriptor\": {\n    \"type\": \"soap-atomic-dmap\",\n    \"soap-atomic\": {\n      \"spectrum.global\": false,\n      \"spectrum.gradients\": false,\n      \"spectrum.2l1_norm\": false,\n      \"_spectrum.2l1_norm\": true,\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.adaptor\": \"specific-unique\",\n      \"exclude_centers\": [],\n      \"exclude_targets\": [],\n      \"type_list\": []\n    },\n    \"soap-atomic-dmap\": {\n      \"spectrum.global\": false,\n      \"spectrum.gradients\": false,\n      \"spectrum.2l1_norm\": false,\n      \"radialbasis.type\" : \"gaussian\",\n      \"radialbasis.mode\" : \"adaptive\",\n      \"radialbasis.N\" : 9,\n      \"radialbasis.sigma\": 0.5,\n      \"radialbasis.integration_steps\": 15,\n      \"radialcutoff.Rc\": 3.5,\n      \"radialcutoff.Rc_width\": 0.5,\n      \"radialcutoff.type\": \"heaviside\",\n      \"radialcutoff.center_weight\": 1.0,\n      \"angularbasis.type\": \"spherical-harmonic\",\n      \"angularbasis.L\": 6,\n      \"kernel.adaptor\": \"specific-unique-dmap\",\n      \"exclude_centers\": [],\n      \"exclude_targets\": [],\n      \"type_list\": []\n    }\n  }\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 Query   <br> </p><hr style=\"border-width:2px\"> <p></p>\n\n <table class=\"query_control\">\n    \n    <!-- SYSTEM REWEIHGTED COMPOSITION -->  \n  <tbody><tr style=\"line-height:40px\">\n    <td><b>Name of query to analyze</b> (if empty: load latest query)</td>\n    <td>\n      <input type=\"text\" id=\"query_name\" value=\"\">  \n\n    </td>\n  </tr>\n  \n    \n    <!-- BASE KERNEL -->    \n    <tr style=\"line-height:40px\">\n      <td><b>Max number or results for each space group/point group</b> </td>\n      <td>\n          <input type=\"number\" name=\"quantity\" id=\"max_nb_res\" min=\"5\" max=\"100\" value=\"25\" step=\"1\"> \n      </td>\n    </tr>    \n    \n   \n    \n</tbody></table>\n  \n<br> <br>\n\n  <p style=\"color:#20335d; font-weight:900; font-size:18pt;\"> Control options Analysis <br> </p><hr style=\"border-width:2px\"> <p></p>\n  \n  \n  <table class=\"glosim_control\">\n    \n    <!-- ATOMIC DENSITY -->  \n  <tbody><tr style=\"line-height:40px\">\n    <td><b>Atomic density</b> </td>\n    <td>\n        <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>    <!-- DATASETS -->\n \n       <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=\"\">    Use covalent radii   <input id=\"atomic_density_use_covrad\" type=\"checkbox\" value=\"true\" unchecked=\"\">\n          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>\n    </td>\n  </tr>\n  \n  <!-- BASIS SET -->  \n  <tr style=\"line-height:40px\">\n    <td><b>Basis set</b> </td>\n    <td>\n        <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       <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          Radial functions N =   <input id=\"soap_radialbasis_N\" type=\"number\" value=\"9\" min=\"1\" max=\"14\" step=\"1\" class=\"in11f\">\n              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\">\n              Radial Gaussian width   <input id=\"soap_radialbasis_sigma\" type=\"number\" value=\"0.5\" min=\"0.1\" max=\"3.0\" step=\"0.1\" class=\"in11f\">\n          Angular functions L =   <input id=\"soap_angularbasis_L\" type=\"number\" value=\"6\" min=\"1\" max=\"14\" step=\"1\" class=\"in11f\"> \n      </g>\n    </td>\n  </tr>    \n    \n    <!-- BASE KERNEL -->    \n    <tr style=\"line-height:40px\">\n      <td><b>Base kernel</b> </td>\n      <td>\n          <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         <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            Exponent   <input id=\"basekernel_kernel_xi\" type=\"number\" value=\"3.0\" min=\"0.1\" max=\"5.0\" step=\"0.1\" class=\"in11f\">\n        </g>\n      </td>\n    </tr>    \n    \n    <!-- TOP KERNEL -->\n    <tr style=\"line-height:40px\">\n      <td><b>Top kernel</b> </td>\n      <td>\n          <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         <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            Mode    \n        <select id=\"kernel_hierarchical\">\n          <option value=\"false\"> single-level</option>\n          <option value=\"true\"> hierarchical</option>\n        </select>\n            Graph Laplacian    \n        <select id=\"opt_top_kernel_hierarchy\">\n          <option value=\"invdist\"> inverse distance</option>\n          <option value=\"coulomb\"> Coulomb matrix</option>\n        </select>\n            Levels   <input id=\"graph:n_levels\" type=\"number\" value=\"1\" min=\"1\" max=\"5\" step=\"1\" class=\"in11f\">\n            Base radius   <input id=\"graph:r0\" type=\"number\" value=\"1.0\" min=\"0.1\" max=\"5.0\" step=\"0.1\" class=\"in11f\">\n            Scale   <input id=\"graph:alpha\" type=\"number\" value=\"2.0\" min=\"0.1\" max=\"5.0\" step=\"0.1\" class=\"in11f\">\n        </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 Retrieval &amp; Analysis</button> \n  <button class=\"btn btn-default\" onclick=\"reset_soap()\">RESET </button> \n  <label title=\"Activate once run is complete.\"> \n    <a href=\"/user/tmp/462b47d34c41e56d.html\" target=\"_blank\" class=\"btn btn-primary\" id=\"plot_result_button\">View 2D similarity map</a> \n  </label>\n"
+                    "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}\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    var query_name = $(\"#query_name\").val();  \n    var max_nb_res = $(\"#max_nb_res\").val();  \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      \"query\": {\n        \"query_name\": $(\"#query_name\").val(),\n        \"max_nb_res\": $(\"#max_nb_res\").val()\n      },\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    \n      \"basekernel\": {\n      \"type\": \"dot\",\n      \"dot\": {\n        \"xi\": parseFloat($(\"#basekernel_kernel_xi\").val()),\n        \"delta\": 1.0\n        }\n      },\n      \n      \"topkernel\": {\n      \"type\": \"rematch\",\n      \"rematch\": {\n        \"gamma\": 0.01\n        },\n      \"rematch-atomic\": {\n        \"gamma\": 0.01\n        },\n      \"average\": {\n        \"xi\": 1.0,\n        \"delta\": 1.0\n        }\n       },\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\n    \"descriptor\": {\n    \"type\": \"soap-atomic-dmap\",\n    \"soap-atomic\": {\n      \"spectrum.global\": false,\n      \"spectrum.gradients\": false,\n      \"spectrum.2l1_norm\": false,\n      \"_spectrum.2l1_norm\": true,\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.adaptor\": \"specific-unique\",\n      \"exclude_centers\": [],\n      \"exclude_targets\": [],\n      \"type_list\": []\n    },\n    \"soap-atomic-dmap\": {\n      \"spectrum.global\": false,\n      \"spectrum.gradients\": false,\n      \"spectrum.2l1_norm\": false,\n      \"radialbasis.type\" : \"gaussian\",\n      \"radialbasis.mode\" : \"adaptive\",\n      \"radialbasis.N\" : 9,\n      \"radialbasis.sigma\": 0.5,\n      \"radialbasis.integration_steps\": 15,\n      \"radialcutoff.Rc\": 3.5,\n      \"radialcutoff.Rc_width\": 0.5,\n      \"radialcutoff.type\": \"heaviside\",\n      \"radialcutoff.center_weight\": 1.0,\n      \"angularbasis.type\": \"spherical-harmonic\",\n      \"angularbasis.L\": 6,\n      \"kernel.adaptor\": \"specific-unique-dmap\",\n      \"exclude_centers\": [],\n      \"exclude_targets\": [],\n      \"type_list\": []\n    }\n  }\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 Query   <br> </p><hr style=\"border-width:2px\"> <p></p>\n\n <table class=\"query_control\">\n    \n    <!-- SYSTEM REWEIHGTED COMPOSITION -->  \n  <tbody><tr style=\"line-height:40px\">\n    <td><b>Name of query to analyze</b> (if empty: load latest query)</td>\n    <td>\n      <input type=\"text\" id=\"query_name\" value=\"\">  \n\n    </td>\n  </tr>\n  \n    \n    <!-- BASE KERNEL -->    \n    <tr style=\"line-height:40px\">\n      <td><b>Max number or results for each space group/point group</b> </td>\n      <td>\n          <input type=\"number\" name=\"quantity\" id=\"max_nb_res\" min=\"5\" max=\"100\" value=\"25\" step=\"1\"> \n      </td>\n    </tr>    \n    \n   \n    \n</tbody></table>\n  \n<br> <br>\n\n  <p style=\"color:#20335d; font-weight:900; font-size:18pt;\"> Control options Analysis <br> </p><hr style=\"border-width:2px\"> <p></p>\n  \n  \n  <table class=\"glosim_control\">\n    \n    <!-- ATOMIC DENSITY -->  \n  <tbody><tr style=\"line-height:40px\">\n    <td><b>Atomic density</b> </td>\n    <td>\n        <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>    <!-- DATASETS -->\n \n       <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=\"\">    Use covalent radii   <input id=\"atomic_density_use_covrad\" type=\"checkbox\" value=\"true\" unchecked=\"\">\n          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>\n    </td>\n  </tr>\n  \n  <!-- BASIS SET -->  \n  <tr style=\"line-height:40px\">\n    <td><b>Basis set</b> </td>\n    <td>\n        <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       <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          Radial functions N =   <input id=\"soap_radialbasis_N\" type=\"number\" value=\"9\" min=\"1\" max=\"14\" step=\"1\" class=\"in11f\">\n              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\">\n              Radial Gaussian width   <input id=\"soap_radialbasis_sigma\" type=\"number\" value=\"0.5\" min=\"0.1\" max=\"3.0\" step=\"0.1\" class=\"in11f\">\n          Angular functions L =   <input id=\"soap_angularbasis_L\" type=\"number\" value=\"6\" min=\"1\" max=\"14\" step=\"1\" class=\"in11f\"> \n      </g>\n    </td>\n  </tr>    \n    \n    <!-- BASE KERNEL -->    \n    <tr style=\"line-height:40px\">\n      <td><b>Base kernel</b> </td>\n      <td>\n          <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         <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            Exponent   <input id=\"basekernel_kernel_xi\" type=\"number\" value=\"3.0\" min=\"0.1\" max=\"5.0\" step=\"0.1\" class=\"in11f\">\n        </g>\n      </td>\n    </tr>    \n    \n    <!-- TOP KERNEL -->\n    <tr style=\"line-height:40px\">\n      <td><b>Top kernel</b> </td>\n      <td>\n          <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         <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            Mode    \n        <select id=\"kernel_hierarchical\">\n          <option value=\"false\"> single-level</option>\n          <option value=\"true\"> hierarchical</option>\n        </select>\n            Graph Laplacian    \n        <select id=\"opt_top_kernel_hierarchy\">\n          <option value=\"invdist\"> inverse distance</option>\n          <option value=\"coulomb\"> Coulomb matrix</option>\n        </select>\n            Levels   <input id=\"graph:n_levels\" type=\"number\" value=\"1\" min=\"1\" max=\"5\" step=\"1\" class=\"in11f\">\n            Base radius   <input id=\"graph:r0\" type=\"number\" value=\"1.0\" min=\"0.1\" max=\"5.0\" step=\"0.1\" class=\"in11f\">\n            Scale   <input id=\"graph:alpha\" type=\"number\" value=\"2.0\" min=\"0.1\" max=\"5.0\" step=\"0.1\" class=\"in11f\">\n        </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 Retrieval &amp; Analysis</button> \n  <button class=\"btn btn-default\" onclick=\"reset_soap()\">RESET </button> \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"
                 },
                 "selectedType": "BeakerDisplay",
                 "elapsedTime": 0,
@@ -2825,6 +2813,1413 @@
             "tags": "cell_soap_gui",
             "isError": false
         },
+        {
+            "id": "codedb2MCr",
+            "type": "code",
+            "evaluator": "IPython",
+            "input": {
+                "body": [
+                    "class NOMADStructure(object):",
+                    "    \"\"\"Read the atomic structure and the total energy of a system given a NOMAD",
+                    "        JSON file.",
+                    "",
+                    "        Gets data from JSON file and sets up the ase.Atoms objects.",
+                    "        It handles multiple geometries in the NOMAD file (e.g. configurations",
+                    "        from a geometry optimization). ",
+                    "",
+                    "        Parameters",
+                    "        ----------",
+                    "",
+                    "        in_file : string,",
+                    "            Path to json file to read",
+                    "",
+                    "        frame_list : int, list (or list of lists)",
+                    "            Specifies for each NOMAD json file 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.",
+                    "",
+                    "        png_path : string",
+                    "            Path to the folder where the png files for each structure are",
+                    "            written.",
+                    "",
+                    "        geo_path : string",
+                    "            Path to the folder where the png files for each structure are",
+                    "            written.",
+                    "",
+                    "        png_file : string",
+                    "            Path to the png file where the image for each structure and frame",
+                    "            is written.",
+                    "",
+                    "        geo_file : string",
+                    "            Path to the geometry file where the image for each structure and",
+                    "            frame is written.",
+                    "",
+                    "        xray_path : string",
+                    "            Path to the folder where the xray diffraction pattern png files for",
+                    "            each structure are written.",
+                    "",
+                    "        xray_file : string",
+                    "            Path to the xray diffraction pattern png files where the image for",
+                    "            each structure and frame is written.",
+                    "",
+                    "        isPeriodic : bool",
+                    "            Specify if the system is periodic (used for generating periodic",
+                    "            replicas in the plot).",
+                    "            If `True` if create a 4x4x4 periodic replica of the unit cell for",
+                    "            visualization.",
+                    "            .. todo:: It should be guessed automatically using",
+                    "            `nomad_classify `.",
+                    "",
+                    "        file_format : text, optional, {'NOMAD', 'rdf'}",
+                    "            Specify what is the format of the file to read.",
+                    "            ('rdf' is DEPRECATED).",
+                    "",
+                    "",
+                    "        Attributes",
+                    "        ----------",
+                    "",
+                    "        atoms : dict",
+                    "",
+                    "        energy_eV : dict",
+                    "",
+                    "        name : (?)",
+                    "            Sha - checksum.",
+                    "",
+                    "        chemical_symbols : dict",
+                    "",
+                    "        chemical_formula : dict",
+                    "",
+                    "        spacegroup_analyzer : dict",
+                    "            Spacegroup analyzer object of pymatgen",
+                    "            http://pymatgen.org/_modules/pymatgen/symmetry/analyzer.html",
+                    "",
+                    "",
+                    "        \"\"\"",
+                    "",
+                    "    def __init__(",
+                    "            self, in_file=None, frame_list=None, png_path=None,",
+                    "            png_file=None, geo_path=None, geo_file=None, desc_path=None,",
+                    "            rdf_file=None, xray_path=None, xray_file=None, isPeriodic=None,",
+                    "            file_format=None, cell_type=None, take_first=True,",
+                    "            descriptor=None):",
+                    "",
+                    "        self.m_to_ang = 1.0e10",
+                    "        self.j_to_ev = 6.241509e18",
+                    "        self.atoms = {}",
+                    "        self.scaled_positions = {}",
+                    "        self.energy_total = {}",
+                    "        self.energy_total__eV = {}",
+                    "        self.in_file = in_file",
+                    "        self.frame_list = frame_list",
+                    "        self.png_path = png_path",
+                    "        self.png_file = {}",
+                    "        self.geo_path = geo_path",
+                    "        self.geo_file = {}",
+                    "        self.desc_path = desc_path",
+                    "        self.xray_path = xray_path",
+                    "        self.xray_file = {}",
+                    "        self.xray_npy_file = {}",
+                    "        self.xray_rs_file = {}",
+                    "        self.rdf_file = {}",
+                    "        self.name = os.path.splitext(os.path.basename(in_file))[0]",
+                    "        self.chemical_symbols = {}",
+                    "        self.chemical_formula = {}",
+                    "        self.isPeriodic = isPeriodic",
+                    "        self.Id = {}",
+                    "        self.isEnergyNone = False",
+                    "        self.file_format = file_format",
+                    "        self.cell_type = cell_type",
+                    "        self.spacegroup_analyzer = {}",
+                    "        self.spacegroup_analyzer_actual = {}",
+                    "        ",
+                    "        ",
+                    "        if self.file_format is None:",
+                    "            self.file_format = 'NOMAD'",
+                    "",
+                    "        if self.file_format == 'NOMAD':",
+                    "            # read JSON file",
+                    "            json_dict = self._get_json_dict(in_file)",
+                    "",
+                    "            # get single_config_calc (target: energy_total)",
+                    "            single_config_calc = self._get_single_config_calc(json_dict)",
+                    "",
+                    "            # extract energy from the list in single_config_calc",
+                    "            for (gIndexRun, gIndexSingle), structure in single_config_calc.iteritems():",
+                    "                energy = structure.get('energy_total')",
+                    "                if energy is None:",
+                    "            #        logger.warning(",
+                    "             #           \"Could not find energy_total in \" +",
+                    "              #          \"single_config_calculations \\n with gIndexSingle {0}\" +",
+                    "               #         \"in section_run with gIndexRun {1} \\n\" +",
+                    "                #        \"in file {2}\".format(",
+                    "                 #           gIndexSingle,",
+                    "                  #          gIndexRun,",
+                    "                   #         self.in_file))",
+                    "                    isEnergyNone = True",
+                    "                    self.energy_total[gIndexRun, gIndexSingle] = 0.0",
+                    "                    self.energy_total__eV[gIndexRun, gIndexSingle] = 0.0",
+                    "                else:",
+                    "                    self.energy_total[",
+                    "                        gIndexRun, gIndexSingle] = energy",
+                    "                    self.energy_total__eV[",
+                    "                        gIndexRun, gIndexSingle] = energy * self.j_to_ev",
+                    "",
+                    "            # get system_description (target: structure)",
+                    "            system_descriptions = self._get_system_descriptions(json_dict)",
+                    "",
+                    "            # compare dictionaries of single_config_calc and",
+                    "            # system_descriptions",
+                    "            logger.debug(\"Single configuration keys: {0}\".format(",
+                    "                set(single_config_calc.keys())))",
+                    "            logger.debug(\"System description keys: {0}\".format(",
+                    "                set(system_descriptions.keys())))",
+                    "",
+                    "            intersect = set(single_config_calc.keys()).intersection(",
+                    "                set(system_descriptions.keys()))",
+                    "            not_intersect = set(single_config_calc.keys()).symmetric_difference(",
+                    "                set(system_descriptions.keys()))",
+                    "",
+                    "            logger.debug(",
+                    "                \"Deleting frames that do not both have 'single_config_calc' and in 'system_descriptions'.\")",
+                    "            for key in not_intersect:",
+                    "                if key in system_descriptions:",
+                    "                    del system_descriptions[key]",
+                    "            if take_first:",
+                    "                logger.debug(",
+                    "                    \"Keeping only 1st frame in which both 'single_config_calc' and 'system_descriptions' are present.\")",
+                    "                not_intersect_system = set([(0, 0)]).symmetric_difference(",
+                    "                    set(system_descriptions.keys()))",
+                    "                not_intersect_single = set([(0, 0)]).symmetric_difference(",
+                    "                    set(single_config_calc.keys()))",
+                    "                index = 0",
+                    "            else:",
+                    "                logger.debug(",
+                    "                    \"Keeping only last frame in which both 'single_config_calc' and 'system_descriptions' are present.\")",
+                    "                index = len(system_descriptions)-1",
+                    "            system_descriptions_value = system_descriptions[(0, index)]",
+                    "            system_descriptions.clear()",
+                    "            system_descriptions[(0, 0)] = system_descriptions_value",
+                    "",
+                    "            single_config_calc_value = single_config_calc[(0, index)]",
+                    "            single_config_calc.clear()",
+                    "            single_config_calc[(0, 0)] = single_config_calc_value",
+                    "               ",
+                    "            # print len(single_config_calc)",
+                    "            # print len(system_descriptions)",
+                    "",
+                    "            # print set(single_config_calc.keys())",
+                    "            # print set(system_descriptions.keys())",
+                    "",
+                    "            # extract structure data from the list in system_descriptions",
+                    "            # the key is a tuple (gIndexRun, gIndexDesc)",
+                    "            # Note: self.atoms is a dict with key (gIndexRun, gIndexDesc)",
+                    "            # for (gIndexRun, gIndexDesc), structure in",
+                    "            # system_descriptions.items():",
+                    "            for (gIndexRun, gIndexDesc), structure in system_descriptions.iteritems():",
+                    "                # old format",
+                    "                # labels = structure.get('atom_label')",
+                    "                labels = structure.get('atom_labels')",
+                    "",
+                    "                if labels is None:",
+                    "                    raise Exception(",
+                    "                        \"Could not find atom_label in section_system_description\" +",
+                    "                        \"\\nwith gIndex %d in section_run with gIndex \" +",
+                    "                        \"%d!\" %",
+                    "                        gIndexDesc %",
+                    "                        gIndexRun)",
+                    "",
+                    "                # positions = structure.get('atom_position')",
+                    "                positions = structure.get('atom_positions')",
+                    "",
+                    "                if positions is None:",
+                    "                    raise Exception(",
+                    "                        \"Could not find atom_position in \" +",
+                    "                        \"section_system_description \\nwith gIndex %d in\" +",
+                    "                        \"section_run with gIndex %d!\" % gIndexDesc % gIndexRun)",
+                    "",
+                    "                cell = structure.get('simulation_cell')",
+                    "",
+                    "                # convert to Angstrom and numpy array",
+                    "                positions = self.m_to_ang * np.asarray(positions)",
+                    "",
+                    "                # check if all labels are known by ase",
+                    "                # if not change unknown label to X",
+                    "                for i in range(len(labels)):",
+                    "                    number = ase.data.atomic_numbers.get(labels[i])",
+                    "                    if number is None:",
+                    "                        labels[i] = u'X'",
+                    "",
+                    "                if cell is None:",
+                    "                    self.isPeriodic = False",
+                    "                    atoms = ase.Atoms(",
+                    "                        symbols=labels, positions=positions,",
+                    "                        cell=None, pbc=False)",
+                    "                else:",
+                    "                    self.isPeriodic = True",
+                    "                    # convert to Angstrom and numpy array",
+                    "                    cell = self.m_to_ang * np.asarray(cell)",
+                    "                    # in the metadata, simulation_cell has lattice vectors as",
+                    "                    # columns, ase has them as rows => transpose",
+                    "                    atoms = ase.Atoms(",
+                    "                        symbols=labels, positions=positions,",
+                    "#                        cell=np.transpose(cell), pbc=True)",
+                    "                        cell=cell, pbc=True)",
+                    "",
+                    "",
+                    "                # get conventional or primitive standard cell with pymatgen",
+                    "                if self.cell_type is not None:",
+                    "                    if self.cell_type == 'primitive':",
+                    "                        atoms = get_conventional_standard_atoms(atoms)",
+                    "                        atoms = get_primitive_standard_atoms(atoms)",
+                    "                    elif self.cell_type == 'standard':",
+                    "                        atoms = get_conventional_standard_atoms(atoms)",
+                    "",
+                    "                # get the SpacegroupAnalyzer object from pymatgen ",
+                    "                # for further processing (e.g. to get spacegroup number or symbol)",
+                    "                # (from PyMatGen): tolerance of 0.1 (the value used in Materials Project) is often needed",
+                    "#                symprecs = np.logspace(-3, -1, 7, endpoint=True, base=10.0).tolist()   ",
+                    "#                symprecs = np.linspace(1.0E-3, 1E-1, i, endpoint=True).tolist()   ",
+                    "#                symprecs = [1.0E-3, 1.0E-2, 1.0E-1]",
+                    "#                angle_tolerances = [1., 5.]",
+                    "",
+                    "                symprecs = [1.0E-3]",
+                    "                angle_tolerances = [1.]",
+                    "",
+                    "                spacegroup_analyzer = {}  ",
+                    "                # build a dictionary with different spacegroup analyzers according",
+                    "                # to the thresholds used",
+                    "                try:",
+                    "                    for symprec in symprecs:",
+                    "                        for angle_tolerance in angle_tolerances:",
+                    "                            spacegroup_analyzer[symprec, angle_tolerance] = SpacegroupAnalyzer(AseAtomsAdaptor.get_structure(atoms),",
+                    "#                    symprec=1e-1, angle_tolerance=5) ",
+                    "                        symprec=symprec, angle_tolerance=angle_tolerance) ",
+                    "                except:",
+                    "                    spacegroup_analyzer=None",
+                    "                ",
+                    "                # wrap atomic positions inside unit cell",
+                    "                atoms.wrap()",
+                    "                # save the atoms",
+                    "                self.Id[gIndexRun, gIndexDesc] = (gIndexRun, gIndexDesc)",
+                    "                self.atoms[gIndexRun, gIndexDesc] = atoms",
+                    "                # get chemical formula",
+                    "                self.chemical_formula[",
+                    "                    gIndexRun,",
+                    "                    gIndexDesc] = atoms.get_chemical_formula(",
+                    "                    mode='hill')",
+                    "                self.chemical_symbols[",
+                    "                    gIndexRun, gIndexDesc] = atoms.get_chemical_symbols()",
+                    "                self.scaled_positions[",
+                    "                    gIndexRun,",
+                    "                    gIndexDesc] = atoms.get_scaled_positions(",
+                    "                    wrap=True)",
+                    "                        ",
+                    "                self.spacegroup_analyzer[",
+                    "                    gIndexRun,",
+                    "                    gIndexDesc] = spacegroup_analyzer",
+                    "                ",
+                    "",
+                    "        elif self.file_format == 'xyz':",
+                    "            ''' reads xyz file with a list of configurations'''",
+                    "            xyz_file = open(self.in_file, 'r')",
+                    "",
+                    "            try:",
+                    "                ase_frames = ase.io.read(self.in_file, index=':', format='xyz')",
+                    "                logger.debug(",
+                    "                    \"Number of frames found: {0}\".format(",
+                    "                        len(ase_frames)))",
+                    "",
+                    "                N_frames = len(ase_frames)",
+                    "",
+                    "                # usually the frame list is not defined in this cases",
+                    "                if frame_list is None:",
+                    "                    frame_list = range(N_frames)",
+                    "",
+                    "                # check if frame_list is actually a list and not only a number",
+                    "                if isinstance(frame_list, list) is False:",
+                    "                    frame_list = [frame_list]",
+                    "",
+                    "                for frame in frame_list:",
+                    "",
+                    "                    atoms = ase_frames[frame]",
+                    "",
+                    "                    # wrap atomic positions inside unit cell",
+                    "                    atoms.wrap()",
+                    "",
+                    "                    # save the atoms",
+                    "                    self.atoms[0, frame] = atoms",
+                    "",
+                    "                    # instead of chemical formula, display the name",
+                    "                    self.chemical_formula[",
+                    "                        0, frame] = atoms.get_chemical_formula(",
+                    "                        mode='hill')",
+                    "                    self.energy_total__eV[0, frame] = 0.0",
+                    "                    self.energy_total[0, frame] = 0.0",
+                    "",
+                    "",
+                    "                    # it is the same as self.gIndexDescMax = i",
+                    "                    self.gIndexRunMax = 0",
+                    "                    self.gIndexDescMax = len(frame_list) - 1",
+                    "",
+                    "            finally:",
+                    "                xyz_file.close()",
+                    "",
+                    "        else:",
+                    "            logger.error(",
+                    "                \"Please specify if the file is a JSON file is either a file \\nfrom the NOMAD repository or a Radial Distribution Function\")",
+                    "",
+                    "    def __getitem__(self, index):",
+                    "        return self.energy_total[index], self.png_file[index], self.geo_file[index], self.chemical_formula[index], self.name",
+                    "",
+                    "    def __len__(self):",
+                    "        return self._data_len",
+                    "",
+                    "    def _get_json_dict(self, in_file):",
+                    "        \"\"\"Reads JSON content from file.",
+                    "        Args:",
+                    "            in_file: file which is read.",
+                    "        Returns:",
+                    "            Dictionary loaded from JSON file.",
+                    "        \"\"\"",
+                    "        try:",
+                    "            with open(in_file) as json_file:",
+                    "                try:",
+                    "                    return json.load(json_file)",
+                    "                except Exception:",
+                    "                    logger.error(",
+                    "                        \"Could not read content from JSON file '%s'! See below for error message.\" %",
+                    "                        in_file)",
+                    "                    raise",
+                    "                finally:",
+                    "                    json_file.close()",
+                    "        except IOError:",
+                    "            raise Exception(\"Could not open file '%s'!\" % in_file)",
+                    "",
+                    "    def _get_system_descriptions(self, json_dict):",
+                    "        \"\"\"Extract section_system_description from JSON dictionary (to obtain the structure in this case)",
+                    "        Args:",
+                    "            json_dict: JSON dictionary containing parsed data.",
+                    "        Returns:",
+                    "            Dictionaries of section_system_description for each section_run as dictionary.",
+                    "            The keys are a tuple (gIndexRun, gIndexDesc) of the different section_run and section_system_description, respectively.",
+                    "        \"\"\"",
+                    "",
+                    "        # old format",
+                    "        # for section in sections",
+                    "",
+                    "        found_section_run = False",
+                    "        sections = json_dict.get('sections')",
+                    "        section_system_descriptions = {}",
+                    "",
+                    "        # read section_run and for each section_run read section_system_description",
+                    "        # gIndexRun:  gIndex for section_run",
+                    "        # gIndexDesc: gIndex for section_system_description",
+                    "        if sections is not None:",
+                    "            for section in sections.values():",
+                    "                if section.get('name') == 'section_run':",
+                    "                    found_section_run = True",
+                    "                    section_run_sections = section.get('sections')",
+                    "                    gIndexRun = section.get('gIndex')",
+                    "                    if section_run_sections is not None and gIndexRun is not None:",
+                    "                        # extract all occurrences of section_system_description",
+                    "                        for section_run_section in section_run_sections.values():",
+                    "                            if section_run_section.get(",
+                    "                                    'name') == 'section_system':",
+                    "                                # if section_run_section.get('name') ==",
+                    "                                # 'section_system_description':",
+                    "                                found_section_system_description = True",
+                    "                                gIndexDesc = section_run_section.get('gIndex')",
+                    "                                section_system_descriptions[",
+                    "                                    gIndexRun, gIndexDesc] = section_run_section",
+                    "                    else:",
+                    "                        raise Exception(\"Could not find key 'sections' or 'gIndex' in section_run!\")",
+                    "",
+                    "            if not found_section_run:",
+                    "                raise Exception(\"Could not find any section_run!\")",
+                    "        else:",
+                    "            raise Exception(\"Could not find key 'sections' in JSON file!\")",
+                    "",
+                    "        self.gIndexRunMax = gIndexRun",
+                    "        self.gIndexDescMax = gIndexDesc",
+                    "        return section_system_descriptions",
+                    "",
+                    "    def _get_single_config_calc(self, json_dict):",
+                    "        \"\"\"Extract _get_single_config_calc from JSON dictionary (to obtain the energy in this case).",
+                    "        It is the analogue of ' _get_system_descriptions', but for the single_config_calc section.",
+                    "        Args:",
+                    "            json_dict: JSON dictionary containing parsed data.",
+                    "        Returns:",
+                    "            Dictionaries of _get_single_config_calc for each section_run as dictionary.",
+                    "            The keys are a tuple (gIndexRun, gIndexSingle) of the different section_run and section_single_configuration_calculation, respectively.",
+                    "        \"\"\"",
+                    "",
+                    "        # old format",
+                    "        # for section in sections",
+                    "",
+                    "        found_section_run = False",
+                    "        sections = json_dict.get('sections')",
+                    "        section_single_config_calc = {}",
+                    "",
+                    "        # read section_run and for each section_run read section_system_description",
+                    "        # gIndexRun:  gIndex for section_run",
+                    "        # gIndexDesc: gIndex for single_config_calc",
+                    "",
+                    "        if sections is not None:",
+                    "            for section in sections.values():",
+                    "                if section.get('name') == 'section_run':",
+                    "                    found_section_run = True",
+                    "                    section_run_sections = section.get('sections')",
+                    "                    gIndexRun = section.get('gIndex')",
+                    "",
+                    "                    if section_run_sections is not None and gIndexRun is not None:",
+                    "                        # extract all occurrences of",
+                    "                        # section_single_configuration_calculation",
+                    "                        for section_run_section in section_run_sections.values():",
+                    "                            if section_run_section.get(",
+                    "                                    'name') == 'section_single_configuration_calculation':",
+                    "                                found_section_single_configuration_calculation = True",
+                    "                                gIndexSingle = section_run_section.get(",
+                    "                                    'gIndex')",
+                    "                                section_single_config_calc[",
+                    "                                    gIndexRun, gIndexSingle] = section_run_section",
+                    "                    else:",
+                    "                        raise Exception(",
+                    "                            \"Could not find key 'sections' or 'gIndex' in section_run!\")",
+                    "            if not found_section_run:",
+                    "                raise Exception(\"Could not find any section_run!\")",
+                    "        else:",
+                    "            raise Exception(\"Could not find key 'sections' in JSON file!\")",
+                    "        return section_single_config_calc",
+                    "",
+                    "    def write_geometry(",
+                    "            self,",
+                    "            path=None,",
+                    "            filename_suffix='_aims.in',",
+                    "            format='aims',",
+                    "            operation_number=0):",
+                    "        \"\"\"Writes the coordinates of the structure as text file with the writing routine of ASE.",
+                    "",
+                    "        Parameters",
+                    "        ----------",
+                    "        path : string, optional, default `geo_path`",
+                    "            Path to the folder where the geometry files are written",
+                    "",
+                    "        filename_suffix : string, default '_aims.in'",
+                    "            Suffix added after filename",
+                    "",
+                    "        format : string, optional, default 'aims'",
+                    "            Format of the file to be written. Must be a valid ASE format",
+                    "            (see https://wiki.fysik.dtu.dk/ase/ase/io/io.html#module-ase.io)",
+                    "",
+                    "        \"\"\"",
+                    "        # define the default path as geo_path",
+                    "        if path is None:",
+                    "            path = self.geo_path",
+                    "",
+                    "        if self.file_format == 'NOMAD':",
+                    "            for (gIndexRun, gIndexDesc), atoms in self.atoms.items():",
+                    "                if atoms is not None:",
+                    "                    # filename is the normalized absolute path",
+                    "                    filename = os.path.abspath(",
+                    "                        os.path.normpath(",
+                    "                            os.path.join(",
+                    "                                path, '%s_%d_%d_op%d%s' %",
+                    "                                (self.name, gIndexRun, gIndexDesc, operation_number, filename_suffix))))",
+                    "                                ",
+                    "                    atoms.write(filename, format=format)",
+                    "",
+                    "                    # store the normalized absolute path to the geometry file",
+                    "                    # in the class",
+                    "                    if configs[\"isBeaker\"] == \"True\":",
+                    "#                    if False:",
+                    "                        # only for Beaker Notebook",
+                    "                        filename = os.path.abspath(",
+                    "                            os.path.normpath(",
+                    "                                os.path.join(",
+                    "                                    '/user/tmp/', '%s_%d_%d_op%d%s' %",
+                    "                                    (self.name, gIndexRun, gIndexDesc, operation_number, filename_suffix))))",
+                    "                    else:",
+                    "                        # to run locally",
+                    "                        filename = os.path.abspath(",
+                    "                            os.path.normpath(",
+                    "                                os.path.join(",
+                    "                                    path, '%s_%d_%d_op%d%s' %",
+                    "                                    (self.name, gIndexRun, gIndexDesc, operation_number, filename_suffix))))",
+                    "",
+                    "                    self.geo_file[gIndexRun, gIndexDesc] = filename",
+                    "",
+                    "",
+                    "        else:",
+                    "            raise Exception(",
+                    "                \"Please specify a valid file format. Possible file formats are 'NOMAD' or 'rdf'.\")",
+                    "",
+                    "    def write_png(",
+                    "            self,",
+                    "            path=None,",
+                    "            filename_suffix='.png',",
+                    "            replicas=None,",
+                    "            rotation=None,",
+                    "            operation_number=0):",
+                    "                ",
+                    "        \"\"\"Write png images for the structures read from the JSON files. Builds a 4x4x4 supercell",
+                    "        if the structure is periodic.",
+                    "",
+                    "",
+                    "        Parameters",
+                    "        ----------",
+                    "        path : string, optional, default `png_path`",
+                    "            Path to the folder where the geometry files are written",
+                    "",
+                    "        filename_suffix : string, default '.png'",
+                    "            Suffix added after filename",
+                    "",
+                    "        replicas: list of 3 integers, default [4,4,4]",
+                    "            Number of replicas in each direction. Used only if `isPeriodic` is `True`.",
+                    "",
+                    "        \"\"\"",
+                    "        # define the default path as geo_path",
+                    "        if path is None:",
+                    "            path = self.png_path",
+                    "",
+                    "        if rotation:",
+                    "            rot = '10z,-80x'",
+                    "        else:",
+                    "            rot = '0x, 0y, 0z'",
+                    "",
+                    "        filename_list = []",
+                    "",
+                    "        if self.file_format == 'NOMAD':",
+                    "            for (gIndexRun, gIndexDesc), atoms in self.atoms.items():",
+                    "                if atoms is not None:",
+                    "                    # filename is the normalized absolute path",
+                    "                    filename = os.path.abspath(",
+                    "                        os.path.normpath(",
+                    "                            os.path.join(",
+                    "                                path, '%s_%d_%d_op%d_geometry_thumbnail%s' %",
+                    "                                (self.name, gIndexRun, gIndexDesc, operation_number, filename_suffix))))",
+                    "",
+                    "                    # if it is periodic, replicate according to the vector",
+                    "                    # replicas",
+                    "                    if self.isPeriodic:",
+                    "                        # set the default to 4 replicas in each direction",
+                    "                        if replicas is None:",
+                    "                            replicas = (4, 4, 4)",
+                    "                    else:",
+                    "                        replicas = (1, 1, 1)",
+                    "",
+                    "                    atoms = atoms * replicas",
+                    "",
+                    "                    # View used to start ag, and find desired viewing angle",
+                    "                    # rot = '35x,63y,36z'  # found using ag: 'view -> rotate'",
+                    "",
+                    "                    # Common kwargs for eps, png, pov",
+                    "                    kwargs = {",
+                    "                        # text string with rotation (default='' )",
+                    "                        'rotation': rot,",
+                    "                        'radii': .50,  # float, or a list with one float per atom",
+                    "                        'colors': None,  # List: one (r, g, b) tuple per atom",
+                    "                        'show_unit_cell': 0,   # 0, 1, or 2 to not show, show, and show all of cell",
+                    "                        'scale': 100,",
+                    "                    }",
+                    "",
+                    "                    atoms.write(filename, format='png', **kwargs)",
+                    "",
+                    "                    if configs[\"isBeaker\"] == \"True\":",
+                    "                        # only for Beaker Notebook",
+                    "                        filename = os.path.abspath(",
+                    "                            os.path.normpath(",
+                    "                                os.path.join(",
+                    "                                    '/user/tmp/', '%s_%d_%d_op%d_geometry_thumbnail%s' %",
+                    "                                (self.name, gIndexRun, gIndexDesc, operation_number, filename_suffix))))",
+                    "                    else:",
+                    "                        # to run locally",
+                    "                        filename = os.path.abspath(",
+                    "                            os.path.normpath(",
+                    "                                os.path.join(",
+                    "                                    path, '%s_%d_%d_op%d_geometry_thumbnail%s' %",
+                    "                                    (self.name, gIndexRun, gIndexDesc, operation_number, filename_suffix))))",
+                    "",
+                    "                    # store the normalized absolute path to the png file in the",
+                    "                    # class",
+                    "                    self.png_file[gIndexRun, gIndexDesc] = filename",
+                    "",
+                    "                    filename_list.append(filename)",
+                    "",
+                    "                else:",
+                    "                    logger.error(\"Could not find atoms in %s\" % self.name)",
+                    "",
+                    "        else:",
+                    "            logger.error(",
+                    "                \"Please specify a valid file format. Possible formats are 'NOMAD' or 'rdf'.\")",
+                    "        ",
+                    "        return filename_list",
+                    "",
+                    "",
+                    "    def _calc_rdf(self, gIndexRun, gIndexDesc, maxR, is_prdf=None):",
+                    "        \"\"\"Returns the radial distribution function of a single (user specified) frame given a NOMADstructure.",
+                    "        This function was written by Fawzi Mohamed.",
+                    "        Args:",
+                    "            gIndexRun: int. run index of the frame (usually 0)",
+                    "            gIndexDesc: int. system_description index of the frame",
+                    "            maxR: float. cut-off radius up to which the atom distances are considered",
+                    "            is_prdf: bool. If true calculates partial radial distribution function.",
+                    "                If false calculates radial distribution function (all atom types are the same)",
+                    "        Returns:",
+                    "            radD: radial distribution function for a single frame with gIndexRun=gIndexRun and gIndexDesc=gIndexDesc",
+                    "        Note:",
+                    "            cell vectors v1,v2,v3 with values in the columns: [[v1x,v2x,v3x],[v1y,v2y,v3x],[v1z,v2z,v3z]]",
+                    "        \"\"\"",
+                    "        if is_prdf is None:",
+                    "            is_prdf = True",
+                    "",
+                    "        if self.isPeriodic:",
+                    "            # in the metadata, the simulation_cell has lattice vectors as columns, ASE has them as rows",
+                    "            # in the NOMADstructure the cell has been trasposed from the metadata => lattice vectors are as rows",
+                    "            # calc_rdf needs lattice vectors as colulmns => transpose again",
+                    "            cell = self.atoms[gIndexRun, gIndexDesc].get_cell()",
+                    "#            cell = np.transpose(cell)",
+                    "            atoms = self.atoms[gIndexRun, gIndexDesc]",
+                    "            positions = self.atoms[",
+                    "                gIndexRun,",
+                    "                gIndexDesc].get_positions(",
+                    "                wrap=True)",
+                    "            maxR2 = maxR * maxR",
+                    "",
+                    "            radD = {}",
+                    "            for ii, a1 in enumerate(atoms):",
+                    "                for jj, a2 in enumerate(atoms[ii:]):",
+                    "",
+                    "                    # write atomic numbers if prdf, otherwise set them to zero",
+                    "                    if is_prdf:",
+                    "                        n1 = a1.number",
+                    "                        n2 = a2.number",
+                    "                    else:",
+                    "                        n1 = 0",
+                    "                        n2 = 0",
+                    "",
+                    "                    label = \"%d_%d\" % (min(n1, n2), max(n1, n2))",
+                    "                    if label not in radD:",
+                    "                        radD[label] = {",
+                    "                            \"particle_atom_numer_1\": n1,",
+                    "                            \"particle_atom_numer_2\": n2,",
+                    "                            \"arr\": []",
+                    "                        }",
+                    "                    arr = radD[label][\"arr\"]",
+                    "                    r0 = np.array([a1.x - a2.x, a1.y - a2.y, a1.z - a2.z])",
+                    "                    r02 = np.dot(r0, r0)",
+                    "                    r = r02 - maxR2",
+                    "                    m = np.dot(cell.transpose(), cell)",
+                    "                    l = np.dot(r0, cell)",
+                    "                    r = np.dot(r0, r0) - maxR2",
+                    "                    mii = m[0, 0]",
+                    "                    mij = m[0, 1]",
+                    "                    mik = m[0, 2]",
+                    "                    mjj = m[1, 1]",
+                    "                    mjk = m[1, 2]",
+                    "                    mkk = m[2, 2]",
+                    "                    li = l[0]",
+                    "                    lj = l[1]",
+                    "                    lk = l[2]",
+                    "                    c = (",
+                    "                        mjj**2 *",
+                    "                        mkk**3 *",
+                    "                        r -",
+                    "                        2 *",
+                    "                        mjj *",
+                    "                        mjk**2 *",
+                    "                        mkk**2 *",
+                    "                        r +",
+                    "                        mjk**4 *",
+                    "                        mkk *",
+                    "                        r -",
+                    "                        lj**2 *",
+                    "                        mjj *",
+                    "                        mkk**3 +",
+                    "                        lj**2 *",
+                    "                        mjk**2 *",
+                    "                        mkk**2 +",
+                    "                        2 *",
+                    "                        lj *",
+                    "                        lk *",
+                    "                        mjj *",
+                    "                        mjk *",
+                    "                        mkk**2 -",
+                    "                        lk**2 *",
+                    "                        mjj**2 *",
+                    "                        mkk**2 -",
+                    "                        2 *",
+                    "                        lj *",
+                    "                        lk *",
+                    "                        mjk**3 *",
+                    "                        mkk +",
+                    "                        lk**2 *",
+                    "                        mjj *",
+                    "                        mjk**2 *",
+                    "                        mkk)",
+                    "                    a = (",
+                    "                        mii *",
+                    "                        mjj**2 *",
+                    "                        mkk**3 -",
+                    "                        mij**2 *",
+                    "                        mjj *",
+                    "                        mkk**3 -",
+                    "                        2 *",
+                    "                        mii *",
+                    "                        mjj *",
+                    "                        mjk**2 *",
+                    "                        mkk**2 +",
+                    "                        mij**2 *",
+                    "                        mjk**2 *",
+                    "                        mkk**2 +",
+                    "                        2 *",
+                    "                        mij *",
+                    "                        mik *",
+                    "                        mjj *",
+                    "                        mjk *",
+                    "                        mkk**2 -",
+                    "                        mik**2 *",
+                    "                        mjj**2 *",
+                    "                        mkk**2 +",
+                    "                        mii *",
+                    "                        mjk**4 *",
+                    "                        mkk -",
+                    "                        2 *",
+                    "                        mij *",
+                    "                        mik *",
+                    "                        mjk**3 *",
+                    "                        mkk +",
+                    "                        mik**2 *",
+                    "                        mjj *",
+                    "                        mjk**2 *",
+                    "                        mkk)",
+                    "                    b = (",
+                    "                        2 *",
+                    "                        li *",
+                    "                        mjj**2 *",
+                    "                        mkk**3 -",
+                    "                        2 *",
+                    "                        lj *",
+                    "                        mij *",
+                    "                        mjj *",
+                    "                        mkk**3 -",
+                    "                        4 *",
+                    "                        li *",
+                    "                        mjj *",
+                    "                        mjk**2 *",
+                    "                        mkk**2 +",
+                    "                        2 *",
+                    "                        lj *",
+                    "                        mij *",
+                    "                        mjk**2 *",
+                    "                        mkk**2 +",
+                    "                        2 *",
+                    "                        lj *",
+                    "                        mik *",
+                    "                        mjj *",
+                    "                        mjk *",
+                    "                        mkk**2 +",
+                    "                        2 *",
+                    "                        lk *",
+                    "                        mij *",
+                    "                        mjj *",
+                    "                        mjk *",
+                    "                        mkk**2 -",
+                    "                        2 *",
+                    "                        lk *",
+                    "                        mik *",
+                    "                        mjj**2 *",
+                    "                        mkk**2 +",
+                    "                        2 *",
+                    "                        li *",
+                    "                        mjk**4 *",
+                    "                        mkk -",
+                    "                        2 *",
+                    "                        lj *",
+                    "                        mik *",
+                    "                        mjk**3 *",
+                    "                        mkk -",
+                    "                        2 *",
+                    "                        lk *",
+                    "                        mij *",
+                    "                        mjk**3 *",
+                    "                        mkk +",
+                    "                        2 *",
+                    "                        lk *",
+                    "                        mik *",
+                    "                        mjj *",
+                    "                        mjk**2 *",
+                    "                        mkk)",
+                    "",
+                    "                    delta = b * b - 4 * a * c",
+                    "",
+                    "                    if (a == 0 or delta < 0):",
+                    "                        continue",
+                    "                    sDelta = math.sqrt(delta)",
+                    "                    imin = int(math.ceil((-b - sDelta) / (2 * a)))",
+                    "                    imax = int(math.floor((-b + sDelta) / (2 * a)))",
+                    "                    for i in range(imin, imax + 1):",
+                    "                        cj = (mkk * r + i**2 * mii * mkk + 2 * i * li *",
+                    "                              mkk - i**2 * mik**2 - 2 * i * lk * mik - lk**2)",
+                    "                        aj = (mjj * mkk - mjk**2)",
+                    "                        bj = (2 * i * mij * mkk + 2 * lj * mkk -",
+                    "                              2 * i * mik * mjk - 2 * lk * mjk)",
+                    "                        deltaj = bj * bj - 4 * aj * cj",
+                    "                        if (aj == 0 or deltaj < 0):",
+                    "                            continue",
+                    "                        sDeltaj = math.sqrt(deltaj)",
+                    "                        jmin = int(math.ceil((-bj - sDeltaj) / (2 * aj)))",
+                    "                        jmax = int(math.floor((-bj + sDeltaj) / (2 * aj)))",
+                    "                        for j in range(jmin, jmax + 1):",
+                    "                            ck = r + j**2 * mjj + 2 * i * j * mij + i**2 * mii + 2 * j * lj + 2 * i * li",
+                    "                            ak = mkk",
+                    "                            bk = (2 * j * mjk + 2 * i * mik + 2 * lk)",
+                    "                            deltak = bk * bk - 4 * ak * ck",
+                    "                            if (ak == 0 or deltak < 0):",
+                    "                                continue",
+                    "                            sDeltak = math.sqrt(deltak)",
+                    "                            kmin = int(math.ceil((-bk - sDeltak) / (2 * ak)))",
+                    "                            kmax = int(math.floor((-bk + sDeltak) / (2 * ak)))",
+                    "                            for k in range(kmin, kmax + 1):",
+                    "                                if (jj != 0 or i != 0 or j != 0 or k != 0):",
+                    "                                    rr = r02 + k**2 * mkk + k * \\",
+                    "                                        (2 * j * mjk + 2 * i * mik + 2 * lk) + j**2 * mjj + 2 * i * j * mij + i**2 * mii + 2 * j * lj + 2 * i * li",
+                    "                                    arr.append(math.sqrt(rr))",
+                    "            wFact = 4 * math.pi * len(atoms) / abs(np.linalg.det(cell))",
+                    "            for k, v in radD.items():",
+                    "                v[\"arr\"].sort()",
+                    "                v[\"weights\"] = map(lambda r: 1.0 / (wFact * r * r), v[\"arr\"])",
+                    "            return radD",
+                    "",
+                    "    def write_rdf(",
+                    "            self,",
+                    "            path=None,",
+                    "            filename_suffix='.json',",
+                    "            maxR=None,",
+                    "            is_prdf=None):",
+                    "        \"\"\"Write a JSON file with structure info and radial distribution functions of all the frames in the NOMADstructure",
+                    "",
+                    "        One json file is generated for each NOMADjson file. If the NOMADjson file contains multiple frames,",
+                    "        the partial radial distribution functions of different frames are appended.",
+                    "",
+                    "        Parameters",
+                    "        ----------",
+                    "        path : string",
+                    "            Path to the folder where the rdf file is written",
+                    "",
+                    "        filename_suffix : string, default '.json'",
+                    "            Suffix added after filename (the filename is the NoMaD database unique identifier)",
+                    "",
+                    "        replicas : list of 3 integers, default [4,4,4]",
+                    "            Number of replicas in each direction. Used only if `isPeriodic` is `True`.",
+                    "",
+                    "        maxR : float, default 25",
+                    "            Cut-off radius in Angstrom up to which the atom distances are considered",
+                    "",
+                    "            .. todo:: Add BIN_COUNT to parameters.",
+                    "",
+                    "        is_prdf : bool, default `True`",
+                    "            If `True` calculates partial radial distribution function.",
+                    "            If `False` calculates radial distribution function (all atom types are the same)",
+                    "",
+                    "",
+                    "        Returns",
+                    "        -------",
+                    "",
+                    "        filename : string",
+                    "            Absolute path where the file with the partial radial distribution function(s) is written.",
+                    "",
+                    "",
+                    "        \"\"\"",
+                    "",
+                    "        if self.isPeriodic:",
+                    "            filename = os.path.abspath(",
+                    "                os.path.normpath(",
+                    "                    os.path.join(",
+                    "                        path, '%s%s' %",
+                    "                        (self.name, filename_suffix))))",
+                    "            self.rdf_file = filename",
+                    "            outF = file(filename, 'w')",
+                    "            outF.write(\"\"\"",
+                    "    {",
+                    "          \"data\":[\"\"\")",
+                    "",
+                    "            for (gIndexRun, gIndexDesc), atoms in self.atoms.items():",
+                    "                if atoms is not None:",
+                    "                    # filename is the normalized absolute path",
+                    "                    # filename = os.path.abspath(os.path.normpath(os.path.join(path, '%s_%d_%d%s' % (self.name, gIndexRun, gIndexDesc, filename_suffix))))",
+                    "                    # store the normalized absolute path to the rdf file in the class",
+                    "                    # self.rdf_file[gIndexRun, gIndexDesc] = filename",
+                    "",
+                    "                    cell = self.atoms[gIndexRun, gIndexDesc].get_cell()",
+                    "#                    cell = np.transpose(cell)",
+                    "                    atoms = self.atoms[gIndexRun, gIndexDesc]",
+                    "                    positions = self.atoms[",
+                    "                        gIndexRun, gIndexDesc].get_positions(",
+                    "                        wrap=True)",
+                    "                    energy_total__eV = self.energy_total__eV[gIndexRun, gIndexDesc]",
+                    "                    energy_total = self.energy_total[gIndexRun, gIndexDesc]",
+                    "",
+                    "                    writeColon = False",
+                    "",
+                    "                    rdf = self._calc_rdf(",
+                    "                        gIndexRun=gIndexRun,",
+                    "                        gIndexDesc=gIndexDesc,",
+                    "                        maxR=25,",
+                    "                        is_prdf=is_prdf)",
+                    "                    res = {",
+                    "                        \"calc_id\": 'NaN',",
+                    "                        \"checksum\": self.name,",
+                    "                        \"energy_total\": energy_total,",
+                    "                        \"energy_total__eV\": energy_total__eV,",
+                    "                        \"path\": self.rdf_file,",
+                    "                        \"step\": gIndexDesc,",
+                    "                        \"final\": 'NaN',",
+                    "                        \"struct_id\": 'NaN',",
+                    "                        \"cell\": cell.tolist(),",
+                    "                        \"particle_atom_number\": map(",
+                    "                            lambda x: x.number,",
+                    "                            atoms),",
+                    "                        \"particle_position\": map(",
+                    "                            lambda x: [",
+                    "                                x.x,",
+                    "                                x.y,",
+                    "                                x.z],",
+                    "                            atoms),",
+                    "                        \"radial_distribution_function\": rdf}",
+                    "                    if (writeColon):",
+                    "                        outF.write(\", \")",
+                    "                    writeColon = True",
+                    "                    json.dump(res, outF, indent=2)",
+                    "            outF.write(\"\"\"",
+                    "    ] }\"\"\")",
+                    "            outF.flush()",
+                    "",
+                    "        else:",
+                    "            raise Exception(",
+                    "                \"File {0} is a non-periodic structure. The radial distribution function is \\ncurrently implemented only for periodic systems.\".format(self.in_file))",
+                    "",
+                    "        # only 1 filename because all the frames are in the same file",
+                    "        return filename",
+                    "",
+                    "    def write_xray(",
+                    "            self,",
+                    "            path=None,",
+                    "            filename_suffix='_xray.png',",
+                    "            replicas=None,",
+                    "            grayscale=True,",
+                    "            user_param_source=None,",
+                    "            user_param_detector=None,",
+                    "            rotation=None,",
+                    "            angles_d=None):",
+                    "        \"\"\"Write xray images for the structures read from the JSON files. Builds a 4x4x4 supercell",
+                    "        if the structure is periodic.",
+                    "",
+                    "        Parameters",
+                    "        ----------",
+                    "        path : string, optional, default `xray_path`",
+                    "            Path to the folder where the xray files are written",
+                    "",
+                    "        filename_suffix : string, default '_xray.png'",
+                    "            Suffix added after filename",
+                    "",
+                    "        replicas: list of 3 integers, default [4,4,4]",
+                    "            Number of replicas in each direction. Used only if `isPeriodic` is `True`.",
+                    "",
+                    "        Returns",
+                    "        -------",
+                    "",
+                    "        filename_list : string or list",
+                    "            Xray file (or list of xray files) generated from the file. It is a list if multiple",
+                    "            frames are present.",
+                    "",
+                    "        \"\"\"",
+                    "",
+                    "        filename_list = []",
+                    "",
+                    "        # define the default path as xray_path",
+                    "        if path is None:",
+                    "            path = self.xray_path",
+                    "",
+                    "        param_source = {",
+                    "            'wavelength': 1.0E-11,",
+                    "            'pulse_energy': 1.6022e-14,",
+                    "            'focus_diameter': 1E-6",
+                    "        }",
+                    "",
+                    "        param_detector = {",
+                    "            'distance': 0.10,",
+                    "            'pixel_size': 16E-5,",
+                    "            'nx': 28,",
+                    "            'ny': 28",
+                    "        }",
+                    "",
+                    "        if user_param_source is not None:",
+                    "            param_source.update(user_param_source)",
+                    "",
+                    "        if user_param_detector is not None:",
+                    "            param_detector.update(user_param_detector)",
+                    "",
+                    "        if not rotation:",
+                    "            angles_d = [0.0]",
+                    "",
+                    "        # logger.debug(\"Source parameters \\n {0}\".format(param_source))",
+                    "        # logger.debug(\"Detector parameters \\n {0}\".format(param_source))",
+                    "",
+                    "        if (self.file_format == 'NOMAD') or (self.file_format == 'xyz'):",
+                    "            for (gIndexRun, gIndexDesc), atoms in self.atoms.items():",
+                    "                if atoms is not None:",
+                    "",
+                    "                    # if it is periodic, replicate according to the vector",
+                    "                    # replicas",
+                    "                    if self.isPeriodic:",
+                    "                        # set the default to 4 replicas in each direction",
+                    "                        if replicas is None:",
+                    "                            replicas = (4, 4, 4)",
+                    "                    else:",
+                    "                        replicas = (1, 1, 1)",
+                    "",
+                    "                    atoms = atoms * replicas",
+                    "",
+                    "                    # Source",
+                    "                    src = condor.Source(**param_source)",
+                    "",
+                    "                    # Detector",
+                    "                    det = condor.Detector(**param_detector)",
+                    "",
+                    "                    # Atoms",
+                    "                    atomic_numbers = map(lambda x: x.number, atoms)",
+                    "",
+                    "                    # convert Angstrom to m (CONDOR uses meters)",
+                    "                    atomic_positions = map(",
+                    "                        lambda x: [",
+                    "                            x.x * 1E-10,",
+                    "                            x.y * 1E-10,",
+                    "                            x.z * 1E-10],",
+                    "                        atoms)",
+                    "",
+                    "                    for angle_d in angles_d:",
+                    "                        # filename is the normalized absolute path",
+                    "                        filename_xray = os.path.abspath(",
+                    "                            os.path.normpath(",
+                    "                                os.path.join(",
+                    "                                    path, '%s_%d_%d_%d%s' %",
+                    "                                    (self.name, gIndexRun, gIndexDesc, angle_d, filename_suffix))))",
+                    "                        filename_rs = os.path.abspath(",
+                    "                            os.path.normpath(",
+                    "                                os.path.join(",
+                    "                                    path, '%s_%d_%d_%d%s' %",
+                    "                                    (self.name, gIndexRun, gIndexDesc, angle_d, '_xray_rs.png'))))",
+                    "                        filename_ph = os.path.abspath(",
+                    "                            os.path.normpath(",
+                    "                                os.path.join(",
+                    "                                    path, '%s_%d_%d_%d%s' %",
+                    "                                    (self.name, gIndexRun, gIndexDesc, angle_d, '_xray_ph.png'))))",
+                    "                        filename_npy = os.path.abspath(",
+                    "                            os.path.normpath(",
+                    "                                os.path.join(",
+                    "                                    path, '%s_%d_%d_%d%s' %",
+                    "                                    (self.name, gIndexRun, gIndexDesc, angle_d, '.npy'))))",
+                    "",
+                    "                        angle = angle_d / 360. * 2 * np.pi",
+                    "                        rotation_axis = np.array([0., 0., 1.])/np.sqrt(1.)",
+                    "                        #rotation_axis = np.array([1., 1., 1.]) / np.sqrt(3.)",
+                    "                        quaternion = condor.utils.rotation.quat(",
+                    "                            angle, rotation_axis[0], rotation_axis[1], rotation_axis[2])",
+                    "                        rotation_values = np.array([quaternion])",
+                    "                        rotation_formalism = \"quaternion\"",
+                    "                        rotation_mode = \"extrinsic\"",
+                    "",
+                    "                        par = condor.ParticleAtoms(",
+                    "                            atomic_numbers=atomic_numbers,",
+                    "                            atomic_positions=atomic_positions,",
+                    "                            rotation_values=rotation_values,",
+                    "                            rotation_formalism=rotation_formalism,",
+                    "                            rotation_mode=rotation_mode)",
+                    "",
+                    "                        s = \"particle_atoms\"",
+                    "                        E = condor.Experiment(src, {s: par}, det)",
+                    "                        res = E.propagate()",
+                    "",
+                    "                        real_space = np.fft.fftshift(",
+                    "                            np.fft.ifftn(",
+                    "                                np.fft.fftshift(",
+                    "                                    res[\"entry_1\"][\"data_1\"][\"data_fourier\"])))",
+                    "                        intensity_pattern = res[\"entry_1\"][\"data_1\"][\"data\"]",
+                    "                        fourier_space = res[\"entry_1\"][",
+                    "                            \"data_1\"][\"data_fourier\"]",
+                    "                        phases = np.angle(fourier_space) % (2 * np.pi)",
+                    "                        # vmin = np.log10(res[\"entry_1\"][\"data_1\"][\"data\"].max()/10000.)",
+                    "",
+                    "                        # scaler = preprocessing.StandardScaler().fit(intensity_pattern)",
+                    "                        # intensity_pattern = scaler.transform(intensity_pattern)",
+                    "",
+                    "                        # intensity_pattern = np.log10(intensity_pattern)",
+                    "",
+                    "                        # real space image",
+                    "                        # np.save(filename_npy, rs8)",
+                    "",
+                    "                        if grayscale:",
+                    "                            I8 = (((intensity_pattern -",
+                    "                                    intensity_pattern.min()) /",
+                    "                                   (intensity_pattern.max() -",
+                    "                                    intensity_pattern.min())) *",
+                    "                                  255.0).astype(np.uint8)",
+                    "                            rs8 = (((real_space -",
+                    "                                     real_space.min()) /",
+                    "                                    (real_space.max() -",
+                    "                                     real_space.min())) *",
+                    "                                   255.0).astype(np.uint8)",
+                    "                            ph8 = (((phases - phases.min()) / (phases.max() -",
+                    "                                   phases.min())) * 255.0).astype(np.uint8)",
+                    "",
+                    "                            img = Image.fromarray(I8)",
+                    "                            img.save(filename_xray)",
+                    "",
+                    "                            img = Image.fromarray(rs8)",
+                    "                            img.save(filename_rs)",
+                    "",
+                    "                            img = Image.fromarray(ph8)",
+                    "                            img.save(filename_ph)",
+                    "",
+                    "                            np.save(filename_npy, I8)",
+                    "                            # np.save(filename_npy, ph8)",
+                    "",
+                    "                        else:",
+                    "                            pypl.imsave(",
+                    "                                filename_xray, np.log10(intensity_pattern))",
+                    "                            np.save(filename_npy, intensity_pattern)",
+                    "                            # pypl.imsave(filename_xray, np.log10(intensity_pattern), vmin=vmin)",
+                    "                            pypl.imsave(filename_ph, phases)",
+                    "                            pypl.imsave(filename_rs, abs(real_space))",
+                    "",
+                    "#                       the Viewer with xray files will not work",
+                    "#                        if configs[\"isBeaker\"] == \"True\":",
+                    "#                            # only for Beaker Notebook",
+                    "#                            filename_xray = os.path.abspath(",
+                    "#                                os.path.normpath(",
+                    "#                                    os.path.join(",
+                    "#                                        '/user/tmp/', '%s_%d_%d_%d%s' %",
+                    "#                                        (self.name, gIndexRun, gIndexDesc, angle_d, filename_suffix))))",
+                    "",
+                    "                        # store the normalized absolute path to the png file in",
+                    "                        # the class",
+                    "                        self.xray_file[gIndexRun, gIndexDesc] = filename_xray",
+                    "                        self.xray_npy_file[",
+                    "                            gIndexRun, gIndexDesc] = filename_npy",
+                    "                        self.xray_rs_file[gIndexRun, gIndexDesc] = filename_rs",
+                    "",
+                    "                        filename_list.append(filename_xray)",
+                    "                        filename_list.append(filename_npy)",
+                    "                        filename_list.append(filename_rs)",
+                    "",
+                    "                else:",
+                    "                    raise Exception(\"Could not find atoms in %s\" % self.name)",
+                    "",
+                    "        else:",
+                    "            raise Exception(",
+                    "                \"Please specify a valid file format. Possible format is 'NOMAD'.\")",
+                    "",
+                    "        return filename_list",
+                    "",
+                    "    def write_target_values(self, path=None, filename_suffix='_target.json',",
+                    "                            target=None, operation_number=0):",
+                    "        \"\"\"Write target values. One file for each frame.",
+                    "        The target works only if one frame is considered. Please check.",
+                    "",
+                    "        Parameters",
+                    "        ----------",
+                    "        path : string, optional, default `xray_path`",
+                    "            Path to the folder where the geometry files are written",
+                    "",
+                    "        filename_suffix : string, default '_target.json'",
+                    "            Suffix added after filename",
+                    "",
+                    "        \"\"\"",
+                    "",
+                    "        filename_list = []",
+                    "",
+                    "        # define the default path as xray_path",
+                    "        if path is None:",
+                    "            path = self.xray_path",
+                    "",
+                    "        if (self.file_format == 'NOMAD') or (self.file_format == 'xyz'):",
+                    "            for (gIndexRun, gIndexDesc), atoms in self.atoms.items():",
+                    "                if atoms is not None:",
+                    "                    # filename is the normalized absolute path",
+                    "                    filename = os.path.abspath(",
+                    "                        os.path.normpath(",
+                    "                            os.path.join(",
+                    "                                path, '%s_%d_%d_op%d%s' %",
+                    "                                (self.name, gIndexRun, gIndexDesc, operation_number, filename_suffix))))",
+                    "",
+                    "",
+                    "                    outF = file(filename, 'w')",
+                    "",
+                    "                    outF.write(\"\"\"",
+                    "            {",
+                    "                  \"data\":[\"\"\")",
+                    "",
+                    "                    chemical_formula = self.chemical_formula[",
+                    "                        gIndexRun, gIndexDesc]",
+                    "                    cell = self.atoms[gIndexRun, gIndexDesc].get_cell()",
+                    "#                    cell = np.transpose(cell)",
+                    "                    atoms = self.atoms[gIndexRun, gIndexDesc]",
+                    "                    energy_total__eV = self.energy_total__eV[gIndexRun, gIndexDesc]",
+                    "                    energy_total = self.energy_total[gIndexRun, gIndexDesc]",
+                    "                    ",
+                    "                    spacegroup_symbol = {}",
+                    "                    spacegroup_number = {}",
+                    "                    pointgroup_symbol = {}",
+                    "                    crystal_system = {}",
+                    "                    lattice_type = {}",
+                    "                    hall_symbol = {}",
+                    "                    lattice_centering = {}",
+                    "",
+                    "                    spacegroup_symbol_actual = {}",
+                    "                    spacegroup_number_actual = {}",
+                    "                    pointgroup_symbol_actual = {}",
+                    "                    crystal_system_actual = {}",
+                    "                    lattice_type_actual = {}",
+                    "                    hall_symbol_actual = {}",
+                    "                    lattice_centering_actual = {}",
+                    "                    ",
+                    "                    # calculate the actual spacegroup of the defective struture",
+                    "                    # get the SpacegroupAnalyzer object from pymatgen ",
+                    "                    symprecs = [1.0E-3, 1.0E-2, 1.0E-1]",
+                    "                    angle_tolerances = [1., 5.]",
+                    "    ",
+                    "                    spacegroup_analyzer_actual = {}  ",
+                    "                    # build a dictionary with different spacegroup analyzers according",
+                    "                    # to the thresholds used",
+                    "                    ",
+                    "                    for symprec in symprecs:",
+                    "                        for angle_tolerance in angle_tolerances:",
+                    "                            spacegroup_analyzer_actual[symprec, angle_tolerance] = SpacegroupAnalyzer(AseAtomsAdaptor.get_structure(atoms),",
+                    "                            symprec=symprec, angle_tolerance=angle_tolerance) ",
+                    "                        ",
+                    "                    self.spacegroup_analyzer_actual[gIndexRun, gIndexDesc] = spacegroup_analyzer_actual",
+                    "#                    self.spacegroup_analyzer_actual[gIndexRun, gIndexDesc] = self.spacegroup_analyzer[gIndexRun, gIndexDesc] ",
+                    "                    ",
+                    "                    # read the dictionary with different spacegroup analyzers ",
+                    "                    # according to the thresholds",
+                    "                    # this is for the pristine parental structure",
+                    "                    for key in self.spacegroup_analyzer[gIndexRun, gIndexDesc]:",
+                    "                        symprec, angle_tolerance = key                    ",
+                    "                        spacegroup_symbol[str(key)] = self.spacegroup_analyzer[gIndexRun, gIndexDesc][key].get_space_group_symbol()                    ",
+                    "                        spacegroup_number[str(key)] = self.spacegroup_analyzer[gIndexRun, gIndexDesc][key].get_space_group_number()                    ",
+                    "                        pointgroup_symbol[str(key)] = self.spacegroup_analyzer[gIndexRun, gIndexDesc][key].get_point_group_symbol()                    ",
+                    "                        crystal_system[str(key)] = self.spacegroup_analyzer[gIndexRun, gIndexDesc][key].get_crystal_system() ",
+                    "                        # Get the lattice for the structure, e.g., (triclinic, orthorhombic, cubic, etc.).",
+                    "                        #This is the same than the crystal system with the exception of the",
+                    "                        #hexagonal/rhombohedral lattice",
+                    "                        lattice_type[str(key)] = self.spacegroup_analyzer[gIndexRun, gIndexDesc][key].get_lattice_type() ",
+                    "                        hall_symbol[str(key)] = self.spacegroup_analyzer[gIndexRun, gIndexDesc][key].get_hall()                    ",
+                    "                        lattice_centering[str(key)] = self.spacegroup_analyzer[gIndexRun, gIndexDesc][key].get_space_group_symbol()[0]                    ",
+                    "",
+                    "                        spacegroup_symbol_actual[str(key)] = self.spacegroup_analyzer_actual[gIndexRun, gIndexDesc][key].get_space_group_symbol()                    ",
+                    "                        spacegroup_number_actual[str(key)] = self.spacegroup_analyzer_actual[gIndexRun, gIndexDesc][key].get_space_group_number()                    ",
+                    "                        pointgroup_symbol_actual[str(key)] = self.spacegroup_analyzer_actual[gIndexRun, gIndexDesc][key].get_point_group_symbol()                    ",
+                    "                        crystal_system_actual[str(key)] = self.spacegroup_analyzer_actual[gIndexRun, gIndexDesc][key].get_crystal_system() ",
+                    "                        # Get the lattice for the structure, e.g., (triclinic, orthorhombic, cubic, etc.).",
+                    "                        #This is the same than the crystal system with the exception of the",
+                    "                        #hexagonal/rhombohedral lattice",
+                    "                        lattice_type_actual[str(key)] = self.spacegroup_analyzer_actual[gIndexRun, gIndexDesc][key].get_lattice_type() ",
+                    "                        hall_symbol_actual[str(key)] = self.spacegroup_analyzer_actual[gIndexRun, gIndexDesc][key].get_hall()                    ",
+                    "                        lattice_centering_actual[str(key)] = self.spacegroup_analyzer_actual[gIndexRun, gIndexDesc][key].get_space_group_symbol()[0]                            ",
+                    "                        ",
+                    "                    ",
+                    "                    ",
+                    "                    writeColon = False",
+                    "",
+                    "                    res = {",
+                    "                        \"checksum\": self.name,",
+                    "                        \"main_json_file_name\": self.in_file,",
+                    "                        \"chemical_formula\": chemical_formula,",
+                    "                        \"energy_total__eV\": energy_total__eV,",
+                    "                        \"energy_total\": energy_total,",
+                    "                        \"gIndexRun\": gIndexRun,",
+                    "                        \"gIndexDesc\": gIndexDesc,",
+                    "                        \"cell\": cell.tolist(),",
+                    "                        \"particle_atom_number\": map(",
+                    "                            lambda x: x.number,",
+                    "                            atoms),",
+                    "                        \"particle_position\": map(",
+                    "                            lambda x: [",
+                    "                                x.x,",
+                    "                                x.y,",
+                    "                                x.z],",
+                    "                            atoms),",
+                    "                        \"filename\": filename,",
+                    "                        \"target\": target,",
+                    "                        ",
+                    "                        # these are dictionaries with key: (symprec, angle_tolerance)",
+                    "                        \"spacegroup_symbol\": spacegroup_symbol,",
+                    "                        \"spacegroup_number\": spacegroup_number,",
+                    "                        \"pointgroup_symbol\": pointgroup_symbol,",
+                    "                        \"crystal_system\": crystal_system,",
+                    "                        \"hall_symbol\": hall_symbol,",
+                    "                        \"lattice_type\": lattice_type,",
+                    "                        \"lattice_centering\": lattice_centering,",
+                    "",
+                    "                        \"spacegroup_symbol_actual\": spacegroup_symbol_actual,",
+                    "                        \"spacegroup_number_actual\": spacegroup_number_actual,",
+                    "                        \"pointgroup_symbol_actual\": pointgroup_symbol_actual,",
+                    "                        \"crystal_system_actual\": crystal_system_actual,",
+                    "                        \"hall_symbol_actual\": hall_symbol_actual,",
+                    "                        \"lattice_type_actual\": lattice_type_actual,",
+                    "                        \"lattice_centering_actual\": lattice_centering_actual,",
+                    "",
+                    "                        ",
+                    "#                        \"Bravais_lattice_cs\": crystal_system+lattice_centering,",
+                    "#                        \"Bravais_lattice_lt\": lattice_type+lattice_centering,",
+                    "                        ",
+                    "                        #\"symmetry_dataset\": symmetry_dataset,",
+                    "                        \"operation_number\": operation_number,",
+                    "                    }",
+                    "",
+                    "                    if (writeColon):",
+                    "                        outF.write(\", \")",
+                    "",
+                    "                    writeColon = True",
+                    "                    json.dump(res, outF, indent=2)",
+                    "",
+                    "                    outF.write(\"\"\"",
+                    "            ] }\"\"\")",
+                    "                    outF.flush()",
+                    "",
+                    "                else:",
+                    "                    logger.error(\"Could not find atoms in %s\" % self.name)",
+                    "",
+                    "",
+                    "                filename = os.path.abspath(",
+                    "                    os.path.normpath(",
+                    "                        os.path.join(",
+                    "                            path, '%s_%d_%d_op%d%s' %",
+                    "                            (self.name, gIndexRun, gIndexDesc, operation_number, filename_suffix))))",
+                    "",
+                    "                filename_list.append(filename)",
+                    "",
+                    "        else:",
+                    "            raise Exception(\"Please specify a valid file format.\")",
+                    "",
+                    "        return filename_list"
+                ],
+                "hidden": true
+            },
+            "output": {
+                "state": {},
+                "selectedType": "BeakerDisplay",
+                "pluginName": "IPython",
+                "shellId": "2ED595F8DAE142AD8F34EA76B35AF4BA",
+                "elapsedTime": 5295,
+                "height": 88
+            },
+            "evaluatorReader": true,
+            "lineCount": 1385,
+            "tags": "cell_soap_run",
+            "initialization": true
+        },
         {
             "id": "codeQ4vsu9",
             "type": "code",
@@ -2893,8 +4288,8 @@
                 "state": {},
                 "selectedType": "Results",
                 "pluginName": "IPython",
-                "shellId": "32B7F85D85DA4B05AC8ABA4FA6E22968",
-                "elapsedTime": 641,
+                "shellId": "2ED595F8DAE142AD8F34EA76B35AF4BA",
+                "elapsedTime": 253,
                 "dataresult": {
                     "name": "Fe_query",
                     "timestamp": 1516012342,
@@ -12912,36 +14307,196 @@
                     "path": "data/2018-01-15 103222 Fe_query.json",
                     "data": {}
                 },
-                "height": 91
+                "height": 177
             },
             "evaluatorReader": true,
             "lineCount": 55,
-            "initialization": true,
             "tags": "cell_soap_run"
         },
         {
-            "id": "code5mRsI5",
+            "id": "codeIfeJrQ",
             "type": "code",
             "evaluator": "IPython",
             "input": {
                 "body": [
-                    "query_name = options['query']['query_name']",
-                    "nmd_query_saved = nomad_query.fetch(name_or_index=query_name, resolve=False)",
+                    "def _get_structures(",
+                    "        json_list=None,",
+                    "        frame_list=None,",
+                    "        file_format=None,",
+                    "        png_path=None,",
+                    "        geo_path=None,",
+                    "        desc_path=None,",
+                    "        tmp_folder=None,",
+                    "        cell_type=None,",
+                    "        operations_on_structure=None,",
+                    "        op_list=None,",
+                    "        descriptor=None,",
+                    "        atoms_scaling=None):",
+                    "    \"\"\" Obtain the NOMADstructure from each json file in the json_list;",
+                    "    write geometry files and figures to disk that will be later used to",
+                    "    plot the results in the Viewer.",
                     "",
-                    "MAX_NB_RES = int(options['query']['max_nb_res'])     #for faster computation",
-                    "MAX_CATEGORIES = 5 #for compatibility with the Viewer",
+                    "    Parameters",
+                    "    ----------",
                     "",
-                    "# resolve only a limited number of URIs",
-                    "max_nb_uris = int(options['query']['max_nb_res'])*MAX_CATEGORIES",
+                    "    json_list : list",
+                    "        List with the absolute paths to the json files",
                     "",
-                    "if nmd_query_saved['uri'] == 0 :",
-                    "    logger.error(\"Your query did not yield any results. Please use another query for the analysis\")",
-                    "    sys.exit()",
+                    "    frame_list : list or list of list, optional",
+                    "        For each json file, specifies with frames to consider in the descriptor",
+                    "        calculation. If multiple json files are present, it is a list of lists.",
                     "",
-                    "if len(nmd_query_saved['uri']) > max_nb_uris:",
-                    "    # fix random seeds to have consistent runs",
-                    "    random.seed(42)",
-                    "    nmd_uri_sampled = random.sample(nmd_query_saved['uri'], max_nb_uris)",
+                    "    file_format : text, optional, default 'NOMAD'",
+                    "        Specify what is the format of the file to read.",
+                    "        Possible values: 'NOMAD' and 'rdf' (rdf is deprecated).",
+                    "",
+                    "    png_path : text, optional, default tmp_folder",
+                    "        Path to the folder where the png file for each structure are written.",
+                    "",
+                    "    geo_path : text, optional, default tmp_folder",
+                    "        Path to the folder where the png file for each structure are written.",
+                    "",
+                    "    tmp_folder : text",
+                    "        Temporary folder.",
+                    "",
+                    "    descriptor: object Descriptor",
+                    "",
+                    "",
+                    "    Returns",
+                    "    ----------",
+                    "",
+                    "    structure_list: list, shape (len(json_list), )",
+                    "        List of NOMADstuctures. Each element in the list is an instance of the",
+                    "        class NOMADstructure; such instance can contain multiple frames",
+                    "        (see nomad_structures.py for more detail on the class NOMADstructure).",
+                    "",
+                    "    \"\"\"",
+                    "",
+                    "    structure_list = []",
+                    "",
+                    "    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",
+                    "        ",
+                    "    if desc_path is None:",
+                    "        desc_path = tmp_folder",
+                    "",
+                    "    logger.info(\"Generating figures and geometry files.\")",
+                    "",
+                    "    # get unique list of json files ",
+                    "    # this is important when operations are applied to the json files",
+                    "    # this does not conserve the order",
+                    "    #json_list = list(set(json_list))",
+                    "    # NOTE: we should do something more robust",
+                    "    new_json_list = []",
+                    "    for item in json_list:",
+                    "        if item not in new_json_list:",
+                    "            new_json_list.append(item)",
+                    "            ",
+                    "    json_list = new_json_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",
+                    "",
+                    "            # make the first \"pristine\" structure",
+                    "            structure = NOMADStructure(",
+                    "                in_file=json_file,",
+                    "                frame_list=frame_list_json,",
+                    "                file_format=file_format,",
+                    "                cell_type=cell_type,",
+                    "                descriptor=descriptor)",
+                    "                ",
+                    "            try:",
+                    "                structure_op = _apply_operations(structure, operations_on_structure)",
+                    "            except:",
+                    "                # do not apply operation",
+                    "                # this is a hack to visualize non-periodic structures ",
+                    "                # this is very dangerous, should be changed asap",
+                    "                structure_op = _apply_operations(structure, operations_on_structure=None)",
+                    "",
+                    "                ",
+                    "            for op_id, structure in enumerate(structure_op):",
+                    "                # write coordinates of structure",
+                    "                structure.write_geometry(path=geo_path, operation_number=op_list[op_id])",
+                    "                #structure.write_png(path=png_path, replicas=(3, 3, 3), ",
+                    "                structure.write_png(path=png_path, replicas=(1, 1, 1), ",
+                    "                    rotation=True, operation_number=op_list[op_id])",
+                    "                ",
+                    "                # calculate descriptor",
+                    "                if descriptor is not None:",
+                    "                    descriptor.write(",
+                    "                        structure, path=desc_path, ",
+                    "                        operation_number=op_id,",
+                    "                        atoms_scaling=atoms_scaling)",
+                    "            ",
+                    "            ",
+                    "        else:",
+                    "            raise Exception(\"Please specify a valid file format. Possible file formats are 'NOMAD' or 'rdf'.\")",
+                    "",
+                    "",
+                    "",
+                    "        structure_list.append(structure_op)",
+                    "",
+                    "        if idx % (int(len(json_list) / 10) + 1) == 0:",
+                    "            logger.info(",
+                    "                \"Generating figures and geometries: file {0}/{1}\".format(idx + 1, len(json_list)))",
+                    "",
+                    "    logger.info(\"Generating figures and geometry files: done.\")",
+                    "",
+                    "    return structure_list"
+                ],
+                "hidden": true
+            },
+            "output": {
+                "state": {},
+                "selectedType": "Hidden",
+                "pluginName": "IPython",
+                "shellId": "2ED595F8DAE142AD8F34EA76B35AF4BA",
+                "elapsedTime": 511,
+                "height": 88
+            },
+            "evaluatorReader": true,
+            "tags": "cell_soap_run",
+            "lineCount": 139,
+            "initialization": true
+        },
+        {
+            "id": "code5mRsI5",
+            "type": "code",
+            "evaluator": "IPython",
+            "input": {
+                "body": [
+                    "query_name = options['query']['query_name']",
+                    "nmd_query_saved = nomad_query.fetch(name_or_index=query_name, resolve=False)",
+                    "",
+                    "MAX_NB_RES = int(options['query']['max_nb_res'])     #for faster computation",
+                    "MAX_CATEGORIES = 5 #for compatibility with the Viewer",
+                    "",
+                    "# resolve only a limited number of URIs",
+                    "max_nb_uris = int(options['query']['max_nb_res'])*MAX_CATEGORIES",
+                    "",
+                    "if nmd_query_saved['uri'] == 0 :",
+                    "    logger.error(\"Your query did not yield any results. Please use another query for the analysis\")",
+                    "    sys.exit()",
+                    "",
+                    "if len(nmd_query_saved['uri']) > max_nb_uris:",
+                    "    # fix random seeds to have consistent runs",
+                    "    random.seed(42)",
+                    "    nmd_uri_sampled = random.sample(nmd_query_saved['uri'], max_nb_uris)",
                     "else:",
                     "    nmd_uri_sampled = nmd_query_saved['uri']"
                 ],
@@ -12951,8 +14506,8 @@
                 "state": {},
                 "selectedType": "Hidden",
                 "pluginName": "IPython",
-                "shellId": "32B7F85D85DA4B05AC8ABA4FA6E22968",
-                "elapsedTime": 296,
+                "shellId": "2ED595F8DAE142AD8F34EA76B35AF4BA",
+                "elapsedTime": 536,
                 "height": 88
             },
             "evaluatorReader": true,
@@ -13001,7 +14556,7 @@
                     "                        # nomad json files are in SU ",
                     "                        \"atom_positions\": map(lambda x: [x.x*1.0E-10,x.y*1.0E-10,x.z*1.0E-10], atoms)",
                     "                    }",
-                    "",
+                    "                ",
                     "        if atoms.pbc.all():",
                     "            # periodic structure",
                     "            res['simulation_cell'] = (atoms.get_cell()*1.0E-10).tolist()",
@@ -13024,8 +14579,8 @@
                 "state": {},
                 "selectedType": "Hidden",
                 "pluginName": "IPython",
-                "shellId": "32B7F85D85DA4B05AC8ABA4FA6E22968",
-                "elapsedTime": 322,
+                "shellId": "2ED595F8DAE142AD8F34EA76B35AF4BA",
+                "elapsedTime": 302,
                 "height": 88
             },
             "evaluatorReader": true,
@@ -13094,7 +14649,7 @@
                     "            if section['section_name'] == 'section_system':",
                     "                atom_positions = np.array(nmd_dict['atom_positions']['flatData']).reshape(nmd_dict['atom_positions']['shape'])*1.0E+10",
                     "                periodicity = np.array(nmd_dict['configuration_periodic_dimensions'][0]['flatData'], dtype=bool)",
-                    "                                ",
+                    "                ",
                     "                if required_keys == section['required_keys_atom_species']:",
                     "                    atom_species = np.array(nmd_dict['atom_species'])",
                     "                elif required_keys == section['required_keys_atom_labels']:",
@@ -13104,16 +14659,16 @@
                     "                                    ",
                     "                # read cell only if periodicity is all True ",
                     "                # the Gaussian parser for non-periodic systems still the cell (0., 0., 0.) even if there is no cell",
-                    "                if np.all(periodicity):                ",
+                    "                if np.all(periodicity):  ",
                     "                    try:",
                     "                        simulation_cell = np.array(nmd_dict['simulation_cell']['flatData']).reshape(nmd_dict['simulation_cell']['shape'])*1.0E+10",
                     "                    except:",
                     "                        simulation_cell = None",
                     "                else:",
-                    "                    logger.debug(\"Calculation {} is not periodic over 3-dimensions.\".format(nmd))",
-                    "                    ",
+                    "                    logger.debug(\"Calculation {} is not periodic over three dimensions.\".format(nmd))",
+                    "                ",
                     "                # create ASE object",
-                    "                if simulation_cell is not None:",
+                    "                if np.all(periodicity):  ",
                     "                    atoms = ase.Atoms(",
                     "                        symbols=atom_species, positions=atom_positions,",
                     "                        cell=simulation_cell, pbc=True)",
@@ -13121,7 +14676,7 @@
                     "                    # calculate spacegroup on-the-fly",
                     "                    # use spacegroup as target for crystals",
                     "                    try:",
-                    "                        spgroup_nb = SpacegroupAnalyzer(AseAtomsAdaptor.get_structure(atoms), symprec=0.001, angle_tolerance=1.).get_space_group_number()",
+                    "                        spgroup_nb = SpacegroupAnalyzer(AseAtomsAdaptor.get_structure(atoms), symprec=0.001).get_space_group_number()",
                     "                    except:",
                     "                        spgroup_nb = None",
                     "                    ",
@@ -13131,14 +14686,14 @@
                     "                else:",
                     "                    atoms = ase.Atoms(",
                     "                        symbols=atom_species, positions=atom_positions,",
-                    "                        cell=None, pbc=False)",
+                    "                        cell=simulation_cell, pbc=False)",
                     "                    ",
                     "                    # calculate pointgroup on-the-fly",
                     "                    # use pointgroup as target for molecules",
-                    "                    try:",
-                    "                        point_group_symbol = SpacegroupAnalyzer(AseAtomsAdaptor.get_structure(atoms), symprec=0.001, angle_tolerance=1.).get_point_group_symbol()",
-                    "                    except:",
-                    "                        point_group_symbol = None",
+                    "                    #try:",
+                    "                    point_group_symbol = SpacegroupAnalyzer(AseAtomsAdaptor.get_structure(atoms), symprec=0.001).get_point_group_symbol()",
+                    "                    #except:",
+                    "                    #    point_group_symbol = None",
                     "                        ",
                     "                    atoms.info['point_group_symbol'] = point_group_symbol",
                     "                    atoms.info['target'] = point_group_symbol",
@@ -13179,9 +14734,9 @@
                 "state": {},
                 "selectedType": "Results",
                 "pluginName": "IPython",
-                "shellId": "32B7F85D85DA4B05AC8ABA4FA6E22968",
-                "elapsedTime": 2035,
-                "height": 88
+                "shellId": "2ED595F8DAE142AD8F34EA76B35AF4BA",
+                "elapsedTime": 7779,
+                "height": 1672
             },
             "evaluatorReader": true,
             "lineCount": 134,
@@ -13269,8 +14824,8 @@
                 "state": {},
                 "selectedType": "Hidden",
                 "pluginName": "IPython",
-                "shellId": "32B7F85D85DA4B05AC8ABA4FA6E22968",
-                "elapsedTime": 301,
+                "shellId": "2ED595F8DAE142AD8F34EA76B35AF4BA",
+                "elapsedTime": 309,
                 "height": 88
             },
             "evaluatorReader": true,
@@ -13312,9 +14867,9 @@
                 "state": {},
                 "selectedType": "Results",
                 "pluginName": "IPython",
-                "shellId": "32B7F85D85DA4B05AC8ABA4FA6E22968",
-                "elapsedTime": 224,
-                "height": 88
+                "shellId": "2ED595F8DAE142AD8F34EA76B35AF4BA",
+                "elapsedTime": 201,
+                "height": 62
             },
             "evaluatorReader": true,
             "lineCount": 20,
@@ -13366,8 +14921,8 @@
                 "state": {},
                 "selectedType": "Hidden",
                 "pluginName": "IPython",
-                "shellId": "32B7F85D85DA4B05AC8ABA4FA6E22968",
-                "elapsedTime": 317,
+                "shellId": "2ED595F8DAE142AD8F34EA76B35AF4BA",
+                "elapsedTime": 306,
                 "height": 88
             },
             "evaluatorReader": true,
@@ -13438,615 +14993,2011 @@
                 "state": {},
                 "selectedType": "Results",
                 "pluginName": "IPython",
-                "shellId": "32B7F85D85DA4B05AC8ABA4FA6E22968",
-                "elapsedTime": 9549,
+                "shellId": "2ED595F8DAE142AD8F34EA76B35AF4BA",
+                "elapsedTime": 15397,
                 "height": 50,
                 "result": {
                     "type": "Results",
                     "outputdata": [
                         {
                             "type": "out",
-                            "value": "\r"
+                            "value": "[Kernel] 64              106             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 64              118             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 64              120             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 64              121             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              70              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              79              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              90              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              94              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              98              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              109             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              116             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              4               \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              10              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              17              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              19              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              20              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              25              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              26              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              30              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              33              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              36              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              44              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              49              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              51              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              57              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              71              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              80              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              81              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              83              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              89              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              96              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              106             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              118             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              120             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 70              121             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 79              79              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 79              90              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 79              94              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 79              98              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 79              109             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 79              116             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 79              4               \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 79              10              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 79              17              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 79              19              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 79              20              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 79              25              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 79              26              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 79              30              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 79              33              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 79              36              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 79              44              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 79              49              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 79              51              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 79              57              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 79              71              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 79              80              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 79              81              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 79              83              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 79              89              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 79              96              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 79              106             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 79              118             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 79              120             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 79              121             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 90              90              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 90              94              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 90              98              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 90              109             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 90              116             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 90              4               \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 90              10              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 90              17              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 90              19              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 90              20              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 90              25              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 90              26              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 90              30              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 90              33              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 90              36              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 90              44              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 90              49              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 90              51              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 90              57              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 90              71              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 90              80              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 90              81              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 90              83              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 90              89              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 90              96              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 90              106             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 90              118             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 90              120             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 90              121             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 94              94              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 94              98              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 94              109             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 94              116             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 94              4               \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 94              10              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 94              17              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 94              19              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 94              20              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 94              25              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 94              26              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 94              30              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 94              33              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 94              36              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 94              44              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 94              49              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 94              51              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 94              57              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 94              71              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 94              80              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 94              81              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 94              83              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 94              89              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 94              96              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 94              106             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 94              118             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 94              120             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 94              121             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 98              98              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 98              109             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 98              116             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 98              4               \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 98              10              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 98              17              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 98              19              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 98              20              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 98              25              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 98              26              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 98              30              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 98              33              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 98              36              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 98              44              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 98              49              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 98              51              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 98              57              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 98              71              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 98              80              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 98              81              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 98              83              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 98              89              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 98              96              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 98              106             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 98              118             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 98              120             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 98              121             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 109             109             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 109             116             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 109             4               \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 109             10              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 109             17              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 109             19              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 109             20              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 109             25              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 109             26              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 109             30              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 109             33              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 109             36              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 109             44              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 109             49              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 109             51              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 109             57              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 109             71              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 109             80              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 109             81              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 109             83              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 109             89              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 109             96              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 109             106             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 109             118             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 109             120             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 109             121             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 116             116             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 116             4               \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 116             10              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 116             17              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 116             19              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 116             20              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 116             25              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 116             26              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 116             30              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 116             33              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 116             36              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 116             44              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 116             49              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 116             51              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 116             57              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 116             71              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 116             80              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 116             81              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 116             83              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 116             89              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 116             96              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 116             106             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 116             118             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 116             120             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 116             121             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 4               4               \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 4               10              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 4               17              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 4               19              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 4               20              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 4               25              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 4               26              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 4               30              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 4               33              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 4               36              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 4               44              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 4               49              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 4               51              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 4               57              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 4               71              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 4               80              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 4               81              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 4               83              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 4               89              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 4               96              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 4               106             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 4               118             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 4               120             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 4               121             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 10              10              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 10              17              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 10              19              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 10              20              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 10              25              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 10              26              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 10              30              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 10              33              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 10              36              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 10              44              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 10              49              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 10              51              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 10              57              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 10              71              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 10              80              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 10              81              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 10              83              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 10              89              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 10              96              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 10              106             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 10              118             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 10              120             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 10              121             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 17              17              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 17              19              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 17              20              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 17              25              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 17              26              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 17              30              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 17              33              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 17              36              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 17              44              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 17              49              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 17              51              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 17              57              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 17              71              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 17              80              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 17              81              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 17              83              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 17              89              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 17              96              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 17              106             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 17              118             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Graph] 2               \n"
+                            "value": "[Kernel] 17              120             \n"
                         },
                         {
                             "type": "out",
-                            "value": "\r"
+                            "value": "[Kernel] 17              121             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Graph] 4               \n"
+                            "value": "[Kernel] 19              19              \n"
                         },
                         {
                             "type": "out",
-                            "value": "\r"
+                            "value": "[Kernel] 19              20              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Graph] 5               \n"
+                            "value": "[Kernel] 19              25              \n"
                         },
                         {
                             "type": "out",
-                            "value": "\r"
+                            "value": "[Kernel] 19              26              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Graph] 6               \n"
+                            "value": "[Kernel] 19              30              \n"
                         },
                         {
                             "type": "out",
-                            "value": "\r"
+                            "value": "[Kernel] 19              33              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Graph] 7               \n"
+                            "value": "[Kernel] 19              36              \n"
                         },
                         {
                             "type": "out",
-                            "value": "\r"
+                            "value": "[Kernel] 19              44              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Graph] 8               \n"
+                            "value": "[Kernel] 19              49              \n"
                         },
                         {
                             "type": "out",
-                            "value": "\r"
+                            "value": "[Kernel] 19              51              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Graph] 9               \n"
+                            "value": "[Kernel] 19              57              \n"
                         },
                         {
                             "type": "out",
-                            "value": "\r"
+                            "value": "[Kernel] 19              71              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Graph] 10              \n"
+                            "value": "[Kernel] 19              80              \n"
                         },
                         {
                             "type": "out",
-                            "value": "\r"
+                            "value": "[Kernel] 19              81              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Graph] 11              \n"
+                            "value": "[Kernel] 19              83              \n"
                         },
                         {
                             "type": "out",
-                            "value": "\r"
+                            "value": "[Kernel] 19              89              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Graph] 12              \n"
+                            "value": "[Kernel] 19              96              \n"
                         },
                         {
                             "type": "out",
-                            "value": "\r"
+                            "value": "[Kernel] 19              106             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Graph] 13              \n"
+                            "value": "[Kernel] 19              118             \n"
                         },
                         {
                             "type": "out",
-                            "value": "\r"
+                            "value": "[Kernel] 19              120             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Graph] 14              \n"
+                            "value": "[Kernel] 19              121             \n"
                         },
                         {
                             "type": "out",
-                            "value": "\r"
+                            "value": "[Kernel] 20              20              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Graph] 0               \n"
+                            "value": "[Kernel] 20              25              \n"
                         },
                         {
                             "type": "out",
-                            "value": "\r"
+                            "value": "[Kernel] 20              26              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Graph] 1               \n"
+                            "value": "[Kernel] 20              30              \n"
                         },
                         {
                             "type": "out",
-                            "value": "\r"
+                            "value": "[Kernel] 20              33              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Graph] 3               \n"
+                            "value": "[Kernel] 20              36              \n"
                         },
                         {
                             "type": "out",
-                            "value": "\u001b[92mComputing kernel ... \u001b[0;1m\n"
+                            "value": "[Kernel] 20              44              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 2               2               \n"
+                            "value": "[Kernel] 20              49              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 2               4               \n"
+                            "value": "[Kernel] 20              51              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 2               5               \n"
+                            "value": "[Kernel] 20              57              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 2               6               \n"
+                            "value": "[Kernel] 20              71              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 2               7               \n"
+                            "value": "[Kernel] 20              80              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 2               8               \n"
+                            "value": "[Kernel] 20              81              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 2               9               \n"
+                            "value": "[Kernel] 20              83              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 2               10              \n"
+                            "value": "[Kernel] 20              89              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 2               11              \n"
+                            "value": "[Kernel] 20              96              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 2               12              \n"
+                            "value": "[Kernel] 20              106             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 2               13              \n"
+                            "value": "[Kernel] 20              118             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 2               14              \n"
+                            "value": "[Kernel] 20              120             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 2               0               \n"
+                            "value": "[Kernel] 20              121             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 2               1               \n"
+                            "value": "[Kernel] 25              25              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 2               3               \n"
+                            "value": "[Kernel] 25              26              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 4               4               \n"
+                            "value": "[Kernel] 25              30              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 4               5               \n"
+                            "value": "[Kernel] 25              33              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 4               6               \n"
+                            "value": "[Kernel] 25              36              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 4               7               \n"
+                            "value": "[Kernel] 25              44              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 4               8               \n"
+                            "value": "[Kernel] 25              49              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 4               9               \n"
+                            "value": "[Kernel] 25              51              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 4               10              \n"
+                            "value": "[Kernel] 25              57              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 4               11              \n"
+                            "value": "[Kernel] 25              71              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 4               12              \n"
+                            "value": "[Kernel] 25              80              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 4               13              \n"
+                            "value": "[Kernel] 25              81              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 4               14              \n"
+                            "value": "[Kernel] 25              83              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 4               0               \n"
+                            "value": "[Kernel] 25              89              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 4               1               \n"
+                            "value": "[Kernel] 25              96              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 4               3               \n"
+                            "value": "[Kernel] 25              106             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 5               5               \n"
+                            "value": "[Kernel] 25              118             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 5               6               \n"
+                            "value": "[Kernel] 25              120             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 5               7               \n"
+                            "value": "[Kernel] 25              121             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 5               8               \n"
+                            "value": "[Kernel] 26              26              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 5               9               \n"
+                            "value": "[Kernel] 26              30              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 5               10              \n"
+                            "value": "[Kernel] 26              33              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 5               11              \n"
+                            "value": "[Kernel] 26              36              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 5               12              \n"
+                            "value": "[Kernel] 26              44              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 5               13              \n"
+                            "value": "[Kernel] 26              49              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 5               14              \n"
+                            "value": "[Kernel] 26              51              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 5               0               \n"
+                            "value": "[Kernel] 26              57              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 5               1               \n"
+                            "value": "[Kernel] 26              71              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 5               3               \n"
+                            "value": "[Kernel] 26              80              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 6               6               \n"
+                            "value": "[Kernel] 26              81              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 6               7               \n"
+                            "value": "[Kernel] 26              83              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 6               8               \n"
+                            "value": "[Kernel] 26              89              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 6               9               \n"
+                            "value": "[Kernel] 26              96              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 6               10              \n"
+                            "value": "[Kernel] 26              106             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 6               11              \n"
+                            "value": "[Kernel] 26              118             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 6               12              \n"
+                            "value": "[Kernel] 26              120             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 6               13              \n"
+                            "value": "[Kernel] 26              121             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 6               14              \n"
+                            "value": "[Kernel] 30              30              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 6               0               \n"
+                            "value": "[Kernel] 30              33              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 6               1               \n"
+                            "value": "[Kernel] 30              36              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 6               3               \n"
+                            "value": "[Kernel] 30              44              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 7               7               \n"
+                            "value": "[Kernel] 30              49              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 7               8               \n"
+                            "value": "[Kernel] 30              51              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 7               9               \n"
+                            "value": "[Kernel] 30              57              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 7               10              \n"
+                            "value": "[Kernel] 30              71              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 7               11              \n"
+                            "value": "[Kernel] 30              80              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 7               12              \n"
+                            "value": "[Kernel] 30              81              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 7               13              \n"
+                            "value": "[Kernel] 30              83              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 7               14              \n"
+                            "value": "[Kernel] 30              89              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 7               0               \n"
+                            "value": "[Kernel] 30              96              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 7               1               \n"
+                            "value": "[Kernel] 30              106             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 7               3               \n"
+                            "value": "[Kernel] 30              118             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 8               8               \n"
+                            "value": "[Kernel] 30              120             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 8               9               \n"
+                            "value": "[Kernel] 30              121             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 8               10              \n"
+                            "value": "[Kernel] 33              33              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 8               11              \n"
+                            "value": "[Kernel] 33              36              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 8               12              \n"
+                            "value": "[Kernel] 33              44              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 8               13              \n"
+                            "value": "[Kernel] 33              49              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 8               14              \n"
+                            "value": "[Kernel] 33              51              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 8               0               \n"
+                            "value": "[Kernel] 33              57              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 8               1               \n"
+                            "value": "[Kernel] 33              71              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 8               3               \n"
+                            "value": "[Kernel] 33              80              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 9               9               \n"
+                            "value": "[Kernel] 33              81              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 9               10              \n"
+                            "value": "[Kernel] 33              83              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 9               11              \n"
+                            "value": "[Kernel] 33              89              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 9               12              \n"
+                            "value": "[Kernel] 33              96              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 9               13              \n"
+                            "value": "[Kernel] 33              106             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 9               14              \n"
+                            "value": "[Kernel] 33              118             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 9               0               \n"
+                            "value": "[Kernel] 33              120             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 9               1               \n"
+                            "value": "[Kernel] 33              121             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 9               3               \n"
+                            "value": "[Kernel] 36              36              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 10              10              \n"
+                            "value": "[Kernel] 36              44              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 36              49              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 36              51              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 36              57              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 36              71              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 36              80              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 36              81              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 36              83              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 36              89              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 36              96              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 36              106             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 36              118             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 36              120             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 36              121             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 44              44              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 44              49              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 44              51              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 44              57              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 44              71              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 44              80              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 44              81              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 44              83              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 44              89              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 44              96              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 44              106             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 44              118             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 44              120             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 44              121             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 49              49              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 49              51              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 49              57              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 49              71              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 49              80              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 49              81              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 49              83              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 49              89              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 49              96              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 49              106             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 49              118             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 49              120             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 49              121             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 51              51              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 51              57              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 51              71              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 51              80              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 51              81              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 51              83              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 51              89              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 51              96              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 51              106             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 51              118             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 51              120             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 51              121             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 57              57              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 57              71              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 57              80              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 57              81              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 57              83              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 57              89              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 57              96              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 57              106             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 57              118             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 57              120             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 57              121             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 10              11              \n"
+                            "value": "[Kernel] 71              71              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 10              12              \n"
+                            "value": "[Kernel] 71              80              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 10              13              \n"
+                            "value": "[Kernel] 71              81              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 10              14              \n"
+                            "value": "[Kernel] 71              83              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 10              0               \n"
+                            "value": "[Kernel] 71              89              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 10              1               \n"
+                            "value": "[Kernel] 71              96              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 10              3               \n"
+                            "value": "[Kernel] 71              106             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 11              11              \n"
+                            "value": "[Kernel] 71              118             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 11              12              \n"
+                            "value": "[Kernel] 71              120             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 11              13              \n"
+                            "value": "[Kernel] 71              121             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 11              14              \n"
+                            "value": "[Kernel] 80              80              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 11              0               \n"
+                            "value": "[Kernel] 80              81              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 11              1               \n"
+                            "value": "[Kernel] 80              83              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 11              3               \n"
+                            "value": "[Kernel] 80              89              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 12              12              \n"
+                            "value": "[Kernel] 80              96              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 12              13              \n"
+                            "value": "[Kernel] 80              106             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 12              14              \n"
+                            "value": "[Kernel] 80              118             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 12              0               \n"
+                            "value": "[Kernel] 80              120             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 12              1               \n"
+                            "value": "[Kernel] 80              121             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 12              3               \n"
+                            "value": "[Kernel] 81              81              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 13              13              \n"
+                            "value": "[Kernel] 81              83              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 13              14              \n"
+                            "value": "[Kernel] 81              89              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 13              0               \n"
+                            "value": "[Kernel] 81              96              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 13              1               \n"
+                            "value": "[Kernel] 81              106             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 13              3               \n"
+                            "value": "[Kernel] 81              118             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 14              14              \n"
+                            "value": "[Kernel] 81              120             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 14              0               \n"
+                            "value": "[Kernel] 81              121             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 14              1               \n"
+                            "value": "[Kernel] 83              83              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 14              3               \n"
+                            "value": "[Kernel] 83              89              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 0               0               \n"
+                            "value": "[Kernel] 83              96              \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 0               1               \n"
+                            "value": "[Kernel] 83              106             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 0               3               \n"
+                            "value": "[Kernel] 83              118             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 1               1               \n"
+                            "value": "[Kernel] 83              120             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 1               3               \n"
+                            "value": "[Kernel] 83              121             \n"
                         },
                         {
                             "type": "out",
-                            "value": "[Kernel] 3               3               \n"
+                            "value": "[Kernel] 89              89              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 89              96              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 89              106             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 89              118             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 89              120             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 89              121             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 96              96              \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 96              106             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 96              118             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 96              120             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 96              121             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 106             106             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 106             118             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 106             120             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 106             121             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 118             118             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 118             120             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 118             121             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 120             120             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 120             121             \n"
+                        },
+                        {
+                            "type": "out",
+                            "value": "[Kernel] 121             121             \n"
                         }
                     ]
                 },
@@ -15681,8 +18632,8 @@
                 "state": {},
                 "selectedType": "Hidden",
                 "pluginName": "IPython",
-                "shellId": "32B7F85D85DA4B05AC8ABA4FA6E22968",
-                "elapsedTime": 3606,
+                "shellId": "2ED595F8DAE142AD8F34EA76B35AF4BA",
+                "elapsedTime": 3870,
                 "height": 88
             },
             "evaluatorReader": true,
@@ -15872,8 +18823,8 @@
                 "state": {},
                 "selectedType": "Hidden",
                 "pluginName": "IPython",
-                "shellId": "32B7F85D85DA4B05AC8ABA4FA6E22968",
-                "elapsedTime": 368,
+                "shellId": "2ED595F8DAE142AD8F34EA76B35AF4BA",
+                "elapsedTime": 370,
                 "height": 88
             },
             "evaluatorReader": true,
@@ -15950,15 +18901,16 @@
                     "",
                     "# remote tmp_json_folder created",
                     "shutil.rmtree(tmp_json_folder)"
-                ]
+                ],
+                "hidden": true
             },
             "output": {
                 "state": {},
                 "selectedType": "Results",
                 "pluginName": "IPython",
-                "shellId": "32B7F85D85DA4B05AC8ABA4FA6E22968",
-                "elapsedTime": 1730,
-                "height": 88
+                "shellId": "2ED595F8DAE142AD8F34EA76B35AF4BA",
+                "elapsedTime": 5296,
+                "height": 185
             },
             "evaluatorReader": true,
             "lineCount": 64,
@@ -15980,7 +18932,7 @@
                 "state": {},
                 "selectedType": "BeakerDisplay",
                 "pluginName": "JavaScript",
-                "elapsedTime": 20,
+                "elapsedTime": 14,
                 "height": 88
             },
             "evaluatorReader": true,
@@ -16021,7 +18973,7 @@
     "namespace": {
         "options": {
             "query": {
-                "query_name": "",
+                "query_name": "VASP",
                 "max_nb_res": "25"
             },
             "run": {
@@ -16131,7 +19083,7 @@
                 }
             }
         },
-        "viewer_result": "462b47d34c41e56d",
+        "viewer_result": "4a842900a713ed5b",
         "last_query_name": "Crystal-C"
     },
     "locked": true
-- 
GitLab