Looks like you create a local OBMol which is then destroyed on return.
You should probably use:
OBMolecule *tmpMolecule =new OBMolecule(originalMo);

Hope this helps,
Jean

Le mercredi 06 février 2013 à 22:14 -0800, andi a écrit :
> Hi all,
>     I am running into a strange problem and just can't seem to find a cause.
> What I am trying to do is pass a an OBMol to some function and set some
> generic data. One of the criteria is that I preserve the original molecule.
> So what I do is I create a temporary mol and initialize it with the original
> one such as this *OBMolecule tmpMolecule (originalMo);*.
> 
> The problem I am running into is that after I set my generic data in some
> other function, upon return, the generic data is not being reflected, but if
> I pass the original molecule, then the data is reflected.
> 
> Any help, suggestions would greatly be appreciated...I don't understand this
> behavior at all.
> 
> Thanks,
> Andi
> 
> 
> 
> --
> View this message in context: 
> http://forums.openbabel.org/Data-not-reflected-on-copied-molecule-tp4655926.html
> Sent from the openbabel-devel mailing list archive at Nabble.com.
> 
> ------------------------------------------------------------------------------
> Free Next-Gen Firewall Hardware Offer
> Buy your Sophos next-gen firewall before the end March 2013 
> and get the hardware for free! Learn more.
> http://p.sf.net/sfu/sophos-d2d-feb
> _______________________________________________
> OpenBabel-Devel mailing list
> OpenBabel-Devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-devel



------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to