I am trying to map atoms in one molecule to those of another using 
GetSubstructMatch, but have a problem with molecule pairs like the two below

The problem is that GetSubstructMatch ignored the H on the n, so that the 
protonated ā€œn" in mol1 is mapped to the deprotonated ā€œnā€
in mol2, and vice versa

Is there a way to fix this?

Best regards, Jan

smiles1 = "ClCc1[nH]c(c2n1)cccc2"
smiles2 = "c1(I)cc(I)c2c(c1)nc(CCl)[nH]2"

mol1 = Chem.MolFromSmiles(smiles1)
mol2 = Chem.MolFromSmiles(smiles2)

order_mol1 = list(mol1.GetSubstructMatch(mol1))
order_mol2 = list(mol2.GetSubstructMatch(mol1))

print order_mol2

atom_map = dict(zip(order_mol1,order_mol2))
print atom_map

img = 
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Rdkit-discuss mailing list

Reply via email to