From 304165a71de772b0ea6b1183f179ab3801699dd9 Mon Sep 17 00:00:00 2001 From: amr8004 <90706046+amr8004@users.noreply.github.com> Date: Wed, 20 Nov 2024 20:39:59 +0000 Subject: [PATCH] Updated example baseline "working", results wrong --- Compositional_Space_Stitching.ipynb | 1567 ++++++++++++++++++--------- testing_input.yaml | 4 + 2 files changed, 1033 insertions(+), 538 deletions(-) diff --git a/Compositional_Space_Stitching.ipynb b/Compositional_Space_Stitching.ipynb index 34b5af2..de07a78 100644 --- a/Compositional_Space_Stitching.ipynb +++ b/Compositional_Space_Stitching.ipynb @@ -33,7 +33,7 @@ }, { "cell_type": "code", - "execution_count": 69, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -45,7 +45,7 @@ }, { "cell_type": "code", - "execution_count": 70, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -72,7 +72,7 @@ }, { "cell_type": "code", - "execution_count": 71, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -83,7 +83,7 @@ }, { "cell_type": "code", - "execution_count": 72, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -95,7 +95,7 @@ }, { "cell_type": "code", - "execution_count": 73, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -148,7 +148,7 @@ }, { "cell_type": "code", - "execution_count": 74, + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ @@ -165,7 +165,7 @@ }, { "cell_type": "code", - "execution_count": 75, + "execution_count": 7, "metadata": {}, "outputs": [], "source": [ @@ -176,7 +176,7 @@ }, { "cell_type": "code", - "execution_count": 76, + "execution_count": 8, "metadata": {}, "outputs": [], "source": [ @@ -191,7 +191,7 @@ }, { "cell_type": "code", - "execution_count": 77, + "execution_count": 9, "metadata": {}, "outputs": [], "source": [ @@ -201,7 +201,7 @@ }, { "cell_type": "code", - "execution_count": 78, + "execution_count": 10, "metadata": {}, "outputs": [ { @@ -219,7 +219,7 @@ }, { "cell_type": "code", - "execution_count": 79, + "execution_count": 11, "metadata": {}, "outputs": [], "source": [ @@ -230,7 +230,7 @@ }, { "cell_type": "code", - "execution_count": 80, + "execution_count": 12, "metadata": {}, "outputs": [], "source": [ @@ -240,7 +240,7 @@ }, { "cell_type": "code", - "execution_count": 81, + "execution_count": 13, "metadata": {}, "outputs": [], "source": [ @@ -250,7 +250,7 @@ }, { "cell_type": "code", - "execution_count": 82, + "execution_count": 14, "metadata": {}, "outputs": [], "source": [ @@ -268,7 +268,7 @@ }, { "cell_type": "code", - "execution_count": 83, + "execution_count": 15, "metadata": {}, "outputs": [], "source": [ @@ -284,7 +284,7 @@ }, { "cell_type": "code", - "execution_count": 84, + "execution_count": 16, "metadata": {}, "outputs": [ { @@ -293,7 +293,7 @@ "28" ] }, - "execution_count": 84, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } @@ -304,7 +304,7 @@ }, { "cell_type": "code", - "execution_count": 85, + "execution_count": 17, "metadata": {}, "outputs": [], "source": [ @@ -317,7 +317,7 @@ }, { "cell_type": "code", - "execution_count": 86, + "execution_count": 18, "metadata": {}, "outputs": [], "source": [ @@ -327,17 +327,15 @@ }, { "cell_type": "code", - "execution_count": 87, + "execution_count": 19, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "/opt/conda/lib/python3.11/site-packages/pycalphad/io/tdb.py:293: UserWarning:\n", - "\n", - "The type definition character `&` in `TYPE_DEFINITION & GES A_P_D A2_BCC MAGNETIC -1.0 4.00000E-01 ` is not used by any phase.\n", - "\n" + "/opt/conda/lib/python3.11/site-packages/pycalphad/io/tdb.py:293: UserWarning: The type definition character `&` in `TYPE_DEFINITION & GES A_P_D A2_BCC MAGNETIC -1.0 4.00000E-01 ` is not used by any phase.\n", + " warnings.warn(f\"The type definition character `{typechar}` in `TYPE_DEFINITION {typechar} {line}` is not used by any phase.\")\n" ] } ], @@ -365,7 +363,7 @@ }, { "cell_type": "code", - "execution_count": 88, + "execution_count": 20, "metadata": {}, "outputs": [], "source": [ @@ -389,7 +387,7 @@ }, { "cell_type": "code", - "execution_count": 89, + "execution_count": 21, "metadata": {}, "outputs": [ { @@ -409,7 +407,7 @@ }, { "cell_type": "code", - "execution_count": 90, + "execution_count": 22, "metadata": {}, "outputs": [], "source": [ @@ -418,7 +416,7 @@ }, { "cell_type": "code", - "execution_count": 91, + "execution_count": 23, "metadata": {}, "outputs": [], "source": [ @@ -433,7 +431,7 @@ }, { "cell_type": "code", - "execution_count": 92, + "execution_count": 24, "metadata": {}, "outputs": [], "source": [ @@ -443,7 +441,7 @@ }, { "cell_type": "code", - "execution_count": 93, + "execution_count": 25, "metadata": {}, "outputs": [ { @@ -482,7 +480,7 @@ }, { "cell_type": "code", - "execution_count": 94, + "execution_count": 26, "metadata": {}, "outputs": [ { @@ -518,7 +516,7 @@ }, { "cell_type": "code", - "execution_count": 95, + "execution_count": 27, "metadata": {}, "outputs": [], "source": [ @@ -535,7 +533,7 @@ }, { "cell_type": "code", - "execution_count": 96, + "execution_count": 28, "metadata": {}, "outputs": [ { @@ -555,7 +553,7 @@ }, { "cell_type": "code", - "execution_count": 97, + "execution_count": 29, "metadata": {}, "outputs": [], "source": [ @@ -564,7 +562,7 @@ }, { "cell_type": "code", - "execution_count": 98, + "execution_count": 30, "metadata": {}, "outputs": [], "source": [ @@ -579,7 +577,7 @@ }, { "cell_type": "code", - "execution_count": 99, + "execution_count": 31, "metadata": {}, "outputs": [], "source": [ @@ -589,7 +587,7 @@ }, { "cell_type": "code", - "execution_count": 100, + "execution_count": 32, "metadata": {}, "outputs": [ { @@ -627,7 +625,7 @@ }, { "cell_type": "code", - "execution_count": 101, + "execution_count": 33, "metadata": {}, "outputs": [ { @@ -688,7 +686,7 @@ }, { "cell_type": "code", - "execution_count": 102, + "execution_count": 34, "metadata": {}, "outputs": [], "source": [ @@ -705,36 +703,36 @@ }, { "cell_type": "code", - "execution_count": 103, + "execution_count": 35, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "('Fe', 'Ni', 'Cr') -> ([0, 1, 0, 0, 0], [0, 0, 1, 0, 0], [0, 1, 0, 0, 0])\n", + "('Cr', 'Fe', 'Ni') -> ([1, 0, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 1, 0, 0])\n", + "('Cr', 'Fe', 'V') -> ([1, 0, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 0, 0, 1])\n", + "('Cr', 'Fe', 'Ti') -> ([1, 0, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 0, 1, 0])\n", + "('Cr', 'Ni', 'V') -> ([1, 0, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 0, 1])\n", + "('Cr', 'Ni', 'Ti') -> ([1, 0, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 1, 0])\n", + "('Cr', 'V', 'Ti') -> ([1, 0, 0, 0, 0], [0, 0, 0, 0, 1], [0, 0, 0, 1, 0])\n", "('Fe', 'Ni', 'V') -> ([0, 1, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 0, 1])\n", "('Fe', 'Ni', 'Ti') -> ([0, 1, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 1, 0])\n", - "('Fe', 'Cr', 'V') -> ([0, 1, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 0, 0, 1])\n", - "('Fe', 'Cr', 'Ti') -> ([0, 1, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 0, 1, 0])\n", "('Fe', 'V', 'Ti') -> ([0, 1, 0, 0, 0], [0, 0, 0, 0, 1], [0, 0, 0, 1, 0])\n", - "('Ni', 'Cr', 'V') -> ([0, 0, 1, 0, 0], [0, 1, 0, 0, 0], [0, 0, 0, 0, 1])\n", - "('Ni', 'Cr', 'Ti') -> ([0, 0, 1, 0, 0], [0, 1, 0, 0, 0], [0, 0, 0, 1, 0])\n", - "('Ni', 'V', 'Ti') -> ([0, 0, 1, 0, 0], [0, 0, 0, 0, 1], [0, 0, 0, 1, 0])\n", - "('Cr', 'V', 'Ti') -> ([0, 1, 0, 0, 0], [0, 0, 0, 0, 1], [0, 0, 0, 1, 0])\n" + "('Ni', 'V', 'Ti') -> ([0, 0, 1, 0, 0], [0, 0, 0, 0, 1], [0, 0, 0, 1, 0])\n" ] } ], "source": [ "elementalSpaceComponents = [\"Cr\",\"Fe\",\"Ni\",\"Ti\",\"V\"]\n", "#attainableSpaceComponents = [\"SS304L\", \"Ni\", \"Cr\", \"V\", \"Ti\"]\n", - "attainableSpaceComponents = [\"Fe\", \"Ni\", \"Cr\", \"V\", \"Ti\"]\n", + "attainableSpaceComponents = [\"Cr\", \"Fe\", \"Ni\", \"V\", \"Ti\"]\n", "attainableSpaceComponentPositions = [\n", " #\"Cr\",\"Fe\",\"Ni\",\"Ti\",\"V\"\n", " #[0.1993865031, 0.7044989775,0.096114519430,0,0],\n", + " [1,0,0,0,0],\n", " [0,1,0,0,0],\n", " [0,0,1,0,0],\n", - " [0,1,0,0,0],\n", " [0,0,0,0,1],\n", " [0,0,0,1,0]\n", "] \n", @@ -747,6 +745,13 @@ " print(f\"{str(tern):<40} -> {terncp}\")" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, { "cell_type": "code", "execution_count": null, @@ -758,55 +763,66 @@ }, { "cell_type": "code", - "execution_count": 104, + "execution_count": 36, "metadata": {}, "outputs": [], "source": [ - "#From Adam\n", - "# Edges list for graph plotting and path finding purposes\n", - "edges = []\n", - "# Connectivity list within each subsystem\n", - "graphN = [[] for i in range(len(gridAtt * len(ternaries)))]\n", - "# Connectivity list between subsystems\n", - "graphNS = [[] for i in range(len(graphN))]\n", - "compositions = []\n", - "# Initialize spaces counter\n", - "spaces = 0\n", - "# Iterate over ternaries\n", - "for i, terncp in enumerate(ternaries_CompPos):\n", - " offset = i*len(gridAtt)\n", - " for j in range(len(gridAtt)):\n", - " for n in nList[j]:\n", - " edges.append((j+offset,n+offset))\n", - " graphN[j+offset].append(n+offset)\n", - " gridAttTemp, gridElTemp = nimplex.embeddedpair_simplex_grid_fractional_py(terncp, ndiv)\n", - " compositions += gridElTemp\n", - " spaces += i" + "# #From Adam\n", + "# # Edges list for graph plotting and path finding purposes\n", + "# edges = []\n", + "# # Connectivity list within each subsystem\n", + "# graphN = [[] for i in range(len(gridAtt * len(ternaries)))]\n", + "# # Connectivity list between subsystems\n", + "# graphNS = [[] for i in range(len(graphN))]\n", + "# compositions = []\n", + "# # Initialize spaces counter\n", + "# spaces = 0\n", + "# # Iterate over ternaries\n", + "# for i, terncp in enumerate(ternaries_CompPos):\n", + "# offset = i*len(gridAtt)\n", + "# for j in range(len(gridAtt)):\n", + "# for n in nList[j]:\n", + "# edges.append((j+offset,n+offset))\n", + "# graphN[j+offset].append(n+offset)\n", + "# gridAttTemp, gridElTemp = nimplex.embeddedpair_simplex_grid_fractional_py(terncp, ndiv)\n", + "# compositions += gridElTemp\n", + "# spaces += i" ] }, { "cell_type": "code", - "execution_count": 105, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "45" - ] - }, - "execution_count": 105, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": {}, + "outputs": [], "source": [ - "spaces" + "# # Edges list for graph plotting and path finding purposes\n", + "# edges = []\n", + "# # Connectivity list within each subsystem\n", + "# graphN = [[] for i in range(len(gridAtt * len(ternaries)))]\n", + "# # Connectivity list between subsystems\n", + "# graphNS = [[] for i in range(len(graphN))]\n", + "# compositions = []\n", + "# # Iterate over ternaries\n", + "# for i, terncp in enumerate(ternaries_CompPos):\n", + "# offset = i*len(gridAtt)\n", + "# for j in range(len(gridAtt)):\n", + "# for n in nList[j]:\n", + "# edges.append((j+offset,n+offset))\n", + "# graphN[j+offset].append(n+offset)\n", + "# gridAttTemp, gridElTemp = nimplex.embeddedpair_simplex_grid_fractional_py(terncp, ndiv)\n", + "# compositions += gridElTemp" ] }, { "cell_type": "code", - "execution_count": 106, + "execution_count": 38, "metadata": {}, "outputs": [], "source": [ @@ -817,6 +833,8 @@ "# # Connectivity list between subsystems\n", "# graphNS = [[] for i in range(len(graphN))]\n", "# compositions = []\n", + "# compositions_with_id = [] # New list to store compositions with their identifiers\n", + "\n", "# # Iterate over ternaries\n", "# for i, terncp in enumerate(ternaries_CompPos):\n", "# offset = i*len(gridAtt)\n", @@ -825,94 +843,205 @@ "# edges.append((j+offset,n+offset))\n", "# graphN[j+offset].append(n+offset)\n", "# gridAttTemp, gridElTemp = nimplex.embeddedpair_simplex_grid_fractional_py(terncp, ndiv)\n", - "# compositions += gridElTemp" + "# compositions += gridElTemp\n", + " \n", + "# # Attach identifier to each composition\n", + "# compositions_with_id.extend([(comp, i) for comp in gridElTemp])" ] }, { "cell_type": "code", - "execution_count": 107, + "execution_count": 39, "metadata": {}, "outputs": [], "source": [ - "def find_duplicates(lst):\n", - " duplicates_counts = {}\n", - " for item in lst:\n", - " # Use the string representation for complex/unhashable types\n", - " item_str = str(item)\n", - " if item_str in duplicates_counts:\n", - " duplicates_counts[item_str] += 1\n", - " else:\n", - " duplicates_counts[item_str] = 1\n", - "\n", - " # Filter out items that only appear once\n", - " duplicates = {item: count for item, count in duplicates_counts.items() if count > 1}\n", + "# Edges list for graph plotting and path finding purposes\n", + "edges = []\n", + "# Connectivity list within each subsystem\n", + "graphN = [[] for i in range(len(gridAtt * len(ternaries)))]\n", + "# Connectivity list between subsystems\n", + "graphNS = [[] for i in range(len(graphN))]\n", + "compositions = []\n", + "compositions_with_id = [] # List to store compositions with their identifiers\n", + "ternaries_with_id = [] # New list to store ternaries_CompPos with their identifiers\n", + "\n", + "# Iterate over ternaries\n", + "for i, terncp in enumerate(ternaries_CompPos):\n", + " ternaries_with_id.append((terncp, i)) # Add terncp and its id to the new list\n", " \n", - " if not duplicates:\n", - " return \"No duplicates found in the list.\"\n", - " else:\n", - " result = \"Duplicates found:\"\n", - " for item, count in duplicates.items():\n", - " result += f\"{item} appears {count} times\"\n", - " return result.strip()" + " offset = i*len(gridAtt)\n", + " for j in range(len(gridAtt)):\n", + " for n in nList[j]:\n", + " edges.append((j+offset,n+offset))\n", + " graphN[j+offset].append(n+offset)\n", + " gridAttTemp, gridElTemp = nimplex.embeddedpair_simplex_grid_fractional_py(terncp, ndiv)\n", + " compositions += gridElTemp\n", + " \n", + " # Attach identifier to each composition\n", + " compositions_with_id.extend([(comp, i) for comp in gridElTemp])" ] }, { "cell_type": "code", - "execution_count": 108, + "execution_count": 40, "metadata": {}, "outputs": [ { - "data": { - "text/plain": [ - "'Duplicates found:[0.0, 1.0, 0.0, 0.0, 0.0] appears 33 times[0.0, 0.875, 0.125, 0.0, 0.0] appears 12 times[0.0, 0.75, 0.25, 0.0, 0.0] appears 11 times[0.0, 0.625, 0.375, 0.0, 0.0] appears 10 times[0.0, 0.5, 0.5, 0.0, 0.0] appears 9 times[0.0, 0.375, 0.625, 0.0, 0.0] appears 8 times[0.0, 0.25, 0.75, 0.0, 0.0] appears 7 times[0.0, 0.125, 0.875, 0.0, 0.0] appears 6 times[0.0, 0.0, 1.0, 0.0, 0.0] appears 6 times[0.0, 0.0, 0.0, 0.0, 1.0] appears 6 times[0.0, 0.0, 0.125, 0.0, 0.875] appears 3 times[0.0, 0.0, 0.25, 0.0, 0.75] appears 3 times[0.0, 0.0, 0.375, 0.0, 0.625] appears 3 times[0.0, 0.0, 0.5, 0.0, 0.5] appears 3 times[0.0, 0.0, 0.625, 0.0, 0.375] appears 3 times[0.0, 0.0, 0.75, 0.0, 0.25] appears 3 times[0.0, 0.0, 0.875, 0.0, 0.125] appears 3 times[0.0, 0.125, 0.0, 0.0, 0.875] appears 6 times[0.0, 0.125, 0.125, 0.0, 0.75] appears 2 times[0.0, 0.125, 0.25, 0.0, 0.625] appears 2 times[0.0, 0.125, 0.375, 0.0, 0.5] appears 2 times[0.0, 0.125, 0.5, 0.0, 0.375] appears 2 times[0.0, 0.125, 0.625, 0.0, 0.25] appears 2 times[0.0, 0.125, 0.75, 0.0, 0.125] appears 2 times[0.0, 0.25, 0.0, 0.0, 0.75] appears 7 times[0.0, 0.25, 0.125, 0.0, 0.625] appears 2 times[0.0, 0.25, 0.25, 0.0, 0.5] appears 2 times[0.0, 0.25, 0.375, 0.0, 0.375] appears 2 times[0.0, 0.25, 0.5, 0.0, 0.25] appears 2 times[0.0, 0.25, 0.625, 0.0, 0.125] appears 2 times[0.0, 0.375, 0.0, 0.0, 0.625] appears 8 times[0.0, 0.375, 0.125, 0.0, 0.5] appears 2 times[0.0, 0.375, 0.25, 0.0, 0.375] appears 2 times[0.0, 0.375, 0.375, 0.0, 0.25] appears 2 times[0.0, 0.375, 0.5, 0.0, 0.125] appears 2 times[0.0, 0.5, 0.0, 0.0, 0.5] appears 9 times[0.0, 0.5, 0.125, 0.0, 0.375] appears 2 times[0.0, 0.5, 0.25, 0.0, 0.25] appears 2 times[0.0, 0.5, 0.375, 0.0, 0.125] appears 2 times[0.0, 0.625, 0.0, 0.0, 0.375] appears 10 times[0.0, 0.625, 0.125, 0.0, 0.25] appears 2 times[0.0, 0.625, 0.25, 0.0, 0.125] appears 2 times[0.0, 0.75, 0.0, 0.0, 0.25] appears 11 times[0.0, 0.75, 0.125, 0.0, 0.125] appears 2 times[0.0, 0.875, 0.0, 0.0, 0.125] appears 12 times[0.0, 0.0, 0.0, 1.0, 0.0] appears 6 times[0.0, 0.0, 0.125, 0.875, 0.0] appears 3 times[0.0, 0.0, 0.25, 0.75, 0.0] appears 3 times[0.0, 0.0, 0.375, 0.625, 0.0] appears 3 times[0.0, 0.0, 0.5, 0.5, 0.0] appears 3 times[0.0, 0.0, 0.625, 0.375, 0.0] appears 3 times[0.0, 0.0, 0.75, 0.25, 0.0] appears 3 times[0.0, 0.0, 0.875, 0.125, 0.0] appears 3 times[0.0, 0.125, 0.0, 0.875, 0.0] appears 6 times[0.0, 0.125, 0.125, 0.75, 0.0] appears 2 times[0.0, 0.125, 0.25, 0.625, 0.0] appears 2 times[0.0, 0.125, 0.375, 0.5, 0.0] appears 2 times[0.0, 0.125, 0.5, 0.375, 0.0] appears 2 times[0.0, 0.125, 0.625, 0.25, 0.0] appears 2 times[0.0, 0.125, 0.75, 0.125, 0.0] appears 2 times[0.0, 0.25, 0.0, 0.75, 0.0] appears 7 times[0.0, 0.25, 0.125, 0.625, 0.0] appears 2 times[0.0, 0.25, 0.25, 0.5, 0.0] appears 2 times[0.0, 0.25, 0.375, 0.375, 0.0] appears 2 times[0.0, 0.25, 0.5, 0.25, 0.0] appears 2 times[0.0, 0.25, 0.625, 0.125, 0.0] appears 2 times[0.0, 0.375, 0.0, 0.625, 0.0] appears 8 times[0.0, 0.375, 0.125, 0.5, 0.0] appears 2 times[0.0, 0.375, 0.25, 0.375, 0.0] appears 2 times[0.0, 0.375, 0.375, 0.25, 0.0] appears 2 times[0.0, 0.375, 0.5, 0.125, 0.0] appears 2 times[0.0, 0.5, 0.0, 0.5, 0.0] appears 9 times[0.0, 0.5, 0.125, 0.375, 0.0] appears 2 times[0.0, 0.5, 0.25, 0.25, 0.0] appears 2 times[0.0, 0.5, 0.375, 0.125, 0.0] appears 2 times[0.0, 0.625, 0.0, 0.375, 0.0] appears 10 times[0.0, 0.625, 0.125, 0.25, 0.0] appears 2 times[0.0, 0.625, 0.25, 0.125, 0.0] appears 2 times[0.0, 0.75, 0.0, 0.25, 0.0] appears 11 times[0.0, 0.75, 0.125, 0.125, 0.0] appears 2 times[0.0, 0.875, 0.0, 0.125, 0.0] appears 12 times[0.0, 0.0, 0.0, 0.875, 0.125] appears 3 times[0.0, 0.0, 0.0, 0.75, 0.25] appears 3 times[0.0, 0.0, 0.0, 0.625, 0.375] appears 3 times[0.0, 0.0, 0.0, 0.5, 0.5] appears 3 times[0.0, 0.0, 0.0, 0.375, 0.625] appears 3 times[0.0, 0.0, 0.0, 0.25, 0.75] appears 3 times[0.0, 0.0, 0.0, 0.125, 0.875] appears 3 times[0.0, 0.125, 0.0, 0.75, 0.125] appears 2 times[0.0, 0.125, 0.0, 0.625, 0.25] appears 2 times[0.0, 0.125, 0.0, 0.5, 0.375] appears 2 times[0.0, 0.125, 0.0, 0.375, 0.5] appears 2 times[0.0, 0.125, 0.0, 0.25, 0.625] appears 2 times[0.0, 0.125, 0.0, 0.125, 0.75] appears 2 times[0.0, 0.25, 0.0, 0.625, 0.125] appears 2 times[0.0, 0.25, 0.0, 0.5, 0.25] appears 2 times[0.0, 0.25, 0.0, 0.375, 0.375] appears 2 times[0.0, 0.25, 0.0, 0.25, 0.5] appears 2 times[0.0, 0.25, 0.0, 0.125, 0.625] appears 2 times[0.0, 0.375, 0.0, 0.5, 0.125] appears 2 times[0.0, 0.375, 0.0, 0.375, 0.25] appears 2 times[0.0, 0.375, 0.0, 0.25, 0.375] appears 2 times[0.0, 0.375, 0.0, 0.125, 0.5] appears 2 times[0.0, 0.5, 0.0, 0.375, 0.125] appears 2 times[0.0, 0.5, 0.0, 0.25, 0.25] appears 2 times[0.0, 0.5, 0.0, 0.125, 0.375] appears 2 times[0.0, 0.625, 0.0, 0.25, 0.125] appears 2 times[0.0, 0.625, 0.0, 0.125, 0.25] appears 2 times[0.0, 0.75, 0.0, 0.125, 0.125] appears 2 times'" - ] - }, - "execution_count": 108, - "metadata": {}, - "output_type": "execute_result" + "name": "stdout", + "output_type": "stream", + "text": [ + "Ternary composition position ([1, 0, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 1, 0, 0]) has id 0\n", + "Ternary composition position ([1, 0, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 0, 0, 1]) has id 1\n", + "Ternary composition position ([1, 0, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 0, 1, 0]) has id 2\n", + "Ternary composition position ([1, 0, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 0, 1]) has id 3\n", + "Ternary composition position ([1, 0, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 1, 0]) has id 4\n", + "Ternary composition position ([1, 0, 0, 0, 0], [0, 0, 0, 0, 1], [0, 0, 0, 1, 0]) has id 5\n", + "Ternary composition position ([0, 1, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 0, 1]) has id 6\n", + "Ternary composition position ([0, 1, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 1, 0]) has id 7\n", + "Ternary composition position ([0, 1, 0, 0, 0], [0, 0, 0, 0, 1], [0, 0, 0, 1, 0]) has id 8\n", + "Ternary composition position ([0, 0, 1, 0, 0], [0, 0, 0, 0, 1], [0, 0, 0, 1, 0]) has id 9\n" + ] } ], "source": [ - "find_duplicates(compositions)" + "# Example: Access ternaries_CompPos with their identifiers\n", + "for terncp, ternary_id in ternaries_with_id:\n", + " print(f\"Ternary composition position {terncp} has id {ternary_id}\")" ] }, { "cell_type": "code", - "execution_count": 43, + "execution_count": 41, + "metadata": {}, + "outputs": [], + "source": [ + "mapping = {}\n", + "for ternary, id in ternaries_with_id:\n", + " composition_key = ''.join(elementalSpaceComponents[i] for i in range(len(elementalSpaceComponents)) if any(ternary[j][i] for j in range(len(ternary))))\n", + " mapping[composition_key] = id" + ] + }, + { + "cell_type": "code", + "execution_count": 42, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "[0.0, 1.0, 0.0, 0.0, 0.0]\n", - "[0.0, 1.0, 0.0, 0.0, 0.0]\n" + "Combination: CrFeNi, ID: 0, Elements: ['Cr', 'Fe', 'Ni']\n", + "Combination: CrFeV, ID: 1, Elements: ['Cr', 'Fe', 'V']\n", + "Combination: CrFeTi, ID: 2, Elements: ['Cr', 'Fe', 'Ti']\n", + "Combination: CrNiV, ID: 3, Elements: ['Cr', 'Ni', 'V']\n", + "Combination: CrNiTi, ID: 4, Elements: ['Cr', 'Ni', 'Ti']\n", + "Combination: CrTiV, ID: 5, Elements: ['Cr', 'Ti', 'V']\n", + "Combination: FeNiV, ID: 6, Elements: ['Fe', 'Ni', 'V']\n", + "Combination: FeNiTi, ID: 7, Elements: ['Fe', 'Ni', 'Ti']\n", + "Combination: FeTiV, ID: 8, Elements: ['Fe', 'Ti', 'V']\n", + "Combination: NiTiV, ID: 9, Elements: ['Ni', 'Ti', 'V']\n" ] } ], "source": [ - "print(compositions[0])\n", - "print(compositions[17])" + "mapping = {}\n", + "for ternary, id in ternaries_with_id:\n", + " composition_key = ''.join(elementalSpaceComponents[i] for i in range(len(elementalSpaceComponents)) if any(ternary[j][i] for j in range(len(ternary))))\n", + " individual_elements = [elementalSpaceComponents[i] for i in range(len(elementalSpaceComponents)) if any(ternary[j][i] for j in range(len(ternary)))]\n", + " mapping[composition_key] = {\n", + " 'id': id,\n", + " 'elements': individual_elements\n", + " }\n", + "\n", + "# Print the mapping to see the result\n", + "for key, value in mapping.items():\n", + " print(f\"Combination: {key}, ID: {value['id']}, Elements: {value['elements']}\")" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'CrFeNi': {'id': 0, 'elements': ['Cr', 'Fe', 'Ni']},\n", + " 'CrFeV': {'id': 1, 'elements': ['Cr', 'Fe', 'V']},\n", + " 'CrFeTi': {'id': 2, 'elements': ['Cr', 'Fe', 'Ti']},\n", + " 'CrNiV': {'id': 3, 'elements': ['Cr', 'Ni', 'V']},\n", + " 'CrNiTi': {'id': 4, 'elements': ['Cr', 'Ni', 'Ti']},\n", + " 'CrTiV': {'id': 5, 'elements': ['Cr', 'Ti', 'V']},\n", + " 'FeNiV': {'id': 6, 'elements': ['Fe', 'Ni', 'V']},\n", + " 'FeNiTi': {'id': 7, 'elements': ['Fe', 'Ni', 'Ti']},\n", + " 'FeTiV': {'id': 8, 'elements': ['Fe', 'Ti', 'V']},\n", + " 'NiTiV': {'id': 9, 'elements': ['Ni', 'Ti', 'V']}}" + ] + }, + "execution_count": 43, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "mapping" ] }, { "cell_type": "code", "execution_count": 44, "metadata": {}, + "outputs": [], + "source": [ + "# def find_duplicates(lst):\n", + "# duplicates_counts = {}\n", + "# for item in lst:\n", + "# # Use the string representation for complex/unhashable types\n", + "# item_str = str(item)\n", + "# if item_str in duplicates_counts:\n", + "# duplicates_counts[item_str] += 1\n", + "# else:\n", + "# duplicates_counts[item_str] = 1\n", + "\n", + "# # Filter out items that only appear once\n", + "# duplicates = {item: count for item, count in duplicates_counts.items() if count > 1}\n", + " \n", + "# if not duplicates:\n", + "# return \"No duplicates found in the list.\"\n", + "# else:\n", + "# result = \"Duplicates found:\"\n", + "# for item, count in duplicates.items():\n", + "# result += f\"{item} appears {count} times\"\n", + "# return result.strip()" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": {}, + "outputs": [], + "source": [ + "# find_duplicates(compositions)" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "('Fe', 'Ni'): occurs between ternary [(0, 1), (0, 2), (1, 2)]\n", - "('Cr', 'Fe'): occurs between ternary [(0, 3), (0, 4), (3, 4)]\n", - "('Cr', 'Ni'): occurs between ternary [(0, 6), (0, 7), (6, 7)]\n", - "('Fe', 'V'): occurs between ternary [(1, 3), (1, 5), (3, 5)]\n", - "('Ni', 'V'): occurs between ternary [(1, 6), (1, 8), (6, 8)]\n", - "('Fe', 'Ti'): occurs between ternary [(2, 4), (2, 5), (4, 5)]\n", - "('Ni', 'Ti'): occurs between ternary [(2, 7), (2, 8), (7, 8)]\n", - "('Cr', 'V'): occurs between ternary [(3, 6), (3, 9), (6, 9)]\n", - "('Cr', 'Ti'): occurs between ternary [(4, 7), (4, 9), (7, 9)]\n", + "('Cr', 'Fe'): occurs between ternary [(0, 1), (0, 2), (1, 2)]\n", + "('Cr', 'Ni'): occurs between ternary [(0, 3), (0, 4), (3, 4)]\n", + "('Fe', 'Ni'): occurs between ternary [(0, 6), (0, 7), (6, 7)]\n", + "('Cr', 'V'): occurs between ternary [(1, 3), (1, 5), (3, 5)]\n", + "('Fe', 'V'): occurs between ternary [(1, 6), (1, 8), (6, 8)]\n", + "('Cr', 'Ti'): occurs between ternary [(2, 4), (2, 5), (4, 5)]\n", + "('Fe', 'Ti'): occurs between ternary [(2, 7), (2, 8), (7, 8)]\n", + "('Ni', 'V'): occurs between ternary [(3, 6), (3, 9), (6, 9)]\n", + "('Ni', 'Ti'): occurs between ternary [(4, 7), (4, 9), (7, 9)]\n", "('Ti', 'V'): occurs between ternary [(5, 8), (5, 9), (8, 9)]\n" ] } @@ -935,40 +1064,40 @@ }, { "cell_type": "code", - "execution_count": 45, + "execution_count": 47, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Stitching 0 and 1 at ('Fe', 'Ni') from [44, 43, 41, 38, 34, 29, 23, 16, 8] to [89, 88, 86, 83, 79, 74, 68, 61, 53]\n", - "Stitching 0 and 2 at ('Fe', 'Ni') from [44, 43, 41, 38, 34, 29, 23, 16, 8] to [134, 133, 131, 128, 124, 119, 113, 106, 98]\n", - "Stitching 1 and 2 at ('Fe', 'Ni') from [89, 88, 86, 83, 79, 74, 68, 61, 53] to [134, 133, 131, 128, 124, 119, 113, 106, 98]\n", - "Stitching 0 and 3 at ('Cr', 'Fe') from [0, 9, 17, 24, 30, 35, 39, 42, 44] to [143, 151, 158, 164, 169, 173, 176, 178, 179]\n", - "Stitching 0 and 4 at ('Cr', 'Fe') from [0, 9, 17, 24, 30, 35, 39, 42, 44] to [188, 196, 203, 209, 214, 218, 221, 223, 224]\n", - "Stitching 3 and 4 at ('Cr', 'Fe') from [143, 151, 158, 164, 169, 173, 176, 178, 179] to [188, 196, 203, 209, 214, 218, 221, 223, 224]\n", - "Stitching 0 and 6 at ('Cr', 'Ni') from [0, 1, 2, 3, 4, 5, 6, 7, 8] to [278, 286, 293, 299, 304, 308, 311, 313, 314]\n", - "Stitching 0 and 7 at ('Cr', 'Ni') from [0, 1, 2, 3, 4, 5, 6, 7, 8] to [323, 331, 338, 344, 349, 353, 356, 358, 359]\n", - "Stitching 6 and 7 at ('Cr', 'Ni') from [278, 286, 293, 299, 304, 308, 311, 313, 314] to [323, 331, 338, 344, 349, 353, 356, 358, 359]\n", - "Stitching 1 and 3 at ('Fe', 'V') from [89, 87, 84, 80, 75, 69, 62, 54, 45] to [179, 177, 174, 170, 165, 159, 152, 144, 135]\n", - "Stitching 1 and 5 at ('Fe', 'V') from [89, 87, 84, 80, 75, 69, 62, 54, 45] to [269, 268, 266, 263, 259, 254, 248, 241, 233]\n", - "Stitching 3 and 5 at ('Fe', 'V') from [179, 177, 174, 170, 165, 159, 152, 144, 135] to [269, 268, 266, 263, 259, 254, 248, 241, 233]\n", - "Stitching 1 and 6 at ('Ni', 'V') from [53, 52, 51, 50, 49, 48, 47, 46, 45] to [314, 312, 309, 305, 300, 294, 287, 279, 270]\n", - "Stitching 1 and 8 at ('Ni', 'V') from [53, 52, 51, 50, 49, 48, 47, 46, 45] to [404, 403, 401, 398, 394, 389, 383, 376, 368]\n", - "Stitching 6 and 8 at ('Ni', 'V') from [314, 312, 309, 305, 300, 294, 287, 279, 270] to [404, 403, 401, 398, 394, 389, 383, 376, 368]\n", - "Stitching 2 and 4 at ('Fe', 'Ti') from [134, 132, 129, 125, 120, 114, 107, 99, 90] to [224, 222, 219, 215, 210, 204, 197, 189, 180]\n", - "Stitching 2 and 5 at ('Fe', 'Ti') from [134, 132, 129, 125, 120, 114, 107, 99, 90] to [269, 267, 264, 260, 255, 249, 242, 234, 225]\n", - "Stitching 4 and 5 at ('Fe', 'Ti') from [224, 222, 219, 215, 210, 204, 197, 189, 180] to [269, 267, 264, 260, 255, 249, 242, 234, 225]\n", - "Stitching 2 and 7 at ('Ni', 'Ti') from [98, 97, 96, 95, 94, 93, 92, 91, 90] to [359, 357, 354, 350, 345, 339, 332, 324, 315]\n", - "Stitching 2 and 8 at ('Ni', 'Ti') from [98, 97, 96, 95, 94, 93, 92, 91, 90] to [404, 402, 399, 395, 390, 384, 377, 369, 360]\n", - "Stitching 7 and 8 at ('Ni', 'Ti') from [359, 357, 354, 350, 345, 339, 332, 324, 315] to [404, 402, 399, 395, 390, 384, 377, 369, 360]\n", - "Stitching 3 and 6 at ('Cr', 'V') from [143, 142, 141, 140, 139, 138, 137, 136, 135] to [278, 277, 276, 275, 274, 273, 272, 271, 270]\n", - "Stitching 3 and 9 at ('Cr', 'V') from [143, 142, 141, 140, 139, 138, 137, 136, 135] to [449, 448, 446, 443, 439, 434, 428, 421, 413]\n", - "Stitching 6 and 9 at ('Cr', 'V') from [278, 277, 276, 275, 274, 273, 272, 271, 270] to [449, 448, 446, 443, 439, 434, 428, 421, 413]\n", - "Stitching 4 and 7 at ('Cr', 'Ti') from [188, 187, 186, 185, 184, 183, 182, 181, 180] to [323, 322, 321, 320, 319, 318, 317, 316, 315]\n", - "Stitching 4 and 9 at ('Cr', 'Ti') from [188, 187, 186, 185, 184, 183, 182, 181, 180] to [449, 447, 444, 440, 435, 429, 422, 414, 405]\n", - "Stitching 7 and 9 at ('Cr', 'Ti') from [323, 322, 321, 320, 319, 318, 317, 316, 315] to [449, 447, 444, 440, 435, 429, 422, 414, 405]\n", + "Stitching 0 and 1 at ('Cr', 'Fe') from [44, 43, 41, 38, 34, 29, 23, 16, 8] to [89, 88, 86, 83, 79, 74, 68, 61, 53]\n", + "Stitching 0 and 2 at ('Cr', 'Fe') from [44, 43, 41, 38, 34, 29, 23, 16, 8] to [134, 133, 131, 128, 124, 119, 113, 106, 98]\n", + "Stitching 1 and 2 at ('Cr', 'Fe') from [89, 88, 86, 83, 79, 74, 68, 61, 53] to [134, 133, 131, 128, 124, 119, 113, 106, 98]\n", + "Stitching 0 and 3 at ('Cr', 'Ni') from [44, 42, 39, 35, 30, 24, 17, 9, 0] to [179, 178, 176, 173, 169, 164, 158, 151, 143]\n", + "Stitching 0 and 4 at ('Cr', 'Ni') from [44, 42, 39, 35, 30, 24, 17, 9, 0] to [224, 223, 221, 218, 214, 209, 203, 196, 188]\n", + "Stitching 3 and 4 at ('Cr', 'Ni') from [179, 178, 176, 173, 169, 164, 158, 151, 143] to [224, 223, 221, 218, 214, 209, 203, 196, 188]\n", + "Stitching 0 and 6 at ('Fe', 'Ni') from [8, 7, 6, 5, 4, 3, 2, 1, 0] to [314, 313, 311, 308, 304, 299, 293, 286, 278]\n", + "Stitching 0 and 7 at ('Fe', 'Ni') from [8, 7, 6, 5, 4, 3, 2, 1, 0] to [359, 358, 356, 353, 349, 344, 338, 331, 323]\n", + "Stitching 6 and 7 at ('Fe', 'Ni') from [314, 313, 311, 308, 304, 299, 293, 286, 278] to [359, 358, 356, 353, 349, 344, 338, 331, 323]\n", + "Stitching 1 and 3 at ('Cr', 'V') from [89, 87, 84, 80, 75, 69, 62, 54, 45] to [179, 177, 174, 170, 165, 159, 152, 144, 135]\n", + "Stitching 1 and 5 at ('Cr', 'V') from [89, 87, 84, 80, 75, 69, 62, 54, 45] to [269, 268, 266, 263, 259, 254, 248, 241, 233]\n", + "Stitching 3 and 5 at ('Cr', 'V') from [179, 177, 174, 170, 165, 159, 152, 144, 135] to [269, 268, 266, 263, 259, 254, 248, 241, 233]\n", + "Stitching 1 and 6 at ('Fe', 'V') from [53, 52, 51, 50, 49, 48, 47, 46, 45] to [314, 312, 309, 305, 300, 294, 287, 279, 270]\n", + "Stitching 1 and 8 at ('Fe', 'V') from [53, 52, 51, 50, 49, 48, 47, 46, 45] to [404, 403, 401, 398, 394, 389, 383, 376, 368]\n", + "Stitching 6 and 8 at ('Fe', 'V') from [314, 312, 309, 305, 300, 294, 287, 279, 270] to [404, 403, 401, 398, 394, 389, 383, 376, 368]\n", + "Stitching 2 and 4 at ('Cr', 'Ti') from [134, 132, 129, 125, 120, 114, 107, 99, 90] to [224, 222, 219, 215, 210, 204, 197, 189, 180]\n", + "Stitching 2 and 5 at ('Cr', 'Ti') from [134, 132, 129, 125, 120, 114, 107, 99, 90] to [269, 267, 264, 260, 255, 249, 242, 234, 225]\n", + "Stitching 4 and 5 at ('Cr', 'Ti') from [224, 222, 219, 215, 210, 204, 197, 189, 180] to [269, 267, 264, 260, 255, 249, 242, 234, 225]\n", + "Stitching 2 and 7 at ('Fe', 'Ti') from [98, 97, 96, 95, 94, 93, 92, 91, 90] to [359, 357, 354, 350, 345, 339, 332, 324, 315]\n", + "Stitching 2 and 8 at ('Fe', 'Ti') from [98, 97, 96, 95, 94, 93, 92, 91, 90] to [404, 402, 399, 395, 390, 384, 377, 369, 360]\n", + "Stitching 7 and 8 at ('Fe', 'Ti') from [359, 357, 354, 350, 345, 339, 332, 324, 315] to [404, 402, 399, 395, 390, 384, 377, 369, 360]\n", + "Stitching 3 and 6 at ('Ni', 'V') from [143, 142, 141, 140, 139, 138, 137, 136, 135] to [278, 277, 276, 275, 274, 273, 272, 271, 270]\n", + "Stitching 3 and 9 at ('Ni', 'V') from [143, 142, 141, 140, 139, 138, 137, 136, 135] to [449, 448, 446, 443, 439, 434, 428, 421, 413]\n", + "Stitching 6 and 9 at ('Ni', 'V') from [278, 277, 276, 275, 274, 273, 272, 271, 270] to [449, 448, 446, 443, 439, 434, 428, 421, 413]\n", + "Stitching 4 and 7 at ('Ni', 'Ti') from [188, 187, 186, 185, 184, 183, 182, 181, 180] to [323, 322, 321, 320, 319, 318, 317, 316, 315]\n", + "Stitching 4 and 9 at ('Ni', 'Ti') from [188, 187, 186, 185, 184, 183, 182, 181, 180] to [449, 447, 444, 440, 435, 429, 422, 414, 405]\n", + "Stitching 7 and 9 at ('Ni', 'Ti') from [323, 322, 321, 320, 319, 318, 317, 316, 315] to [449, 447, 444, 440, 435, 429, 422, 414, 405]\n", "Stitching 5 and 8 at ('Ti', 'V') from [225, 226, 227, 228, 229, 230, 231, 232, 233] to [360, 361, 362, 363, 364, 365, 366, 367, 368]\n", "Stitching 5 and 9 at ('Ti', 'V') from [225, 226, 227, 228, 229, 230, 231, 232, 233] to [405, 406, 407, 408, 409, 410, 411, 412, 413]\n", "Stitching 8 and 9 at ('Ti', 'V') from [360, 361, 362, 363, 364, 365, 366, 367, 368] to [405, 406, 407, 408, 409, 410, 411, 412, 413]\n" @@ -997,7 +1126,7 @@ }, { "cell_type": "code", - "execution_count": 46, + "execution_count": 48, "metadata": {}, "outputs": [ { @@ -1014,15 +1143,15 @@ "name": "stdout", "output_type": "stream", "text": [ - "Unique phases for ammap/databases/Co-Cr-Fe-Ni-V_choi2019.TDB: ['HIGH_SIGMA', 'M3V', 'BCC_A2', 'HCP_A3', 'B2_BCC', 'L12_FCC', 'LIQUID', 'NI2V', 'NI2V7', 'SIGMA', 'COV3', 'FCC_A1']\n", - "Unique phases for ammap/databases/Cr-Fe-Ti_wang2017.tdb: ['BCC_A2', 'BCC_B2', 'HCP_A3', 'C14', 'C15', 'LIQUID', 'SIGMA', 'C36', 'TI5CR7FE17', 'FCC_A1']\n", - "Unique phases for ammap/databases/Cr-Fe-Ni_miettinen1999.tdb: ['BCC_A2', 'HCP_A3', 'LIQUID', 'SIGMA', 'FCC_A1']\n", - "Unique phases for ammap/databases/Cr-Ni-Ti_huang2018.tdb: ['BCC_A2', 'LAVES_C14', 'LAVES_C15', 'HCP_A3', 'NI3TI', 'LIQUID', 'LAVES_C36', 'NITI', 'NITI2', 'FCC_A1']\n", - "Unique phases for ammap/databases/Cr-Ti-V_ghosh2002.tdb: ['BCC_A2', 'LAVES_C14', 'LAVES_C15', 'HCP_A3', 'LIQUID', 'LAVES_C36']\n", - "Unique phases for ammap/databases/Fe-Ni-Ti_dekeyzer2009.tdb: ['NITI2', 'A2', 'A3', 'NI3TI', 'C14', 'LIQUID', 'FCC4', 'BCC2', 'A1']\n", - "Unique phases for ammap/databases/Fe-Ni-V_zhao2014.tdb: ['BCC_A2', 'LAVES_C14', 'A2_BCC', 'A15_NI2V7', 'CBCC_A12', 'FE4N', 'HCP_A3', 'LAVES_C15', 'LIQUID', 'NI2V', 'SIGMA', 'D022_NI3V', 'CUB_A13', 'FCC_A1']\n", - "Unique phases for ammap/databases/Fe-Ti-V_guo2012.TDB: ['BCC_A2', 'HCP_A3', 'B2', 'C14', 'LIQUID', 'SIGMA', 'FCC_A1']\n", - "Unique phases for ammap/databases/Ni-Ti-V_zou2018.tdb: ['BCC_A2', 'LAVES_C14', 'CBCC_A12', 'LAVES_C15', 'HCP_A3', 'NI3V', 'B2', 'NI3TI', 'DIAMOND_A4', 'LIQUID', 'NI2V', 'SIGMA', 'CUB_A13', 'NITI2', 'NIV3', 'FCC_A1', 'BCT_A5']\n" + "Unique phases for ammap/databases/Co-Cr-Fe-Ni-V_choi2019.TDB: ['FCC_A1', 'COV3', 'HIGH_SIGMA', 'HCP_A3', 'LIQUID', 'NI2V7', 'SIGMA', 'L12_FCC', 'NI2V', 'M3V', 'BCC_A2', 'B2_BCC']\n", + "Unique phases for ammap/databases/Cr-Fe-Ti_wang2017.tdb: ['TI5CR7FE17', 'FCC_A1', 'C14', 'SIGMA', 'HCP_A3', 'LIQUID', 'C36', 'C15', 'BCC_A2', 'BCC_B2']\n", + "Unique phases for ammap/databases/Cr-Fe-Ni_miettinen1999.tdb: ['FCC_A1', 'SIGMA', 'HCP_A3', 'LIQUID', 'BCC_A2']\n", + "Unique phases for ammap/databases/Cr-Ni-Ti_huang2018.tdb: ['LAVES_C15', 'FCC_A1', 'NITI2', 'HCP_A3', 'LIQUID', 'NITI', 'LAVES_C36', 'NI3TI', 'LAVES_C14', 'BCC_A2']\n", + "Unique phases for ammap/databases/Cr-Ti-V_ghosh2002.tdb: ['LAVES_C15', 'HCP_A3', 'LIQUID', 'LAVES_C36', 'LAVES_C14', 'BCC_A2']\n", + "Unique phases for ammap/databases/Fe-Ni-Ti_dekeyzer2009.tdb: ['BCC2', 'A3', 'A2', 'C14', 'LIQUID', 'A1', 'NI3TI', 'FCC4', 'NITI2']\n", + "Unique phases for ammap/databases/Fe-Ni-V_zhao2014.tdb: ['LAVES_C15', 'A2_BCC', 'FCC_A1', 'SIGMA', 'HCP_A3', 'LIQUID', 'LAVES_C14', 'NI2V', 'CUB_A13', 'A15_NI2V7', 'FE4N', 'CBCC_A12', 'BCC_A2', 'D022_NI3V']\n", + "Unique phases for ammap/databases/Fe-Ti-V_guo2012.TDB: ['FCC_A1', 'C14', 'SIGMA', 'HCP_A3', 'LIQUID', 'B2', 'BCC_A2']\n", + "Unique phases for ammap/databases/Ni-Ti-V_zou2018.tdb: ['LAVES_C15', 'NI3V', 'FCC_A1', 'DIAMOND_A4', 'NITI2', 'SIGMA', 'HCP_A3', 'LIQUID', 'B2', 'NI2V', 'CUB_A13', 'NI3TI', 'NIV3', 'BCT_A5', 'CBCC_A12', 'BCC_A2', 'LAVES_C14']\n" ] } ], @@ -1058,15 +1187,15 @@ }, { "cell_type": "code", - "execution_count": 64, + "execution_count": 49, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "['Ti', 'Zr', 'Hf', 'W', 'Nb', 'Ta', 'Mo']\n", - "Loaded TDB file with phases considered: ['BCC_A2', 'LAVES_C14', 'LAVES_C15', 'HCP_A3', 'LIQUID', 'LAVES_C36', 'FCC_A1']\n" + "['Cr', 'Fe', 'Ni', 'Ti', 'V']\n", + "Loaded TDB file with phases considered: ['LAVES_C15', 'FCC_A1', 'HCP_A3', 'LIQUID', 'LAVES_C36', 'LAVES_C14', 'BCC_A2']\n" ] } ], @@ -1081,17 +1210,13 @@ }, { "cell_type": "code", - "execution_count": 65, + "execution_count": 50, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "/opt/conda/lib/python3.11/site-packages/pycalphad/io/tdb.py:293: UserWarning:\n", - "\n", - "The type definition character `&` in `TYPE_DEFINITION & GES A_P_D A2_BCC MAGNETIC -1.0 4.00000E-01 ` is not used by any phase.\n", - "\n", "/opt/conda/lib/python3.11/site-packages/pycalphad/model.py:1278: UserWarning:\n", "\n", "The order-disorder model for \"FCC4\" has a contribution from the physical property model `magnetic_energy`. Partitioned physical properties are not correctly substituted into the disordered part of the energy. THE GIBBS ENERGY CALCULATED FOR THIS PHASE MAY BE INCORRECT. Please see the discussion in https://github.com/pycalphad/pycalphad/pull/311 for more details.\n", @@ -1102,239 +1227,674 @@ "name": "stdout", "output_type": "stream", "text": [ - "Imported equilibrium_callable_CrFeTi_08bbfb9a: \n", - "Imported equilibrium_callable_CrTiV_ed4c332b: \n", - "Imported equilibrium_callable_FeTiV_fa95b3ee: \n", - "Imported equilibrium_callable_FeNiV_b9b0384d: \n", - "Imported equilibrium_callable_CrNiTi_e320ddd5: \n", - "Imported equilibrium_callable_FeNiTi_06a49695: \n", - "Imported equilibrium_callable_NiTiV_1d83c99c: \n", - "Imported equilibrium_callable_NiCrV_0f8b67c1: \n", - "Imported equilibrium_callable_NiCrFe_ce8329fb: \n" + "Imported equilibrium_callable_CrFeTi_08bbfb9a: \n", + "Imported equilibrium_callable_CrTiV_ed4c332b: \n", + "Imported equilibrium_callable_FeTiV_fa95b3ee: \n", + "Imported equilibrium_callable_CrFeV_ab1edb07: \n", + "Imported equilibrium_callable_FeNiV_b9b0384d: \n", + "Imported equilibrium_callable_FeNiTi_06a49695: \n", + "Imported equilibrium_callable_CrNiTi_a9f6f2ff: \n", + "Imported equilibrium_callable_NiTiV_1d83c99c: \n", + "Imported equilibrium_callable_NiCrV_0f8b67c1: \n", + "Imported equilibrium_callable_NiCrFe_ce8329fb: \n" + ] + } + ], + "source": [ + "import os\n", + "import importlib\n", + "\n", + "# Directory containing the equilibrium files\n", + "directory = \"ammap/callables/multi_system_equilibrium_and_scheil\"\n", + "\n", + "# Get all files starting with \"equilibrium\"\n", + "equilibrium_files = [f for f in os.listdir(directory) if f.startswith(\"equilibrium\") and f.endswith(\".py\")]\n", + "\n", + "# Dictionary to store imported callables with unique names\n", + "equilibrium_callables = {}\n", + "\n", + "# Import each equilibrium file and store the callable with a unique name\n", + "for file in equilibrium_files:\n", + " module_name = file[:-3] # Remove the .py extension\n", + " module_path = f\"ammap.callables.multi_system_equilibrium_and_scheil.{module_name}\"\n", + " module = importlib.import_module(module_path)\n", + " callable_name = f\"{module_name}\"\n", + " equilibrium_callables[callable_name] = getattr(module, \"equilibrium_callable\")\n", + "\n", + "# Print the imported callables\n", + "for name, func in equilibrium_callables.items():\n", + " print(f\"Imported {name}: {func}\")" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": {}, + "outputs": [], + "source": [ + "def process_filename(filename):\n", + " parts = filename.split('_')\n", + " if len(parts) >= 4:\n", + " middle_part = parts[2]\n", + " if middle_part in element_mapping:\n", + " return middle_part, element_mapping[middle_part]\n", + " return None, None" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": {}, + "outputs": [], + "source": [ + "element_mapping=mapping" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "metadata": {}, + "outputs": [], + "source": [ + "# import os\n", + "\n", + "# # Assuming you have already created the mapping as shown in the previous example\n", + "# # mapping = {...} # Your mapping dictionary\n", + "\n", + "# def process_filename(filename, mapping):\n", + "# parts = filename.split('_')\n", + "# if len(parts) >= 4:\n", + "# middle_part = parts[2]\n", + "# # First, try direct matching\n", + "# if middle_part in mapping:\n", + "# return middle_part, mapping[middle_part]['id'], mapping[middle_part]['elements']\n", + " \n", + "# # If direct matching fails, try matching by elements\n", + "# middle_elements = set(middle_part[i:i+2] for i in range(0, len(middle_part), 2))\n", + "# for key, value in mapping.items():\n", + "# if set(value['elements']) == middle_elements:\n", + "# return middle_part, value['id'], value['elements']\n", + " \n", + "# return None, None, None\n", + "\n", + "# # Specify the directory path\n", + "# directory = \"ammap/callables/multi_system_equilibrium_and_scheil\"\n", + "\n", + "# for filename in os.listdir(directory):\n", + "# if filename.startswith(\"equilibrium\"):\n", + "# full_path = os.path.join(directory, filename)\n", + "# if os.path.isfile(full_path):\n", + "# middle_part, mapping_id, elements = process_filename(filename, mapping)\n", + "# if middle_part and mapping_id is not None:\n", + "# print(f\"File: {filename}\")\n", + "# print(f\"The mapping number for {middle_part} is {mapping_id}\")\n", + "# print(f\"Elements: {elements}\")\n", + "# print(\"---\")\n", + "# else:\n", + "# print(f\"No mapping found for file: {filename}\")\n", + "# print(\"---\")" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Key: equilibrium_callable_CrFeTi_08bbfb9a\n", + "The mapping number for CrFeTi is 2\n", + "Elements: ['Cr', 'Fe', 'Ti']\n", + "---\n", + "Key: equilibrium_callable_CrTiV_ed4c332b\n", + "The mapping number for CrTiV is 5\n", + "Elements: ['Cr', 'Ti', 'V']\n", + "---\n", + "Key: equilibrium_callable_FeTiV_fa95b3ee\n", + "The mapping number for FeTiV is 8\n", + "Elements: ['Fe', 'Ti', 'V']\n", + "---\n", + "Key: equilibrium_callable_CrFeV_ab1edb07\n", + "The mapping number for CrFeV is 1\n", + "Elements: ['Cr', 'Fe', 'V']\n", + "---\n", + "Key: equilibrium_callable_FeNiV_b9b0384d\n", + "The mapping number for FeNiV is 6\n", + "Elements: ['Fe', 'Ni', 'V']\n", + "---\n", + "Key: equilibrium_callable_FeNiTi_06a49695\n", + "The mapping number for FeNiTi is 7\n", + "Elements: ['Fe', 'Ni', 'Ti']\n", + "---\n", + "Key: equilibrium_callable_CrNiTi_a9f6f2ff\n", + "The mapping number for CrNiTi is 4\n", + "Elements: ['Cr', 'Ni', 'Ti']\n", + "---\n", + "Key: equilibrium_callable_NiTiV_1d83c99c\n", + "The mapping number for NiTiV is 9\n", + "Elements: ['Ni', 'Ti', 'V']\n", + "---\n", + "Key: equilibrium_callable_NiCrV_0f8b67c1\n", + "The mapping number for NiCrV is 3\n", + "Elements: ['Cr', 'Ni', 'V']\n", + "---\n", + "Key: equilibrium_callable_NiCrFe_ce8329fb\n", + "The mapping number for NiCrFe is 0\n", + "Elements: ['Cr', 'Fe', 'Ni']\n", + "---\n" + ] + } + ], + "source": [ + "def process_key(key):\n", + " parts = key.split('_')\n", + " if len(parts) >= 3:\n", + " middle_part = parts[2]\n", + " if middle_part in mapping:\n", + " return middle_part, mapping[middle_part]['id'], mapping[middle_part]['elements']\n", + " \n", + " # If direct matching fails, try matching by elements\n", + " middle_elements = set(middle_part[i:i+2] for i in range(0, len(middle_part), 2))\n", + " for map_key, value in mapping.items():\n", + " if set(value['elements']) == middle_elements:\n", + " return middle_part, value['id'], value['elements']\n", + " \n", + " return None, None, None\n", + "\n", + "# Process each key in the equilibrium_callables dictionary\n", + "id_to_callable = {}\n", + "for key in equilibrium_callables:\n", + " middle_part, mapping_id, elements = process_key(key)\n", + " if middle_part and mapping_id is not None:\n", + " print(f\"Key: {key}\")\n", + " print(f\"The mapping number for {middle_part} is {mapping_id}\")\n", + " print(f\"Elements: {elements}\")\n", + " print(\"---\")\n", + " id_to_callable[mapping_id]=key\n", + " else:\n", + " print(f\"No mapping found for key: {key}\")\n", + " print(\"---\")" + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{2: 'equilibrium_callable_CrFeTi_08bbfb9a',\n", + " 5: 'equilibrium_callable_CrTiV_ed4c332b',\n", + " 8: 'equilibrium_callable_FeTiV_fa95b3ee',\n", + " 1: 'equilibrium_callable_CrFeV_ab1edb07',\n", + " 6: 'equilibrium_callable_FeNiV_b9b0384d',\n", + " 7: 'equilibrium_callable_FeNiTi_06a49695',\n", + " 4: 'equilibrium_callable_CrNiTi_a9f6f2ff',\n", + " 9: 'equilibrium_callable_NiTiV_1d83c99c',\n", + " 3: 'equilibrium_callable_NiCrV_0f8b67c1',\n", + " 0: 'equilibrium_callable_NiCrFe_ce8329fb'}" + ] + }, + "execution_count": 55, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "id_to_callable" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[([0.0, 0.0, 1.0, 0.0, 0.0], 0),\n", + " ([0.0, 0.125, 0.875, 0.0, 0.0], 0),\n", + " ([0.0, 0.25, 0.75, 0.0, 0.0], 0),\n", + " ([0.0, 0.375, 0.625, 0.0, 0.0], 0),\n", + " ([0.0, 0.5, 0.5, 0.0, 0.0], 0)]" + ] + }, + "execution_count": 56, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "compositions_with_id[:5]" + ] + }, + { + "cell_type": "code", + "execution_count": 57, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'CrFeNi': {'id': 0, 'elements': ['Cr', 'Fe', 'Ni']},\n", + " 'CrFeV': {'id': 1, 'elements': ['Cr', 'Fe', 'V']},\n", + " 'CrFeTi': {'id': 2, 'elements': ['Cr', 'Fe', 'Ti']},\n", + " 'CrNiV': {'id': 3, 'elements': ['Cr', 'Ni', 'V']},\n", + " 'CrNiTi': {'id': 4, 'elements': ['Cr', 'Ni', 'Ti']},\n", + " 'CrTiV': {'id': 5, 'elements': ['Cr', 'Ti', 'V']},\n", + " 'FeNiV': {'id': 6, 'elements': ['Fe', 'Ni', 'V']},\n", + " 'FeNiTi': {'id': 7, 'elements': ['Fe', 'Ni', 'Ti']},\n", + " 'FeTiV': {'id': 8, 'elements': ['Fe', 'Ti', 'V']},\n", + " 'NiTiV': {'id': 9, 'elements': ['Ni', 'Ti', 'V']}}" + ] + }, + "execution_count": 57, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "mapping" + ] + }, + { + "cell_type": "code", + "execution_count": 58, + "metadata": {}, + "outputs": [], + "source": [ + "from tqdm.contrib.concurrent import process_map" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Starting nodes: [0, 90, 200, 310, 26, 137, 44, 393, 208, 136, 55, 429, 447, 19, 194]\n", + "Starting node: [0.0, 0.0, 1.0, 0.0, 0.0]\n", + "Starting node: [0.0, 0.0, 0.0, 1.0, 0.0]\n", + "Starting node: [0.25, 0.0, 0.375, 0.375, 0.0]\n", + "Starting node: [0.0, 0.75, 0.125, 0.0, 0.125]\n", + "Starting node: [0.375, 0.25, 0.375, 0.0, 0.0]\n", + "Starting node: [0.0, 0.0, 0.25, 0.0, 0.75]\n", + "Starting node: [1.0, 0.0, 0.0, 0.0, 0.0]\n", + "Starting node: [0.0, 0.5, 0.0, 0.125, 0.375]\n", + "Starting node: [0.375, 0.0, 0.5, 0.125, 0.0]\n", + "Starting node: [0.0, 0.0, 0.125, 0.0, 0.875]\n", + "Starting node: [0.125, 0.125, 0.0, 0.0, 0.75]\n", + "Starting node: [0.0, 0.0, 0.375, 0.625, 0.0]\n", + "Starting node: [0.0, 0.0, 0.875, 0.125, 0.0]\n", + "Starting node: [0.25, 0.25, 0.5, 0.0, 0.0]\n", + "Starting node: [0.125, 0.0, 0.625, 0.25, 0.0]\n" + ] + } + ], + "source": [ + "startingNodes = [0, 90, 200, 310] + random.sample(range(len(compositions)), 11)\n", + "print(f\"Starting nodes: {startingNodes}\")\n", + "\n", + "for startingNode in startingNodes:\n", + " print(f\"Starting node: {compositions[startingNode]}\")" + ] + }, + { + "cell_type": "code", + "execution_count": 60, + "metadata": {}, + "outputs": [], + "source": [ + "gridFeasible = [None]*len(compositions)\n", + "queue = startingNodes.copy()\n", + "explored = set()\n", + "calcCount = 0" + ] + }, + { + "cell_type": "code", + "execution_count": 61, + "metadata": {}, + "outputs": [], + "source": [ + "# Function to get the correct callable for a given composition\n", + "def get_callable(composition):\n", + " for comp, id in compositions_with_id:\n", + " if comp == composition:\n", + " callable_name = id_to_callable.get(id)\n", + " if callable_name is None:\n", + " raise ValueError(f\"No callable name found for ID {id}\")\n", + " if callable_name in globals():\n", + " return globals()[callable_name]\n", + " else:\n", + " raise NameError(f\"Function '{callable_name}' not found in global scope\")\n", + " raise ValueError(f\"No callable found for composition {composition}\")\n", + "\n", + "def process_composition(elP):\n", + " try:\n", + " callable_func = get_callable(elP)\n", + " return callable_func(elP)\n", + " except Exception as e:\n", + " print(f\"Error processing composition {elP}: {str(e)}\")\n", + " return None\n" + ] + }, + { + "cell_type": "code", + "execution_count": 62, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'equilibrium_callable_CrFeTi_08bbfb9a': ,\n", + " 'equilibrium_callable_CrTiV_ed4c332b': ,\n", + " 'equilibrium_callable_FeTiV_fa95b3ee': ,\n", + " 'equilibrium_callable_CrFeV_ab1edb07': ,\n", + " 'equilibrium_callable_FeNiV_b9b0384d': ,\n", + " 'equilibrium_callable_FeNiTi_06a49695': ,\n", + " 'equilibrium_callable_CrNiTi_a9f6f2ff': ,\n", + " 'equilibrium_callable_NiTiV_1d83c99c': ,\n", + " 'equilibrium_callable_NiCrV_0f8b67c1': ,\n", + " 'equilibrium_callable_NiCrFe_ce8329fb': }" + ] + }, + "execution_count": 62, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "equilibrium_callables" + ] + }, + { + "cell_type": "code", + "execution_count": 63, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{2: 'equilibrium_callable_CrFeTi_08bbfb9a',\n", + " 5: 'equilibrium_callable_CrTiV_ed4c332b',\n", + " 8: 'equilibrium_callable_FeTiV_fa95b3ee',\n", + " 1: 'equilibrium_callable_CrFeV_ab1edb07',\n", + " 6: 'equilibrium_callable_FeNiV_b9b0384d',\n", + " 7: 'equilibrium_callable_FeNiTi_06a49695',\n", + " 4: 'equilibrium_callable_CrNiTi_a9f6f2ff',\n", + " 9: 'equilibrium_callable_NiTiV_1d83c99c',\n", + " 3: 'equilibrium_callable_NiCrV_0f8b67c1',\n", + " 0: 'equilibrium_callable_NiCrFe_ce8329fb'}" + ] + }, + "execution_count": 63, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "id_to_callable" + ] + }, + { + "cell_type": "code", + "execution_count": 64, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[([0.0, 0.0, 1.0, 0.0, 0.0], 0),\n", + " ([0.0, 0.125, 0.875, 0.0, 0.0], 0),\n", + " ([0.0, 0.25, 0.75, 0.0, 0.0], 0),\n", + " ([0.0, 0.375, 0.625, 0.0, 0.0], 0),\n", + " ([0.0, 0.5, 0.5, 0.0, 0.0], 0)]" + ] + }, + "execution_count": 64, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "compositions_with_id[:5]" + ] + }, + { + "cell_type": "code", + "execution_count": 65, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "([0.0, 0.0, 1.0, 0.0, 0.0], 0)" + ] + }, + "execution_count": 65, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "compositions_with_id[0]" + ] + }, + { + "cell_type": "code", + "execution_count": 66, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Queue: [0, 90, 200, 310, 26, 137, 44, 393, 208, 136, 55, 429, 447, 19, 194]\n", + "[[0.0, 0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 0.0, 1.0, 0.0], [0.25, 0.0, 0.375, 0.375, 0.0], [0.0, 0.75, 0.125, 0.0, 0.125], [0.375, 0.25, 0.375, 0.0, 0.0], [0.0, 0.0, 0.25, 0.0, 0.75], [1.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.5, 0.0, 0.125, 0.375], [0.375, 0.0, 0.5, 0.125, 0.0], [0.0, 0.0, 0.125, 0.0, 0.875], [0.125, 0.125, 0.0, 0.0, 0.75], [0.0, 0.0, 0.375, 0.625, 0.0], [0.0, 0.0, 0.875, 0.125, 0.0], [0.25, 0.25, 0.5, 0.0, 0.0], [0.125, 0.0, 0.625, 0.25, 0.0]]\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "9b282c5251eb4111b1b6d1a016c7e457", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "0it [00:00, ?it/s]" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Calculations done: 15 | Explored points: 31 \n", + "Queue: [1, 387, 132, 388, 135, 392, 9, 138, 394, 12, 397, 142, 271, 398, 145, 146, 144, 20, 18, 279, 280, 25, 281, 27, 412, 11, 31, 32, 185, 420, 422, 423, 186, 42, 427, 43, 46, 47, 430, 306, 307, 435, 181, 309, 311, 312, 313, 54, 187, 56, 445, 62, 63, 192, 193, 444, 449, 195, 199, 201, 202, 206, 207, 209, 213, 214, 87, 91, 226, 99]\n", + "[[0.0, 0.125, 0.875, 0.0, 0.0], [0.0, 0.375, 0.0, 0.25, 0.375], [0.875, 0.0, 0.0, 0.125, 0.0], [0.0, 0.375, 0.0, 0.125, 0.5], [0.0, 0.0, 0.0, 0.0, 1.0], [0.0, 0.5, 0.0, 0.25, 0.25], [0.125, 0.0, 0.875, 0.0, 0.0], [0.0, 0.0, 0.375, 0.0, 0.625], [0.0, 0.5, 0.0, 0.0, 0.5], [0.125, 0.375, 0.5, 0.0, 0.0], [0.0, 0.625, 0.0, 0.125, 0.25], [0.0, 0.0, 0.875, 0.0, 0.125], [0.0, 0.0, 0.125, 0.0, 0.875], [0.0, 0.625, 0.0, 0.0, 0.375], [0.125, 0.0, 0.125, 0.0, 0.75], [0.125, 0.0, 0.25, 0.0, 0.625], [0.125, 0.0, 0.0, 0.0, 0.875], [0.25, 0.375, 0.375, 0.0, 0.0], [0.25, 0.125, 0.625, 0.0, 0.0], [0.0, 0.125, 0.0, 0.0, 0.875], [0.0, 0.125, 0.125, 0.0, 0.75], [0.375, 0.125, 0.5, 0.0, 0.0], [0.0, 0.125, 0.25, 0.0, 0.625], [0.375, 0.375, 0.25, 0.0, 0.0], [0.0, 0.0, 0.0, 0.125, 0.875], [0.125, 0.25, 0.625, 0.0, 0.0], [0.5, 0.125, 0.375, 0.0, 0.0], [0.5, 0.25, 0.25, 0.0, 0.0], [0.0, 0.0, 0.625, 0.375, 0.0], [0.0, 0.0, 0.125, 0.125, 0.75], [0.0, 0.0, 0.25, 0.75, 0.0], [0.0, 0.0, 0.25, 0.625, 0.125], [0.0, 0.0, 0.75, 0.25, 0.0], [0.875, 0.0, 0.125, 0.0, 0.0], [0.0, 0.0, 0.25, 0.125, 0.625], [0.875, 0.125, 0.0, 0.0, 0.0], [0.0, 0.125, 0.0, 0.0, 0.875], [0.0, 0.25, 0.0, 0.0, 0.75], [0.0, 0.0, 0.375, 0.5, 0.125], [0.0, 0.625, 0.125, 0.0, 0.25], [0.0, 0.625, 0.25, 0.0, 0.125], [0.0, 0.0, 0.5, 0.5, 0.0], [0.0, 0.0, 0.125, 0.875, 0.0], [0.0, 0.75, 0.0, 0.0, 0.25], [0.0, 0.75, 0.25, 0.0, 0.0], [0.0, 0.875, 0.0, 0.0, 0.125], [0.0, 0.875, 0.125, 0.0, 0.0], [0.125, 0.0, 0.0, 0.0, 0.875], [0.0, 0.0, 0.875, 0.125, 0.0], [0.125, 0.25, 0.0, 0.0, 0.625], [0.0, 0.0, 0.75, 0.125, 0.125], [0.25, 0.0, 0.0, 0.0, 0.75], [0.25, 0.125, 0.0, 0.0, 0.625], [0.125, 0.0, 0.375, 0.5, 0.0], [0.125, 0.0, 0.5, 0.375, 0.0], [0.0, 0.0, 0.75, 0.25, 0.0], [0.0, 0.0, 1.0, 0.0, 0.0], [0.125, 0.0, 0.75, 0.125, 0.0], [0.25, 0.0, 0.25, 0.5, 0.0], [0.25, 0.0, 0.5, 0.25, 0.0], [0.25, 0.0, 0.625, 0.125, 0.0], [0.375, 0.0, 0.25, 0.375, 0.0], [0.375, 0.0, 0.375, 0.25, 0.0], [0.375, 0.0, 0.625, 0.0, 0.0], [0.5, 0.0, 0.375, 0.125, 0.0], [0.5, 0.0, 0.5, 0.0, 0.0], [0.875, 0.0, 0.0, 0.0, 0.125], [0.0, 0.125, 0.0, 0.875, 0.0], [0.0, 0.0, 0.0, 0.875, 0.125], [0.125, 0.0, 0.0, 0.875, 0.0]]\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "f2610b2c17614589ae68f6dd459f5eac", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "0it [00:00, ?it/s]" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Calculations done: 85 | Explored points: 141 \n", + "Queue: [2, 3, 4, 10, 13, 17, 21, 24, 28, 30, 33, 35, 36, 37, 39, 40, 41, 45, 48, 57, 64, 69, 70, 84, 85, 92, 100, 107, 129, 130, 133, 139, 141, 147, 150, 152, 153, 154, 175, 177, 182, 183, 184, 189, 190, 191, 198, 205, 211, 212, 217, 220, 223, 227, 232, 235, 240, 241, 247, 265, 268, 269, 277, 282, 285, 287, 288, 289, 301, 302, 303, 305, 308, 314, 321, 322, 324, 325, 328, 329, 330, 352, 355, 357, 358, 361, 368, 370, 375, 380, 381, 382, 386, 389, 391, 396, 400, 401, 402, 403, 405, 406, 411, 414, 415, 416, 419, 424, 426, 431, 433, 436, 441, 442]\n", + "[[0.0, 0.25, 0.75, 0.0, 0.0], [0.0, 0.375, 0.625, 0.0, 0.0], [0.0, 0.5, 0.5, 0.0, 0.0], [0.125, 0.125, 0.75, 0.0, 0.0], [0.125, 0.5, 0.375, 0.0, 0.0], [0.25, 0.0, 0.75, 0.0, 0.0], [0.25, 0.5, 0.25, 0.0, 0.0], [0.375, 0.0, 0.625, 0.0, 0.0], [0.375, 0.5, 0.125, 0.0, 0.0], [0.5, 0.0, 0.5, 0.0, 0.0], [0.5, 0.375, 0.125, 0.0, 0.0], [0.625, 0.0, 0.375, 0.0, 0.0], [0.625, 0.125, 0.25, 0.0, 0.0], [0.625, 0.25, 0.125, 0.0, 0.0], [0.75, 0.0, 0.25, 0.0, 0.0], [0.75, 0.125, 0.125, 0.0, 0.0], [0.75, 0.25, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 1.0], [0.0, 0.375, 0.0, 0.0, 0.625], [0.125, 0.375, 0.0, 0.0, 0.5], [0.25, 0.25, 0.0, 0.0, 0.5], [0.375, 0.0, 0.0, 0.0, 0.625], [0.375, 0.125, 0.0, 0.0, 0.5], [0.75, 0.0, 0.0, 0.0, 0.25], [0.75, 0.125, 0.0, 0.0, 0.125], [0.0, 0.25, 0.0, 0.75, 0.0], [0.125, 0.125, 0.0, 0.75, 0.0], [0.25, 0.0, 0.0, 0.75, 0.0], [0.75, 0.0, 0.0, 0.25, 0.0], [0.75, 0.125, 0.0, 0.125, 0.0], [0.875, 0.125, 0.0, 0.0, 0.0], [0.0, 0.0, 0.5, 0.0, 0.5], [0.0, 0.0, 0.75, 0.0, 0.25], [0.125, 0.0, 0.375, 0.0, 0.5], [0.125, 0.0, 0.75, 0.0, 0.125], [0.25, 0.0, 0.0, 0.0, 0.75], [0.25, 0.0, 0.125, 0.0, 0.625], [0.25, 0.0, 0.25, 0.0, 0.5], [0.75, 0.0, 0.125, 0.0, 0.125], [0.875, 0.0, 0.0, 0.0, 0.125], [0.0, 0.0, 0.25, 0.75, 0.0], [0.0, 0.0, 0.375, 0.625, 0.0], [0.0, 0.0, 0.5, 0.5, 0.0], [0.125, 0.0, 0.0, 0.875, 0.0], [0.125, 0.0, 0.125, 0.75, 0.0], [0.125, 0.0, 0.25, 0.625, 0.0], [0.25, 0.0, 0.125, 0.625, 0.0], [0.375, 0.0, 0.125, 0.5, 0.0], [0.5, 0.0, 0.125, 0.375, 0.0], [0.5, 0.0, 0.25, 0.25, 0.0], [0.625, 0.0, 0.25, 0.125, 0.0], [0.75, 0.0, 0.125, 0.125, 0.0], [0.875, 0.0, 0.125, 0.0, 0.0], [0.0, 0.0, 0.0, 0.75, 0.25], [0.0, 0.0, 0.0, 0.125, 0.875], [0.125, 0.0, 0.0, 0.75, 0.125], [0.125, 0.0, 0.0, 0.125, 0.75], [0.125, 0.0, 0.0, 0.0, 0.875], [0.25, 0.0, 0.0, 0.125, 0.625], [0.75, 0.0, 0.0, 0.125, 0.125], [0.875, 0.0, 0.0, 0.0, 0.125], [1.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.875, 0.0, 0.125], [0.0, 0.125, 0.375, 0.0, 0.5], [0.0, 0.125, 0.75, 0.0, 0.125], [0.0, 0.25, 0.0, 0.0, 0.75], [0.0, 0.25, 0.125, 0.0, 0.625], [0.0, 0.25, 0.25, 0.0, 0.5], [0.0, 0.5, 0.125, 0.0, 0.375], [0.0, 0.5, 0.25, 0.0, 0.25], [0.0, 0.5, 0.375, 0.0, 0.125], [0.0, 0.625, 0.0, 0.0, 0.375], [0.0, 0.625, 0.375, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.75, 0.25, 0.0], [0.0, 0.0, 0.875, 0.125, 0.0], [0.0, 0.125, 0.0, 0.875, 0.0], [0.0, 0.125, 0.125, 0.75, 0.0], [0.0, 0.125, 0.5, 0.375, 0.0], [0.0, 0.125, 0.625, 0.25, 0.0], [0.0, 0.125, 0.75, 0.125, 0.0], [0.0, 0.625, 0.25, 0.125, 0.0], [0.0, 0.75, 0.125, 0.125, 0.0], [0.0, 0.875, 0.0, 0.125, 0.0], [0.0, 0.875, 0.125, 0.0, 0.0], [0.0, 0.0, 0.0, 0.875, 0.125], [0.0, 0.0, 0.0, 0.0, 1.0], [0.0, 0.125, 0.0, 0.75, 0.125], [0.0, 0.125, 0.0, 0.125, 0.75], [0.0, 0.25, 0.0, 0.375, 0.375], [0.0, 0.25, 0.0, 0.25, 0.5], [0.0, 0.25, 0.0, 0.125, 0.625], [0.0, 0.375, 0.0, 0.375, 0.25], [0.0, 0.375, 0.0, 0.0, 0.625], [0.0, 0.5, 0.0, 0.375, 0.125], [0.0, 0.625, 0.0, 0.25, 0.125], [0.0, 0.75, 0.0, 0.125, 0.125], [0.0, 0.75, 0.0, 0.0, 0.25], [0.0, 0.875, 0.0, 0.125, 0.0], [0.0, 0.875, 0.0, 0.0, 0.125], [0.0, 0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 0.875, 0.125], [0.0, 0.0, 0.0, 0.25, 0.75], [0.0, 0.0, 0.125, 0.875, 0.0], [0.0, 0.0, 0.125, 0.75, 0.125], [0.0, 0.0, 0.125, 0.625, 0.25], [0.0, 0.0, 0.125, 0.25, 0.625], [0.0, 0.0, 0.25, 0.5, 0.25], [0.0, 0.0, 0.25, 0.25, 0.5], [0.0, 0.0, 0.375, 0.375, 0.25], [0.0, 0.0, 0.375, 0.125, 0.5], [0.0, 0.0, 0.5, 0.375, 0.125], [0.0, 0.0, 0.625, 0.25, 0.125], [0.0, 0.0, 0.625, 0.125, 0.25]]\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "9d2c63f5517e419cbe2fa64e814b343e", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "0it [00:00, ?it/s]" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Calculations done: 199 | Explored points: 277 \n", + "Queue: [5, 14, 22, 29, 34, 38, 49, 58, 65, 71, 75, 76, 80, 81, 82, 93, 101, 108, 114, 125, 126, 127, 140, 148, 149, 155, 157, 160, 161, 163, 164, 168, 169, 171, 172, 173, 176, 210, 216, 228, 231, 236, 239, 243, 246, 253, 261, 262, 283, 284, 290, 292, 295, 296, 297, 298, 299, 304, 318, 319, 326, 327, 333, 335, 336, 337, 343, 347, 348, 351, 354, 367, 371, 372, 373, 374, 378, 379, 385, 390, 395, 410, 417, 418, 425, 432, 437, 438]\n", + "[[0.0, 0.625, 0.375, 0.0, 0.0], [0.125, 0.625, 0.25, 0.0, 0.0], [0.25, 0.625, 0.125, 0.0, 0.0], [0.375, 0.625, 0.0, 0.0, 0.0], [0.5, 0.5, 0.0, 0.0, 0.0], [0.625, 0.375, 0.0, 0.0, 0.0], [0.0, 0.5, 0.0, 0.0, 0.5], [0.125, 0.5, 0.0, 0.0, 0.375], [0.25, 0.375, 0.0, 0.0, 0.375], [0.375, 0.25, 0.0, 0.0, 0.375], [0.5, 0.0, 0.0, 0.0, 0.5], [0.5, 0.125, 0.0, 0.0, 0.375], [0.625, 0.0, 0.0, 0.0, 0.375], [0.625, 0.125, 0.0, 0.0, 0.25], [0.625, 0.25, 0.0, 0.0, 0.125], [0.0, 0.375, 0.0, 0.625, 0.0], [0.125, 0.25, 0.0, 0.625, 0.0], [0.25, 0.125, 0.0, 0.625, 0.0], [0.375, 0.0, 0.0, 0.625, 0.0], [0.625, 0.0, 0.0, 0.375, 0.0], [0.625, 0.125, 0.0, 0.25, 0.0], [0.625, 0.25, 0.0, 0.125, 0.0], [0.0, 0.0, 0.625, 0.0, 0.375], [0.125, 0.0, 0.5, 0.0, 0.375], [0.125, 0.0, 0.625, 0.0, 0.25], [0.25, 0.0, 0.375, 0.0, 0.375], [0.25, 0.0, 0.625, 0.0, 0.125], [0.375, 0.0, 0.125, 0.0, 0.5], [0.375, 0.0, 0.25, 0.0, 0.375], [0.375, 0.0, 0.5, 0.0, 0.125], [0.375, 0.0, 0.625, 0.0, 0.0], [0.5, 0.0, 0.375, 0.0, 0.125], [0.5, 0.0, 0.5, 0.0, 0.0], [0.625, 0.0, 0.125, 0.0, 0.25], [0.625, 0.0, 0.25, 0.0, 0.125], [0.625, 0.0, 0.375, 0.0, 0.0], [0.75, 0.0, 0.25, 0.0, 0.0], [0.5, 0.0, 0.0, 0.5, 0.0], [0.625, 0.0, 0.125, 0.25, 0.0], [0.0, 0.0, 0.0, 0.625, 0.375], [0.0, 0.0, 0.0, 0.25, 0.75], [0.125, 0.0, 0.0, 0.625, 0.25], [0.125, 0.0, 0.0, 0.25, 0.625], [0.25, 0.0, 0.0, 0.625, 0.125], [0.25, 0.0, 0.0, 0.25, 0.5], [0.375, 0.0, 0.0, 0.125, 0.5], [0.625, 0.0, 0.0, 0.25, 0.125], [0.625, 0.0, 0.0, 0.125, 0.25], [0.0, 0.125, 0.5, 0.0, 0.375], [0.0, 0.125, 0.625, 0.0, 0.25], [0.0, 0.25, 0.375, 0.0, 0.375], [0.0, 0.25, 0.625, 0.0, 0.125], [0.0, 0.375, 0.125, 0.0, 0.5], [0.0, 0.375, 0.25, 0.0, 0.375], [0.0, 0.375, 0.375, 0.0, 0.25], [0.0, 0.375, 0.5, 0.0, 0.125], [0.0, 0.375, 0.625, 0.0, 0.0], [0.0, 0.5, 0.5, 0.0, 0.0], [0.0, 0.0, 0.375, 0.625, 0.0], [0.0, 0.0, 0.5, 0.5, 0.0], [0.0, 0.125, 0.25, 0.625, 0.0], [0.0, 0.125, 0.375, 0.5, 0.0], [0.0, 0.25, 0.125, 0.625, 0.0], [0.0, 0.25, 0.375, 0.375, 0.0], [0.0, 0.25, 0.5, 0.25, 0.0], [0.0, 0.25, 0.625, 0.125, 0.0], [0.0, 0.375, 0.5, 0.125, 0.0], [0.0, 0.5, 0.25, 0.25, 0.0], [0.0, 0.5, 0.375, 0.125, 0.0], [0.0, 0.625, 0.125, 0.25, 0.0], [0.0, 0.75, 0.0, 0.25, 0.0], [0.0, 0.0, 0.0, 0.125, 0.875], [0.0, 0.125, 0.0, 0.625, 0.25], [0.0, 0.125, 0.0, 0.5, 0.375], [0.0, 0.125, 0.0, 0.375, 0.5], [0.0, 0.125, 0.0, 0.25, 0.625], [0.0, 0.25, 0.0, 0.625, 0.125], [0.0, 0.25, 0.0, 0.5, 0.25], [0.0, 0.375, 0.0, 0.5, 0.125], [0.0, 0.5, 0.0, 0.5, 0.0], [0.0, 0.625, 0.0, 0.375, 0.0], [0.0, 0.0, 0.0, 0.375, 0.625], [0.0, 0.0, 0.125, 0.5, 0.375], [0.0, 0.0, 0.125, 0.375, 0.5], [0.0, 0.0, 0.25, 0.375, 0.375], [0.0, 0.0, 0.375, 0.25, 0.375], [0.0, 0.0, 0.5, 0.25, 0.25], [0.0, 0.0, 0.5, 0.125, 0.375]]\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "6f409b3fe5b441e1938d4487cde22666", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "0it [00:00, ?it/s]" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Calculations done: 287 | Explored points: 380 \n", + "Queue: [256, 257, 258, 6, 15, 23, 156, 162, 291, 166, 167, 170, 50, 59, 66, 67, 72, 73, 77, 78, 79, 334, 83, 340, 341, 342, 346, 94, 350, 229, 102, 122, 230, 109, 237, 238, 112, 115, 244, 245, 118, 120, 121, 250, 123, 252]\n", + "[[0.5, 0.0, 0.0, 0.375, 0.125], [0.5, 0.0, 0.0, 0.25, 0.25], [0.5, 0.0, 0.0, 0.125, 0.375], [0.0, 0.75, 0.25, 0.0, 0.0], [0.125, 0.75, 0.125, 0.0, 0.0], [0.25, 0.75, 0.0, 0.0, 0.0], [0.25, 0.0, 0.5, 0.0, 0.25], [0.375, 0.0, 0.375, 0.0, 0.25], [0.0, 0.25, 0.5, 0.0, 0.25], [0.5, 0.0, 0.125, 0.0, 0.375], [0.5, 0.0, 0.25, 0.0, 0.25], [0.625, 0.0, 0.0, 0.0, 0.375], [0.0, 0.625, 0.0, 0.0, 0.375], [0.125, 0.625, 0.0, 0.0, 0.25], [0.25, 0.5, 0.0, 0.0, 0.25], [0.25, 0.625, 0.0, 0.0, 0.125], [0.375, 0.375, 0.0, 0.0, 0.25], [0.375, 0.5, 0.0, 0.0, 0.125], [0.5, 0.25, 0.0, 0.0, 0.25], [0.5, 0.375, 0.0, 0.0, 0.125], [0.5, 0.5, 0.0, 0.0, 0.0], [0.0, 0.25, 0.25, 0.5, 0.0], [0.625, 0.375, 0.0, 0.0, 0.0], [0.0, 0.375, 0.125, 0.5, 0.0], [0.0, 0.375, 0.25, 0.375, 0.0], [0.0, 0.375, 0.375, 0.25, 0.0], [0.0, 0.5, 0.125, 0.375, 0.0], [0.0, 0.5, 0.0, 0.5, 0.0], [0.0, 0.625, 0.0, 0.375, 0.0], [0.0, 0.0, 0.0, 0.5, 0.5], [0.125, 0.375, 0.0, 0.5, 0.0], [0.5, 0.25, 0.0, 0.25, 0.0], [0.0, 0.0, 0.0, 0.375, 0.625], [0.25, 0.25, 0.0, 0.5, 0.0], [0.125, 0.0, 0.0, 0.5, 0.375], [0.125, 0.0, 0.0, 0.375, 0.5], [0.25, 0.625, 0.0, 0.125, 0.0], [0.375, 0.125, 0.0, 0.5, 0.0], [0.25, 0.0, 0.0, 0.5, 0.25], [0.25, 0.0, 0.0, 0.375, 0.375], [0.375, 0.5, 0.0, 0.125, 0.0], [0.5, 0.0, 0.0, 0.5, 0.0], [0.5, 0.125, 0.0, 0.375, 0.0], [0.375, 0.0, 0.0, 0.5, 0.125], [0.5, 0.375, 0.0, 0.125, 0.0], [0.375, 0.0, 0.0, 0.25, 0.375]]\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "9eba17096108460687f613b663296b33", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "0it [00:00, ?it/s]" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Calculations done: 333 | Explored points: 429 \n", + "Queue: [7, 103, 105, 104, 365, 110, 111, 16, 51, 116, 117, 345, 251, 60, 95]\n", + "[[0.0, 0.875, 0.125, 0.0, 0.0], [0.125, 0.5, 0.0, 0.375, 0.0], [0.125, 0.75, 0.0, 0.125, 0.0], [0.125, 0.625, 0.0, 0.25, 0.0], [0.0, 0.0, 0.0, 0.375, 0.625], [0.25, 0.375, 0.0, 0.375, 0.0], [0.25, 0.5, 0.0, 0.25, 0.0], [0.125, 0.875, 0.0, 0.0, 0.0], [0.0, 0.75, 0.0, 0.0, 0.25], [0.375, 0.25, 0.0, 0.375, 0.0], [0.375, 0.375, 0.0, 0.25, 0.0], [0.0, 0.5, 0.0, 0.5, 0.0], [0.375, 0.0, 0.0, 0.375, 0.25], [0.125, 0.75, 0.0, 0.0, 0.125], [0.0, 0.625, 0.0, 0.375, 0.0]]\n" ] - } - ], - "source": [ - "import os\n", - "import importlib\n", - "\n", - "# Directory containing the equilibrium files\n", - "directory = \"ammap/callables/multi_system_equilibrium_and_scheil\"\n", - "\n", - "# Get all files starting with \"equilibrium\"\n", - "equilibrium_files = [f for f in os.listdir(directory) if f.startswith(\"equilibrium\") and f.endswith(\".py\")]\n", - "\n", - "# Dictionary to store imported callables with unique names\n", - "equilibrium_callables = {}\n", - "\n", - "# Import each equilibrium file and store the callable with a unique name\n", - "for file in equilibrium_files:\n", - " module_name = file[:-3] # Remove the .py extension\n", - " module_path = f\"ammap.callables.multi_system_equilibrium_and_scheil.{module_name}\"\n", - " module = importlib.import_module(module_path)\n", - " callable_name = f\"{module_name}\"\n", - " equilibrium_callables[callable_name] = getattr(module, \"equilibrium_callable\")\n", - "\n", - "# Print the imported callables\n", - "for name, func in equilibrium_callables.items():\n", - " print(f\"Imported {name}: {func}\")" - ] - }, - { - "cell_type": "code", - "execution_count": 66, - "metadata": {}, - "outputs": [ + }, { - "ename": "KeyError", - "evalue": "6", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[66], line 13\u001b[0m\n\u001b[1;32m 10\u001b[0m used_indices \u001b[38;5;241m=\u001b[39m [np\u001b[38;5;241m.\u001b[39mnonzero(point)[\u001b[38;5;241m0\u001b[39m][:\u001b[38;5;241m3\u001b[39m] \u001b[38;5;28;01mfor\u001b[39;00m point \u001b[38;5;129;01min\u001b[39;00m compositions]\n\u001b[1;32m 12\u001b[0m \u001b[38;5;66;03m# Map the used indices to their corresponding elements for each point\u001b[39;00m\n\u001b[0;32m---> 13\u001b[0m used_elements \u001b[38;5;241m=\u001b[39m [[index_to_element[i] \u001b[38;5;28;01mfor\u001b[39;00m i \u001b[38;5;129;01min\u001b[39;00m indices] \u001b[38;5;28;01mfor\u001b[39;00m indices \u001b[38;5;129;01min\u001b[39;00m used_indices]\n\u001b[1;32m 15\u001b[0m \u001b[38;5;66;03m# Display the first 5 results as a sample\u001b[39;00m\n\u001b[1;32m 16\u001b[0m \u001b[38;5;28mprint\u001b[39m(used_elements)\n", - "Cell \u001b[0;32mIn[66], line 13\u001b[0m, in \u001b[0;36m\u001b[0;34m(.0)\u001b[0m\n\u001b[1;32m 10\u001b[0m used_indices \u001b[38;5;241m=\u001b[39m [np\u001b[38;5;241m.\u001b[39mnonzero(point)[\u001b[38;5;241m0\u001b[39m][:\u001b[38;5;241m3\u001b[39m] \u001b[38;5;28;01mfor\u001b[39;00m point \u001b[38;5;129;01min\u001b[39;00m compositions]\n\u001b[1;32m 12\u001b[0m \u001b[38;5;66;03m# Map the used indices to their corresponding elements for each point\u001b[39;00m\n\u001b[0;32m---> 13\u001b[0m used_elements \u001b[38;5;241m=\u001b[39m [[index_to_element[i] \u001b[38;5;28;01mfor\u001b[39;00m i \u001b[38;5;129;01min\u001b[39;00m indices] \u001b[38;5;28;01mfor\u001b[39;00m indices \u001b[38;5;129;01min\u001b[39;00m used_indices]\n\u001b[1;32m 15\u001b[0m \u001b[38;5;66;03m# Display the first 5 results as a sample\u001b[39;00m\n\u001b[1;32m 16\u001b[0m \u001b[38;5;28mprint\u001b[39m(used_elements)\n", - "Cell \u001b[0;32mIn[66], line 13\u001b[0m, in \u001b[0;36m\u001b[0;34m(.0)\u001b[0m\n\u001b[1;32m 10\u001b[0m used_indices \u001b[38;5;241m=\u001b[39m [np\u001b[38;5;241m.\u001b[39mnonzero(point)[\u001b[38;5;241m0\u001b[39m][:\u001b[38;5;241m3\u001b[39m] \u001b[38;5;28;01mfor\u001b[39;00m point \u001b[38;5;129;01min\u001b[39;00m compositions]\n\u001b[1;32m 12\u001b[0m \u001b[38;5;66;03m# Map the used indices to their corresponding elements for each point\u001b[39;00m\n\u001b[0;32m---> 13\u001b[0m used_elements \u001b[38;5;241m=\u001b[39m [[index_to_element[i] \u001b[38;5;28;01mfor\u001b[39;00m i \u001b[38;5;129;01min\u001b[39;00m indices] \u001b[38;5;28;01mfor\u001b[39;00m indices \u001b[38;5;129;01min\u001b[39;00m used_indices]\n\u001b[1;32m 15\u001b[0m \u001b[38;5;66;03m# Display the first 5 results as a sample\u001b[39;00m\n\u001b[1;32m 16\u001b[0m \u001b[38;5;28mprint\u001b[39m(used_elements)\n", - "\u001b[0;31mKeyError\u001b[0m: 6" - ] - } - ], - "source": [ - "# Define the elemental space components\n", - "elementalSpaceComponents = [\"Cr\", \"Fe\", \"Ni\", \"Ti\", \"V\"]\n", - "\n", - "# Create a mapping of index positions to their corresponding elemental names\n", - "index_to_element = {i: element for i, element in enumerate(elementalSpaceComponents)}\n", - "\n", - "# Assuming 'compositions' is your list of 450 points\n", - "\n", - "# Get the indices of the used dimensions (dimensions where values are non-zero)\n", - "used_indices = [np.nonzero(point)[0][:3] for point in compositions]\n", - "\n", - "# Map the used indices to their corresponding elements for each point\n", - "used_elements = [[index_to_element[i] for i in indices] for indices in used_indices]\n", - "\n", - "# Display the first 5 results as a sample\n", - "print(used_elements)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [ + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "437b17c22a8b44e79c27c763cbf9a765", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "0it [00:00, ?it/s]" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, { "name": "stdout", "output_type": "stream", "text": [ - "[['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Cr', 'Fe', 'Ni'], ['Cr', 'Fe', 'Ni'], ['Cr', 'Fe', 'Ni'], ['Cr', 'Fe', 'Ni']]\n" + "Calculations done: 348 | Explored points: 444 \n", + "Queue: [96, 97, 8, 106, 52]\n", + "[[0.0, 0.75, 0.0, 0.25, 0.0], [0.0, 0.875, 0.0, 0.125, 0.0], [0.0, 1.0, 0.0, 0.0, 0.0], [0.125, 0.875, 0.0, 0.0, 0.0], [0.0, 0.875, 0.0, 0.0, 0.125]]\n" ] - } - ], - "source": [ - "# Define the elemental space components\n", - "elementalSpaceComponents = [\"Cr\", \"Fe\", \"Ni\", \"Ti\", \"V\"]\n", - "\n", - "# Create a mapping of index positions to their corresponding elemental names\n", - "index_to_element = {i: element for i, element in enumerate(elementalSpaceComponents)}\n", - "\n", - "# Function to find the next ternary space\n", - "def find_next_ternary_space(compositions, start_index):\n", - " for i in range(start_index, len(compositions)):\n", - " nonzero_indices = np.nonzero(compositions[i])[0]\n", - " if len(nonzero_indices) >= 3:\n", - " return nonzero_indices[:3]\n", - " return None # Return None if no suitable ternary space is found\n", - "\n", - "# Process the compositions\n", - "used_elements = []\n", - "current_ternary_space = None\n", - "for i, point in enumerate(compositions):\n", - " nonzero_indices = np.nonzero(point)[0]\n", - " \n", - " if len(nonzero_indices) < 3 and current_ternary_space is None:\n", - " # Find the next ternary space\n", - " current_ternary_space = find_next_ternary_space(compositions, i)\n", - " if current_ternary_space is None:\n", - " # If no suitable ternary space is found, use the first three elements\n", - " current_ternary_space = np.array([0, 1, 2])\n", - " \n", - " if len(nonzero_indices) >= 3:\n", - " # If this point has 3 or more non-zero elements, use them and reset current_ternary_space\n", - " elements = [index_to_element[j] for j in nonzero_indices[:3]]\n", - " current_ternary_space = None\n", - " else:\n", - " # Use the current ternary space\n", - " elements = [index_to_element[j] for j in current_ternary_space]\n", - " \n", - " used_elements.append(elements)\n", - "\n", - "# Display the first 5 results as a sample\n", - "print(used_elements)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [ + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "bb64f01d43054712870a80edde7d24c0", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "0it [00:00, ?it/s]" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, { "name": "stdout", "output_type": "stream", "text": [ - "[['Fe', 'Ti', 'V'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['Fe', 'Ni', 'Cr'], ['V', 'Ti', 'Cr'], ['Ni', 'V', 'Cr'], ['Ni', 'V', 'Cr'], ['Ni', 'V', 'Cr'], ['Ni', 'V', 'Cr'], ['Ni', 'V', 'Cr'], ['Ni', 'V', 'Cr'], ['Ni', 'V', 'Cr'], ['Ni', 'V', 'Cr'], ['Fe', 'V', 'Ni'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Ti', 'V', 'Fe'], ['Ni', 'Ti', 'Cr'], ['Ni', 'Ti', 'Cr'], ['Ni', 'Ti', 'Cr'], ['Ni', 'Ti', 'Cr'], ['Ni', 'Ti', 'Cr'], ['Ni', 'Ti', 'Cr'], ['Ni', 'Ti', 'Cr'], ['Ni', 'Ti', 'Cr'], ['Fe', 'Ti', 'Cr'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['V', 'Ni', 'Cr'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'V', 'Ti'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Ni', 'V', 'Cr'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Fe', 'Ni', 'V'], ['Ti', 'Ni', 'V'], ['Fe', 'Ti', 'Cr'], ['Fe', 'Ti', 'Cr'], ['Fe', 'Ti', 'Cr'], ['Fe', 'Ti', 'Cr'], ['Fe', 'Ti', 'Cr'], ['Fe', 'Ti', 'Cr'], ['Fe', 'Ti', 'Cr'], ['Fe', 'Ti', 'Cr'], ['Ni', 'Ti', 'Cr'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Fe', 'Ni', 'Ti'], ['Ti', 'V', 'Fe'], ['Ti', 'V', 'Fe'], ['Ti', 'V', 'Fe'], ['Ti', 'V', 'Fe'], ['Ti', 'V', 'Fe'], ['Ti', 'V', 'Fe'], ['Ti', 'V', 'Fe'], ['Ti', 'V', 'Fe'], ['Ni', 'Ti', 'Cr'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Ni', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V'], ['Fe', 'Ti', 'V']]\n" + "Calculations done: 353 | Explored points: 450 \n", + "Queue: [98]\n", + "[[0.0, 1.0, 0.0, 0.0, 0.0]]\n", + "Calculations done: 354 | Explored points: 450 \n" ] } ], "source": [ - "def implement_representation_logic(compositions, elementalSpaceComponents):\n", - " dimension_map = {i: elementalSpaceComponents[i] for i in range(len(elementalSpaceComponents))}\n", - " used_elements = []\n", - " current_ternary_space = None\n", - "\n", - " for i, point in enumerate(compositions):\n", - " nonzero_indices = np.nonzero(point)[0]\n", - " len_nonzero = len(nonzero_indices)\n", - "\n", - " if len_nonzero < 3:\n", - " if current_ternary_space is None or not all(idx in current_ternary_space for idx in nonzero_indices):\n", - " # Find a new ternary space that includes all nonzero indices\n", - " remaining_indices = [j for j in range(len(point)) if j not in nonzero_indices]\n", - " additional_indices = np.random.choice(remaining_indices, 3 - len_nonzero, replace=False)\n", - " current_ternary_space = np.concatenate((nonzero_indices, additional_indices))\n", - " else:\n", - " current_ternary_space = nonzero_indices[:3]\n", + "from functools import partial\n", "\n", - " elements = [dimension_map[j] for j in current_ternary_space]\n", - " used_elements.append(elements)\n", + "def get_equilibrium_callable(composition, id_to_callable, equilibrium_callables):\n", + " composition_id = composition[1] # Get the ID from the composition tuple\n", + " #print(f\"Composition ID: {composition_id}\")\n", + " callable_name = id_to_callable.get(composition_id)\n", + " if callable_name is None:\n", + " raise ValueError(f\"No callable found for composition ID {composition_id}\")\n", + " callable_func = equilibrium_callables.get(callable_name)\n", + " if callable_func is None:\n", + " raise ValueError(f\"No callable function found for name {callable_name}\")\n", + " return callable_func\n", "\n", - " return used_elements\n", + "def apply_equilibrium_callable(callable_and_position):\n", + " callable_func, position = callable_and_position\n", + " return callable_func(position)\n", "\n", - "\n", - "# Running the implementation function to test\n", - "result = implement_representation_logic(compositions, elementalSpaceComponents)\n", - "\n", - "# Print the result\n", - "# for i, elements in enumerate(result):\n", - "# print(f\"Composition {i+1}: {elements}\")\n", - "\n", - "print(result)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "t1=equilibrium_callables['equilibrium_callable_NiCrV_0f8b67c1'](compositions[200])\n", - "t2=equilibrium_callables['equilibrium_callable_NiCrFe_ce8329fb'](compositions[200])" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "T1= {'Phases': ['BCC_A2'], 'PhaseFraction': [1.000000000003023]} T2= {'Phases': ['BCC_A2', 'SIGMA'], 'PhaseFraction': [0.46923805136416286, 0.5307619487955337]}\n" - ] - } - ], - "source": [ - "print(\"T1=\",t1,\"T2=\",t2)\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [ - { - "ename": "NameError", - "evalue": "name 'elPositions' is not defined", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[29], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m elPositions\n", - "\u001b[0;31mNameError\u001b[0m: name 'elPositions' is not defined" - ] - } - ], - "source": [ - "while len(queue)>0:\n", + "while len(queue) > 0:\n", " print(f\"Queue: {queue}\")\n", " # Calculate feasibilities of the current queue\n", " elPositions = [compositions[i] for i in queue]\n", - " if len(queue)>3:\n", - " phases = process_map(equilibrium_callable, elPositions, max_workers=4)\n", + " print(elPositions)\n", + " # Create a list of equilibrium callables for each composition\n", + " equilibrium_callables_list = [get_equilibrium_callable(compositions_with_id[i], id_to_callable, equilibrium_callables) for i in queue]\n", + " \n", + " if len(queue) > 3:\n", + " phases = process_map(apply_equilibrium_callable, zip(equilibrium_callables_list, elPositions), max_workers=4)\n", " else:\n", - " phases = [equilibrium_callable(elP) for elP in elPositions]\n", - " feasibilities = [len(set(p) & set(['LAVES_C15', 'LAVES_C36', 'LAVES_C14', 'LIQUID']))==0 and p!=[] for p in phases]\n", + " phases = [ec(elP) for ec, elP in zip(equilibrium_callables_list, elPositions)]\n", + " \n", + " feasibilities = [len(set(p) & set(['FCC_A1', 'BCC_A2', 'HCP_A3', 'B2_BCC','A2_FCC'])) == 0 and p != [] for p in phases]\n", "\n", " calcCount += len(feasibilities)\n", " explored = explored.union(queue)\n", @@ -1369,35 +1929,6 @@ " queue = list(nextQueue)" ] }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "args = list(zip(elPositions, systems))\n", - "phases = process_map(lambda x: combined_callable(*x), args, max_workers=4)" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": {}, - "outputs": [ - { - "ename": "NameError", - "evalue": "name 'compositions' is not defined", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[19], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;28mlen\u001b[39m(compositions)\n", - "\u001b[0;31mNameError\u001b[0m: name 'compositions' is not defined" - ] - } - ], - "source": [] - }, { "cell_type": "markdown", "metadata": {}, @@ -1407,7 +1938,7 @@ }, { "cell_type": "code", - "execution_count": 48, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -1476,7 +2007,7 @@ }, { "cell_type": "code", - "execution_count": 49, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -1485,7 +2016,7 @@ "[0, 2, 9, 10]" ] }, - "execution_count": 49, + "execution_count": 65, "metadata": {}, "output_type": "execute_result" } @@ -1503,7 +2034,7 @@ }, { "cell_type": "code", - "execution_count": 50, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -1527,7 +2058,7 @@ }, { "cell_type": "code", - "execution_count": 52, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -1536,7 +2067,7 @@ "list" ] }, - "execution_count": 52, + "execution_count": 67, "metadata": {}, "output_type": "execute_result" } @@ -1547,27 +2078,7 @@ }, { "cell_type": "code", - "execution_count": 63, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'Duplicates found:[0.0, 0.0, 0.25, 0.25, 0.25, 0.25, 0.0] appears 15 times[0.00625, 0.0, 0.3375, 0.21875, 0.21875, 0.21875, 0.0] appears 5 times[0.0125, 0.0, 0.425, 0.1875, 0.1875, 0.1875, 0.0] appears 5 times[0.018750000000000003, 0.0, 0.5125, 0.15625, 0.15625, 0.15625, 0.0] appears 5 times[0.025, 0.0, 0.6, 0.125, 0.125, 0.125, 0.0] appears 5 times[0.03125, 0.0, 0.6875, 0.09375, 0.09375, 0.09375, 0.0] appears 5 times[0.037500000000000006, 0.0, 0.7749999999999999, 0.0625, 0.0625, 0.0625, 0.0] appears 5 times[0.043750000000000004, 0.0, 0.8624999999999999, 0.03125, 0.03125, 0.03125, 0.0] appears 5 times[0.05, 0.0, 0.95, 0.0, 0.0, 0.0, 0.0] appears 15 times[0.0625, 0.0625, 0.21875, 0.21875, 0.21875, 0.21875, 0.0] appears 5 times[0.10625, 0.0625, 0.8312499999999999, 0.0, 0.0, 0.0, 0.0] appears 5 times[0.125, 0.125, 0.1875, 0.1875, 0.1875, 0.1875, 0.0] appears 5 times[0.1625, 0.125, 0.7124999999999999, 0.0, 0.0, 0.0, 0.0] appears 5 times[0.1875, 0.1875, 0.15625, 0.15625, 0.15625, 0.15625, 0.0] appears 5 times[0.21875, 0.1875, 0.59375, 0.0, 0.0, 0.0, 0.0] appears 5 times[0.25, 0.25, 0.125, 0.125, 0.125, 0.125, 0.0] appears 5 times[0.275, 0.25, 0.475, 0.0, 0.0, 0.0, 0.0] appears 5 times[0.3125, 0.3125, 0.09375, 0.09375, 0.09375, 0.09375, 0.0] appears 5 times[0.33125, 0.3125, 0.35624999999999996, 0.0, 0.0, 0.0, 0.0] appears 5 times[0.375, 0.375, 0.0625, 0.0625, 0.0625, 0.0625, 0.0] appears 5 times[0.3875, 0.375, 0.2375, 0.0, 0.0, 0.0, 0.0] appears 5 times[0.4375, 0.4375, 0.03125, 0.03125, 0.03125, 0.03125, 0.0] appears 5 times[0.44375, 0.4375, 0.11875, 0.0, 0.0, 0.0, 0.0] appears 5 times[0.5, 0.5, 0.0, 0.0, 0.0, 0.0, 0.0] appears 15 times[0.0, 0.0, 0.0, 0.1, 0.1, 0.0, 0.8] appears 15 times[0.00625, 0.0, 0.11875, 0.08750000000000001, 0.08750000000000001, 0.0, 0.7000000000000001] appears 5 times[0.0125, 0.0, 0.2375, 0.07500000000000001, 0.07500000000000001, 0.0, 0.6000000000000001] appears 5 times[0.018750000000000003, 0.0, 0.35624999999999996, 0.0625, 0.0625, 0.0, 0.5] appears 5 times[0.025, 0.0, 0.475, 0.05, 0.05, 0.0, 0.4] appears 5 times[0.03125, 0.0, 0.59375, 0.037500000000000006, 0.037500000000000006, 0.0, 0.30000000000000004] appears 5 times[0.037500000000000006, 0.0, 0.7124999999999999, 0.025, 0.025, 0.0, 0.2] appears 5 times[0.043750000000000004, 0.0, 0.8312499999999999, 0.0125, 0.0125, 0.0, 0.1] appears 5 times[0.0625, 0.0625, 0.0, 0.08750000000000001, 0.08750000000000001, 0.0, 0.7000000000000001] appears 5 times[0.125, 0.125, 0.0, 0.07500000000000001, 0.07500000000000001, 0.0, 0.6000000000000001] appears 5 times[0.1875, 0.1875, 0.0, 0.0625, 0.0625, 0.0, 0.5] appears 5 times[0.25, 0.25, 0.0, 0.05, 0.05, 0.0, 0.4] appears 5 times[0.3125, 0.3125, 0.0, 0.037500000000000006, 0.037500000000000006, 0.0, 0.30000000000000004] appears 5 times[0.375, 0.375, 0.0, 0.025, 0.025, 0.0, 0.2] appears 5 times[0.4375, 0.4375, 0.0, 0.0125, 0.0125, 0.0, 0.1] appears 5 times[0.3333333333333333, 0.0, 0.0, 0.0, 0.0, 0.6666666666666666, 0.0] appears 15 times[0.29791666666666666, 0.0, 0.11875, 0.0, 0.0, 0.5833333333333333, 0.0] appears 5 times[0.2625, 0.0, 0.2375, 0.0, 0.0, 0.5, 0.0] appears 5 times[0.22708333333333333, 0.0, 0.35624999999999996, 0.0, 0.0, 0.41666666666666663, 0.0] appears 5 times[0.19166666666666665, 0.0, 0.475, 0.0, 0.0, 0.3333333333333333, 0.0] appears 5 times[0.15625, 0.0, 0.59375, 0.0, 0.0, 0.25, 0.0] appears 5 times[0.12083333333333333, 0.0, 0.7124999999999999, 0.0, 0.0, 0.16666666666666666, 0.0] appears 5 times[0.08541666666666667, 0.0, 0.8312499999999999, 0.0, 0.0, 0.08333333333333333, 0.0] appears 5 times[0.35416666666666663, 0.0625, 0.0, 0.0, 0.0, 0.5833333333333333, 0.0] appears 5 times[0.375, 0.125, 0.0, 0.0, 0.0, 0.5, 0.0] appears 5 times[0.3958333333333333, 0.1875, 0.0, 0.0, 0.0, 0.41666666666666663, 0.0] appears 5 times[0.41666666666666663, 0.25, 0.0, 0.0, 0.0, 0.3333333333333333, 0.0] appears 5 times[0.4375, 0.3125, 0.0, 0.0, 0.0, 0.25, 0.0] appears 5 times[0.4583333333333333, 0.375, 0.0, 0.0, 0.0, 0.16666666666666666, 0.0] appears 5 times[0.4791666666666667, 0.4375, 0.0, 0.0, 0.0, 0.08333333333333333, 0.0] appears 5 times[0.0, 0.0, 0.0, 0.01, 0.96, 0.0, 0.03] appears 15 times[0.00625, 0.0, 0.11875, 0.00875, 0.84, 0.0, 0.02625] appears 5 times[0.0125, 0.0, 0.2375, 0.0075, 0.72, 0.0, 0.0225] appears 5 times[0.018750000000000003, 0.0, 0.35624999999999996, 0.00625, 0.6, 0.0, 0.01875] appears 5 times[0.025, 0.0, 0.475, 0.005, 0.48, 0.0, 0.015] appears 5 times[0.03125, 0.0, 0.59375, 0.00375, 0.36, 0.0, 0.01125] appears 5 times[0.037500000000000006, 0.0, 0.7124999999999999, 0.0025, 0.24, 0.0, 0.0075] appears 5 times[0.043750000000000004, 0.0, 0.8312499999999999, 0.00125, 0.12, 0.0, 0.00375] appears 5 times[0.0625, 0.0625, 0.0, 0.00875, 0.84, 0.0, 0.02625] appears 5 times[0.125, 0.125, 0.0, 0.0075, 0.72, 0.0, 0.0225] appears 5 times[0.1875, 0.1875, 0.0, 0.00625, 0.6, 0.0, 0.01875] appears 5 times[0.25, 0.25, 0.0, 0.005, 0.48, 0.0, 0.015] appears 5 times[0.3125, 0.3125, 0.0, 0.00375, 0.36, 0.0, 0.01125] appears 5 times[0.375, 0.375, 0.0, 0.0025, 0.24, 0.0, 0.0075] appears 5 times[0.4375, 0.4375, 0.0, 0.00125, 0.12, 0.0, 0.00375] appears 5 times[0.0, 0.49, 0.01, 0.0, 0.0, 0.0, 0.5] appears 15 times[0.00625, 0.42874999999999996, 0.1275, 0.0, 0.0, 0.0, 0.4375] appears 5 times[0.0125, 0.3675, 0.245, 0.0, 0.0, 0.0, 0.375] appears 5 times[0.018750000000000003, 0.30625, 0.36249999999999993, 0.0, 0.0, 0.0, 0.3125] appears 5 times[0.025, 0.245, 0.48, 0.0, 0.0, 0.0, 0.25] appears 5 times[0.03125, 0.18375, 0.5975, 0.0, 0.0, 0.0, 0.1875] appears 5 times[0.037500000000000006, 0.1225, 0.7149999999999999, 0.0, 0.0, 0.0, 0.125] appears 5 times[0.043750000000000004, 0.06125, 0.8324999999999999, 0.0, 0.0, 0.0, 0.0625] appears 5 times[0.0625, 0.49124999999999996, 0.00875, 0.0, 0.0, 0.0, 0.4375] appears 5 times[0.125, 0.4925, 0.0075, 0.0, 0.0, 0.0, 0.375] appears 5 times[0.1875, 0.49375, 0.00625, 0.0, 0.0, 0.0, 0.3125] appears 5 times[0.25, 0.495, 0.005, 0.0, 0.0, 0.0, 0.25] appears 5 times[0.3125, 0.49624999999999997, 0.00375, 0.0, 0.0, 0.0, 0.1875] appears 5 times[0.375, 0.4975, 0.0025, 0.0, 0.0, 0.0, 0.125] appears 5 times[0.4375, 0.49875, 0.00125, 0.0, 0.0, 0.0, 0.0625] appears 5 times[0.0, 0.0, 0.03125, 0.11875000000000001, 0.11875000000000001, 0.03125, 0.7000000000000001] appears 5 times[0.0, 0.0, 0.0625, 0.1375, 0.1375, 0.0625, 0.6000000000000001] appears 5 times[0.0, 0.0, 0.09375, 0.15625, 0.15625, 0.09375, 0.5] appears 5 times[0.0, 0.0, 0.125, 0.175, 0.175, 0.125, 0.4] appears 5 times[0.0, 0.0, 0.15625, 0.19375, 0.19375, 0.15625, 0.30000000000000004] appears 5 times[0.0, 0.0, 0.1875, 0.2125, 0.2125, 0.1875, 0.2] appears 5 times[0.0, 0.0, 0.21875, 0.23125, 0.23125, 0.21875, 0.1] appears 5 times[0.29166666666666663, 0.0, 0.03125, 0.03125, 0.03125, 0.6145833333333333, 0.0] appears 5 times[0.25, 0.0, 0.0625, 0.0625, 0.0625, 0.5625, 0.0] appears 5 times[0.20833333333333331, 0.0, 0.09375, 0.09375, 0.09375, 0.5104166666666666, 0.0] appears 5 times[0.16666666666666666, 0.0, 0.125, 0.125, 0.125, 0.4583333333333333, 0.0] appears 5 times[0.125, 0.0, 0.15625, 0.15625, 0.15625, 0.40625, 0.0] appears 5 times[0.08333333333333333, 0.0, 0.1875, 0.1875, 0.1875, 0.35416666666666663, 0.0] appears 5 times[0.041666666666666664, 0.0, 0.21875, 0.21875, 0.21875, 0.3020833333333333, 0.0] appears 5 times[0.0, 0.0, 0.03125, 0.04, 0.87125, 0.03125, 0.02625] appears 5 times[0.0, 0.0, 0.0625, 0.07, 0.7825, 0.0625, 0.0225] appears 5 times[0.0, 0.0, 0.09375, 0.1, 0.69375, 0.09375, 0.01875] appears 5 times[0.0, 0.0, 0.125, 0.13, 0.605, 0.125, 0.015] appears 5 times[0.0, 0.0, 0.15625, 0.16, 0.51625, 0.15625, 0.01125] appears 5 times[0.0, 0.0, 0.1875, 0.19, 0.4275, 0.1875, 0.0075] appears 5 times[0.0, 0.0, 0.21875, 0.22, 0.33875, 0.21875, 0.00375] appears 5 times[0.0, 0.42874999999999996, 0.04, 0.03125, 0.03125, 0.03125, 0.4375] appears 5 times[0.0, 0.3675, 0.07, 0.0625, 0.0625, 0.0625, 0.375] appears 5 times[0.0, 0.30625, 0.1, 0.09375, 0.09375, 0.09375, 0.3125] appears 5 times[0.0, 0.245, 0.13, 0.125, 0.125, 0.125, 0.25] appears 5 times[0.0, 0.18375, 0.16, 0.15625, 0.15625, 0.15625, 0.1875] appears 5 times[0.0, 0.1225, 0.19, 0.1875, 0.1875, 0.1875, 0.125] appears 5 times[0.0, 0.06125, 0.22, 0.21875, 0.21875, 0.21875, 0.0625] appears 5 times[0.29166666666666663, 0.0, 0.0, 0.0125, 0.0125, 0.5833333333333333, 0.1] appears 5 times[0.25, 0.0, 0.0, 0.025, 0.025, 0.5, 0.2] appears 5 times[0.20833333333333331, 0.0, 0.0, 0.037500000000000006, 0.037500000000000006, 0.41666666666666663, 0.30000000000000004] appears 5 times[0.16666666666666666, 0.0, 0.0, 0.05, 0.05, 0.3333333333333333, 0.4] appears 5 times[0.125, 0.0, 0.0, 0.0625, 0.0625, 0.25, 0.5] appears 5 times[0.08333333333333333, 0.0, 0.0, 0.07500000000000001, 0.07500000000000001, 0.16666666666666666, 0.6000000000000001] appears 5 times[0.041666666666666664, 0.0, 0.0, 0.08750000000000001, 0.08750000000000001, 0.08333333333333333, 0.7000000000000001] appears 5 times[0.0, 0.0, 0.0, 0.02125, 0.8524999999999999, 0.0, 0.12625] appears 5 times[0.0, 0.0, 0.0, 0.0325, 0.745, 0.0, 0.2225] appears 5 times[0.0, 0.0, 0.0, 0.043750000000000004, 0.6375, 0.0, 0.31875000000000003] appears 5 times[0.0, 0.0, 0.0, 0.055, 0.53, 0.0, 0.41500000000000004] appears 5 times[0.0, 0.0, 0.0, 0.06625, 0.4225, 0.0, 0.51125] appears 5 times[0.0, 0.0, 0.0, 0.07750000000000001, 0.315, 0.0, 0.6075] appears 5 times[0.0, 0.0, 0.0, 0.08875000000000001, 0.20750000000000002, 0.0, 0.7037500000000001] appears 5 times[0.0, 0.42874999999999996, 0.00875, 0.0125, 0.0125, 0.0, 0.5375] appears 5 times[0.0, 0.3675, 0.0075, 0.025, 0.025, 0.0, 0.575] appears 5 times[0.0, 0.30625, 0.00625, 0.037500000000000006, 0.037500000000000006, 0.0, 0.6125] appears 5 times[0.0, 0.245, 0.005, 0.05, 0.05, 0.0, 0.65] appears 5 times[0.0, 0.18375, 0.00375, 0.0625, 0.0625, 0.0, 0.6875] appears 5 times[0.0, 0.1225, 0.0025, 0.07500000000000001, 0.07500000000000001, 0.0, 0.7250000000000001] appears 5 times[0.0, 0.06125, 0.00125, 0.08750000000000001, 0.08750000000000001, 0.0, 0.7625000000000001] appears 5 times[0.041666666666666664, 0.0, 0.0, 0.00875, 0.84, 0.08333333333333333, 0.02625] appears 5 times[0.08333333333333333, 0.0, 0.0, 0.0075, 0.72, 0.16666666666666666, 0.0225] appears 5 times[0.125, 0.0, 0.0, 0.00625, 0.6, 0.25, 0.01875] appears 5 times[0.16666666666666666, 0.0, 0.0, 0.005, 0.48, 0.3333333333333333, 0.015] appears 5 times[0.20833333333333331, 0.0, 0.0, 0.00375, 0.36, 0.41666666666666663, 0.01125] appears 5 times[0.25, 0.0, 0.0, 0.0025, 0.24, 0.5, 0.0075] appears 5 times[0.29166666666666663, 0.0, 0.0, 0.00125, 0.12, 0.5833333333333333, 0.00375] appears 5 times[0.041666666666666664, 0.42874999999999996, 0.00875, 0.0, 0.0, 0.08333333333333333, 0.4375] appears 5 times[0.08333333333333333, 0.3675, 0.0075, 0.0, 0.0, 0.16666666666666666, 0.375] appears 5 times[0.125, 0.30625, 0.00625, 0.0, 0.0, 0.25, 0.3125] appears 5 times[0.16666666666666666, 0.245, 0.005, 0.0, 0.0, 0.3333333333333333, 0.25] appears 5 times[0.20833333333333331, 0.18375, 0.00375, 0.0, 0.0, 0.41666666666666663, 0.1875] appears 5 times[0.25, 0.1225, 0.0025, 0.0, 0.0, 0.5, 0.125] appears 5 times[0.29166666666666663, 0.06125, 0.00125, 0.0, 0.0, 0.5833333333333333, 0.0625] appears 5 times[0.0, 0.42874999999999996, 0.00875, 0.00125, 0.12, 0.0, 0.44125] appears 5 times[0.0, 0.3675, 0.0075, 0.0025, 0.24, 0.0, 0.3825] appears 5 times[0.0, 0.30625, 0.00625, 0.00375, 0.36, 0.0, 0.32375] appears 5 times[0.0, 0.245, 0.005, 0.005, 0.48, 0.0, 0.265] appears 5 times[0.0, 0.18375, 0.00375, 0.00625, 0.6, 0.0, 0.20625] appears 5 times[0.0, 0.1225, 0.0025, 0.0075, 0.72, 0.0, 0.1475] appears 5 times[0.0, 0.06125, 0.00125, 0.00875, 0.84, 0.0, 0.08875] appears 5 times'" - ] - }, - "execution_count": 63, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "find_duplicates(compositions)" - ] - }, - { - "cell_type": "code", - "execution_count": 48, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -1616,7 +2127,7 @@ }, { "cell_type": "code", - "execution_count": 49, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -1858,7 +2369,7 @@ }, { "cell_type": "code", - "execution_count": 50, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -1867,7 +2378,7 @@ "9450" ] }, - "execution_count": 50, + "execution_count": 71, "metadata": {}, "output_type": "execute_result" } @@ -1878,7 +2389,7 @@ }, { "cell_type": "code", - "execution_count": 54, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -1889,7 +2400,7 @@ }, { "cell_type": "code", - "execution_count": 55, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -1897,7 +2408,7 @@ "output_type": "stream", "text": [ "['Ti', 'Zr', 'Hf', 'W', 'Nb', 'Ta', 'Mo']\n", - "Loaded TDB file with phases considered: ['LAVES_C36', 'HCP_A3', 'LAVES_C15', 'LAVES_C14', 'LIQUID', 'BCC_A2', 'FCC_A1']\n" + "Loaded TDB file with phases considered: ['LAVES_C14', 'LAVES_C36', 'LIQUID', 'BCC_A2', 'HCP_A3', 'FCC_A1', 'LAVES_C15']\n" ] } ], @@ -1911,7 +2422,7 @@ }, { "cell_type": "code", - "execution_count": 56, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -1920,7 +2431,7 @@ }, { "cell_type": "code", - "execution_count": 57, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -1936,7 +2447,7 @@ "['HCP_A3', 'BCC_A2']" ] }, - "execution_count": 57, + "execution_count": 75, "metadata": {}, "output_type": "execute_result" } @@ -1948,29 +2459,29 @@ }, { "cell_type": "code", - "execution_count": 58, + "execution_count": null, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Starting nodes: [0, 90, 1527, 1538, 107, 548, 178, 1574, 834, 545, 220, 78, 776, 1098, 1151]\n", + "Starting nodes: [0, 90, 1527, 1538, 335, 3, 893, 179, 1223, 773, 143, 13, 646, 1499, 918]\n", "Starting node: [0.0, 0.0, 0.25, 0.25, 0.25, 0.25, 0.0]\n", "Starting node: [0.3333333333333333, 0.0, 0.0, 0.0, 0.0, 0.6666666666666666, 0.0]\n", "Starting node: [0.0, 0.06125, 0.00125, 0.08750000000000001, 0.08750000000000001, 0.0, 0.7625000000000001]\n", "Starting node: [0.0, 0.0, 0.0, 0.01, 0.96, 0.0, 0.03]\n", - "Starting node: [0.375, 0.125, 0.0, 0.0, 0.0, 0.5, 0.0]\n", - "Starting node: [0.3333333333333333, 0.0, 0.0, 0.0, 0.0, 0.6666666666666666, 0.0]\n", - "Starting node: [0.44375, 0.4375, 0.11875, 0.0, 0.0, 0.0, 0.0]\n", - "Starting node: [0.3333333333333333, 0.0, 0.0, 0.0, 0.0, 0.6666666666666666, 0.0]\n", - "Starting node: [0.018750000000000003, 0.30625, 0.36249999999999993, 0.0, 0.0, 0.0, 0.3125]\n", - "Starting node: [0.20833333333333331, 0.0, 0.0, 0.00375, 0.36, 0.41666666666666663, 0.01125]\n", - "Starting node: [0.38125, 0.43625, 0.12, 0.0, 0.0, 0.0, 0.0625]\n", - "Starting node: [0.26875, 0.25, 0.35624999999999996, 0.0125, 0.0125, 0.0, 0.1]\n", - "Starting node: [0.00625, 0.0, 0.18125, 0.06875, 0.6625, 0.0625, 0.01875]\n", - "Starting node: [0.0125, 0.30625, 0.24375, 0.00125, 0.12, 0.0, 0.31625]\n", - "Starting node: [0.125, 0.0, 0.09375, 0.11875, 0.11875, 0.34375, 0.2]\n" + "Starting node: [0.125, 0.125, 0.09375, 0.0975, 0.45375, 0.09375, 0.01125]\n", + "Starting node: [0.018750000000000003, 0.0, 0.5125, 0.15625, 0.15625, 0.15625, 0.0]\n", + "Starting node: [0.03125, 0.0, 0.59375, 0.037500000000000006, 0.037500000000000006, 0.0, 0.30000000000000004]\n", + "Starting node: [0.5, 0.5, 0.0, 0.0, 0.0, 0.0, 0.0]\n", + "Starting node: [0.0, 0.0, 0.0, 0.1, 0.1, 0.0, 0.8]\n", + "Starting node: [0.0, 0.0, 0.25, 0.25, 0.25, 0.25, 0.0]\n", + "Starting node: [0.05, 0.0, 0.95, 0.0, 0.0, 0.0, 0.0]\n", + "Starting node: [0.0875, 0.0625, 0.56875, 0.09375, 0.09375, 0.09375, 0.0]\n", + "Starting node: [0.0625, 0.0625, 0.0, 0.00875, 0.84, 0.0, 0.02625]\n", + "Starting node: [0.0, 0.1225, 0.0025, 0.01875, 0.6124999999999999, 0.0, 0.24375000000000002]\n", + "Starting node: [0.0125, 0.0, 0.2375, 0.01875, 0.6124999999999999, 0.0, 0.11875000000000001]\n" ] } ], @@ -1984,7 +2495,7 @@ }, { "cell_type": "code", - "execution_count": 59, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -1993,7 +2504,7 @@ }, { "cell_type": "code", - "execution_count": 60, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -2005,20 +2516,20 @@ }, { "cell_type": "code", - "execution_count": 61, + "execution_count": null, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Queue: [0, 90, 1527, 1538, 107, 548, 178, 1574, 834, 545, 220, 78, 776, 1098, 1151]\n" + "Queue: [0, 90, 1527, 1538, 335, 3, 893, 179, 1223, 773, 143, 13, 646, 1499, 918]\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "1b12586211d44c169680382d72c60eb4", + "model_id": "a2fd6496cdce46efbf37a05a33473aae", "version_major": 2, "version_minor": 0 }, @@ -2033,41 +2544,19 @@ "name": "stdout", "output_type": "stream", "text": [ - "Calculations done: 15 | Explored points: 44 \n", - "Queue: [1408, 1, 1537, 1409, 768, 1145, 1152, 775, 1156, 9, 1546, 777, 1157, 271, 783, 784, 277, 406, 280, 1563, 415, 288, 544, 546, 547, 1567, 423, 553, 554, 555, 175, 176, 177, 562, 179, 322, 592, 600, 217, 216, 91, 219, 222, 607, 99, 100, 232, 1003, 108, 1004, 367, 114, 1144, 1273, 1274, 1150, 767]\n" - ] - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "34bbe4abb92e4d8d862f328456b8b413", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - " 0%| | 0/57 [00:00