These Oxidation Pool notebooks parallelize the oxidation finding routine for the dataset
In [3]:
import pymatgen_pars as pymt
import numpy as np
import pymatgen.analysis.bond_valence as bv
from collections import Counter
In [5]:
st=pymt.read_unique_data("unique_data.json")
In [6]:
import tqdm
st_masked=[i for i in st if np.all([a in bv.BV_PARAMS for a in i.composition.elements])]
BV=bv.BVAnalyzer()
In [7]:
valency2=[]
True_vals=[]
for i in tqdm.tqdm_notebook(st_masked[5000:10000]):
try:
valency2.append(BV.get_valences(i))
True_vals.append(i)
except:
pass
In [18]:
True_vals[0:20]
Out[18]:
In [19]:
import pickle
with open("val2.pickle","w") as f:
pickle.dump(valency2,f)
with open("True2.pickle","w") as f:
pickle.dump(True_vals,f)
In [22]:
t5=[i+20000 for i in True_vals]
In [24]:
True5=[st_masked[i] for i in t5]
In [26]:
True5[0],valency5[0]
Out[26]:
In [27]:
with open("val5.pickle","w") as f:
pickle.dump(valency5,f)
with open("True5.pickle","w") as f:
pickle.dump(True5,f)
In [28]:
True_vals2=[]
for i in tqdm.tqdm_notebook(st_masked[5000:10000]):
try:
BV.get_valences(i)
True_vals2.append(i)
except:
pass
In [29]:
with open("True2.pickle","w") as f:
pickle.dump(True_vals2,f)
In [30]:
bv.BV_PARAMS
Out[30]:
In [31]:
from pymatgen import Element
In [32]:
[e for e in Element if e not in bv.BV_PARAMS.keys()]
Out[32]:
In [ ]: