Thanks, Greg. I don't know how you find the time do take care of so much 
questions, but you are amazing!

Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: Greg Landrum <greg.land...@gmail.com>
Sent: Thursday, August 22, 2019 2:04:05 PM
To: Henrique Castro <henrique...@outlook.com>
Cc: rdkit-discuss@lists.sourceforge.net <rdkit-discuss@lists.sourceforge.net>
Subject: Re: [Rdkit-discuss] Don't let RDKit add hydrogens to sanitize a 
fragment

Hi Henrique,

The RDKit isn't actually adding Hs here, it just recognizes that the P atoms 
have implicit Hs on them and then when drawing the molecule shows those 
implicit Hs.

If you would like to draw some atoms without showing the implicit Hs, you can 
explicitly set the atom labels to be used by setting the "atomLabel" property 
on some/all atoms.
To change all the atoms you can do this:
for atom in m.GetAtoms():
    atom.SetProp("atomLabel",atom.GetSymbol())
which results in the following rendering for your molecule:
[image.png]


Here's a complete gist for that:
https://gist.github.com/greglandrum/9283aeadfb66d0fe8a2900e63fb10f3e<https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgist.github.com%2Fgreglandrum%2F9283aeadfb66d0fe8a2900e63fb10f3e&data=02%7C01%7C%7Cd95ff731bac44566a2b508d72722c5a4%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637020902603195387&sdata=7JnSJXkesPJnS2Mill301YGNgeiukCrrwQ%2Fi3%2F3H%2Bpw%3D&reserved=0>

I hope this helps,
-greg


On Tue, Aug 20, 2019 at 11:36 AM Henrique Castro 
<henrique...@outlook.com<mailto:henrique...@outlook.com>> wrote:
Dear colleagues,
I'm working with coordination compounds and using .mol (v3000) files to 
describe the immediate coordination environment of my molecules. This is an 
example of a cobalt complex (just the coordination environment):

Mrv1827 08101911143D

  0  0  0     0  0            999 V3000
M  V30 BEGIN CTAB
M  V30 COUNTS 6 5 0 0 0
M  V30 BEGIN ATOM
M  V30 1 Co 0.7663 2.1605 10.185 0
M  V30 2 Cl 2.423 1.0205 11.4441 0
M  V30 3 P 2.0121 2.3511 8.3115 0
M  V30 4 P 0.1302 0.2072 9.1724 0
M  V30 5 P -0.781 2.1773 11.8292 0
M  V30 6 P 1.3423 4.1551 11.1519 0
M  V30 END ATOM
M  V30 BEGIN BOND
M  V30 1 1 1 2
M  V30 2 9 3 1
M  V30 3 9 4 1
M  V30 4 9 5 1
M  V30 5 9 6 1
M  V30 END BOND
M  V30 END CTAB
M  END

The problem is that RDKit is adding hydrogens to make the fragment make sense 
and I'd like to avoid that:
[cid:16cba400826cb971f161]

Using Chem.RemoveHs(mol) is not working too.
Any help is much appreciated

--
Henrique C. S. Junior

_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net<mailto:Rdkit-discuss@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss<https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Frdkit-discuss&data=02%7C01%7C%7Cd95ff731bac44566a2b508d72722c5a4%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637020902603205395&sdata=U3zhw%2F%2F0IZ%2BYuGtmVmDgcX%2Fp%2B7oqUHPFz9uf4ILhc1g%3D&reserved=0>
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to