Hi Rocco,

Paolo already replied about the options available for python when
interpreting the data fields from an SDF. The RDKit doesn't normally
convert data field values into floats unless you explicitly ask it to, so
this would be fine to do from Python

The CTAB part of the SDF, which includes the coordinates, always parses the
coordinates using the C locale (regardless of what the current locale on
the machine is)... this is more or less part of the CTAB spec from MDL.

-greg


On Thu, Sep 29, 2022 at 8:16 PM Rocco Moretti <rmoretti...@gmail.com> wrote:

> Hello,
>
> I have a number of SDFs of molecules with associated data blocks. (That
> is, the `>` section that comes after `M END` and before `$$$$`.)
>
> The problem I have is that these SDFs were generated in different
> countries, and have different locales -- most notably, some of them use "."
> as the decimal separator for real-valued properties and some use ",".  To
> make things even more fun, some use a mix of both, depending on who
> calculated which properties where.
>
> Is there any facility in RDKit for reading in such locale-varying SDF
> files and normalizing them?
>
> Thanks,
> Rocco
> _______________________________________________
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to