On Fri, May 27, 2016 at 11:22 AM, Marcus D. Hanwell <marcus.hanw...@kitware.com> wrote: > On Tue, May 24, 2016 at 11:54 AM, Geoffrey Hutchison > <geoff.hutchi...@gmail.com> wrote: >>> I thought that ideally HydrogenTools would operate on the RWMolecule, >>> but RWMolecule is now a lightweight class. There is not currently a >>> way to get the Atom from an RWAtom, but the code would be very simple >>> so if we want to add it we can. >> So I was just taking another look, and I think all you need assuming you have the QtGui::Molecule, and the Atom object you want to access:
RWAtom rwAtom = molecule->undoMolecule()->atom(atom.index()); If you have an example where that doesn't seem to work I can take a better look. The call to undoMolecule on molecule is cheap, no object creation/destruction, and the rwAtom object creation should also be really cheap. There is also atomByUniqueId if you want it, but the index version should be faster and safe in the context you want it. Marcus ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e _______________________________________________ Avogadro-devel mailing list Avogadro-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/avogadro-devel