Oops, meant to reply to the list. That indeed was the problem. Building a list of atoms to remove and then removing then in a separate loop worked like a charm.
Thanks, Greg On Wed, May 16, 2012 at 7:16 AM, Noel O'Boyle <[email protected]> wrote: > >> Any thoughts on why pybel.formula is not updating when I use the >> underlying OBMol.DeleteAtom? > > > This is a FAQ. Don't delete atoms from whether a loop using an Open Babel > iterator as it invalidates the iterator. Instead, just create a list of > OBAtoms, and in a separate loop delete each OBAtom in turn. > > - Noel ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ OpenBabel-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
