{ "metadata": { "name": "", "signature": "sha256:1ffc5e4c5cd29abc660f380890a34a321a791c92490173effbd39142f8a8215c" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "###Choosing k-point meshes\n", "To create consistent k-meshes for different supercells\n", "tt is convinient to use spacing between k-points in reciprocal space - [KSPACING](https://cms.mpi.univie.ac.at/vasp/vasp/KSPACING_tag_KGAMMA_tag.html)\n", "\n", "Typical values \n", "\n", "- for insulators: 0.3 A-1\n", "- for metals: 0.2 A-1\n", "- for DOS: 0.1-0.15 A-1" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import sys\n", "sys.path.append('/home/aksenov/Simulation_wrapper/siman')\n", "from geo import calc_k_point_mesh\n", "\n", "rprimd = [ \n", "[ 11.191118, 0.028037, 1.832131],\n", "[ -0.506595, 9.927410, -1.680211],\n", "[ 0.091572, 0.056075, 10.385107],\n", "]\n", "\n", "calc_k_point_mesh(rprimd, kspacing = 0.3)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "-- I recommend k-point mesh: (2, 2, 2) with k-spacings: [ 0.28 0.32 0.31] \n", "-- Other options are: \n", "-- Mesh | k-spacings \n", "-- (1, 1, 1) | [ 0.56 0.63 0.62] \n", "-- (1, 1, 2) | [ 0.56 0.63 0.31] \n", "-- (1, 1, 3) | [ 0.56 0.63 0.21] \n", "-- (1, 2, 1) | [ 0.56 0.32 0.62] \n", "-- (1, 2, 2) | [ 0.56 0.32 0.31] \n", "-- (1, 2, 3) | [ 0.56 0.32 0.21] \n", "-- (1, 3, 1) | [ 0.56 0.21 0.62] \n", "-- (1, 3, 2) | [ 0.56 0.21 0.31] \n", "-- (1, 3, 3) | [ 0.56 0.21 0.21] \n", "-- (2, 1, 1) | [ 0.28 0.63 0.62] \n", "-- (2, 1, 2) | [ 0.28 0.63 0.31] \n", "-- (2, 1, 3) | [ 0.28 0.63 0.21] \n", "-- (2, 2, 1) | [ 0.28 0.32 0.62] \n", "-- (2, 2, 2) | [ 0.28 0.32 0.31] \n", "-- (2, 2, 3) | [ 0.28 0.32 0.21] \n", "-- (2, 3, 1) | [ 0.28 0.21 0.62] \n", "-- (2, 3, 2) | [ 0.28 0.21 0.31] \n", "-- (2, 3, 3) | [ 0.28 0.21 0.21] \n", "-- (3, 1, 1) | [ 0.19 0.63 0.62] \n", "-- (3, 1, 2) | [ 0.19 0.63 0.31] \n", "-- (3, 1, 3) | [ 0.19 0.63 0.21] \n", "-- (3, 2, 1) | [ 0.19 0.32 0.62] \n", "-- (3, 2, 2) | [ 0.19 0.32 0.31] \n", "-- (3, 2, 3) | [ 0.19 0.32 0.21] \n", "-- (3, 3, 1) | [ 0.19 0.21 0.62] \n", "-- (3, 3, 2) | [ 0.19 0.21 0.31] \n", "-- (3, 3, 3) | [ 0.19 0.21 0.21] \n" ] }, { "metadata": {}, "output_type": "pyout", "prompt_number": 1, "text": [ "(2, 2, 2)" ] } ], "prompt_number": 1 }, { "cell_type": "markdown", "metadata": {}, "source": [ "###Run calculation with explicitly provided k-point mesh; parameter ngkpt" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from calc_manage import add_loop\n", "import header\n", "header.varset['static'].potdir = {3:'Li'} # provide potential\n", "\n", "add_loop('Li2', 'static', 1, input_geo_file = 'in/Li2.POSCAR', it_folder = 'Li', ngkpt = (12, 12, 12))" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "-- add_loop(), you provided *ngkpt*, I add (12, 12, 12) to description of Li2 for kspacing 0.235 \n", "\n", "-- You provided the following geo file explicitly in/Li2.POSCAR ; Version of file does not matter, I use *curver*= 1 as a new version \n", "\n", "-- check_kpoints(): Kpoint mesh is: (12, 12, 12) \n", "\n", "-- check_kpoints(): The actual k-spacings are [ 0.17 0.17 0.17] \n", "\n", "-- Attention! ngkpt = (12, 12, 12) is adopted from struct_des which you provided for it Li2 and kspacing = 0.235 \n", "\n", "\n", "Calculation ('Li2', 'static', 1) successfully created\n", "\n", " \n", "\n" ] }, { "metadata": {}, "output_type": "pyout", "prompt_number": 3, "text": [ "'Li2'" ] } ], "prompt_number": 3 }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }