I was trying to how understand how the AddHs ()works and how I can relate
its output with the GetNumExplicitHs() to see how many explicit hydrogens
were added. But It seems like AddHs does not work correctly. Below is the
code that I used.
m = Chem.MolFromSmiles('C')
for a in m.GetAtoms():
print a.GetIdx(), a.GetNumImplicitHs()
0 4
mnew = Chem.AddHs(m)
for a in mnew.GetAtoms():
print a.GetIdx(), a.GetNumImplicitHs()
0 0
1 0
2 0
3 0
4 0
for a in mnew.GetAtoms():
print a.GetIdx(), a.GetSymbol(), a.GetNumExplicitHs()
0 C 0
1 H 0
2 H 0
3 H 0
4 H 0
mnew = Chem.AddHs(m, explicitOnly=True)
for a in mnew.GetAtoms():
print a.GetIdx(), a.GetSymbol(), a.GetNumExplicitHs()
0 C 0
for a in mnew.GetAtoms():
print a.GetIdx(), a.GetSymbol(), a.GetNumImplicitHs()
0 C 4
mnew = Chem.AddHs(m, explicitOnly=False)
for a in mnew.GetAtoms():
print a.GetIdx(), a.GetSymbol(), a.GetNumImplicitHs()
0 C 0
1 H 0
2 H 0
3 H 0
4 H 0
for a in mnew.GetAtoms():
print a.GetIdx(), a.GetSymbol(), a.GetNumExplicitHs()
0 C 0
1 H 0
2 H 0
3 H 0
4 H 0
Is it possible to fix?
Thanks!
*Syeda Sabrina*
*Graduate Assistant*
*25, Fenske Laboratory*
*Department of Chemical Engineering, Penn State University*
*University Park, PA*
*
*
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss