{ "metadata": { "name": "", "signature": "sha256:e499dc236e18ffaa7e1f82d0ed379ae7c14212e0f8a89cd3fe9f7be8b49ef356" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "###1. Install required packages:\n", "\n", "- Install [Anaconda](https://www.continuum.io/downloads). For linux it is enought to install just [IPython](https://ipython.org/install.html) or [Jupyter Notebook](https://jupyter.readthedocs.io/en/latest/install.html)\n", "- Install [paramiko](http://www.paramiko.org/) package by running in command line *pip install paramiko*\n", "- Download siman package from https://github.com/dimonaks/siman/archive/v0.2.zip \n", " and unpack into your folder, for example *'C:/programms/siman-0.2'*\n", "- Download SSHTools from http://zhugayevych.me/python/SSHTools/SSHTools.zip and unpack into *'C:/programms/SSHTools'*\n", "- open this file (*siman-0.2/tutorials/working_with_database.ipynb*) in Notebook\n", "\n", "###2. Import packages:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import sys\n", "sys.path.extend(['/home/aksenov/Simulation_wrapper/siman', '/home/aksenov/Simulation_wrapper/SSHTools'])\n", "sys.path.extend(['C:/programms/siman-0.2', 'C:/programms/SSHTools']) #path to siman package and SSHtools\n", "from analysis import calc_redox\n", "from database import get_from_database\n", "from SSHTools import SSHTools" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 2 }, { "cell_type": "markdown", "metadata": {}, "source": [ "###3. Initialize ssh:\n", "The database server address is '10.30.100.28'. Use your account data and private rsa key (created earlier and added to server)" ] }, { "cell_type": "code", "collapsed": false, "input": [ "ssh = SSHTools()\n", "# ssh.setup(user=\"Andriy.Zhugayevych\",host=\"cluster.skoltech.ru\",pkey=\"C:/Users/azh/Sys/Internet/SSH/skoltech/key2.ppk\")\n", "ssh.setup(user=\"aksenov\",host=\"10.30.100.28\",pkey=\"/home/aksenov/.ssh/id_rsa\")" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 3 }, { "cell_type": "markdown", "metadata": {}, "source": [ "###4. Access to database\n", "The first two arguments are concentrations. The second argument is material. \n", "To clarify the inquiry use *inquiry_keys*. To switch off messages use *silent = 1*" ] }, { "cell_type": "code", "collapsed": false, "input": [ "cl1, cl2 = get_from_database('x1', 'x0', 'LiTiS2', ssh_object = ssh)\n", "calc_redox(cl1, cl2)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "\n", "Files for x1 :\n", "1 LiTiS2/bin/x1_PBEpaw400.pickle\n", "2 LiTiS2/bin/x1_UGGA-Upaw400.pickle\n", "3 LiTiS2/em/bin/x1_PBEpaw400_vs1.pickle\n", "4 LiTiS2/em/bin/x1_PBEpaw400_vs3.pickle\n", "5 LiTiS2/em/bin/x1_PBEpaw400_vs4.pickle\n", "6 LiTiS2/em/bin/x1_PBEpaw400_vs5.pickle\n", "7 LiTiS2/em/bin/x1_PBEpaw400_vs2.pickle\n", "8 LiTiS2/em/bin/x1_PBEpaw400_cg4.pickle\n", "9 LiTiS2/em/bin/x1_UGGA-Upaw400_vs3.pickle\n", "10 LiTiS2/em/bin/x1_UGGA-Upaw400_vs7.pickle\n", "11 LiTiS2/em/bin/x1_UGGA-Upaw400_vs5.pickle\n", "12 LiTiS2/em/bin/x1_UGGA-Upaw400_cg4.pickle\n", "13 LiTiS2/em/bin/x1_UGGA-Upaw400_vs4.pickle\n", "14 LiTiS2/em/bin/x1_UGGA-Upaw400_vs1.pickle\n", "15 LiTiS2/em/bin/x1_UGGA-Upaw400_vs6.pickle\n", "16 LiTiS2/em/bin/x1_UGGA-Upaw400_vs2.pickle\n", "17 LiTiS2/aks/bin/x1_UPBE-Upaw400_s10_su_4uis_100.pickle\n", "\n", "Files for x0 :\n", "1 LiTiS2/bin/x0_PBEpaw400.pickle\n", "2 LiTiS2/em/bin/x0_PBEpaw400_vs1.pickle\n", "3 LiTiS2/em/bin/x0_PBEpaw400_vs6.pickle\n", "4 LiTiS2/em/bin/x0_PBEpaw400_vs3.pickle\n", "5 LiTiS2/em/bin/x0_PBEpaw400_vs7.pickle\n", "6 LiTiS2/em/bin/x0_PBEpaw400_vs9.pickle\n", "7 LiTiS2/em/bin/x0_PBEpaw400_vs8.pickle\n", "8 LiTiS2/em/bin/x0_PBEpaw400_vs4.pickle\n", "9 LiTiS2/em/bin/x0_PBEpaw400_vs2.pickle\n", "10 LiTiS2/em/bin/x0_PBEpaw400_vs5.pickle\n", "11 LiTiS2/aks/bin/x0_UPBE-Upaw400_id_su_s10_su_4uis_100.pickle\n", "\n", "I choose first entries for both concentrations: LiTiS2/bin/x1_PBEpaw400.pickle and LiTiS2/bin/x0_PBEpaw400.pickle \n", "\n", "-- LiTiS2 | 1.91 eV | -2.7 % \n" ] }, { "metadata": {}, "output_type": "pyout", "prompt_number": 3, "text": [ "{}" ] } ], "prompt_number": 3 }, { "cell_type": "code", "collapsed": false, "input": [ "#clarifying with 'PBEpaw400' and 'vs2' tags\n", "cl1, cl2 = get_from_database('x1', 'x0', 'LiTiS2', inquiry_keys = ['PBEpaw400', 'vs2'], ssh_object = ssh)\n", "calc_redox(cl1, cl2)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "\n", "Files for x1 :\n", "1 LiTiS2/em/bin/x1_PBEpaw400_vs2.pickle\n", "\n", "Files for x0 :\n", "1 LiTiS2/em/bin/x0_PBEpaw400_vs2.pickle\n", "\n", "I choose first entries for both concentrations: LiTiS2/em/bin/x1_PBEpaw400_vs2.pickle and LiTiS2/em/bin/x0_PBEpaw400_vs2.pickle \n", "\n", "-- LiTiS2 | 1.91 eV | 3.6 % \n" ] }, { "metadata": {}, "output_type": "pyout", "prompt_number": 4, "text": [ "{}" ] } ], "prompt_number": 4 }, { "cell_type": "code", "collapsed": false, "input": [ "for mat in ['LiCoO2', 'LiMn2O4', 'LiFePO4', 'NaFePO4', 'NaMnAsO4', 'LiVPO4F',\n", " 'KVPO4F', 'Na2FePO4F', 'KFeSO4F', 'LiVP2O7', 'Na2FeVF7']:\n", " cl1, cl2 = get_from_database('x1', 'x0', mat, inquiry_keys = ['UGGA'], silent = 1, ssh_object = ssh)\n", " calc_redox(cl1, cl2)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "-- LiCoO2 | 3.93 eV | -0.1 % \n", "-- LiMn2O4 | 3.63 eV | 5.7 % \n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "-- LiFePO4 | 3.51 eV | 4.3 % \n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "-- NaFePO4 | 3.09 eV | 12.5 % \n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "-- NaMnAsO4 | 3.53 eV | 13.9 % \n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "-- LiVPO4F | 3.93 eV | 7.3 % \n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "-- KVPO4F | 4.03 eV | 8.7 % \n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "-- Na2FePO4F | 4.11 eV | 3.9 % \n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "-- KFeSO4F | 3.79 eV | 10.5 % \n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "-- LiVP2O7 | 3.93 eV | 3.5 % \n" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "-- Na2FeVF7 | 4.22 eV | 7.6 % \n" ] } ], "prompt_number": 5 }, { "cell_type": "code", "collapsed": false, "input": [ "cl1, cl2 = get_from_database('x1', 'x0', 'LiFePO4', inquiry_keys = ['aks'], silent = 0, ssh_object = ssh)\n", "calc_redox(cl1, cl2)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "\n", "Files for x1 :\n", "1 LiFePO4/aks/bin/x1_UPBE-Upaw400_s10_su_4uis_100.pickle\n", "\n", "Files for x0 :\n", "1 LiFePO4/aks/bin/x0_UPBE-Upaw400_id_su_s10_su_4uis_100.pickle\n", "\n", "I choose first entries for both concentrations: LiFePO4/aks/bin/x1_UPBE-Upaw400_s10_su_4uis_100.pickle and LiFePO4/aks/bin/x0_UPBE-Upaw400_id_su_s10_su_4uis_100.pickle \n", "\n", "-- LiFePO4 | 3.45 eV | 4.7 % \n" ] }, { "metadata": {}, "output_type": "pyout", "prompt_number": 7, "text": [ "{}" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Submitting new calculation" ] }, { "cell_type": "code", "collapsed": false, "input": [ "add_loop('YBaCo4O7_exp', '1uY', 1, input_geo_format = 'cee_database', cee_args = {'section':'Catalysts'}, it_folder = 'YBaCo4O7/P63MC', )" ], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }