In [7]:
import sys
import numpy as np
from siman import header
from siman.header      import db # database dictionary
from siman.calc_manage import smart_structure_read, add, res
from siman.geo         import supercell
from siman.database    import read_database, write_database
from siman.SSHTools    import SSHTools
from siman.set_functions import read_vasp_sets
read_database() # read saved results


Out[7]:
({},
 {'static': <siman.set_functions.InputSet at 0x7f75d6d811d0>,
  'opt': <siman.set_functions.InputSet at 0x7f75d6ddf2b0>},
 56)

In [2]:
header.PATH2POTENTIALS = 'potcars/' # path to POTCAR files
header.ssh_object = SSHTools()
header.ssh_object.setup(user="Dmitry.Aksenov",host="10.30.17.12",pkey="/home/test_user/.ssh/id_rsa")

In [5]:
st = smart_structure_read(input_geo_file = 'POSCAR_LiFePO4_ifn_1m_1_end')
add('LiFePO4_t', 'static', 1, input_st = st, it_folder = 'LiFePO4', cluster = 'pardus', run = 0 )


-- check_kpoints(): Kpoint   mesh is:  [3, 5, 6] 

-- check_kpoints(): The actual k-spacings are  [0.2  0.21 0.22] 

-- POSCAR was written to /home/test_user/rec_bands/LiFePO4//LiFePO4_t.static/1.POSCAR 

-- Attention! ngkpt =  [3, 5, 6]  is adopted from struct_des which you provided for it  LiFePO4_t  and kspacing =  0.235 


Calculation ('LiFePO4_t', 'static', 1) successfully created

 

2075425.mgmt.skoltech.ru
/home/Dmitry.Aksenov
Job ID                    Name             User            Time Use S Queue
------------------------- ---------------- --------------- -------- - -----
2075420.mgmt.skoltech.ru   ...c2_m.su.4uiAg Dmitry.Aksenov         0 C batch          
2075425.mgmt.skoltech.ru   LiFePO4_t.static Dmitry.Aksenov         0 Q batch 

-- 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 

Out[5]:
'LiFePO4_t'

In [10]:
res('LiFePO4_t', 'static', 1, check_job = 0)



Max. F. tot  (meV/A) = 
[1107]; 

-- name                          |  energy(eV)|    Vector lenghts (A)   | Stresses (MPa)     | N MD, N SCF    
-- db['LiFePO4_t.static.1']      | -188.8995  |10.45;6.09;4.75|-12648,-10175,-7871 |   1,22, 22    
Out[10]:
(["db['LiFePO4_t.static.1']      | -188.8995  |10.45;6.09;4.75|-12648,-10175,-7871 |   1,22, 22   "],
 [])

In [11]:
band_pack = {'ICHARG':11, 'LORBIT':11, 'ISMEAR':0, 'SIGMA':0.1, 'NSW':0,
             'k_band_structure':[40, ('G', 0, 0, 0), ('X', 1, 0, 0), 
                                 ('S', 1, 1, 0), ('Y', 0, 1, 0), ('G', 0, 0, 0)]}

read_vasp_sets([('band', 'static',band_pack, 'over')])


Attention! You have chosen to override set band
 

Warning! You did not change  NSW  in band set
 

Out[11]:
{'static': <siman.set_functions.InputSet at 0x7f75d6d811d0>,
 'opt': <siman.set_functions.InputSet at 0x7f75d6ddf2b0>,
 'band': <siman.set_functions.InputSet at 0x7f75d64fd550>}

In [15]:
add('LiFePO4_t', 'static', 1, up = 'up2', run = 1, override = 1, 
    ise_new = 'band', inherit_option = 'full', savefile = 'ocx', cluster = 'pardus')


-- Warning! File ./LiFePO4/LiFePO4_t.if/LiFePO4_t.if.inherit.full.1.geo was replaced 

-- File xyz/LiFePO4_t.static.1.end.xyz was written 

-- inherit_ngkpt(): the k-grid from LiFePO4_t was inherited to LiFePO4_t.if 

-- check_kpoints(): Kpoint   mesh is:  [3, 5, 6] 

-- check_kpoints(): The actual k-spacings are  [0.2  0.21 0.22] 

-- POSCAR was written to /home/test_user/rec_bands/LiFePO4//LiFePO4_t.if.band/1.POSCAR 

-- Writing k-points file for band structure calculation. 


Calculation ('LiFePO4_t.if', 'band', 1) successfully created

 

-- Copying CHGCAR for band structure 

-- File 1.CHGCAR was succesfully copied to /home/Dmitry.Aksenov/./LiFePO4//LiFePO4_t.if.band// with new name CHGCAR 

2075479.mgmt.skoltech.ru
/home/Dmitry.Aksenov
Job ID                    Name             User            Time Use S Queue
------------------------- ---------------- --------------- -------- - -----
2075420.mgmt.skoltech.ru   ...c2_m.su.4uiAg Dmitry.Aksenov         0 C batch          
2075425.mgmt.skoltech.ru   LiFePO4_t.static Dmitry.Aksenov  00:12:09 C batch          
2075479.mgmt.skoltech.ru   ...PO4_t.if.band Dmitry.Aksenov         0 Q batch 

-- 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 

Out[15]:
'LiFePO4_t.if'

In [ ]:
res('LiFePO4_t.if', 'band', 1, up = 'x', show = 'fo')

In [ ]:
p = 'LiFePO4_t.if.band'
plot_bands(vasprun_dos   = p+'/1.vasprun.xml', 
           vasprun_bands = p+'/1.vasprun.xml',
           kpoints       = p+'/KPOINTS',
           element = 'Fe',
           ylim = (-3,10))