I was doing this recently, and used your method. The atom in 'mol' will
still be the same as before the addition, so you can just remember its
identity. The atom in otherMol had a particular Index (GetIdx()). If you
add the number of atoms in the original 'mol' to this index, you can find
its Index in the new 'mol'.
There are some caveats though. Currently, there's a bug that atom stereo is
not carried over from otherMol to mol. You have to do it manually (and I
have some code to do so), but it's kind of awkward.
- Noel
On 2 February 2013 13:06, andi <ad...@mail.missouri.edu> wrote:
> Hi all,
> I have this problem where i need to combine two molecules at some
> specific atom - one from one molecule, and one from the other. The way i do
> this is attach a flag via generic data to both atoms before I do something
> like *mol += otherMol*.
> My question is, now I iterate over all the atoms until i find the ones with
> the appropriate attribute and I was wondering if the molecule was able to
> retrieve the atoms without iterating through all of them "my self"?
>
> A follow up question, any suggestions as if this is the best way to connect
> two molecules, perhaps i'm doing it the wrong way?
>
> Much appreciated,
>
> -Andi
>
>
>
> --
> View this message in context:
> http://forums.openbabel.org/Find-Mol-atom-with-attribute-tp4655912.html
> Sent from the General discussion mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_jan
> _______________________________________________
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss