1. Install required packages:

2. Import packages:

In [2]:
import sys
sys.path.extend(['/home/aksenov/Simulation_wrapper/siman', '/home/aksenov/Simulation_wrapper/SSHTools'])
sys.path.extend(['C:/programms/siman-0.2', 'C:/programms/SSHTools']) #path to siman package and SSHtools
from analysis import calc_redox
from database import get_from_database
from SSHTools import SSHTools

3. Initialize ssh:

The database server address is '10.30.100.28'. Use your account data and private rsa key (created earlier and added to server)

In [3]:
ssh = SSHTools()
# ssh.setup(user="Andriy.Zhugayevych",host="cluster.skoltech.ru",pkey="C:/Users/azh/Sys/Internet/SSH/skoltech/key2.ppk")
ssh.setup(user="aksenov",host="10.30.100.28",pkey="/home/aksenov/.ssh/id_rsa")

4. Access to database

The first two arguments are concentrations. The second argument is material. To clarify the inquiry use inquiry_keys. To switch off messages use silent = 1

In [3]:
cl1, cl2 = get_from_database('x1', 'x0', 'LiTiS2', ssh_object = ssh)
calc_redox(cl1, cl2)
Files for x1 :
1 LiTiS2/bin/x1_PBEpaw400.pickle
2 LiTiS2/bin/x1_UGGA-Upaw400.pickle
3 LiTiS2/em/bin/x1_PBEpaw400_vs1.pickle
4 LiTiS2/em/bin/x1_PBEpaw400_vs3.pickle
5 LiTiS2/em/bin/x1_PBEpaw400_vs4.pickle
6 LiTiS2/em/bin/x1_PBEpaw400_vs5.pickle
7 LiTiS2/em/bin/x1_PBEpaw400_vs2.pickle
8 LiTiS2/em/bin/x1_PBEpaw400_cg4.pickle
9 LiTiS2/em/bin/x1_UGGA-Upaw400_vs3.pickle
10 LiTiS2/em/bin/x1_UGGA-Upaw400_vs7.pickle
11 LiTiS2/em/bin/x1_UGGA-Upaw400_vs5.pickle
12 LiTiS2/em/bin/x1_UGGA-Upaw400_cg4.pickle
13 LiTiS2/em/bin/x1_UGGA-Upaw400_vs4.pickle
14 LiTiS2/em/bin/x1_UGGA-Upaw400_vs1.pickle
15 LiTiS2/em/bin/x1_UGGA-Upaw400_vs6.pickle
16 LiTiS2/em/bin/x1_UGGA-Upaw400_vs2.pickle
17 LiTiS2/aks/bin/x1_UPBE-Upaw400_s10_su_4uis_100.pickle

Files for x0 :
1 LiTiS2/bin/x0_PBEpaw400.pickle
2 LiTiS2/em/bin/x0_PBEpaw400_vs1.pickle
3 LiTiS2/em/bin/x0_PBEpaw400_vs6.pickle
4 LiTiS2/em/bin/x0_PBEpaw400_vs3.pickle
5 LiTiS2/em/bin/x0_PBEpaw400_vs7.pickle
6 LiTiS2/em/bin/x0_PBEpaw400_vs9.pickle
7 LiTiS2/em/bin/x0_PBEpaw400_vs8.pickle
8 LiTiS2/em/bin/x0_PBEpaw400_vs4.pickle
9 LiTiS2/em/bin/x0_PBEpaw400_vs2.pickle
10 LiTiS2/em/bin/x0_PBEpaw400_vs5.pickle
11 LiTiS2/aks/bin/x0_UPBE-Upaw400_id_su_s10_su_4uis_100.pickle

I choose first entries for both concentrations: LiTiS2/bin/x1_PBEpaw400.pickle and LiTiS2/bin/x0_PBEpaw400.pickle 

-- LiTiS2                         |       1.91 eV |       -2.7 % 
Out[3]:
{}
In [4]:
#clarifying with 'PBEpaw400' and 'vs2' tags
cl1, cl2 = get_from_database('x1', 'x0', 'LiTiS2', inquiry_keys = ['PBEpaw400', 'vs2'], ssh_object = ssh)
calc_redox(cl1, cl2)
Files for x1 :
1 LiTiS2/em/bin/x1_PBEpaw400_vs2.pickle

Files for x0 :
1 LiTiS2/em/bin/x0_PBEpaw400_vs2.pickle

I choose first entries for both concentrations: LiTiS2/em/bin/x1_PBEpaw400_vs2.pickle and LiTiS2/em/bin/x0_PBEpaw400_vs2.pickle 

-- LiTiS2                         |       1.91 eV |        3.6 % 
Out[4]:
{}
In [5]:
for mat in ['LiCoO2', 'LiMn2O4', 'LiFePO4', 'NaFePO4', 'NaMnAsO4', 'LiVPO4F',
            'KVPO4F', 'Na2FePO4F', 'KFeSO4F', 'LiVP2O7', 'Na2FeVF7']:
    cl1, cl2 = get_from_database('x1', 'x0', mat, inquiry_keys = ['UGGA'], silent = 1, ssh_object = ssh)
    calc_redox(cl1, cl2)
-- LiCoO2                         |       3.93 eV |       -0.1 % 
-- LiMn2O4                        |       3.63 eV |        5.7 % 
-- LiFePO4                        |       3.51 eV |        4.3 % 
-- NaFePO4                        |       3.09 eV |       12.5 % 
-- NaMnAsO4                       |       3.53 eV |       13.9 % 
-- LiVPO4F                        |       3.93 eV |        7.3 % 
-- KVPO4F                         |       4.03 eV |        8.7 % 
-- Na2FePO4F                      |       4.11 eV |        3.9 % 
-- KFeSO4F                        |       3.79 eV |       10.5 % 
-- LiVP2O7                        |       3.93 eV |        3.5 % 
-- Na2FeVF7                       |       4.22 eV |        7.6 % 
In [7]:
cl1, cl2 = get_from_database('x1', 'x0', 'LiFePO4', inquiry_keys = ['aks'], silent = 0, ssh_object = ssh)
calc_redox(cl1, cl2)
Files for x1 :
1 LiFePO4/aks/bin/x1_UPBE-Upaw400_s10_su_4uis_100.pickle

Files for x0 :
1 LiFePO4/aks/bin/x0_UPBE-Upaw400_id_su_s10_su_4uis_100.pickle

I choose first entries for both concentrations: LiFePO4/aks/bin/x1_UPBE-Upaw400_s10_su_4uis_100.pickle and LiFePO4/aks/bin/x0_UPBE-Upaw400_id_su_s10_su_4uis_100.pickle 

-- LiFePO4                        |       3.45 eV |        4.7 % 
Out[7]:
{}

Submitting new calculation

In [ ]:
add_loop('YBaCo4O7_exp', '1uY', 1, input_geo_format = 'cee_database', cee_args = {'section':'Catalysts'},  it_folder = 'YBaCo4O7/P63MC', )