Siman contains your calculation parameters (e-cut, number of k-points and so on) in separate structures which are called sets. To reduce possible errors, for each combination of parameters your should created new set. This is very easy by inheriting them and changing only a few of parameters at a time. All sets are stored in predefined dictionary header.varset


In [1]:
import sys
sys.path.extend(['/home/aksenov/Simulation_wrapper/siman'])
import header
from set_functions import read_vasp_sets, init_default_sets
init_default_sets() # read pre-defined Siman sets

Create new set 'sk1' from 'static' and change number of k-points:


In [2]:
read_vasp_sets([('sk1','static', {'ngkpt':[1,5,5]})])


Out[2]:
{'static': <set_functions.InputSet at 0x7f0d34ae8160>,
 'sk1': <set_functions.InputSet at 0x7f0d2e3ea208>}

In [3]:
header.varset['sk1'].printme()


-- s.vasp_params['NELMIN']        = 4  
-- s.vasp_params['LPLANE']        = .TRUE.  
-- s.vasp_params['NSIM']          = 4  
-- s.vasp_params['EDIFFG']        = 0  
-- s.vasp_params['IBRION']        = 1  
-- s.vasp_params['SIGMA']         = 0.2  
-- s.vasp_params['EDIFF']         = 6e-06  
-- s.vasp_params['NSW']           = 0  
-- s.vasp_params['PREC']          = Normal  
-- s.vasp_params['LREAL']         = Auto  
-- s.vasp_params['NELM']          = 50  
-- s.vasp_params['MAXMIX']        = 40  
-- s.vasp_params['ALGO']          = Normal  
-- s.vasp_params['NPAR']          = 1  
-- s.vasp_params['ENAUG']         = 776.16  
-- s.vasp_params['ENCUT']         = 441.0  
-- s.vasp_params['ISMEAR']        = 2  
-- s.vasp_params['ISIF']          = 2  
-- s.vasp_params['KGAMMA']        = .TRUE.  
-- s.vasp_params['ISTART']        = 0  
-- s.vasp_params['LSCALU']        = .FALSE.  
-- ngkpt: [5, 5, 1] 

-- POTDIR: {0: 'n', 1: 'H', 2: 'He', 3: 'Li', 4: 'Be', 5: 'B', 6: 'C', 7: 'N', 8: 'O', 9: 'F', 10: 'Ne', 11: 'Na', 12: 'Mg', 13: 'Al', 14: 'Si', 15: 'P', 16: 'S', 17: 'Cl', 18: 'Ar', 19: 'K', 20: 'Ca', 21: 'Sc', 22: 'Ti', 23: 'V', 24: 'Cr', 25: 'Mn', 26: 'Fe', 27: 'Co', 28: 'Ni', 29: 'Cu', 30: 'Zn', 31: 'Ga', 32: 'Ge', 33: 'As', 34: 'Se', 35: 'Br', 36: 'Kr', 37: 'Rb', 38: 'Sr', 39: 'Y', 40: 'Zr', 41: 'Nb', 42: 'Mo', 43: 'Tc', 44: 'Ru', 45: 'Rh', 46: 'Pd', 47: 'Ag', 48: 'Cd', 49: 'In', 50: 'Sn', 51: 'Sb', 52: 'Te', 53: 'I', 54: 'Xe', 55: 'Cs', 56: 'Ba', 57: 'La', 58: 'Ce', 59: 'Pr', 60: 'Nd', 61: 'Pm', 62: 'Sm', 63: 'Eu', 64: 'Gd', 65: 'Tb', 66: 'Dy', 67: 'Ho', 68: 'Er', 69: 'Tm', 70: 'Yb', 71: 'Lu', 72: 'Hf', 73: 'Ta', 74: 'W', 75: 'Re', 76: 'Os', 77: 'Ir', 78: 'Pt', 79: 'Au', 80: 'Hg', 81: 'Tl', 82: 'Pb', 83: 'Bi', 84: 'Po', 85: 'At', 86: 'Rn', 87: 'Fr', 88: 'Ra', 89: 'Ac', 90: 'Th', 91: 'Pa', 92: 'U', 93: 'Np', 94: 'Pu', 95: 'Am', 96: 'Cm', 97: 'Bk', 98: 'Cf', 99: 'Es', 100: 'Fm', 101: 'Md', 102: 'No', 103: 'Lr', 104: 'Rf', 105: 'Db', 106: 'Sg', 107: 'Bh', 108: 'Hs', 109: 'Mt', 110: 'Ds', 111: 'Rg', 112: 'Cn', 114: 'Uuq', 116: 'Uuh', 200: 'octa'} 

To updated existing set use 'over' key


In [ ]:
read_vasp_sets([('sk1','static', {'ngkpt':[1,5,5]}, 'over') ])

The function can deal with list of changes:


In [ ]:
set_update_list = [
('sk1','static', {'ngkpt':[1,5,5]}),
('sk2','static', {'ngkpt':[2,5,5]}),
('sk3','static', {'ngkpt':[3,5,5]}),
]
read_vasp_sets(set_update_list)

To update all sets use override_global


In [ ]:
read_vasp_sets(set_update_list, override_global= 1 )

Updating incar parameters, which could depend on structure


In [ ]:
center_of_mass = [0.5, 0.5, 0.5]
add_loop('Li.suf', 'sk1', 1, input_geo_file = 'Li/Li_suf_5.opt/1.POSCAR', params = {'update_set_dic':{'DIPOL':center_of_mass}})