In this example we show how to calculate migration barrier on the example of LiFePO4
Creation of intermediate images on server is done with nebmake.pl script. By using add_neb(upload_vts = 1) it will be uploaded to ~/tools/vts/
initialize header.PATH2NEBMAKE constant with path to nebmake.pl; either in header.py or project_conf.py
To use void search you should compile findpores.cpp. For linux use make_findpores script in siman folder. Fow windows use make_findpores.bat (mingw64v5.2 or Visuall C++ should be installed).
In [1]:
import sys
sys.path.append('/home/aksenov/Simulation_wrapper/siman')
from SSHTools import SSHTools
import header
from calc_manage import add_loop, res_loop, smart_structure_read
from database import write_database, read_database
from set_functions import read_vasp_sets
from neb import add_neb
%matplotlib inline
In [2]:
header.ssh_object = SSHTools()
header.ssh_object.setup(user="aksenov",host="10.30.16.62",pkey="/home/aksenov/.ssh/id_rsa")
header.PATH2PROJECT = 'neb' # path to project relative to your home folder on cluster
header.PATH2POTENTIALS = '/home/aksenov/scientific_projects/PAW_PBE_VASP' #path to VASP POTENTIALS
header.varset['static'].potdir = {3:'Li', 26:'Fe', 15:'P', 8:'O'} #subfolders with required potentials
read_vasp_sets([('ion_relax', 'static', {'ISIF':2, 'IBRION':1, 'NSW':20, 'EDIFFG':-0.025}, 'override')]) #new set 'ion_relax' from 'static' with 'NSW' = 20
Out[2]:
In [3]:
st = smart_structure_read(input_geo_file = 'in/mp-19017.POSCAR') #read LiFePO4 structure
Function add_neb() creates start and end configurations by removing or adding alkali ion atoms. The start and end configurations have 1 and 2 version numbers, respectively. All intermidiate images have version numbers starting from 3. Before setting run = 1 you can check created configurations in xyz folder: mp-19017_start.xyz and mp-19017_end.xyz
In [4]:
add_neb(st = st, it_new = 'LiFePO4', ise_new = 'ion_relax', it_new_folder = 'LiFePO4/neb',
images = 3, corenum = 15, upload_vts = 0, run = 0)
Out[4]:
In [8]:
header.warnings = 'yY' #control warning levels: n, e, y, Y
res_loop('LiFePO4.n3Li1v1', 'ion_relax', [1,2,3,4,5], show = 'fomepp', analys_type = 'neb' )
Out[8]:
In [ ]:
add_neb(RbVl, ise_new = '1u', images = 5, r_impurity = 1.5, search_type = 'existing_voids',
i_atom_to_move = 1, i_void_final = None) #
In [ ]:
# xr_final is coordinates of final position - void
it = add_neb(RbVl, ise_new = '1u', images = 5,
i_atom_to_move = 2, xr_final = [0.2, 0.1, 0.3], i_void_final = 10) # *i_void_final* is needed here only for producing unique name
Additional help:
res_loop(show = 'neb_geo', params = {'mep_shift_vector'})
neb_analysis()
write_xyz(sts = sts) # write traectory