{ "cells": [ { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "({},\n", " {'static': ,\n", " 'opt': },\n", " 56)" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import sys\n", "import numpy as np\n", "from siman import header\n", "from siman.header import db # database dictionary\n", "from siman.calc_manage import smart_structure_read, add, res\n", "from siman.geo import supercell\n", "from siman.database import read_database, write_database\n", "from siman.SSHTools import SSHTools\n", "from siman.set_functions import read_vasp_sets\n", "read_database() # read saved results" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "header.PATH2POTENTIALS = 'potcars/' # path to POTCAR files\n", "header.ssh_object = SSHTools()\n", "header.ssh_object.setup(user=\"Dmitry.Aksenov\",host=\"10.30.17.12\",pkey=\"/home/test_user/.ssh/id_rsa\")" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "-- check_kpoints(): Kpoint mesh is: [3, 5, 6] \n", "\n", "-- check_kpoints(): The actual k-spacings are [0.2 0.21 0.22] \n", "\n", "-- POSCAR was written to /home/test_user/rec_bands/LiFePO4//LiFePO4_t.static/1.POSCAR \n", "\n", "-- Attention! ngkpt = [3, 5, 6] is adopted from struct_des which you provided for it LiFePO4_t and kspacing = 0.235 \n", "\n", "\n", "Calculation ('LiFePO4_t', 'static', 1) successfully created\n", "\n", " \n", "\n", "2075425.mgmt.skoltech.ru\n", "/home/Dmitry.Aksenov\n", "Job ID Name User Time Use S Queue\n", "------------------------- ---------------- --------------- -------- - -----\n", "2075420.mgmt.skoltech.ru ...c2_m.su.4uiAg Dmitry.Aksenov 0 C batch \n", "2075425.mgmt.skoltech.ru LiFePO4_t.static Dmitry.Aksenov 0 Q batch \n", "\n", "-- To read results use res_loop('LiFePO4_t', ['static'], [1], show = 'fo' ) # , on 2018-12-05 ; possible options for show: fit, fo, fop, en, mag, magp, smag, maga, occ, occ1, mep, mepp \n", "\n" ] }, { "data": { "text/plain": [ "'LiFePO4_t'" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "st = smart_structure_read(input_geo_file = 'POSCAR_LiFePO4_ifn_1m_1_end')\n", "add('LiFePO4_t', 'static', 1, input_st = st, it_folder = 'LiFePO4', cluster = 'pardus', run = 0 )" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "\n", "Max. F. tot (meV/A) = \n", "[1107]; \n", "\n", "-- name | energy(eV)| Vector lenghts (A) | Stresses (MPa) | N MD, N SCF \n", "-- db['LiFePO4_t.static.1'] | -188.8995 |10.45;6.09;4.75|-12648,-10175,-7871 | 1,22, 22 \n" ] }, { "data": { "text/plain": [ "([\"db['LiFePO4_t.static.1'] | -188.8995 |10.45;6.09;4.75|-12648,-10175,-7871 | 1,22, 22 \"],\n", " [])" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "res('LiFePO4_t', 'static', 1, check_job = 0)" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "Attention! You have chosen to override set band\n", " \n", "\n", "Warning! You did not change NSW in band set\n", " \n", "\n" ] }, { "data": { "text/plain": [ "{'static': ,\n", " 'opt': ,\n", " 'band': }" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "band_pack = {'ICHARG':11, 'LORBIT':11, 'ISMEAR':0, 'SIGMA':0.1, 'NSW':0,\n", " 'k_band_structure':[40, ('G', 0, 0, 0), ('X', 1, 0, 0), \n", " ('S', 1, 1, 0), ('Y', 0, 1, 0), ('G', 0, 0, 0)]}\n", "\n", "read_vasp_sets([('band', 'static',band_pack, 'over')])" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "-- Warning! File ./LiFePO4/LiFePO4_t.if/LiFePO4_t.if.inherit.full.1.geo was replaced \n", "\n", "-- File xyz/LiFePO4_t.static.1.end.xyz was written \n", "\n", "-- inherit_ngkpt(): the k-grid from LiFePO4_t was inherited to LiFePO4_t.if \n", "\n", "-- check_kpoints(): Kpoint mesh is: [3, 5, 6] \n", "\n", "-- check_kpoints(): The actual k-spacings are [0.2 0.21 0.22] \n", "\n", "-- POSCAR was written to /home/test_user/rec_bands/LiFePO4//LiFePO4_t.if.band/1.POSCAR \n", "\n", "-- Writing k-points file for band structure calculation. \n", "\n", "\n", "Calculation ('LiFePO4_t.if', 'band', 1) successfully created\n", "\n", " \n", "\n", "-- Copying CHGCAR for band structure \n", "\n", "-- File 1.CHGCAR was succesfully copied to /home/Dmitry.Aksenov/./LiFePO4//LiFePO4_t.if.band// with new name CHGCAR \n", "\n", "2075479.mgmt.skoltech.ru\n", "/home/Dmitry.Aksenov\n", "Job ID Name User Time Use S Queue\n", "------------------------- ---------------- --------------- -------- - -----\n", "2075420.mgmt.skoltech.ru ...c2_m.su.4uiAg Dmitry.Aksenov 0 C batch \n", "2075425.mgmt.skoltech.ru LiFePO4_t.static Dmitry.Aksenov 00:12:09 C batch \n", "2075479.mgmt.skoltech.ru ...PO4_t.if.band Dmitry.Aksenov 0 Q batch \n", "\n", "-- To read results use res_loop('LiFePO4_t.if', ['band'], [1], show = 'fo' ) # , on 2018-12-05 ; possible options for show: fit, fo, fop, en, mag, magp, smag, maga, occ, occ1, mep, mepp \n", "\n" ] }, { "data": { "text/plain": [ "'LiFePO4_t.if'" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "add('LiFePO4_t', 'static', 1, up = 'up2', run = 1, override = 1, \n", " ise_new = 'band', inherit_option = 'full', savefile = 'ocx', cluster = 'pardus')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "res('LiFePO4_t.if', 'band', 1, up = 'x', show = 'fo')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "p = 'LiFePO4_t.if.band'\n", "plot_bands(vasprun_dos = p+'/1.vasprun.xml', \n", " vasprun_bands = p+'/1.vasprun.xml',\n", " kpoints = p+'/KPOINTS',\n", " element = 'Fe',\n", " ylim = (-3,10))" ] } ], "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.5" } }, "nbformat": 4, "nbformat_minor": 2 }