Dear all,

 

I construct my own rdkit.Mol objects from mmcif files. I wanted to use 
mol.GetNumAtoms(onlyExplicit=True) to get the number of heavy atoms for that 
molecule, however, I have noticed that the function returns all the time number 
of all atoms in the molecule including hydrogens (47 vs. expected 31). When I 
try to iterate over the atoms to get number of Implicit/Explicit Hs for each 
atom I get 0 for all the atoms in the molecule, although the element types are 
correct (C’s, O’s, H’s etc.)

 

So I assume that I construct the molecule incorrectly and wonder if there’s a 
way to tag hydrogen atoms correctly when I construct them. 

 

Hydrogens are explicitly present in my input structures and I’d like to get 
GetNumAtoms(onlyExplicit=True) function to work as expected. Attached is a 
python pickle of ATP molecule with two conformations.

 

Interestingly rdkit.Chem.Descriptors.HeavyAtomCount(self.mol) returns correct 
value as expected.

 

My configuration:

OS: MacOS: 10.14.4

Rdkit: 2019.03.01

Python: 3.7.3

 

Best,

 

Lukas

Attachment: ATP.pickle
Description: Binary data

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

Reply via email to