{ "metadata": { "name": "", "signature": "sha256:57f3c4901abedc28be343715c8602d83788799716131fe6816d6366c1169b50c" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "##Remove cations from cathode structure\n", "In this example part of Na ions is removed from fully intercalated structure of Na2FePO4F" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import sys, numpy\n", "sys.path.extend(['/home/aksenov/Simulation_wrapper/siman'])\n", "from calc_manage import smart_structure_read\n", "from geo import create_deintercalated_structure\n", "\n", "st = smart_structure_read(input_geo_file = 'in/Na2FePO4F.POSCAR') #read initial structure from POSCAR\n", "\n", "st1 = create_deintercalated_structure(st, 'Na', del_pos = 1) #find non-equivalent positions of Na and remove position 1\n", "st2 = create_deintercalated_structure(st, 'Na', del_pos = 2) #find non-equivalent positions of Na and remove position 2" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "-- You provided the following geo file explicitly in/Na2FePO4F.POSCAR ; Version of file does not matter, I use *curver*= 1 as a new version \n", "\n", "-- I have found 2 non-equivalent positions for Na : dict_keys([56, 64]) \n", "\n", "-- Choose from the following list using *del_pos*: \n", "-- 1 ---> 56 \n", "-- 2 ---> 64 \n", "-- You have chosen position: 56 \n", "\n", "-- I have found 2 non-equivalent positions for Na : dict_keys([56, 64]) \n", "\n", "-- Choose from the following list using *del_pos*: \n", "-- 1 ---> 56 \n", "-- 2 ---> 64 \n", "-- You have chosen position: 64 \n", "\n" ] } ], "prompt_number": 1 }, { "cell_type": "code", "collapsed": false, "input": [ "st.write_xyz()\n", "st1.write_xyz()\n", "st2.write_xyz()" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "-- File xyz/Na2FePO4F.xyz was written \n", "\n", "-- File xyz/Na2FePO4F.Na56del.xyz was written \n", "\n", "-- File xyz/Na2FePO4F.Na64del.xyz was written \n", "\n" ] } ], "prompt_number": 2 }, { "cell_type": "markdown", "metadata": {}, "source": [ "To remover all atoms a general method can be used" ] }, { "cell_type": "code", "collapsed": false, "input": [ "stDS = st.remove_atoms(['Na'])" ], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }