Finger_Pool Notebooks are the ones used to create the fingerprints (without oxidation states for structures with <50 atoms in the unit cell. This could have been done in one cell using the Multiprocess.Pool.map function however I wanted to track progress using tqdm which is harder to do with Multiprocess module.
In [1]:
import fingerprint as fp
struct_all=s_all=fp.read_pickle("struct_all.pickle")
In [2]:
structs_lim_50=[x for x in struct_all if len(x.species)<50]
In [3]:
import tqdm
import numpy as np
import itertools
def phi_getter(i):
phi_ones=fp.get_phi_scaled(i,obser='ones')
phi_Z=fp.get_phi_scaled(i,obser='Z')
phi_Chi=fp.get_phi_scaled(i,obser='Chi')
return list(itertools.chain(phi_ones,phi_Z,phi_Chi))
lim1=3700
lim2=7400
finger_part=np.array([phi_getter(structs_lim_50[lim1+i]) for i in tqdm.tqdm_notebook(range(lim2-lim1))])
finger_part.shape
Out[3]:
In [4]:
np.savetxt("finger_part2.npz",finger_part)
In [ ]: