On 17 May 2010 11:19, Tim Vandermeersch <tim.vandermeer...@gmail.com> wrote:
> On Mon, May 17, 2010 at 11:22 AM, Noel O'Boyle <baoille...@gmail.com> wrote:
>> Hi all,
>>
>> I would like to be able to const iterate over the atoms of a mol with,
>> for example, FOR_CONST_ATOMS_OF_MOL or so. I am instead reduced to
>> using "for (i=1; i<=mol.NumAtoms(); ++i)" which is very sad.
>>
>> I'm not quite sure how to add this to OBMolAtomIter, so I'd appreciate
>> if someone else could do this or steer me in the right direction.
>
> The easiest way to do this would be to add a OBConstMolAtomIter I
> think. A new (const) version for OBMol::BeginAtom/NextAtom is also
> needed. Shouldn't be alot of work though. Do you want me to add this?

That's fine. You've given me the starting point. I'll see if anyone
else comments and if not, I'll give it a go later today or tomorrow.

> Note: Ideally, const OBMol objects would be used more. However there
> are methods which prevent this (e.g. GetSSSR, ...)

>> - Noel
>>
>> ------------------------------------------------------------------------------
>>
>> _______________________________________________
>> OpenBabel-Devel mailing list
>> OpenBabel-Devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/openbabel-devel
>>
>

------------------------------------------------------------------------------

_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to