{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "ExecuteTime": { "end_time": "2018-05-16T13:40:06.181056Z", "start_time": "2018-05-16T13:40:04.311156Z" } }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/Users/jan/anaconda3/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.\n", " from ._conv import register_converters as _register_converters\n" ] } ], "source": [ "from pyiron import Project" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "ExecuteTime": { "end_time": "2018-05-16T13:40:06.224666Z", "start_time": "2018-05-16T13:40:06.185149Z" } }, "outputs": [], "source": [ "pr = Project('FeC')" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "ExecuteTime": { "end_time": "2018-05-16T13:40:06.237269Z", "start_time": "2018-05-16T13:40:06.227203Z" } }, "outputs": [], "source": [ "pr.remove_jobs()" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "ExecuteTime": { "end_time": "2018-05-16T13:40:06.275561Z", "start_time": "2018-05-16T13:40:06.243585Z" } }, "outputs": [], "source": [ "basis = pr.create_structure('Fe', 'bcc', 2.78)" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "ExecuteTime": { "end_time": "2018-05-16T13:40:06.294010Z", "start_time": "2018-05-16T13:40:06.278517Z" } }, "outputs": [], "source": [ "basis[1] = 'C'" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "ExecuteTime": { "end_time": "2018-05-16T13:40:06.306804Z", "start_time": "2018-05-16T13:40:06.297622Z" } }, "outputs": [], "source": [ "job = pr.create_job(pr.job_type.Lammps, 'lammpsFeC')" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "ExecuteTime": { "end_time": "2018-05-16T13:40:06.318457Z", "start_time": "2018-05-16T13:40:06.313111Z" } }, "outputs": [], "source": [ "job.structure = basis " ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "ExecuteTime": { "end_time": "2018-05-16T13:40:06.336867Z", "start_time": "2018-05-16T13:40:06.325240Z" } }, "outputs": [], "source": [ "job.potential = 'Fe_C_Hepburn_Ackland_eam'" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "ExecuteTime": { "end_time": "2018-05-16T13:40:06.992900Z", "start_time": "2018-05-16T13:40:06.343563Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The job lammpsFeC was saved and received the ID: 10\n" ] } ], "source": [ "job.run()" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "ExecuteTime": { "end_time": "2018-05-16T13:40:07.027750Z", "start_time": "2018-05-16T13:40:06.995987Z" } }, "outputs": [ { "data": { "text/plain": [ "array([-7.47519366])" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "job.output.energy_tot" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "ExecuteTime": { "end_time": "2018-05-16T13:40:07.063571Z", "start_time": "2018-05-16T13:40:07.033286Z" } }, "outputs": [ { "data": { "text/plain": [ "array([-7.47519366])" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "job.output.energy_pot" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "ExecuteTime": { "end_time": "2018-05-16T13:40:07.099836Z", "start_time": "2018-05-16T13:40:07.067199Z" } }, "outputs": [ { "data": { "text/plain": [ "array([[[0. , 0. , 0. ],\n", " [1.39, 1.39, 1.39]]])" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "job.output.positions" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "ExecuteTime": { "end_time": "2018-05-16T13:40:07.138155Z", "start_time": "2018-05-16T13:40:07.106171Z" } }, "outputs": [ { "data": { "text/plain": [ "array([[[ 2.78000000e+00, 0.00000000e+00, 0.00000000e+00],\n", " [-1.15608312e-32, 2.78000000e+00, 0.00000000e+00],\n", " [-1.15608312e-32, -1.15608312e-32, 2.78000000e+00]]])" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "job.output.cells" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "ExecuteTime": { "end_time": "2018-05-16T13:40:07.173932Z", "start_time": "2018-05-16T13:40:07.145512Z" } }, "outputs": [ { "data": { "text/plain": [ "array([[353781.39474433, 353781.39474433, 353781.39474433]])" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "job.output.pressures" ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "ExecuteTime": { "end_time": "2018-05-16T13:40:07.202983Z", "start_time": "2018-05-16T13:40:07.177425Z" } }, "outputs": [ { "data": { "text/plain": [ "array([0.])" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "job.output.temperature" ] }, { "cell_type": "code", "execution_count": 16, "metadata": { "ExecuteTime": { "end_time": "2018-05-16T13:40:07.237020Z", "start_time": "2018-05-16T13:40:07.206605Z" } }, "outputs": [ { "data": { "text/plain": [ "array([[[-2.22044605e-16, -9.02056208e-17, 2.08166817e-17],\n", " [ 4.61694282e-49, 4.61694282e-49, -1.11022302e-16]]])" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "job.output.forces" ] }, { "cell_type": "code", "execution_count": 17, "metadata": { "ExecuteTime": { "end_time": "2018-05-16T13:40:07.264895Z", "start_time": "2018-05-16T13:40:07.239790Z" } }, "outputs": [ { "data": { "text/plain": [ "array([0.])" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "job.output.steps" ] }, { "cell_type": "code", "execution_count": 18, "metadata": { "ExecuteTime": { "end_time": "2018-05-16T13:40:07.291500Z", "start_time": "2018-05-16T13:40:07.267149Z" } }, "outputs": [ { "data": { "text/plain": [ "array([0])" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "job.output.time" ] }, { "cell_type": "code", "execution_count": 19, "metadata": { "ExecuteTime": { "end_time": "2018-05-16T13:40:07.319872Z", "start_time": "2018-05-16T13:40:07.295010Z" } }, "outputs": [ { "data": { "text/plain": [ "array([21.484952])" ] }, "execution_count": 19, "metadata": {}, "output_type": "execute_result" } ], "source": [ "job.output.volume" ] }, { "cell_type": "code", "execution_count": 20, "metadata": { "ExecuteTime": { "end_time": "2018-05-16T13:40:07.351623Z", "start_time": "2018-05-16T13:40:07.324075Z" } }, "outputs": [ { "data": { "text/plain": [ "array([[[0. , 0. , 0. ],\n", " [1.39, 1.39, 1.39]]])" ] }, "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ "job.output.unwrapped_positions" ] }, { "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.6.4" }, "toc": { "nav_menu": {}, "number_sections": true, "sideBar": true, "skip_h1_title": false, "toc_cell": false, "toc_position": {}, "toc_section_display": "block", "toc_window_display": false } }, "nbformat": 4, "nbformat_minor": 2 }