Guillaume,

Which test are you actually doing?

I would certainly always recommend adding some kind of tolerance value for
anything involving floating point values. This helps protect you from both
roundoff error and the precision of various file formats.

-greg


On Thu, Mar 2, 2017 at 11:37 AM, Guillaume GODIN <
guillaume.go...@firmenich.com> wrote:

> Dear Chris,
>
>
> Thanks,
>
>
> Yes that can be the case (I changed all 0 values to 1 or 2 or 3 and it's
> keep to be planar).
>
>
> Based on the precision of the coordinates (in rdkit sdf files it's 4
> digits) can we infer the precision on the PBF value based on that ?
>
>
> When you compute "pinv" for example even in matlab, there is a standard
> thresold to avoid those precision issues.
>
>
> Yes of course, I can put my own threshold that's true (Greg generaly
> takes 1e-4 to check if the results are similar from time to time).
>
>
> It's would be relevant to establish standard rules in term of threshold
> anyway.
>
>
> BR,
>
>
> Guillaume
> ------------------------------
> *De :* Chris Earnshaw <cgearns...@gmail.com>
> *Envoyé :* jeudi 2 mars 2017 11:07
> *À :* Guillaume GODIN; Rdkit-discuss@lists.sourceforge.net
> *Objet :* Re: [Rdkit-discuss] PBF precision is to high to determine good
> planarity
>
> Hi Guillaume
>
> I suspect that your first case 'works' because all the Z-coordinates are
> exactly zero and so the structure can be perceived as exactly planar. The
> second SD file is probably not perfectly planar, due to the limited
> precision of the coordinates in the SD file and the internal representation
> of floating point numbers. In general, exact equality checks with floating
> point numbers are rather dangerous.
>
> Instead of RDkit imposing a default threshold PBF value - which may not be
> appropriate in all cases - why not simply check if the returned value is
> below whatever threshold is relevant for you?
>
> Best regards,
> Chris
>
> On 2 March 2017 at 08:22, Guillaume GODIN <guillaume.go...@firmenich.com>
> wrote:
>
>> Dear All,
>>
>>
>>
>> I am working on the Whim implementation following the article of
>> Todeschini & Consonni in Handbook of Chemoinformatic book (
>> http://michem.disat.unimib.it/chm/download/materiale/geomet
>> rical_descriptors.pdf)
>>
>>
>> I used rkdit to generate 3D coordinates sdf file of chlorobenzene and I
>> also manually write another sdf file using the exact values x,y,z from the
>> book page 1015.
>>
>>
>>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to