Noel,

Thanks for the input.  Regarding the floating point problems, that's
what I assumed, but I didn't know what to use for a safe delta.  Is
this a decent approach otherwise?

The alternate method sounds great.  I'll do a little research and see
if that will work for us. Thanks for the pointer.

Greg

On Tue, May 15, 2012 at 1:32 AM, Noel O'Boyle <[email protected]> wrote:
> The coordinates should not change on copying the molecule (I just tested
> this).
>
> However, I'm guessing that you are comparing two floating point numbers
> using "if x==y". If you search around the web, you will see that you should
> this doesn't work for a variety of reasons. Instead, you should compare two
> non-integers using "if (x-y)<delta"  (where delta is 0.0001 or whatever).
> An alternative method for your problem would be to search for the isolated
> molecule in the complex. See
> http://openbabel.org/api/2.3/group__substructure.shtml and
> CompileMoleculeQuery. I think (!) these should work from Python okay...

------------------------------------------------------------------------------
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

Reply via email to