diff --git a/docs/source/jupyter/quantum-espresso.ipynb b/docs/source/jupyter/quantum-espresso.ipynb index a412a50..bd30ba4 100644 --- a/docs/source/jupyter/quantum-espresso.ipynb +++ b/docs/source/jupyter/quantum-espresso.ipynb @@ -1,4 +1,25 @@ { + "metadata": { + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": 3 + }, + "orig_nbformat": 2, + "kernelspec": { + "name": "python_defaultSpec_1597048081738", + "display_name": "Python 3.8.2 64-bit" + } + }, + "nbformat": 4, + "nbformat_minor": 2, "cells": [ { "cell_type": "markdown", @@ -34,7 +55,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -54,7 +75,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -71,7 +92,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -92,9 +113,18 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "metadata": {}, - "outputs": [], + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": "" + }, + "metadata": {}, + "execution_count": 4 + } + ], "source": [ "Si.add(SiPseudo, Si1)\n", "Si.add(QE.Mass(value = 28.085, unit = \"amu\"))\n", @@ -112,9 +142,18 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": {}, - "outputs": [], + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": "[,\n ,\n ]" + }, + "metadata": {}, + "execution_count": 5 + } + ], "source": [ "SiParams.add(QE.CellParameterX(vector = (0.5, 0.5, 0), unit = \"\"),\n", " QE.CellParameterY(vector = (0.5, 0, 0.5), unit = \"\"),\n", @@ -130,9 +169,18 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "metadata": {}, - "outputs": [], + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": "" + }, + "metadata": {}, + "execution_count": 6 + } + ], "source": [ "sim.add(SiCell)\n", "sim.add(Si)\n", @@ -148,9 +196,18 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 7, "metadata": {}, - "outputs": [], + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": "" + }, + "metadata": {}, + "execution_count": 7 + } + ], "source": [ "sim.add(QE.Pressure(value = 100, unit = \"kbar\"))\n", "sim.add(QE.StressTensor(tensor2 = np.zeros((3, 3)), unit = \"kbar\"))" @@ -165,9 +222,17 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 8, + "metadata": { + "tags": [] + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": "- Cuds object:\n uuid: 903145ad-50e3-46fc-9d28-1aa1ec364e8a\n type: qe.Simulation\n superclasses: cuba.Class, cuba.Entity, qe.Simulation\n description: \n All components of the simulation that are needed to run the model\n\n |_Relationship qe.HAS_PART:\n - qe.Cell cuds object:\n . uuid: 67a0fcb4-4977-49df-9bcb-13bca17b2763\n . |_Relationship qe.HAS_PART:\n . - qe.Atom cuds object:\n . . uuid: 1bad1c25-609a-4bc0-8c65-3c0167cfdbe2\n . . |_Relationship qe.HAS_PART:\n . . - qe.Position cuds object:\n . . uuid: c70afbb3-0012-488d-8059-b44d775c6b23\n . . vector: [0. 0. 0.]\n . . unit: \n . - qe.CellParams cuds object:\n . . uuid: f444899a-e850-4ab2-b79e-c91026523eb3\n . . |_Relationship qe.HAS_PART:\n . . - qe.CellParameterX cuds object:\n . . . uuid: 0ebdeed9-1d8a-498d-94c9-bafccb05d652\n . . . vector: [0.5 0.5 0. ]\n . . . unit: \n . . - qe.CellParameterY cuds object:\n . . . uuid: fea8789c-8c07-49f9-9971-8d42bdd6ba3f\n . . . vector: [0.5 0. 0.5]\n . . . unit: \n . . - qe.CellParameterZ cuds object:\n . . uuid: 1474d106-4204-428d-827b-2d5e2cb4af51\n . . vector: [0. 0.5 0.5]\n . . unit: \n . - qe.Celldm1 cuds object:\n . uuid: be8f3915-3eb7-4221-a441-345eda51832b\n . unit: au\n . value: 5.4307\n - qe.Element cuds object named :\n . uuid: 8628ceb7-1c02-4014-95a4-d9450aab4753\n . |_Relationship qe.HAS_PART:\n . - qe.Atom cuds object:\n . . uuid: 1bad1c25-609a-4bc0-8c65-3c0167cfdbe2\n . . (already printed)\n . - qe.Mass cuds object:\n . . uuid: 1aee515a-4e12-40e6-bbd6-23bf5c95fe84\n . . unit: amu\n . . value: 28.085\n . - qe.PSEUDOPOTENTIAL cuds object named :\n . uuid: cb27bcb9-27c6-48a9-8f1e-8977b16567c5\n - qe.K_POINTS cuds object:\n . uuid: 6847a5f0-8d20-4f73-9eb3-043e78053182\n . vector: [7. 7. 7.]\n . unit: \n - qe.Pressure cuds object:\n . uuid: d281d93d-fd10-41fd-868c-0cda3b510431\n . unit: kbar\n . value: 100.0\n - qe.StressTensor cuds object:\n uuid: 2f302f8b-89b8-4d7a-a2a7-4f6e19737f00\n unit: kbar\n tensor2: [[0. 0. 0.]\n [0. 0. 0.]\n [0. 0. 0.]]\n" + } + ], "source": [ "pretty_print(sim)" ] @@ -181,16 +246,24 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 12, + "metadata": { + "tags": [] + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": "Running calculation...\n/mnt/c/iwm/docs/si.pwscf.in\npw.x -i /mnt/c/iwm/docs/si.pwscf.in > /mnt/c/iwm/docs/si.pwscf.out\n" + } + ], "source": [ - "session = qeSession(root = \"\")\n", + "session = qeSession()\n", "quantum_espresso_wrapper = QE.QEWrapper(session = session)\n", "quantum_espresso_wrapper.add(sim)\n", "print(\"Running calculation...\")\n", "\n", - "quantum_espresso_wrapper.session._run(prefix = \"si\", command_type = \"pw.x\", calculation_type = \"scf\")" + "quantum_espresso_wrapper.session._run(simulation = sim, prefix = \"si\", command_type = \"pw.x\", calculation_type = \"scf\", root = \"\", CONTROL = {'pseudo_dir': \"'.'\"})" ] }, { @@ -202,9 +275,17 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 10, + "metadata": { + "tags": [] + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": "- Cuds object:\n uuid: 903145ad-50e3-46fc-9d28-1aa1ec364e8a\n type: qe.Simulation\n superclasses: cuba.Class, cuba.Entity, qe.Simulation\n description: \n All components of the simulation that are needed to run the model\n\n |_Relationship qe.HAS_PART:\n - qe.Cell cuds object:\n . uuid: 67a0fcb4-4977-49df-9bcb-13bca17b2763\n . |_Relationship qe.HAS_PART:\n . - qe.Atom cuds object:\n . . uuid: 1bad1c25-609a-4bc0-8c65-3c0167cfdbe2\n . . |_Relationship qe.HAS_PART:\n . . - qe.Position cuds object:\n . . uuid: c70afbb3-0012-488d-8059-b44d775c6b23\n . . vector: [0. 0. 0.]\n . . unit: \n . - qe.CellParams cuds object:\n . . uuid: f444899a-e850-4ab2-b79e-c91026523eb3\n . . |_Relationship qe.HAS_PART:\n . . - qe.CellParameterX cuds object:\n . . . uuid: 0ebdeed9-1d8a-498d-94c9-bafccb05d652\n . . . vector: [0.5 0.5 0. ]\n . . . unit: \n . . - qe.CellParameterY cuds object:\n . . . uuid: fea8789c-8c07-49f9-9971-8d42bdd6ba3f\n . . . vector: [0.5 0. 0.5]\n . . . unit: \n . . - qe.CellParameterZ cuds object:\n . . uuid: 1474d106-4204-428d-827b-2d5e2cb4af51\n . . vector: [0. 0.5 0.5]\n . . unit: \n . - qe.Celldm1 cuds object:\n . uuid: be8f3915-3eb7-4221-a441-345eda51832b\n . unit: au\n . value: 5.4307\n - qe.Element cuds object named :\n . uuid: 8628ceb7-1c02-4014-95a4-d9450aab4753\n . |_Relationship qe.HAS_PART:\n . - qe.Atom cuds object:\n . . uuid: 1bad1c25-609a-4bc0-8c65-3c0167cfdbe2\n . . (already printed)\n . - qe.Mass cuds object:\n . . uuid: 1aee515a-4e12-40e6-bbd6-23bf5c95fe84\n . . unit: amu\n . . value: 28.085\n . - qe.PSEUDOPOTENTIAL cuds object named :\n . uuid: cb27bcb9-27c6-48a9-8f1e-8977b16567c5\n - qe.K_POINTS cuds object:\n . uuid: 6847a5f0-8d20-4f73-9eb3-043e78053182\n . vector: [7. 7. 7.]\n . unit: \n - qe.Pressure cuds object:\n . uuid: d281d93d-fd10-41fd-868c-0cda3b510431\n . unit: kbar\n . value: 100.0\n - qe.PwOut cuds object:\n . uuid: 15c6637e-9124-44dd-a1d3-f225203c1bfc\n . path: /mnt/c/iwm/docs/si.pwscf.out\n - qe.StressTensor cuds object:\n uuid: 2f302f8b-89b8-4d7a-a2a7-4f6e19737f00\n unit: kbar\n tensor2: [[0. 0. 0.]\n [0. 0. 0.]\n [0. 0. 0.]]\n" + } + ], "source": [ "pretty_print(sim)" ] @@ -234,9 +315,21 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 21, "metadata": {}, - "outputs": [], + "outputs": [ + { + "output_type": "error", + "ename": "TypeError", + "evalue": "_run() missing 1 required positional argument: 'simulation'", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mquantum_espresso_wrapper\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msession\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_run\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mprefix\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"si\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcommand_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"pw.x\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcalculation_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"bands\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0mquantum_espresso_wrapper\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msession\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_run\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mprefix\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"si\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcommand_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"bands.x\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcalculation_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mTypeError\u001b[0m: _run() missing 1 required positional argument: 'simulation'" + ] + } + ], "source": [ "quantum_espresso_wrapper.session._run(prefix = \"si\", command_type = \"pw.x\", calculation_type = \"bands\")\n", "quantum_espresso_wrapper.session._run(prefix = \"si\", command_type = \"bands.x\", calculation_type = \"\")" @@ -253,18 +346,38 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 22, "metadata": {}, - "outputs": [], + "outputs": [ + { + "output_type": "error", + "ename": "TypeError", + "evalue": "_run() missing 1 required positional argument: 'simulation'", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mquantum_espresso_wrapper\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msession\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_run\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mprefix\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"si\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcommand_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"pw.x\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcalculation_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"relax\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mIONS\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m{\u001b[0m\u001b[0;34m'ion_dynamics'\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m\"'bfgs'\"\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", + "\u001b[0;31mTypeError\u001b[0m: _run() missing 1 required positional argument: 'simulation'" + ] + } + ], "source": [ "quantum_espresso_wrapper.session._run(prefix = \"si\", command_type = \"pw.x\", calculation_type = \"relax\", IONS = {'ion_dynamics': \"'bfgs'\"})" ] }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 23, + "metadata": { + "tags": [] + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": "- Cuds object:\n uuid: 90361daa-6905-4566-979e-11b3b0dd4e85\n type: qe.Simulation\n superclasses: cuba.Class, cuba.Entity, qe.Simulation\n description: \n All components of the simulation that are needed to run the model\n\n |_Relationship qe.HAS_PART:\n - qe.Cell cuds object:\n . uuid: f7548873-28e9-4d76-86da-6fddb687d29e\n . |_Relationship qe.HAS_PART:\n . - qe.Atom cuds object:\n . . uuid: 53114a1f-ebbb-4e4b-a115-080925d9eaa8\n . . |_Relationship qe.HAS_PART:\n . . - qe.Position cuds object:\n . . uuid: 48d4483b-7c72-4454-8041-581dc73fd216\n . . vector: [0. 0. 0.]\n . . unit: \n . - qe.CellParams cuds object:\n . . uuid: 9d61e990-2509-474b-935e-618ca11bb40d\n . . |_Relationship qe.HAS_PART:\n . . - qe.CellParameterX cuds object:\n . . . uuid: f2655054-efa7-4b39-9f0a-cf6453be68ec\n . . . vector: [0.5 0.5 0. ]\n . . . unit: \n . . - qe.CellParameterY cuds object:\n . . . uuid: 55647575-ea8f-4ef7-aee8-2a3333a4ec71\n . . . vector: [0.5 0. 0.5]\n . . . unit: \n . . - qe.CellParameterZ cuds object:\n . . uuid: 92be9c63-ee80-46d9-8853-ccb562e94a5b\n . . vector: [0. 0.5 0.5]\n . . unit: \n . - qe.Celldm1 cuds object:\n . . uuid: db776c65-9d2e-448e-bc55-5fe0f9c7ee75\n . . unit: au\n . . value: 5.4307\n . - qe.Element cuds object named :\n . uuid: 14dacecb-023c-4ace-9e83-35b0ecaa1032\n . |_Relationship qe.HAS_PART:\n . - qe.Atom cuds object:\n . . uuid: 53114a1f-ebbb-4e4b-a115-080925d9eaa8\n . . (already printed)\n . - qe.Atom cuds object:\n . . uuid: c2094a19-8769-4298-a50a-be1f8befe5bf\n . . |_Relationship qe.HAS_PART:\n . . - qe.Position cuds object:\n . . uuid: 4087ce47-16f0-4449-b8c4-4577e6d265e2\n . . vector: [0.25 0.25 0.26]\n . . unit: \n . - qe.Mass cuds object:\n . . uuid: 5d57a768-d315-4f91-84a8-fcfad9aae382\n . . unit: amu\n . . value: 28.085\n . - qe.PSEUDOPOTENTIAL cuds object named :\n . uuid: ab064983-5cc9-418e-a9e7-3357c04388f5\n - qe.Element cuds object named :\n . uuid: 14dacecb-023c-4ace-9e83-35b0ecaa1032\n . (already printed)\n - qe.K_POINTS cuds object:\n . uuid: 38385f3b-128c-491f-91f4-44de15055d56\n . vector: [7. 7. 7.]\n . unit: \n - qe.Pressure cuds object:\n . uuid: 57f47fa8-4588-488f-8c89-fa8a0f37f567\n . unit: kbar\n . value: 100.0\n - qe.Pressure cuds object:\n . uuid: beac6977-01cf-4b4d-b89b-1b4d4eecf5c0\n . unit: kbar\n . value: 100.0\n - qe.PwOut cuds object:\n . uuid: 7890c86c-9f6f-42b3-a02c-cd57f5307c75\n . path: si.pwscf.out\n - qe.PwOut cuds object:\n . uuid: 5c7e31f9-6e55-4ddf-af62-5a3e58811464\n . path: si.pwscf.out\n - qe.StressTensor cuds object:\n . uuid: 16b33d51-0f6d-4451-a919-da494a13082f\n . unit: kbar\n . tensor2: [[0. 0. 0.]\n [0. 0. 0.]\n [0. 0. 0.]]\n - qe.StressTensor cuds object:\n uuid: 590ad64e-d110-4711-90c6-0986bb53dafc\n unit: kbar\n tensor2: [[0. 0. 0.]\n [0. 0. 0.]\n [0. 0. 0.]]\n" + } + ], "source": [ "pretty_print(sim)" ] @@ -278,9 +391,24 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 24, + "metadata": { + "tags": [] + }, + "outputs": [ + { + "output_type": "error", + "ename": "ValueError", + "evalue": " is already in the container", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0mSi2\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mQE\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mAtom\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0mSi2\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0madd\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mQE\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mPosition\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvector\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;36m0.25\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m0.25\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m0.26\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0munit\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0mSiCell\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0madd\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mSi\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4\u001b[0m \u001b[0mSi\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0madd\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mSi2\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mpretty_print\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0msim\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/mnt/c/IWM/osp-core-3.4.0-dev/osp/core/cuds.py\u001b[0m in \u001b[0;36madd\u001b[0;34m(self, rel, *args)\u001b[0m\n\u001b[1;32m 161\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mrel\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_neighbors\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0marg\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0muid\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_neighbors\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mrel\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 162\u001b[0m \u001b[0mmessage\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'{!r} is already in the container'\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 163\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mValueError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmessage\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mformat\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0marg\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 164\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msession\u001b[0m \u001b[0;34m!=\u001b[0m \u001b[0marg\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msession\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 165\u001b[0m \u001b[0marg\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_recursive_store\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0marg\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mnext\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mold_objects\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mValueError\u001b[0m: is already in the container" + ] + } + ], "source": [ "Si2 = QE.Atom()\n", "Si2.add(QE.Position(vector = (0.25, 0.25, 0.26), unit = \"\"))\n", @@ -291,9 +419,21 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 25, "metadata": {}, - "outputs": [], + "outputs": [ + { + "output_type": "error", + "ename": "TypeError", + "evalue": "_run() missing 1 required positional argument: 'simulation'", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mquantum_espresso_wrapper\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msession\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_run\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mprefix\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"si\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcommand_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"pw.x\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcalculation_type\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"relax\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mIONS\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m{\u001b[0m\u001b[0;34m'ion_dynamics'\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m\"'bfgs'\"\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0mpretty_print\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0msim\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mTypeError\u001b[0m: _run() missing 1 required positional argument: 'simulation'" + ] + } + ], "source": [ "quantum_espresso_wrapper.session._run(prefix = \"si\", command_type = \"pw.x\", calculation_type = \"relax\", IONS = {'ion_dynamics': \"'bfgs'\"})\n", "pretty_print(sim)"