Hi list,

In atom.h, there are the following three functions:

      //! \return the internal atom index (e.g., inside an OBMol)
      unsigned int GetIdx()           const { return((int)_idx);  }
      unsigned int GetIndex() const { return _idx - 1; }
      unsigned long GetId() const { return _id; }

Can someone explain and/or document these in a bit more detail? I was
quite surprised that GetIdx and GetIndex are defined differently. What
is the role of _idx vs _id? Is there a reason that in GetIdx _idx is
cast from uint->int, then (implicitly) back to a uint?

I also see:

unsigned int   _idx; //!< unique node index (GetIdx(), SetIdx())
unsigned long  _id; //!< unique id

I'm not sure what the difference between these descriptions is either?

The reason I ask is that I'm trying to limit an OBFF calculation with
OBForceField::AddInt[er,ra]Group[s], which takes the atom index, but
it's not clear to me whether this means the index, the idx, or the id.

Thanks in advance,

Dave

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to