I'm finding that if I add a Xenon atom to a molecule it seems to get an unwanted hydrogen added to it. Example notebook here: https://gist.github.com/tdudgeon/ba3497341d9de95b4d78f3e5ed9fc0f7

Basic code is like this:

from rdkit import Chem
m = Chem.MolFromSmiles("c1ccccc1")
mw = Chem.RWMol(m)
xe = Chem.Atom(54) # 54 is Xenon
idx = mw.AddAtom(xe)
mw.AddBond(0,6,Chem.BondType.SINGLE)
Chem.SanitizeMol(mw)
atom = mw.GetAtomWithIdx(idx)
atom.GetExplicitValence() # returns 1
Chem.MolToSmiles(mw) # returns [XeH]c1ccccc1, expecting [Xe]c1ccccc1

Even if I do a Chem.RemoveHs() the H remains.

Any ideas why and how to fix?





_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to