I used openbabel to convert the .cif files to .smi. Here are parts of the .smi corresponding to two .cif files (I have many .cif files):
[C](=[C]\F)\F.C(=C(\[C][C]O[Zn@]12O[C](c3ccc([C]4O[Zn](O[C](c5ccc(C(=O)O[Zn]([O])O[C](c6ccc(C(=O)O[Zn](OC(=O)c7ccc(C(=O)O2)cc7)[O])cc6)O[Zn]O[C])cc5)O[Zn]O[Zn]O4)O[C][C]/C(=C(\[C][C]/C(=[C]/F)/F)/F)/F)cc3)O[Zn]([O])O1)/F)(\[C][C]/C(=C(\[C])/F)/F)/F.c12C(=O)O[Zn](O[C])OC(=O)c3ccc([C](O[Zn@@]4([O])O[C](c5ccc([C]6O[Zn](O[C](c7ccc(C(=O)O[Zn](OC(=O)c(cc1)cc2)O[C])cc7)O[Zn]O[Zn]O6)[O])cc5)O[Zn](O[C][C]/C(=C(\[C])/F)/F)O4)O[Zn])cc3.[C]/C(=C(\[C])/F)/F.[C]/C(=C(\[C])/F)/F.[C]/C(=C(\[C])/F)/F.[C]/C(=[C]/F)/F.[C](=[C]\F)\F.[C](=[C]\F)\F.[C](=[C]\F)\F.[C](=[C]\F)\F.[C](=[C]\F)\F.[C](=[C]\F)\F.[C](=O)[O].[C](=O)[O].[O] str_m1_o1_o2_f0_pcu.sym.6
C(=[CH])([C])O[C]CC.[C](=[CH])OCCC.c12[C]3O[Zn](O[C][C]/C=C(\[C])/OCCC)O[C](c4ccc(C(=O)O[Zn]([O])OC(=O)c5ccc(C(=O)O[Zn]([O])(OC(=O)c6ccc([C](O[Zn@]7(O[C](c(cc1)cc2)O[Zn]([O])O7)O[C][C]/C=[C]/OCCC)O[Zn][O])cc6)[O])cc5)cc4)O[Zn]O[C]([C]/C=[C]/O[C]CC)O[Zn]O3.c12[C]3O[Zn@@](O[C][C]/C=C(\[C])/OCCC)(O[Zn]O3)O[C](c3ccc([C](O[Zn](O[C](c4ccc(C(=O)O[Zn](OC(=O)c5ccc(C(=O)O[Zn@@]([O])(OC(=O)c(cc1)cc2)O[C][C]/C=C(\[C])/OCCC)cc5)[O])cc4)O[Zn])[O])O[Zn])cc3)O[Zn][O].[C]/C=[C]/O[C]CC.[C]/C=C(\[C])/O[C]CC.[C](/C=[C]/O[C]CC)[C].[C](CC)OC(=[CH])[C].C(=[CH])([C])OCCC.[C](CC)OC(=[CH])[C].[C](CC)O[C]=[CH].[C](=[CH])OCCC.[C](=[CH])OCCC.[C]=O.[C](=O)[O].[H].[H].[H].[H].[H].[H].[H].[H].[H].[H].[H].[H].[H].[H].[H].[H] str_m1_o1_o2_f0_pcu.sym.5
Now, I converted them to .pkl file, but when I tried to load the .pkl file, I get this error:
smi2pkl.py:16 in <module>
qm9_smiles = pkl.load(f)
UnpicklingError: invalid load key, '['.
Here is the snippet of code I used for the conversion of .smi to .pkl:
with open(out_path, "wb") as f:
pkl.dump(file_path, f, protocol=pkl.HIGHEST_PROTOCOL)
Any insight is welcome. Thank you in advance