Re: [Rdkit-discuss] number of significant digits in molblock?

2018-10-05 Thread Michal Krompiec
6 digits seems perfectly fine for me. On Fri, 5 Oct 2018 at 14:26, Greg Landrum wrote: > > On Fri, Oct 5, 2018 at 2:42 PM Ivan Tubert-Brohman < > ivan.tubert-broh...@schrodinger.com> wrote: > >> In the newer "V3000", the atom line is not column-based, which I believe >> gives more freedom to

Re: [Rdkit-discuss] number of significant digits in molblock?

2018-10-05 Thread Greg Landrum
On Fri, Oct 5, 2018 at 2:42 PM Ivan Tubert-Brohman < ivan.tubert-broh...@schrodinger.com> wrote: > In the newer "V3000", the atom line is not column-based, which I believe > gives more freedom to implementers to decide the precision of the > coordinates. You can force RDKit to write in this

Re: [Rdkit-discuss] number of significant digits in molblock?

2018-10-05 Thread Ivan Tubert-Brohman
Hi Michal, The old SDF format (aka V2000 CTAB) is column-based, as things often were in the era of Fortran 77 and punch cards. Not only the precision but also the exact position of each value on the line is specified! Here's what the spec says: The Atom Block is made up of atom lines, one line

Re: [Rdkit-discuss] number of significant digits in molblock?

2018-10-05 Thread Michal Krompiec
Hi Jan, Thanks, 6 digits is OK! Forcing V3000 did the trick: sdf_out=Chem.SDWriter(outfile) sdf_out.SetForceV3000(True) Best, Michal On Fri, 5 Oct 2018 at 12:59, Jan Holst Jensen wrote: > Hi Michal, > > V2000 format is restricted by its specification to fixed format with 4 > decimals. V3000

Re: [Rdkit-discuss] number of significant digits in molblock?

2018-10-05 Thread Jan Holst Jensen
Hi Michal, V2000 format is restricted by its specification to fixed format with 4 decimals. V3000 output is not restricted to a fixed format, but the current code still rounds it in practice as seen below. To get extra precision you could change the formatting of x, y, and z coordinate

[Rdkit-discuss] number of significant digits in molblock?

2018-10-05 Thread Michal Krompiec
Hello, Is it possible to control the number of significant digits of XYZ coordinates? I am modifying coordinates of my molecules using SetAtomPosition but when I save them into an SDF it seems that the precision is limited to 4 digits after the decimal point (I'd like 10 instead...). Best wishes,