Hi Sharang (adding the list as I missed reply-all previously),

Glad to hear that RDKit does what it is supposed to.

I am unfortunately not familiar with how Datawarrior processes molecules, so I don't know if it does its own layout. To remove RDKit from the equation - if you can feed Datawarrior a molfile directly from disk, you can see if Datawarrior preserves the layout of the molfile or not.

Cheers
-- Jan

On 2020-05-09 16:32, Sharang Phatak wrote:
Hi Jan,

Thank you for your message. I did go back and check with mol_to_ctab and found out the coordinates are indeed identical. I am using Datawarrior to visualize these structures using Datawarrior's native SQL integration tool. The structures then are displayed a bit differently, flipped / rotated within this tool. Perhaps it's a different issue unrelated to RDKit. If you've experienced such issues and share what you did to overcome them, it would be much appreciated.

Cheers,
Sharang

On Thu, May 7, 2020 at 3:22 AM Jan Holst Jensen <j...@biochemfusion.com <mailto:j...@biochemfusion.com>> wrote:

    Hi Sharang,

    A very old version of RDKit ?

    When I use your form of calling mol_to_ctab() it does preserve
    coordinates for me.

    select mol_to_ctab(mol_from_ctab('


       4  3  0  0  0  0  0  0  1  0999 V2000
         5.0000    5.0000    0.0000 C   0  0  0  0  0  0  0 0  0 0  0  0
         5.0000    4.0000    0.0000 C   0  0  0  0  0  0  0 0  0 0  0  0
         6.0000    3.0000    0.0000 N   0  0  0  0  0  0  0 0  0 0  0  0
         4.0000    3.0000    0.0000 O   0  0  0  0  0  0  0 0  0 0  0  0
       2  1  1  1  0  0  0
       2  3  1  0  0  0  0
       2  4  1  0  0  0  0
    M  END
    '::cstring, true));


          RDKit          3D

       4  3  0  0  0  0  0  0  0  0999 V2000
         5.0000    5.0000    0.0000 C   0  0  0  0  0  0  0 0  0 0  0  0
         5.0000    4.0000    0.0000 C   0  0  0  0  0  0  0 0  0 0  0  0
         6.0000    3.0000    0.0000 N   0  0  0  0  0  0  0 0  0 0  0  0
         4.0000    3.0000    0.0000 O   0  0  0  0  0  0  0 0  0 0  0  0
       2  1  1  1
       2  3  1  0
       2  4  1  0
    M  END


    If I leave out the second optional boolean parameter, which
    defaults to
    false, the coordinates are re-generated by RDKit.

    select mol_to_ctab(mol_from_ctab('


       4  3  0  0  0  0  0  0  1  0999 V2000
         5.0000    5.0000    0.0000 C   0  0  0  0  0  0  0 0  0 0  0  0
         5.0000    4.0000    0.0000 C   0  0  0  0  0  0  0 0  0 0  0  0
         6.0000    3.0000    0.0000 N   0  0  0  0  0  0  0 0  0 0  0  0
         4.0000    3.0000    0.0000 O   0  0  0  0  0  0  0 0  0 0  0  0
       2  1  1  1  0  0  0
       2  3  1  0  0  0  0
       2  4  1  0  0  0  0
    M  END
    '::cstring));


          RDKit          2D

       4  3  0  0  0  0  0  0  0  0999 V2000
         0.0000    0.0000    0.0000 C   0  0  0  0  0  0  0 0  0 0  0  0
         1.2990    0.7500    0.0000 C   0  0  0  0  0  0  0 0  0 0  0  0
         2.5981   -0.0000    0.0000 N   0  0  0  0  0  0  0 0  0 0  0  0
         1.2990    2.2500    0.0000 O   0  0  0  0  0  0  0 0  0 0  0  0
       2  1  1  6
       2  3  1  0
       2  4  1  0
    M  END

    This is on a fairly old RDKit 2016_09_4 on Postgres 9.6. Earlier
    versions would ignore the second parameter - that was fixed around
    the
    2016_09 release if I recall correctly.

    Cheers
    -- Jan Holst Jensen

    On 2020-05-07 00:21, Sharang Phatak wrote:
    > Hi,
    >
    > I am following the documentation for postgres / rdkit. I have a
    table
    > with valid molfiles as confirmed from is_valid_ctab(). I am then
    > trying to insert into a table 'mols' using
    > mol_from_ctab(molfile::cstring,true).
    >
    > However, the coordinates are not preserved. Is there something I am
    > missing?
    >
    > Thank you,
    > Sharang


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to