Hi,
I tried to find a substructure (MCS) 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
correctly...
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))
[image: צילום מסך 2023-05-11 132315]
<https://user-images.githubusercontent.com/133215803/237793539-4211b7ec-4020-41a6-8769-23c21505461d.png>
Here is the code to print just one substructure:
l = rdFMCS.FindMCS([Chem.MolFromPDBFile("ligand_5.pdb"),
Chem.MolFromPDBFile("ligand_4.pdb")],
bondCompare=rdFMCS.BondCompare.CompareAny).smartsString
l = Chem.MolFromSmarts(l)
IPythonConsole.drawOptions.addBondIndices = True
l
[image: צילום מסך 2023-05-11 132559]
<https://user-images.githubusercontent.com/133215803/237793698-e417ce3d-d755-4f65-a549-fdef05056309.png>
Why is it happening? and how can I solve this problem?
Thank you,
Amit
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
ללא
וירוסים.www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#m_8337968732212653344_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss