In [1]:
from siman import header
from siman.SSHTools import SSHTools
from siman.calc_manage import add_loop, res_loop
from siman.database import write_database, read_database
from siman.set_functions import read_vasp_sets
from siman.dos_functions import plot_dos
from siman.bands import plot_bands
%matplotlib inline
read_database() # read database if exist
header.PATH2PROJECT = 'topologic' # 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 = {83:'Bi_pv', 34:'Se'} #subfolders with required potentials
header.ssh_object = SSHTools()
header.ssh_object.setup(user="aksenov",host="10.30.16.62",pkey="/home/aksenov/.ssh/id_rsa")
In [2]:
#Creating new sets for DOS and Bands
dos_pack = {'NSW':0, 'LORBIT':11,
'ISMEAR':-5, 'LAECHG':'.TRUE.',
'EMIN':-10, 'EMAX':14,
'NEDOS':2000, 'KSPACING':0.15,
'savefile':'d'}
read_vasp_sets([('dos', 'static',dos_pack, 'override')]) #new set 'dos' from 'static'
band_pack = {'ICHARG':11, 'LORBIT':11,
'k_band_structure':[40, ('G', 0, 0, 0), ('Z', 0.5, 0.5, 0.5),
('F', 0.5, 0.5, 0), ('G', 0, 0, 0), ('L', 0, 0.5, 0)]
}
read_vasp_sets([('band', 'static', band_pack, 'override')]) #new set 'band' from static
Out[2]:
In [4]:
#calculate charge density
add_loop('Bi2Se3.rho', 'static', 1, input_geo_file = 'in/Bi2Se3_mp-541837_computed.POSCAR', it_folder = 'Bi2Se3', run = 0)
Out[4]:
In [5]:
res_loop('Bi2Se3.rho', 'static', 1)
Out[5]:
In [3]:
#inherit charge density and make non-selfconsistent calculation of band structure
add_loop('Bi2Se3.rho', 'static', 1, ise_new = 'band', inherit_option = 'full', savefile = 'ocx', override = 1, run = 1)
Out[3]:
In [4]:
#calculate dos
add_loop('Bi2Se3.rho', 'dos', 1, savefile = 'ocx', input_geo_file = 'Bi2Se3_mp-541837_computed.POSCAR', it_folder = 'Bi2Se3', run = 1)
Out[4]:
In [13]:
#read results, download xml files
res_loop('Bi2Se3.rho.if', 'band', 1, up = 'x')
res_loop('Bi2Se3.rho', 'dos', 1, up = 'x')
Out[13]:
In [12]:
#plot bands and dos using xml files
plot_bands(vasprun_dos = 'Bi2Se3/Bi2Se3.rho.dos/1.vasprun.xml',
vasprun_bands = 'Bi2Se3/Bi2Se3.rho.if.band/1.vasprun.xml',
kpoints = 'Bi2Se3/Bi2Se3.rho.if.band/KPOINTS',
element = 'Bi',
ylim = (-2,2))