Hi,
On Mon, Sep 19, 2016 at 5:33 AM, 杨弘宾 wrote:
>When I used rdkit to parse a smi file, I found that there was a SMILES
> that rdkit cannot parse, and no any error or warning.
>
>
> version: Release_2016_03_1
> >>> mol = Chem.MolFromSmiles('N(CC(O)C1=C\C(=N/#N)\C(=O)C=C1)N=O')
> >>> print mol
> None
>
> This compound can be read by OpenBabel. But I have no idea why it didnot
> work.
>
I don't know why OpenBabel accepts it, but there's definitely an error in
that SMILES. This part: "=N/#N" has a single bond (the "/") directly
followed by a triple bond (the "#"), and that's not legal SMILES.
I do see an error message when I try the SMILES:
In [2]: mol = Chem.MolFromSmiles('N(CC(O)C1=C\C(=N/#N)\C(=O)C=C1)N=O')
[06:04:54] SMILES Parse Error: syntax error for input:
'N(CC(O)C1=C\C(=N/#N)\C(=O)C=C1)N=O'
and find it a bit odd that you don't. What operating system are you using
and how are you running the code?
Best,
-greg
--
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss