diff --git a/docs/source/user_guide/structuredata/API_start.ipynb b/docs/source/user_guide/structuredata/API_start.ipynb index 6010fd8..6b29fa4 100644 --- a/docs/source/user_guide/structuredata/API_start.ipynb +++ b/docs/source/user_guide/structuredata/API_start.ipynb @@ -4,7 +4,30 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# The StructureData object" + "# [The StructureData object](#toc0_)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Table of contents** \n", + "- [The StructureData object](#toc1_) \n", + " - [Initialization of a StructureData instance](#toc1_1_) \n", + " - [How to define the properties](#toc1_1_1_) \n", + " - [Inspect the supported and stored properties from the StructureData instance:](#toc1_1_2_) \n", + " - [Missing: access the supported property from the class object](#toc1_1_2_1_) \n", + " - [The immutability of the StructureData instance](#toc1_1_3_) \n", + " - [How to get kinds](#toc1_1_4_) \n", + "\n", + "\n", + "" ] }, { @@ -38,27 +61,16 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 16, "metadata": {}, "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\u001b[93m\u001b[1mWarning\u001b[0m: \u001b[22mYou are currently using a post release development version of AiiDA: 2.4.0.post0\u001b[0m\n", - "\u001b[93m\u001b[1mWarning\u001b[0m: \u001b[22mBe aware that this is not recommended for production and is not officially supported.\u001b[0m\n", - "\u001b[93m\u001b[1mWarning\u001b[0m: \u001b[22mDatabases used with this version may not be compatible with future releases of AiiDA\u001b[0m\n", - "\u001b[93m\u001b[1mWarning\u001b[0m: \u001b[22mas you might not be able to automatically migrate your data.\n", - "\u001b[0m\n" - ] - }, { "data": { "text/plain": [ "Profile" ] }, - "execution_count": 1, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } @@ -100,7 +112,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 17, "metadata": {}, "outputs": [], "source": [ @@ -121,7 +133,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 18, "metadata": {}, "outputs": [], "source": [ @@ -139,16 +151,16 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 19, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Mass(parent=, value=[6.941, 6.945], domain='intra-site', default_kind_threshold=0.001)" + "Mass(parent=, value=[6.941, 6.945], domain='intra-site', default_kind_threshold=0.001)" ] }, - "execution_count": 4, + "execution_count": 19, "metadata": {}, "output_type": "execute_result" } @@ -159,7 +171,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 20, "metadata": {}, "outputs": [ { @@ -168,7 +180,7 @@ "[6.941, 6.945]" ] }, - "execution_count": 5, + "execution_count": 20, "metadata": {}, "output_type": "execute_result" } @@ -179,7 +191,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 21, "metadata": {}, "outputs": [ { @@ -188,7 +200,7 @@ "'intra-site'" ] }, - "execution_count": 6, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } @@ -206,7 +218,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 22, "metadata": {}, "outputs": [ { @@ -215,7 +227,7 @@ "{'value': [6.941, 6.945]}" ] }, - "execution_count": 7, + "execution_count": 22, "metadata": {}, "output_type": "execute_result" } @@ -228,21 +240,21 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Inspect the supported and stored properties from the StructureData instance:" + "### [Inspect the supported and stored properties from the StructureData instance:](#toc0_)" ] }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 23, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "['positions', 'cell', 'pbc', 'mass', 'symbols', 'custom', 'charge']" + "['pbc', 'mass', 'custom', 'cell', 'symbols', 'charge', 'positions']" ] }, - "execution_count": 8, + "execution_count": 23, "metadata": {}, "output_type": "execute_result" } @@ -253,16 +265,16 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 24, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "['positions', 'cell', 'pbc', 'mass', 'symbols', 'charge']" + "['mass', 'cell', 'pbc', 'symbols', 'charge', 'positions']" ] }, - "execution_count": 9, + "execution_count": 24, "metadata": {}, "output_type": "execute_result" } @@ -275,7 +287,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "#### Missing: access the supported property from the class object\n", + "#### [Missing: access the supported property from the class object](#toc0_)\n", "\n", "```python\n", "In [1]: StructureData.get_supported_properties()\n", @@ -287,7 +299,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### The immutability of the StructureData instance" + "### [The immutability of the StructureData instance](#toc0_)" ] }, { @@ -303,7 +315,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 25, "metadata": {}, "outputs": [ { @@ -317,7 +329,7 @@ " 'charge': {'value': [1, 0]}}" ] }, - "execution_count": 10, + "execution_count": 25, "metadata": {}, "output_type": "execute_result" } @@ -329,7 +341,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 26, "metadata": {}, "outputs": [], "source": [ @@ -338,7 +350,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 27, "metadata": {}, "outputs": [], "source": [ @@ -347,7 +359,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 28, "metadata": {}, "outputs": [ { @@ -356,7 +368,7 @@ "[6.941, 6.941]" ] }, - "execution_count": 13, + "execution_count": 28, "metadata": {}, "output_type": "execute_result" } @@ -369,14 +381,14 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### How to get kinds\n", + "### [How to get kinds](#toc0_)\n", "\n", "It is possible to get a list of kinds using the `get_kinds` method. This will generate the corresponding predicted kinds for all the properties (the \"intra-site\" ones) and then generate the list of global different kinds. \n" ] }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 29, "metadata": {}, "outputs": [ { @@ -395,7 +407,7 @@ " {'mass': [6.9415, 6.945500000000001], 'charge': [1.1250000000000002, 0.225]})" ] }, - "execution_count": 16, + "execution_count": 29, "metadata": {}, "output_type": "execute_result" } @@ -408,12 +420,15 @@ "cell_type": "markdown", "metadata": {}, "source": [ + "As you can see, basically the value of a property is not the starting value choosen, and this is a PROBLEM: we have TOFIX this, especially in case in which the value is zero. \n", + "The issue is that we are using a middle-point representative value.\n", + "\n", "Kinds are determined using, for each property, a given threshold. There is a default threshold:" ] }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 30, "metadata": {}, "outputs": [ { @@ -422,7 +437,7 @@ "0.001" ] }, - "execution_count": 17, + "execution_count": 30, "metadata": {}, "output_type": "execute_result" } @@ -441,6 +456,11 @@ "structure.get_kinds(thr={\"mass\":0.1})\n", "```" ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [] } ], "metadata": {