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: image.png] Here's a complete gist for that: https://gist.github.com/greglandrum/9283aeadfb66d0fe8a2900e63fb10f3e I hope this helps, -greg On Tue, Aug 20, 2019 at 11:36 AM Henrique Castro <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: > > > 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 > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss