# In[4]: from nxrd.Compound import Compound from classes import MCS_Finder import kcf.converter as kcfco # In[5]: f = MCS_Finder("Streptomyces") Cnlist = f.get_Cnlist_from_label2("C(C)-C(C)-C(C-C-C-C-C-C)-C-C-C-C-C-C-C-C-C") # In[6]: complist = [] * len(Cnlist) for i in Cnlist: complist.append(Compound()) print(complist) # In[7]: for i, Cn in enumerate(Cnlist): complist[i].input_molfile('KNApSAck_mol/%s.mol' % (Cn)) complist[i].fit2d = False print(Cn, i) # In[8]: veclist = [0] * len(Cnlist) # In[9]:
import os from classes import MCS_Finder import datetime import re import sys sys.path.append("../../module") from rdkit.Chem import rdDepictor import kcf.converter as kcfco from rdkit import Chem from nxrd.Compound import Compound # In[2]: c = Compound() # In[3]: hanni = [] for i in range(1, 52): page = str(i) with open("../../../database/knapsack-kcf/KNApSAck" + page + ".kcf")as f1: clist = f1.read().split() hanni.append(clist[1]) print(hanni) # In[4]:
# In[7]: import sys # In[8]: sys.path.append("../../module") # In[9]: from nxrd.Compound import Compound # In[9]: c = Compound() for Cn in Cnlist: with open('KNApSAck_mol/%s.mol' % (Cn)) as file: molblock = file.read() c.input_molblock(molblock) c.fit2d = False print(molblock) break # In[10]: print(c.n_atoms, c.n_bonds) # In[10]: get_ipython().magic('matplotlib inline')
from rdkit.Chem import Draw img = Draw.MolsToGridImage(mol_list, legends=sorted(list(spedict2.items())[0][1]), subImgSize=(400, 400)) img.save("dotpng/Rosa_test2-2.png") # In[18]: from nxrd.Compound import Compound # In[19]: comp = [] for i in mol_list: temp = Compound() temp.input_rdkmol(i) comp.append(temp) # In[20]: print(comp) # In[21]: vec = [] for i in comp: vec.append(kcfco.kcf_vec(i)) # In[22]: