Dear Greg and others,

I am looking for a function that returns all the atom 

keys of a molecule. I thought GetAtoms was it. But then
it does not seem to give a stable list of atom keys.
For example:

>>> mol = Chem.MolFromSmiles('CCCC')
>>> for c in mol.GetAtoms():
...   print c
...
<rdkit.Chem.rdchem.Atom object at 0x02BA65E0>
<rdkit.Chem.rdchem.Atom object at 0x02BA6618>
<rdkit.Chem.rdchem.Atom object at 0x02BA65E0>
<rdkit.Chem.rdchem.Atom object at 0x02BA6618>

>>> allat = []
>>> for c in mol.GetAtoms():
...   allat.append(c)
...

>>> mol = Chem.MolFromSmiles('CCCC')
>>> for c in mol.GetAtoms():
...   print c
...
<rdkit.Chem.rdchem.Atom object at 0x02BA6810>
<rdkit.Chem.rdchem.Atom object at 0x02BA6848>
<rdkit.Chem.rdchem.Atom object at 0x02BA6810>
<rdkit.Chem.rdchem.Atom object at 0x02BA6848>


Hence the list given by GetAtoms have evolved.
Am I missing something?

Thank you for your input!

Ling
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to