{ "cells": [ { "cell_type": "markdown", "id": "3836140c", "metadata": {}, "source": [ "# Setup magnetic entites and pairs" ] }, { "cell_type": "markdown", "id": "ef0e83cc", "metadata": {}, "source": [ "There are many different systems, where the magnetic entities can be very different. Sometimes it is just one atom from the cell, sometimes it is one element and sometimes it is a cluster of atoms, a quasi-molecule. grogupy can handle all these different systems and provide a hopefully intuitive way to autoamtically generate the pairs." ] }, { "cell_type": "code", "execution_count": 10, "id": "5e8fae98", "metadata": {}, "outputs": [ { "data": { "text/html": [ " \n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import grogupy\n", "import grogupy.viz\n", "\n", "################################################################################\n", "# this is just for the html export of interactive figures, but it is not part of\n", "# grogupy\n", "import plotly\n", "\n", "plotly.offline.init_notebook_mode()\n", "################################################################################" ] }, { "cell_type": "markdown", "id": "a7d0fd79", "metadata": {}, "source": [ "## Simple systems, with one magnetic element" ] }, { "cell_type": "markdown", "id": "a8061235", "metadata": {}, "source": [ "Let's start by setting up a ``Builder`` instance from the **CrI3** benchmark as shown in the Calculate Magnetic Parameters tutorial." ] }, { "cell_type": "code", "execution_count": 11, "id": "fe5b21cd", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Setting up Hamiltonian: 100%|██████████| 147/147 [00:00<00:00, 1170.90it/s]\n" ] }, { "data": { "text/plain": [ "" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "CrI3_path = \"./../../../benchmarks/CrI3/CrI3.fdf\"\n", "\n", "CrI3 = grogupy.Builder()\n", "CrI3.add_kspace(grogupy.Kspace(kset=[21, 21, 1]))\n", "CrI3.add_contour(grogupy.Contour(eset=100, eigfile=CrI3_path))\n", "CrI3.add_hamiltonian(grogupy.Hamiltonian(CrI3_path))\n", "CrI3" ] }, { "cell_type": "markdown", "id": "a8c6548f", "metadata": {}, "source": [ "In case of a simple system like this, where only the **Cr** atoms are magnetic we can set up the magnetic entities and pairs automatically, by defining a range for the pairs and the subset of atoms we want to use. " ] }, { "cell_type": "code", "execution_count": 12, "id": "85131dd8", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Add magnetic entities: 100%|██████████| 2/2 [00:00<00:00, 32.97it/s]\n", "Add pairs: 100%|██████████| 114/114 [00:00<00:00, 13500.98it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "[\n", "]\n", "[\n", " ]\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n" ] } ], "source": [ "CrI3.setup_from_range(R=20, subset=\"Cr\")\n", "print(CrI3.magnetic_entities)\n", "print(CrI3.pairs[:2])" ] }, { "cell_type": "markdown", "id": "e712ddfa", "metadata": {}, "source": [ "We have to take into account, that some orbitals are more localized, than others and the approximation of the Heisenberg model works better, if we only take into account these localized orbitals. we can define them by indexing directly from the atom, but this needs an in depth knowledge about the basis of the Hamiltonian. Instead we could simply choose the shell of orbitals, in this case the d orbitals." ] }, { "cell_type": "code", "execution_count": 13, "id": "27edc36c", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Add magnetic entities: 100%|██████████| 2/2 [00:00<00:00, 69.87it/s]\n", "Add pairs: 100%|██████████| 114/114 [00:00<00:00, 5591.03it/s]" ] }, { "name": "stdout", "output_type": "stream", "text": [ "[\n", "]\n", "[\n", " ]\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n" ] } ], "source": [ "CrI3.setup_from_range(R=20, subset=\"Cr\", l=2)\n", "print(CrI3.magnetic_entities)\n", "print(CrI3.pairs[:2])" ] }, { "cell_type": "markdown", "id": "4fdedada", "metadata": {}, "source": [ "The ``setup_from_range`` method takes keyword arguments, when it defines the magnetic entities. For more information on what is possible take a look at the ``MagneticEntity`` class in the API reference. Let's take a look at the final system." ] }, { "cell_type": "code", "execution_count": 14, "id": "72b7e647", "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "marker": { "color": "#1F77B4", "opacity": 0.5, "size": 10 }, "mode": "markers", "name": "Center:0Cr(l:2)", "type": "scatter3d", "x": [ -0.0000521955 ], "y": [ 0.00003006233980938 ], "z": [ 15 ] }, { "marker": { "color": "#1F77B4", "opacity": 0.5, "size": 5 }, "mode": "markers", "name": "Pairs on: 0Cr(l:2)", "type": "scatter3d", "x": [ -14.000052195499997, -17.500052195499997, -3.5000521955, -7.0000521954999995, -10.500052195499999, -14.000052195499999, -17.500052195499997, 3.499947804499999, -0.0000521955, -3.5000521954999995, -7.0000521954999995, -10.500052195499999, -14.000052195499999, 6.999947804499999, 3.4999478044999996, -3.5000521954999995, -7.0000521954999995, 13.999947804499998, 10.499947804499998, 6.999947804499999, 3.4999478044999996, -0.0000521955, -3.500052195499999, 17.499947804499996, 13.999947804499998, 10.499947804499998, 6.999947804499999, 3.4999478045, 17.499947804499996, 13.999947804499996, -6.999947443999998, -10.499947443999996, -13.999947443999996, -17.499947443999996, 0.000052555999999981395, -3.499947443999999, -6.999947443999998, -10.499947443999998, -13.999947443999996, 7.000052555999999, 3.500052556, 0.000052556000000425485, -3.499947443999999, -6.999947443999998, -10.499947443999998, 10.500052556, 7.000052556, 3.500052556, 0.000052556000000425485, -3.499947443999999, 14.000052555999998, 10.500052556, 7.000052556, 3.500052556, 17.500052556, 14.000052555999998, 10.500052556 ], "y": [ -12.12432557766019, -6.06214775766019, -18.18650339766019, -12.12432557766019, -6.06214775766019, 0.00003006233980938, 6.062207882339809, -18.18650339766019, -12.12432557766019, -6.06214775766019, 0.00003006233980938, 6.062207882339809, 12.124385702339808, -12.12432557766019, -6.06214775766019, 6.062207882339809, 12.124385702339808, -12.12432557766019, -6.06214775766019, 0.00003006233980938, 6.062207882339809, 12.124385702339808, 18.18656352233981, -6.06214775766019, 0.00003006233980938, 6.062207882339809, 12.124385702339808, 18.18656352233981, 6.062207882339809, 12.124385702339808, -16.165837923842492, -10.103660103842493, -4.041482283842493, 2.0206955361575063, -16.165837923842492, -10.103660103842493, -4.041482283842493, 2.0206955361575063, 8.082873356157506, -16.165837923842492, -10.103660103842493, -4.041482283842493, 2.0206955361575063, 8.082873356157506, 14.145051176157505, -10.103660103842493, -4.041482283842493, 2.0206955361575063, 8.082873356157506, 14.145051176157505, -4.041482283842493, 2.0206955361575063, 8.082873356157506, 14.145051176157505, 2.0206955361575063, 8.082873356157506, 14.145051176157505 ], "z": [ 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998 ] }, { "marker": { "color": "#FF7F0E", "opacity": 0.5, "size": 10 }, "mode": "markers", "name": "Center:1Cr(l:2)", "type": "scatter3d", "x": [ 3.500052556 ], "y": [ 2.0206955361575063 ], "z": [ 14.999999969999998 ] }, { "marker": { "color": "#FF7F0E", "opacity": 0.5, "size": 5 }, "mode": "markers", "name": "Pairs on: 1Cr(l:2)", "type": "scatter3d", "x": [ -7.0000521954999995, -10.500052195499999, -14.000052195499999, -0.0000521955, -3.5000521954999995, -7.0000521954999995, -10.500052195499999, 6.999947804499999, 3.4999478044999996, -0.0000521955, -3.5000521954999995, -7.0000521954999995, 13.999947804499998, 10.499947804499998, 6.999947804499999, 3.4999478044999996, -0.0000521955, -3.500052195499999, 17.499947804499996, 13.999947804499998, 10.499947804499998, 6.999947804499999, 3.4999478045, 20.999947804499996, 17.499947804499996, 13.999947804499996, 10.499947804499998, -10.499947443999996, -13.999947443999996, 0.000052555999999981395, -3.499947443999999, -6.999947443999998, -10.499947443999998, -13.999947443999996, 7.000052555999999, 3.500052556, 0.000052556000000425485, -3.499947443999999, -6.999947443999998, -10.499947443999998, 10.500052556, 7.000052556, 0.000052556000000425485, -3.499947443999999, 17.500052556, 14.000052555999998, 10.500052556, 7.000052556, 3.500052556, 0.000052556000000869574, 21.000052555999996, 17.500052556, 14.000052555999998, 10.500052556, 7.000052556, 21.000052555999996, 17.500052555999996 ], "y": [ -12.12432557766019, -6.06214775766019, 0.00003006233980938, -12.12432557766019, -6.06214775766019, 0.00003006233980938, 6.062207882339809, -12.12432557766019, -6.06214775766019, 0.00003006233980938, 6.062207882339809, 12.124385702339808, -12.12432557766019, -6.06214775766019, 0.00003006233980938, 6.062207882339809, 12.124385702339808, 18.18656352233981, -6.06214775766019, 0.00003006233980938, 6.062207882339809, 12.124385702339808, 18.18656352233981, 0.00003006233980938, 6.062207882339809, 12.124385702339808, 18.18656352233981, -10.103660103842493, -4.041482283842493, -16.165837923842492, -10.103660103842493, -4.041482283842493, 2.0206955361575063, 8.082873356157506, -16.165837923842492, -10.103660103842493, -4.041482283842493, 2.0206955361575063, 8.082873356157506, 14.145051176157505, -10.103660103842493, -4.041482283842493, 8.082873356157506, 14.145051176157505, -10.103660103842493, -4.041482283842493, 2.0206955361575063, 8.082873356157506, 14.145051176157505, 20.207228996157507, -4.041482283842493, 2.0206955361575063, 8.082873356157506, 14.145051176157505, 20.207228996157507, 8.082873356157506, 14.145051176157505 ], "z": [ 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998, 14.999999969999998 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ 0, 6.999999999999999 ], "y": [ 0, 0 ], "z": [ 0, 0 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ 0, -3.4999999999999996 ], "y": [ 0, 6.06217782 ], "z": [ 0, 0 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ 0, 0 ], "y": [ 0, 0 ], "z": [ 0, 30 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ 6.999999999999999, 3.4999999999999996 ], "y": [ 0, 6.06217782 ], "z": [ 0, 0 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ 6.999999999999999, 6.999999999999999 ], "y": [ 0, 0 ], "z": [ 0, 30 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ -3.4999999999999996, 3.4999999999999996 ], "y": [ 6.06217782, 6.06217782 ], "z": [ 0, 0 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ -3.4999999999999996, -3.4999999999999996 ], "y": [ 6.06217782, 6.06217782 ], "z": [ 0, 30 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ 0, 6.999999999999999 ], "y": [ 0, 0 ], "z": [ 30, 30 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ 0, -3.4999999999999996 ], "y": [ 0, 6.06217782 ], "z": [ 30, 30 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ 3.4999999999999996, 3.4999999999999996 ], "y": [ 6.06217782, 6.06217782 ], "z": [ 30, 0 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ 3.4999999999999996, 6.999999999999999 ], "y": [ 6.06217782, 0 ], "z": [ 30, 30 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ 3.4999999999999996, -3.4999999999999996 ], "y": [ 6.06217782, 6.06217782 ], "z": [ 30, 30 ] } ], "layout": { "autosize": false, "height": 500, "scene": { "aspectmode": "data", "xaxis": { "gridwidth": 1, "showgrid": true, "title": { "text": "X Axis" } }, "yaxis": { "gridwidth": 1, "showgrid": true, "title": { "text": "Y Axis" } }, "zaxis": { "gridwidth": 1, "showgrid": true, "title": { "text": "Z Axis" } } }, "showlegend": true, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter": [ { "fillpattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermap": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermap" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "autotypenumbers": "strict", "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 } } }, "title": {}, "width": 800 } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "CrI3.plot_pairs()" ] }, { "cell_type": "markdown", "id": "beab95e8", "metadata": {}, "source": [ "## Complicated systems, with molecule like magnetic entities" ] }, { "cell_type": "markdown", "id": "9b6a48c4", "metadata": {}, "source": [ "Triangulene are coming soon..." ] }, { "cell_type": "markdown", "id": "fb079f51", "metadata": {}, "source": [ "## Defining magnetic entities and pairs by hand" ] }, { "cell_type": "markdown", "id": "34d767d4", "metadata": {}, "source": [ "If you are only interested in some specific magnetic entities and pairs, in this case the first-, second- and third neighbour, then you can define these using dictionaries. Internally all the above methods first create these dictionaries, then use them to create the ``MagneticEntityList`` and ``PairList`` of the ``Builder`` instance." ] }, { "cell_type": "code", "execution_count": 15, "id": "0ae8ad57", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Add magnetic entities: 100%|██████████| 2/2 [00:00<00:00, 67.47it/s]\n", "Add pairs: 100%|██████████| 6/6 [00:00<00:00, 4298.18it/s]\n" ] } ], "source": [ "# clear magnetic entities and pairs\n", "CrI3.magnetic_entities = grogupy.MagneticEntityList()\n", "CrI3.pairs = grogupy.PairList()\n", "\n", "# use the same atoms as in the first example\n", "magnetic_entities = [\n", " dict(atom=[0], l=[2]),\n", " dict(orb=[15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29]),\n", "]\n", "pairs = [\n", " dict(ai=0, aj=1, Ruc=[0, 0, 0]),\n", " dict(ai=0, aj=0, Ruc=[1, 0, 0]),\n", " dict(ai=0, aj=1, Ruc=[1, 0, 0]),\n", " dict(ai=1, aj=0, Ruc=[0, 0, 0]),\n", " dict(ai=1, aj=1, Ruc=[-1, 0, 0]),\n", " dict(ai=1, aj=0, Ruc=[-1, 0, 0]),\n", "]\n", "CrI3.add_magnetic_entities(magnetic_entities)\n", "CrI3.add_pairs(pairs)" ] }, { "cell_type": "code", "execution_count": 16, "id": "64e7ca0b", "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "marker": { "color": "#1F77B4", "opacity": 0.5, "size": 10 }, "mode": "markers", "name": "Center:0Cr(l:2)", "type": "scatter3d", "x": [ -0.0000521955 ], "y": [ 0.00003006233980938 ], "z": [ 15 ] }, { "legendgroup": "pair 0Cr(l:2)-1Cr(o:0-1-2-3-4-5-6-7-8-9-10-11-12-13-14), ruc:[0, 0, 0]", "marker": { "color": "#1F77B4", "opacity": 0.5, "size": 5 }, "mode": "markers", "name": "1Cr(o:0-1-2-3-4-5-6-7-8-9-10-11-12-13-14), ruc:[0, 0, 0]", "type": "scatter3d", "x": [ 3.500052556 ], "y": [ 2.0206955361575063 ], "z": [ 14.999999969999998 ] }, { "legendgroup": "pair 0Cr(l:2)-0Cr(l:2), ruc:[1, 0, 0]", "marker": { "color": "#1F77B4", "opacity": 0.5, "size": 5 }, "mode": "markers", "name": "0Cr(l:2), ruc:[1, 0, 0]", "type": "scatter3d", "x": [ 6.999947804499999 ], "y": [ 0.00003006233980938 ], "z": [ 15 ] }, { "legendgroup": "pair 0Cr(l:2)-1Cr(o:0-1-2-3-4-5-6-7-8-9-10-11-12-13-14), ruc:[1, 0, 0]", "marker": { "color": "#1F77B4", "opacity": 0.5, "size": 5 }, "mode": "markers", "name": "1Cr(o:0-1-2-3-4-5-6-7-8-9-10-11-12-13-14), ruc:[1, 0, 0]", "type": "scatter3d", "x": [ 10.500052556 ], "y": [ 2.0206955361575063 ], "z": [ 14.999999969999998 ] }, { "marker": { "color": "#FF7F0E", "opacity": 0.5, "size": 10 }, "mode": "markers", "name": "Center:1Cr(o:0-1-2-3-4-5-6-7-8-9-10-11-12-13-14)", "type": "scatter3d", "x": [ 3.500052556 ], "y": [ 2.0206955361575063 ], "z": [ 14.999999969999998 ] }, { "legendgroup": "pair 1Cr(o:0-1-2-3-4-5-6-7-8-9-10-11-12-13-14)-0Cr(l:2), ruc:[0, 0, 0]", "marker": { "color": "#FF7F0E", "opacity": 0.5, "size": 5 }, "mode": "markers", "name": "0Cr(l:2), ruc:[0, 0, 0]", "type": "scatter3d", "x": [ -0.0000521955 ], "y": [ 0.00003006233980938 ], "z": [ 15 ] }, { "legendgroup": "pair 1Cr(o:0-1-2-3-4-5-6-7-8-9-10-11-12-13-14)-1Cr(o:0-1-2-3-4-5-6-7-8-9-10-11-12-13-14), ruc:[-1, 0, 0", "marker": { "color": "#FF7F0E", "opacity": 0.5, "size": 5 }, "mode": "markers", "name": "1Cr(o:0-1-2-3-4-5-6-7-8-9-10-11-12-13-14), ruc:[-1, 0, 0", "type": "scatter3d", "x": [ -3.499947443999999 ], "y": [ 2.0206955361575063 ], "z": [ 14.999999969999998 ] }, { "legendgroup": "pair 1Cr(o:0-1-2-3-4-5-6-7-8-9-10-11-12-13-14)-0Cr(l:2), ruc:[-1, 0, 0", "marker": { "color": "#FF7F0E", "opacity": 0.5, "size": 5 }, "mode": "markers", "name": "0Cr(l:2), ruc:[-1, 0, 0", "type": "scatter3d", "x": [ -7.0000521954999995 ], "y": [ 0.00003006233980938 ], "z": [ 15 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ 0, 6.999999999999999 ], "y": [ 0, 0 ], "z": [ 0, 0 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ 0, -3.4999999999999996 ], "y": [ 0, 6.06217782 ], "z": [ 0, 0 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ 0, 0 ], "y": [ 0, 0 ], "z": [ 0, 30 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ 6.999999999999999, 3.4999999999999996 ], "y": [ 0, 6.06217782 ], "z": [ 0, 0 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ 6.999999999999999, 6.999999999999999 ], "y": [ 0, 0 ], "z": [ 0, 30 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ -3.4999999999999996, 3.4999999999999996 ], "y": [ 6.06217782, 6.06217782 ], "z": [ 0, 0 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ -3.4999999999999996, -3.4999999999999996 ], "y": [ 6.06217782, 6.06217782 ], "z": [ 0, 30 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ 0, 6.999999999999999 ], "y": [ 0, 0 ], "z": [ 30, 30 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ 0, -3.4999999999999996 ], "y": [ 0, 6.06217782 ], "z": [ 30, 30 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ 3.4999999999999996, 3.4999999999999996 ], "y": [ 6.06217782, 6.06217782 ], "z": [ 30, 0 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ 3.4999999999999996, 6.999999999999999 ], "y": [ 6.06217782, 0 ], "z": [ 30, 30 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ 3.4999999999999996, -3.4999999999999996 ], "y": [ 6.06217782, 6.06217782 ], "z": [ 30, 30 ] } ], "layout": { "autosize": false, "height": 500, "scene": { "aspectmode": "data", "xaxis": { "gridwidth": 1, "showgrid": true, "title": { "text": "X Axis" } }, "yaxis": { "gridwidth": 1, "showgrid": true, "title": { "text": "Y Axis" } }, "zaxis": { "gridwidth": 1, "showgrid": true, "title": { "text": "Z Axis" } } }, "showlegend": true, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter": [ { "fillpattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermap": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermap" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "autotypenumbers": "strict", "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 } } }, "title": {}, "width": 800 } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "CrI3.plot_pairs(group=False)" ] }, { "cell_type": "markdown", "id": "98efb176", "metadata": {}, "source": [ "The firs magnetic entity is the same as in the first example, but the second is defined by taking all the orbitals, not just the d orbitlas, from the second atom. As you can see the 'atom' and 'l' keys in the dictionary are list, so, for more complicated systems, you can define quasi-molecules with different shells. A not so physically meaningful example, where we combine a cromium, with a neighbouring iodine would look something like this." ] }, { "cell_type": "code", "execution_count": 17, "id": "5ee077f7", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Add magnetic entities: 100%|██████████| 2/2 [00:00<00:00, 137.01it/s]\n", "Add pairs: 100%|██████████| 8/8 [00:00<00:00, 24873.56it/s]\n" ] } ], "source": [ "# clear magnetic entities and pairs\n", "CrI3.magnetic_entities = grogupy.MagneticEntityList()\n", "CrI3.pairs = grogupy.PairList()\n", "\n", "# use the same atoms as in the first example\n", "magnetic_entities = [\n", " dict(atom=[0, 2], l=[[None], [2]]),\n", " dict(atom=[1]),\n", "]\n", "pairs = [\n", " dict(ai=0, aj=1, Ruc=[1, 0, 0]),\n", " dict(ai=0, aj=1, Ruc=[1, 1, 0]),\n", " dict(ai=0, aj=1, Ruc=[0, 1, 0]),\n", " dict(ai=0, aj=1, Ruc=[-1, 1, 0]),\n", " dict(ai=0, aj=1, Ruc=[-1, 0, 0]),\n", " dict(ai=0, aj=1, Ruc=[-1, -1, 0]),\n", " dict(ai=0, aj=1, Ruc=[0, -1, 0]),\n", " dict(ai=0, aj=1, Ruc=[1, -1, 0]),\n", "]\n", "CrI3.add_magnetic_entities(magnetic_entities)\n", "CrI3.add_pairs(pairs)" ] }, { "cell_type": "code", "execution_count": 18, "id": "07714eae", "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "marker": { "color": "#1F77B4", "opacity": 0.5, "size": 10 }, "mode": "markers", "name": "Center:0Cr(l:0-1-2-3-4-5-6-7-8-9-10-11-12-13-14)--2I(l:2)", "type": "scatter3d", "x": { "bdata": "VzVXuY9dC7+Ut2D/LgcCQA==", "dtype": "f8" }, "y": { "bdata": "tGjbQsyF/z6huSF36bbBPw==", "dtype": "f8" }, "z": { "bdata": "AAAAAAAALkArtlG2q5cwQA==", "dtype": "f8" } }, { "legendgroup": "pair 0Cr(l:0-1-2-3-4-5-6-7-8-9-10-11-12-13-14)--2I(l:2)-1Cr(l:All), ruc:[1, 0, 0]", "marker": { "color": "#1F77B4", "opacity": 0.5, "size": 5 }, "mode": "markers", "name": "1Cr(l:All), ruc:[1, 0, 0]", "type": "scatter3d", "x": { "bdata": "OJp84wYAJUA=", "dtype": "f8" }, "y": { "bdata": "5cHXa2IqAEA=", "dtype": "f8" }, "z": { "bdata": "TE3+/v//LUA=", "dtype": "f8" } }, { "legendgroup": "pair 0Cr(l:0-1-2-3-4-5-6-7-8-9-10-11-12-13-14)--2I(l:2)-1Cr(l:All), ruc:[1, 1, 0]", "marker": { "color": "#1F77B4", "opacity": 0.5, "size": 5 }, "mode": "markers", "name": "1Cr(l:All), ruc:[1, 1, 0]", "type": "scatter3d", "x": { "bdata": "cDT5xg0AHEA=", "dtype": "f8" }, "y": { "bdata": "ANBkYG4qIEA=", "dtype": "f8" }, "z": { "bdata": "TE3+/v//LUA=", "dtype": "f8" } }, { "legendgroup": "pair 0Cr(l:0-1-2-3-4-5-6-7-8-9-10-11-12-13-14)--2I(l:2)-1Cr(l:All), ruc:[0, 1, 0]", "marker": { "color": "#1F77B4", "opacity": 0.5, "size": 5 }, "mode": "markers", "name": "1Cr(l:All), ruc:[0, 1, 0]", "type": "scatter3d", "x": { "bdata": "AADhaPKNCz8=", "dtype": "f8" }, "y": { "bdata": "ANBkYG4qIEA=", "dtype": "f8" }, "z": { "bdata": "TE3+/v//LUA=", "dtype": "f8" } }, { "legendgroup": "pair 0Cr(l:0-1-2-3-4-5-6-7-8-9-10-11-12-13-14)--2I(l:2)-1Cr(l:All), ruc:[-1, 1, 0", "marker": { "color": "#1F77B4", "opacity": 0.5, "size": 5 }, "mode": "markers", "name": "1Cr(l:All), ruc:[-1, 1, 0", "type": "scatter3d", "x": { "bdata": "jssGOfL/G8A=", "dtype": "f8" }, "y": { "bdata": "ANBkYG4qIEA=", "dtype": "f8" }, "z": { "bdata": "TE3+/v//LUA=", "dtype": "f8" } }, { "legendgroup": "pair 0Cr(l:0-1-2-3-4-5-6-7-8-9-10-11-12-13-14)--2I(l:2)-1Cr(l:All), ruc:[-1, 0, 0", "marker": { "color": "#1F77B4", "opacity": 0.5, "size": 5 }, "mode": "markers", "name": "1Cr(l:All), ruc:[-1, 0, 0", "type": "scatter3d", "x": { "bdata": "HpcNcuT/C8A=", "dtype": "f8" }, "y": { "bdata": "5cHXa2IqAEA=", "dtype": "f8" }, "z": { "bdata": "TE3+/v//LUA=", "dtype": "f8" } }, { "legendgroup": "pair 0Cr(l:0-1-2-3-4-5-6-7-8-9-10-11-12-13-14)--2I(l:2)-1Cr(l:All), ruc:[-1, -1, ", "marker": { "color": "#1F77B4", "opacity": 0.5, "size": 5 }, "mode": "markers", "name": "1Cr(l:All), ruc:[-1, -1, ", "type": "scatter3d", "x": { "bdata": "AADhaPKNCz8=", "dtype": "f8" }, "y": { "bdata": "Gt7xVHoqEMA=", "dtype": "f8" }, "z": { "bdata": "TE3+/v//LUA=", "dtype": "f8" } }, { "legendgroup": "pair 0Cr(l:0-1-2-3-4-5-6-7-8-9-10-11-12-13-14)--2I(l:2)-1Cr(l:All), ruc:[0, -1, 0", "marker": { "color": "#1F77B4", "opacity": 0.5, "size": 5 }, "mode": "markers", "name": "1Cr(l:All), ruc:[0, -1, 0", "type": "scatter3d", "x": { "bdata": "cDT5xg0AHEA=", "dtype": "f8" }, "y": { "bdata": "Gt7xVHoqEMA=", "dtype": "f8" }, "z": { "bdata": "TE3+/v//LUA=", "dtype": "f8" } }, { "legendgroup": "pair 0Cr(l:0-1-2-3-4-5-6-7-8-9-10-11-12-13-14)--2I(l:2)-1Cr(l:All), ruc:[1, -1, 0", "marker": { "color": "#1F77B4", "opacity": 0.5, "size": 5 }, "mode": "markers", "name": "1Cr(l:All), ruc:[1, -1, 0", "type": "scatter3d", "x": { "bdata": "N5p84wYALEA=", "dtype": "f8" }, "y": { "bdata": "Gt7xVHoqEMA=", "dtype": "f8" }, "z": { "bdata": "TE3+/v//LUA=", "dtype": "f8" } }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ 0, 6.999999999999999 ], "y": [ 0, 0 ], "z": [ 0, 0 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ 0, -3.4999999999999996 ], "y": [ 0, 6.06217782 ], "z": [ 0, 0 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ 0, 0 ], "y": [ 0, 0 ], "z": [ 0, 30 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ 6.999999999999999, 3.4999999999999996 ], "y": [ 0, 6.06217782 ], "z": [ 0, 0 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ 6.999999999999999, 6.999999999999999 ], "y": [ 0, 0 ], "z": [ 0, 30 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ -3.4999999999999996, 3.4999999999999996 ], "y": [ 6.06217782, 6.06217782 ], "z": [ 0, 0 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ -3.4999999999999996, -3.4999999999999996 ], "y": [ 6.06217782, 6.06217782 ], "z": [ 0, 30 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ 0, 6.999999999999999 ], "y": [ 0, 0 ], "z": [ 30, 30 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ 0, -3.4999999999999996 ], "y": [ 0, 6.06217782 ], "z": [ 30, 30 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ 3.4999999999999996, 3.4999999999999996 ], "y": [ 6.06217782, 6.06217782 ], "z": [ 30, 0 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ 3.4999999999999996, 6.999999999999999 ], "y": [ 6.06217782, 0 ], "z": [ 30, 30 ] }, { "line": { "color": "black", "width": 1 }, "mode": "lines", "showlegend": false, "type": "scatter3d", "x": [ 3.4999999999999996, -3.4999999999999996 ], "y": [ 6.06217782, 6.06217782 ], "z": [ 30, 30 ] } ], "layout": { "autosize": false, "height": 500, "scene": { "aspectmode": "data", "xaxis": { "gridwidth": 1, "showgrid": true, "title": { "text": "X Axis" } }, "yaxis": { "gridwidth": 1, "showgrid": true, "title": { "text": "Y Axis" } }, "zaxis": { "gridwidth": 1, "showgrid": true, "title": { "text": "Z Axis" } } }, "showlegend": true, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter": [ { "fillpattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermap": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermap" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "autotypenumbers": "strict", "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 } } }, "title": {}, "width": 800 } }, "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "CrI3.plot_pairs(group=False)" ] }, { "cell_type": "markdown", "id": "1e24b02a", "metadata": {}, "source": [ "Here we took different shells from the chromium and iodine. If you set the atoms you could also use the 'orb' key, but in this case the indexing is not done directly from the Hamiltonian, but from the atomic orbitals." ] } ], "metadata": { "kernelspec": { "display_name": ".venv (3.13.8)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.13.8" } }, "nbformat": 4, "nbformat_minor": 5 }