{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "ExecuteTime": { "end_time": "2019-08-05T13:40:01.957087Z", "start_time": "2019-08-05T13:39:56.667015Z" } }, "outputs": [], "source": [ "from pyiron import Project" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "ExecuteTime": { "end_time": "2019-08-05T13:40:11.823729Z", "start_time": "2019-08-05T13:40:01.959371Z" } }, "outputs": [], "source": [ "pr = Project('SPX_CHECK_ALL')\n", "pr.remove_jobs(recursive=True)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "ExecuteTime": { "end_time": "2019-08-05T13:40:11.831213Z", "start_time": "2019-08-05T13:40:11.827701Z" } }, "outputs": [], "source": [ "a_Fe = 2.832\n", "a_Al = 4.024" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "ExecuteTime": { "end_time": "2019-08-05T13:40:18.852884Z", "start_time": "2019-08-05T13:40:11.833338Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The job spx_Fe_nonmag was saved and received the ID: 1\n" ] } ], "source": [ "job = pr.create_job(pr.job_type.Sphinx, 'spx_Fe_nonmag')\n", "job.structure = pr.create_structure('Fe', 'bcc', a_Fe)\n", "job.calc_static()\n", "job.run()" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "ExecuteTime": { "end_time": "2019-08-05T13:40:28.062167Z", "start_time": "2019-08-05T13:40:18.898937Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The job spx_Fe_ferro was saved and received the ID: 2\n" ] } ], "source": [ "job = pr.create_job(pr.job_type.Sphinx, 'spx_Fe_ferro')\n", "job.structure = pr.create_structure('Fe', 'bcc', a_Fe)\n", "job.structure.set_initial_magnetic_moments([2, 2])\n", "job.calc_static()\n", "job.run()" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "ExecuteTime": { "end_time": "2019-08-05T13:40:50.061556Z", "start_time": "2019-08-05T13:40:28.107028Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The job spx_Fe_ferro_C was saved and received the ID: 3\n" ] } ], "source": [ "job = pr.create_job(pr.job_type.Sphinx, 'spx_Fe_ferro_C')\n", "job.structure = pr.create_structure('Fe', 'bcc', a_Fe)\n", "job.structure.set_initial_magnetic_moments([2, 2])\n", "job.structure += pr.create_atoms(elements=['C'], positions=[[0, 0, 0.5*a_Fe]], magmoms=[0])\n", "job.calc_static()\n", "job.run()" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "ExecuteTime": { "end_time": "2019-08-05T13:40:55.501734Z", "start_time": "2019-08-05T13:40:50.106756Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The job spx_Al was saved and received the ID: 4\n" ] } ], "source": [ "job = pr.create_job(pr.job_type.Sphinx, 'spx_Al')\n", "job.structure = pr.create_structure('Al', 'fcc', a_Al)\n", "job.calc_static()\n", "job.run()" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "ExecuteTime": { "end_time": "2019-08-05T13:41:01.362212Z", "start_time": "2019-08-05T13:40:55.546539Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The job spx_Al_restart was saved and received the ID: 5\n" ] } ], "source": [ "job = job.restart()\n", "job.run()" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "ExecuteTime": { "end_time": "2019-08-05T13:41:07.505810Z", "start_time": "2019-08-05T13:41:01.407472Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The job spx_Al_minimize was saved and received the ID: 6\n" ] } ], "source": [ "job = pr.create_job(pr.job_type.Sphinx, 'spx_Al_minimize')\n", "job.structure = pr.create_structure('Al', 'fcc', a_Al)\n", "job.structure.positions[0,0] += 0.01\n", "job.calc_minimize()\n", "job.run()" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "ExecuteTime": { "end_time": "2019-08-05T13:41:14.015270Z", "start_time": "2019-08-05T13:41:07.546940Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The job spx_check_overlap was saved and received the ID: 7\n" ] } ], "source": [ "job = pr.create_job(pr.job_type.Sphinx, 'spx_check_overlap')\n", "job.structure = pr.create_structure('Fe', 'bcc', 2.832)\n", "job.set_check_overlap(False)\n", "job.calc_static()\n", "job.run()" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "ExecuteTime": { "end_time": "2019-08-05T13:41:20.286494Z", "start_time": "2019-08-05T13:41:14.058179Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The job spx_symmetry was saved and received the ID: 8\n" ] } ], "source": [ "job = pr.create_job(pr.job_type.Sphinx, 'spx_symmetry')\n", "job.structure = pr.create_structure('Fe', 'bcc', 2.832)\n", "job.fix_symmetry = False\n", "job.calc_static()\n", "job.run()" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "ExecuteTime": { "end_time": "2019-08-05T13:41:31.018747Z", "start_time": "2019-08-05T13:41:20.328124Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The job spx_Fe_ferro_constraint was saved and received the ID: 9\n" ] } ], "source": [ "job = pr.create_job(pr.job_type.Sphinx, 'spx_Fe_ferro_constraint')\n", "job.structure = pr.create_structure('Fe', 'bcc', a_Fe)\n", "job.structure.set_initial_magnetic_moments([2, 2])\n", "job.fix_spin_constraint = True\n", "job.calc_static()\n", "job.run()" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "ExecuteTime": { "end_time": "2019-08-05T13:41:32.936706Z", "start_time": "2019-08-05T13:41:31.060102Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The job spx_Al_submit was saved and received the ID: 10\n" ] } ], "source": [ "job = pr.create_job(pr.job_type.Sphinx, 'spx_Al_submit')\n", "job.structure = pr.create_structure('Al', 'fcc', a_Al)\n", "job.calc_static()\n", "# job.server.queue = 'impi_hy'\n", "job.run()" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "ExecuteTime": { "end_time": "2019-08-05T13:41:38.933696Z", "start_time": "2019-08-05T13:41:32.982329Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The job spx_Al_save_memory was saved and received the ID: 11\n" ] } ], "source": [ "job = pr.create_job(pr.job_type.Sphinx, 'spx_Al_save_memory')\n", "job.structure = pr.create_structure('Al', 'fcc', a_Al)\n", "job.input['SaveMemory'] = True\n", "job.calc_static()\n", "job.run()" ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "ExecuteTime": { "end_time": "2019-08-05T13:41:56.987598Z", "start_time": "2019-08-05T13:41:38.996569Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The job sxextopt_Al was saved and received the ID: 12\n", "The job spx_Al_interactive was saved and received the ID: 13\n", "Ending calculation\n" ] } ], "source": [ "job = pr.create_job(pr.job_type.Sphinx, 'spx_Al_interactive')\n", "job.structure = pr.create_structure('Al', 'fcc', a_Al)\n", "job.structure.positions[0,0] += 0.01\n", "job.server.run_mode.interactive = True\n", "job.calc_static()\n", "minim = pr.create_job(pr.job_type.SxExtOptInteractive, 'sxextopt_Al')\n", "minim.ref_job = job\n", "minim.run()" ] }, { "cell_type": "code", "execution_count": 16, "metadata": { "ExecuteTime": { "end_time": "2019-08-05T13:41:57.072806Z", "start_time": "2019-08-05T13:39:56.683Z" } }, "outputs": [ { "data": { "text/plain": [ "array([6.041038, 5.85493 , 5.854974, 5.854982, 5.855377, 5.855084,\n", " 5.855078, 5.854986, 5.854775, 5.854941, 5.854247, 5.854506,\n", " 5.841481, 5.842393, 5.854424, 5.853549, 5.853233, 5.853254])" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "job['output/generic/dft/bands_e_fermi']" ] }, { "cell_type": "code", "execution_count": 17, "metadata": { "ExecuteTime": { "end_time": "2019-08-05T13:42:17.652385Z", "start_time": "2019-08-05T13:42:09.893056Z" } }, "outputs": [], "source": [ "pr.remove(enable=True)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.6" }, "latex_envs": { "LaTeX_envs_menu_present": true, "autoclose": false, "autocomplete": true, "bibliofile": "biblio.bib", "cite_by": "apalike", "current_citInitial": 1, "eqLabelWithNumbers": true, "eqNumInitial": 1, "hotkeys": { "equation": "Ctrl-E", "itemize": "Ctrl-I" }, "labels_anchors": false, "latex_user_defs": false, "report_style_numbering": false, "user_envs_cfg": false }, "toc": { "base_numbering": 1, "nav_menu": {}, "number_sections": true, "sideBar": true, "skip_h1_title": false, "title_cell": "Table of Contents", "title_sidebar": "Contents", "toc_cell": false, "toc_position": {}, "toc_section_display": true, "toc_window_display": false } }, "nbformat": 4, "nbformat_minor": 2 }