diff --git a/tetradymite_PRM2020.ipynb b/tetradymite_PRM2020.ipynb index e50ed8410da647973dabe8c5aa5da7d7331e7dfe..1d0bca330c36ebeffb2b7912d09a6e9a3784ad2d 100644 --- a/tetradymite_PRM2020.ipynb +++ b/tetradymite_PRM2020.ipynb @@ -76,45 +76,15 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": { "ExecuteTime": { - "end_time": "2021-11-11T17:39:58.531306Z", - "start_time": "2021-11-11T17:39:58.519331Z" + "end_time": "2022-01-26T17:19:14.608522Z", + "start_time": "2022-01-26T17:19:14.598216Z" }, "init_cell": true }, - "outputs": [ - { - "data": { - "text/html": [ - "<script>\n", - " code_show=true; \n", - " function code_toggle() {\n", - " if (code_show)\n", - " {\n", - " $('div.input').hide();\n", - " } \n", - " else \n", - " {\n", - " $('div.input').show();\n", - " }\n", - " code_show = !code_show\n", - " } \n", - " $( document ).ready(code_toggle);\n", - " window.runCells(\"startup\");\n", - "</script>\n", - "The Python code for this notebook is by default hidden for easier reading.\n", - "To toggle on/off the code, click <a href=\"javascript:code_toggle()\">here</a>.\n" - ], - "text/plain": [ - "<IPython.core.display.HTML object>" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "%%HTML\n", "<script>\n", @@ -139,11 +109,11 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": { "ExecuteTime": { - "end_time": "2021-11-11T17:40:00.687030Z", - "start_time": "2021-11-11T17:39:58.532534Z" + "end_time": "2022-01-26T17:19:14.655139Z", + "start_time": "2022-01-26T17:19:14.610695Z" }, "init_cell": true }, @@ -181,11 +151,11 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": { "ExecuteTime": { - "end_time": "2021-11-11T17:40:00.712924Z", - "start_time": "2021-11-11T17:40:00.689177Z" + "end_time": "2022-01-26T17:19:14.656814Z", + "start_time": "2022-01-26T17:19:14.600Z" }, "init_cell": true }, @@ -206,59 +176,58 @@ }, "outputs": [], "source": [ - "# This piece of code is not run at initialization. \n", "# It can create the molecular structures which are visualized.\n", "\n", - "path_structure = './data/tetradymite_PRM2020/structures/'\n", - "try:\n", - " os.mkdir(path_structure)\n", - "except OSError:\n", - " !rm ./data/tetradymite_PRM2020/structures/*\n", - "compounds=df_train.index.to_list()\n", - "scale_factor = 10**10\n", - "alist = []\n", - "for compound in compounds:\n", - " for entry in range (1581):\n", - " labels = query[entry].section_run[0].section_system[-1].atom_labels\n", - " if (len(labels)>5):\n", - " continue\n", + "# path_structure = './data/tetradymite_PRM2020/structures/'\n", + "# try:\n", + "# os.mkdir(path_structure)\n", + "# except OSError:\n", + "# !rm ./data/tetradymite_PRM2020/structures/*\n", + "# compounds=df_train.index.to_list()\n", + "# scale_factor = 10**10\n", + "# alist = []\n", + "# for compound in compounds:\n", + "# for entry in range (1581):\n", + "# labels = query[entry].section_run[0].section_system[-1].atom_labels\n", + "# if (len(labels)>5):\n", + "# continue\n", " \n", - " labels_1 = str(labels[0])+'_'+str(labels[1])+'_'+str(labels[3])+'_'+str(labels[4])+'_'+str(labels[2])\n", - " labels_2 = str(labels[0])+'_'+str(labels[1])+'_'+str(labels[4])+'_'+str(labels[3])+'_'+str(labels[2])\n", - " labels_3 = str(labels[1])+'_'+str(labels[0])+'_'+str(labels[3])+'_'+str(labels[4])+'_'+str(labels[2])\n", - " labels_4 = str(labels[1])+'_'+str(labels[0])+'_'+str(labels[4])+'_'+str(labels[3])+'_'+str(labels[2])\n", - "\n", - " if compound in list([labels_1, labels_2, labels_3, labels_4]):\n", - "\n", - " n_atoms = len (labels)\n", - " lat_x, lat_y, lat_z = query[entry].section_run[0].section_system[-1].lattice_vectors.magnitude * scale_factor\n", - " file = open(path_structure + str(compound) +\".xyz\",\"w\") \n", - " file.write(\"%d\\n\\n\"%(n_atoms*8))\n", - " for i in [0,1,2]:\n", - " for j in [0,1,2]:\n", - " for k in [0,1,2]:\n", - " for n in range (n_atoms):\n", - " el = query[entry].section_run[0].section_system[-1].atom_labels[n]\n", - " xyz = query[entry].section_run[0].section_system[-1].atom_positions[n].magnitude * scale_factor\n", - " xyz += i*lat_x\n", - " xyz += j*lat_y\n", - " xyz += k*lat_z\n", - " file.write (el)\n", - " file.write (\"\\t%f\\t%f\\t%f\\n\"%(xyz[0],xyz[1],xyz[2]))\n", - " file.close()\n", - " alist.append(compound)\n", - "\n", - " break\n", + "# labels_1 = str(labels[0])+'_'+str(labels[1])+'_'+str(labels[3])+'_'+str(labels[4])+'_'+str(labels[2])\n", + "# labels_2 = str(labels[0])+'_'+str(labels[1])+'_'+str(labels[4])+'_'+str(labels[3])+'_'+str(labels[2])\n", + "# labels_3 = str(labels[1])+'_'+str(labels[0])+'_'+str(labels[3])+'_'+str(labels[4])+'_'+str(labels[2])\n", + "# labels_4 = str(labels[1])+'_'+str(labels[0])+'_'+str(labels[4])+'_'+str(labels[3])+'_'+str(labels[2])\n", + "\n", + "# if compound in list([labels_1, labels_2, labels_3, labels_4]):\n", + "\n", + "# n_atoms = len (labels)\n", + "# lat_x, lat_y, lat_z = query[entry].section_run[0].section_system[-1].lattice_vectors.magnitude * scale_factor\n", + "# file = open(path_structure + str(compound) +\".xyz\",\"w\") \n", + "# file.write(\"%d\\n\\n\"%(n_atoms*8))\n", + "# for i in [0,1,2]:\n", + "# for j in [0,1,2]:\n", + "# for k in [0,1,2]:\n", + "# for n in range (n_atoms):\n", + "# el = query[entry].section_run[0].section_system[-1].atom_labels[n]\n", + "# xyz = query[entry].section_run[0].section_system[-1].atom_positions[n].magnitude * scale_factor\n", + "# xyz += i*lat_x\n", + "# xyz += j*lat_y\n", + "# xyz += k*lat_z\n", + "# file.write (el)\n", + "# file.write (\"\\t%f\\t%f\\t%f\\n\"%(xyz[0],xyz[1],xyz[2]))\n", + "# file.close()\n", + "# alist.append(compound)\n", + "\n", + "# break\n", " " ] }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": { "ExecuteTime": { - "end_time": "2021-11-11T17:40:00.825235Z", - "start_time": "2021-11-11T17:40:00.714917Z" + "end_time": "2022-01-26T17:19:14.657898Z", + "start_time": "2022-01-26T17:19:14.602Z" }, "init_cell": true }, @@ -298,11 +267,11 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": { "ExecuteTime": { - "end_time": "2021-11-11T17:40:00.833240Z", - "start_time": "2021-11-11T17:40:00.826473Z" + "end_time": "2022-01-26T17:19:14.659159Z", + "start_time": "2022-01-26T17:19:14.603Z" }, "init_cell": true }, @@ -362,11 +331,11 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "metadata": { "ExecuteTime": { - "end_time": "2021-11-11T17:40:00.852305Z", - "start_time": "2021-11-11T17:40:00.835080Z" + "end_time": "2022-01-26T17:19:14.660406Z", + "start_time": "2022-01-26T17:19:14.604Z" }, "init_cell": true }, @@ -498,31 +467,16 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": { "ExecuteTime": { - "end_time": "2021-11-11T17:40:01.105413Z", - "start_time": "2021-11-11T17:40:00.853592Z" + "end_time": "2022-01-26T17:19:14.661617Z", + "start_time": "2022-01-26T17:19:14.605Z" }, "init_cell": true, "scrolled": false }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "bdf60e78420e4942a81f682b99ecdb3d", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "VBox(children=(HBox(children=(VBox(children=(Label(value=''), Checkbox(value=True, disabled=True, indent=Falseā¦" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "cb_layout = widgets.Layout(width = '15px')\n", "thin_layout = widgets.Layout(width = '100px')\n",