You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug Chem.MolToSmarts returns a SMARTS string which is invalid when converted back to a molecule using Chem.MolFromSmarts.
Original SMARTS: [NX3H2+0,NX4H3+;!$([N][!C]);!$([N]*~[#7,#8,#15,#16])]
RDKit SMARTS generated by Chem.MolToSmarts: [N&X3&H2&+0,N&X4&H3&+;!$(N!C);!$(N*~[#7,#8,#15,#16])]
The error is in the $(N!C) part. If I change back to $([N][!C]) the SMARTS become valid.
I have seen this bug with multiple different SMARTS strings, and all seem to involve a removal of square brackets around a !C (or other atoms).
Describe the bug
Chem.MolToSmarts
returns a SMARTS string which is invalid when converted back to a molecule usingChem.MolFromSmarts
.Original SMARTS:
[NX3H2+0,NX4H3+;!$([N][!C]);!$([N]*~[#7,#8,#15,#16])]
RDKit SMARTS generated by
Chem.MolToSmarts
:[N&X3&H2&+0,N&X4&H3&+;!$(N!C);!$(N*~[#7,#8,#15,#16])]
The error is in the
$(N!C)
part. If I change back to$([N][!C])
the SMARTS become valid.I have seen this bug with multiple different SMARTS strings, and all seem to involve a removal of square brackets around a
!C
(or other atoms).To Reproduce
Expected behavior
The SMARTS returned by
Chem.MolToSmarts
should be valid.Configuration (please complete the following information):
The text was updated successfully, but these errors were encountered: