Hi, Greg

Recently, I got the code producing a combined molecule from one core and
several functional groups:
https://gist.github.com/greglandrum/fd488309268cb085be218f26178e13b8

Here is the exception case that I encountered.

core = Chem.MolFromSmiles('N(=N/c1ccccc1)\c2ccccc2')
pieces = [Chem.MolFromSmiles(x) for x in ('C(=O)O','O=[SH](=O)O')]
connections = ((7,0),(4,1))
newMol = combine(core,pieces,connections)
Draw.MolToImage(core).show()
Draw.MolToImage(pieces[0]).show()
Draw.MolToImage(pieces[1]).show()
Draw.MolToImage(newMol).show()
print(Chem.MolToSmiles(newMol))

I tried using all canonicalized smiles. I worked for 'O=S(=O)O' which is
not canonicalized one.
If I put 'O=[SH](=O)O', it works. But it's not what I wanted. The tail of
H(hydrogen) tags along the S atom.
I tried [S-] instead [SH], but it is also not what I expected. S in the
result of 'combine' function has a negative charge. Can you suggest
something?
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to