Hi Thomas,
That's a bug in the SMARTS writer. It should be outputting the required
information.
I will take a look.
Thanks for reporting it!
-greg
On Fri, Jun 8, 2018 at 7:35 PM Thomas Duigou <[email protected]> wrote:
> Hi RDKiters,
>
>
> I am trying to output EZ configurations ('/', '\') in SMARTS syntax. While
> it is possible to do it for SMILES with ease (using the MolToSmiles()
> method), I didn't succeed for SMARTS. Below an example:
>
>
> zbut = Chem.MolFromInchi('InChI=1S/C4H8/c1-3-4-2/h3-4H,1-2H3/b4-3-')
> ebut = Chem.MolFromInchi('InChI=1S/C4H8/c1-3-4-2/h3-4H,1-2H3/b4-3+')
> Chem.SanitizeMol(zbut)
> Chem.SanitizeMol(ebut)
> Chem.AssignStereochemistry(zbut)
> Chem.AssignStereochemistry(ebut)
> print('zbut', Chem.MolToSmarts(zbut), Chem.MolToSmiles(zbut))
>
> # zbut [#6H3]-[#6H]=[#6H]-[#6H3] C/C=C\C
>
> print('ebut', Chem.MolToSmarts(ebut), Chem.MolToSmiles(ebut))
>
> # ebut [#6H3]-[#6H]=[#6H]-[#6H3] C/C=C/C
>
>
> I also did try to build an "atomQuery" object, but without the expected
> result:
>
>
> smarts = "[*]/[*]"
> qb = Chem.MolFromSmarts(smarts).GetBondWithIdx(0)
> print(qb.HasQuery())
>
> # True
>
> print(qb.GetBondDir())
>
> # ENDUPRIGHT
>
> print('SMARTS:', qb.GetSmarts())
>
> # SMARTS: -
>
>
> Any tip and help are welcome, thank you by advance,
>
> Best wishes,
>
> Thomas
>
> ------------------------------------------------------------------------------
> 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
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss