Draw aromatic rings
Closed this issue · 1 comments
Hey,
I tried to find a substructure between molecules, and put the results in grid-image. In the output, there is a missing bond in the aromatic rings, but when I print just one substructure alone it prints this correct...
def defult():
l = 5
ligs = []
common_atoms_matrix = []
#make a list from the ligands that we insert to the code
for i in range(1, int(l)+1):
ligand = "ligand_" + str(i) + ".pdb"
ligs.append(ligand)
for i in range(len(ligs)):
mol_object = Chem.MolFromPDBFile(ligs[i])
Chem.SanitizeMol(mol_object)
ligs[i] = mol_object
return ligs
ligs = defult()
ls = []
for a, i in enumerate(ligs):
ks = []
for b, j in enumerate(ligs):
l = rdFMCS.FindMCS([i, j], bondCompare=rdFMCS.BondCompare.CompareAny).smartsString
l = Chem.MolFromSmarts(l)
#Chem.SanitizeMol(l)
ls.append(l)
Draw.MolsToGridImage(ls, molsPerRow=5, subImgSize=(250,250))
l = rdFMCS.FindMCS([Chem.MolFromPDBFile("ligand_5.pdb", sanitize = True), Chem.MolFromPDBFile("ligand_4.pdb", sanitize = True)], bondCompare=rdFMCS.BondCompare.CompareAny).smartsString
l = Chem.MolFromSmarts(l)
IPythonConsole.drawOptions.addBondIndices = True
l
why is this happening? and how can I solve this problem?
Thank you,
Amit
This is not a place to ask RDKit questions. Please use the discussions tab in the rdkit repo for that