Rdkit: sdf to SMILES

Created on 23 Dec 2018  路  3Comments  路  Source: rdkit/rdkit

Description:
Substance_000000001_000025000.sdf.zip
I downloaded a sdf file from PubChem and I want to convert sdf to SMILES, but I have some problems. I am very anxious, I hope to get help.

  • RDKit Version:2018.09.1
  • Platform:macOS High Sierra 10.13.4
  • python:Python 3.6.5 |Anaconda, Inc.

    result锛歔11:23:40] Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 6187
    [11:23:40] ERROR: Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 6637
    [11:23:40] ERROR: Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 6 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 9297
    [11:23:40] ERROR: Explicit valence for atom # 6 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 6 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 9454
    [11:23:40] ERROR: Explicit valence for atom # 6 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 17 H, 2, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 15469
    [11:23:40] ERROR: Explicit valence for atom # 17 H, 2, is greater than permitted
    [11:23:40] Explicit valence for atom # 7 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 21963
    [11:23:40] ERROR: Explicit valence for atom # 7 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 11 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 25430
    [11:23:40] ERROR: Explicit valence for atom # 11 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 17 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 25618
    [11:23:40] ERROR: Explicit valence for atom # 17 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 26802
    [11:23:40] ERROR: Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 26919
    [11:23:40] ERROR: Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 27044
    [11:23:40] ERROR: Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 27169
    [11:23:40] ERROR: Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 27288
    [11:23:40] ERROR: Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 27407
    [11:23:40] ERROR: Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 27526
    [11:23:40] ERROR: Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 27649
    [11:23:40] ERROR: Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 27779
    [11:23:40] ERROR: Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 9 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 27911
    [11:23:40] ERROR: Explicit valence for atom # 9 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 28040
    [11:23:40] ERROR: Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 5 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 29495
    [11:23:40] ERROR: Explicit valence for atom # 5 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 5 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 29606
    [11:23:40] ERROR: Explicit valence for atom # 5 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 5 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 29717
    [11:23:40] ERROR: Explicit valence for atom # 5 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 6 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 29830
    [11:23:40] ERROR: Explicit valence for atom # 6 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 30121
    [11:23:40] ERROR: Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 6 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 30759
    [11:23:40] ERROR: Explicit valence for atom # 6 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 6 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 30871
    [11:23:40] ERROR: Explicit valence for atom # 6 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 31948
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 32135
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 32292
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 32461
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 32628
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 32789
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 32950
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 33262
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 4 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 33429
    [11:23:40] ERROR: Explicit valence for atom # 4 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 33632
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 33791
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 33926
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 34057
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 34228
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 34403
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 34568
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 34759
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 34878
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 35079
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 35262
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 35385
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 35496
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 35609
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 35808
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 36019
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 36128
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 36249
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 36390
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 36535
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 36688
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 36817
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 36960
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 37097
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 37222
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 37351
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 37464
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 24 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 37779
    [11:23:40] ERROR: Explicit valence for atom # 24 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 24 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 38096
    [11:23:40] ERROR: Explicit valence for atom # 24 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 24 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 38415
    [11:23:40] ERROR: Explicit valence for atom # 24 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 24 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 38734
    [11:23:40] ERROR: Explicit valence for atom # 24 N, 4, is greater than permitted
    [11:23:40] WARNING: not removing hydrogen atom without neighbors
    [11:23:40] WARNING: not removing hydrogen atom without neighbors
    [11:23:40] Explicit valence for atom # 14 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 41791
    [11:23:40] ERROR: Explicit valence for atom # 14 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 15 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 42743
    [11:23:40] ERROR: Explicit valence for atom # 15 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 14 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 42869
    [11:23:40] ERROR: Explicit valence for atom # 14 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 17 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 42995
    [11:23:40] ERROR: Explicit valence for atom # 17 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 17 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 43121
    [11:23:40] ERROR: Explicit valence for atom # 17 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 15 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 43245
    [11:23:40] ERROR: Explicit valence for atom # 15 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 21 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 44189
    [11:23:40] ERROR: Explicit valence for atom # 21 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 21 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 44343
    [11:23:40] ERROR: Explicit valence for atom # 21 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 14 In, 7, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 44500
    [11:23:40] ERROR: Explicit valence for atom # 14 In, 7, is greater than permitted
    [11:23:40] Explicit valence for atom # 40 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 44746
    [11:23:40] ERROR: Explicit valence for atom # 40 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 21 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 45185
    [11:23:40] ERROR: Explicit valence for atom # 21 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 26 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 45442
    [11:23:40] ERROR: Explicit valence for atom # 26 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 50 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 45829
    [11:23:40] ERROR: Explicit valence for atom # 50 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 40 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 46787
    [11:23:40] ERROR: Explicit valence for atom # 40 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 2 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 49982
    [11:23:40] ERROR: Explicit valence for atom # 2 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 2 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 50060
    [11:23:40] ERROR: Explicit valence for atom # 2 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 1 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 50141
    [11:23:40] ERROR: Explicit valence for atom # 1 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 4 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 50241
    [11:23:40] ERROR: Explicit valence for atom # 4 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 17 C, 5, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 50507
    [11:23:40] ERROR: Explicit valence for atom # 17 C, 5, is greater than permitted
    [11:23:40] Explicit valence for atom # 17 C, 5, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 50792
    [11:23:40] ERROR: Explicit valence for atom # 17 C, 5, is greater than permitted
    [11:23:40] Explicit valence for atom # 11 C, 5, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 51029
    [11:23:40] ERROR: Explicit valence for atom # 11 C, 5, is greater than permitted
    [11:23:40] Explicit valence for atom # 5 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 53031
    [11:23:40] ERROR: Explicit valence for atom # 5 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 56027
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 1 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 56670
    [11:23:40] ERROR: Explicit valence for atom # 1 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 5 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 56757
    [11:23:40] ERROR: Explicit valence for atom # 5 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 4 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 56837
    [11:23:40] ERROR: Explicit valence for atom # 4 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 5 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 56928
    [11:23:40] ERROR: Explicit valence for atom # 5 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 5 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 57087
    [11:23:40] ERROR: Explicit valence for atom # 5 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 57313
    [11:23:40] ERROR: Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 57392
    [11:23:40] ERROR: Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 57471
    [11:23:40] ERROR: Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 57550
    [11:23:40] ERROR: Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 6 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 57671
    [11:23:40] ERROR: Explicit valence for atom # 6 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 6 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 57805
    [11:23:40] ERROR: Explicit valence for atom # 6 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 6 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 57947
    [11:23:40] ERROR: Explicit valence for atom # 6 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 6 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 58095
    [11:23:40] ERROR: Explicit valence for atom # 6 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 1 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 58175
    [11:23:40] ERROR: Explicit valence for atom # 1 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 58253
    [11:23:40] ERROR: Explicit valence for atom # 3 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 1 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 61791
    [11:23:40] ERROR: Explicit valence for atom # 1 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 4 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 64840
    [11:23:40] ERROR: Explicit valence for atom # 4 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 5 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 67314
    [11:23:40] ERROR: Explicit valence for atom # 5 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 7 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 68206
    [11:23:40] ERROR: Explicit valence for atom # 7 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 7 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 68294
    [11:23:40] ERROR: Explicit valence for atom # 7 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 7 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 68384
    [11:23:40] ERROR: Explicit valence for atom # 7 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 7 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 68470
    [11:23:40] ERROR: Explicit valence for atom # 7 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 7 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 68559
    [11:23:40] ERROR: Explicit valence for atom # 7 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 7 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 68650
    [11:23:40] ERROR: Explicit valence for atom # 7 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 7 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 68741
    [11:23:40] ERROR: Explicit valence for atom # 7 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 7 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 68831
    [11:23:40] ERROR: Explicit valence for atom # 7 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 7 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 68921
    [11:23:40] ERROR: Explicit valence for atom # 7 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 7 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 69006
    [11:23:40] ERROR: Explicit valence for atom # 7 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 7 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 69091
    [11:23:40] ERROR: Explicit valence for atom # 7 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 7 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 69176
    [11:23:40] ERROR: Explicit valence for atom # 7 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 7 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 69261
    [11:23:40] ERROR: Explicit valence for atom # 7 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 7 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 69365
    [11:23:40] ERROR: Explicit valence for atom # 7 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 6 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 69658
    [11:23:40] ERROR: Explicit valence for atom # 6 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 4 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 69758
    [11:23:40] ERROR: Explicit valence for atom # 4 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 4 C, 5, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 70180
    [11:23:40] ERROR: Explicit valence for atom # 4 C, 5, is greater than permitted
    [11:23:40] Explicit valence for atom # 9 C, 5, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 70290
    [11:23:40] ERROR: Explicit valence for atom # 9 C, 5, is greater than permitted
    [11:23:40] Explicit valence for atom # 10 C, 5, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 70479
    [11:23:40] ERROR: Explicit valence for atom # 10 C, 5, is greater than permitted
    [11:23:40] Explicit valence for atom # 11 C, 5, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 70674
    [11:23:40] ERROR: Explicit valence for atom # 11 C, 5, is greater than permitted
    [11:23:40] Explicit valence for atom # 4 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 75495
    [11:23:40] ERROR: Explicit valence for atom # 4 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 4 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 75587
    [11:23:40] ERROR: Explicit valence for atom # 4 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 75670
    [11:23:40] ERROR: Explicit valence for atom # 8 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 2 O, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 75766
    [11:23:40] ERROR: Explicit valence for atom # 2 O, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 2 O, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 75857
    [11:23:40] ERROR: Explicit valence for atom # 2 O, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 2 O, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 75948
    [11:23:40] ERROR: Explicit valence for atom # 2 O, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 2 O, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 76041
    [11:23:40] ERROR: Explicit valence for atom # 2 O, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 2 O, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 76134
    [11:23:40] ERROR: Explicit valence for atom # 2 O, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 2 O, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 76231
    [11:23:40] ERROR: Explicit valence for atom # 2 O, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 2 O, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 76330
    [11:23:40] ERROR: Explicit valence for atom # 2 O, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 76412
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 76494
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 1 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 76609
    [11:23:40] ERROR: Explicit valence for atom # 1 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 6 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 76721
    [11:23:40] ERROR: Explicit valence for atom # 6 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 6 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 77219
    [11:23:40] ERROR: Explicit valence for atom # 6 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 6 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 77298
    [11:23:40] ERROR: Explicit valence for atom # 6 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 6 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 77377
    [11:23:40] ERROR: Explicit valence for atom # 6 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 6 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 77456
    [11:23:40] ERROR: Explicit valence for atom # 6 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 79215
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] Explicit valence for atom # 13 C, 5, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 83871
    [11:23:40] ERROR: Explicit valence for atom # 13 C, 5, is greater than permitted
    [11:23:40] Explicit valence for atom # 21 C, 5, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 84056
    [11:23:40] ERROR: Explicit valence for atom # 21 C, 5, is greater than permitted
    [11:23:40] Explicit valence for atom # 17 C, 5, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 84213
    [11:23:40] ERROR: Explicit valence for atom # 17 C, 5, is greater than permitted
    [11:23:40] Explicit valence for atom # 16 C, 5, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 84366
    [11:23:40] ERROR: Explicit valence for atom # 16 C, 5, is greater than permitted
    [11:23:40] Explicit valence for atom # 16 C, 5, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 84519
    [11:23:40] ERROR: Explicit valence for atom # 16 C, 5, is greater than permitted
    [11:23:40] Explicit valence for atom # 13 C, 5, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 84657
    [11:23:40] ERROR: Explicit valence for atom # 13 C, 5, is greater than permitted
    [11:23:40] WARNING: not removing hydrogen atom without neighbors
    [11:23:40] Explicit valence for atom # 3 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 90624
    [11:23:40] ERROR: Explicit valence for atom # 3 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 6 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 95534
    [11:23:40] ERROR: Explicit valence for atom # 6 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 5 K, 2, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 95790
    [11:23:40] ERROR: Explicit valence for atom # 5 K, 2, is greater than permitted
    [11:23:40] Explicit valence for atom # 15 H, 2, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 98395
    [11:23:40] ERROR: Explicit valence for atom # 15 H, 2, is greater than permitted
    [11:23:40] Explicit valence for atom # 5 N, 4, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 100309
    [11:23:40] ERROR: Explicit valence for atom # 5 N, 4, is greater than permitted
    [11:23:40] Explicit valence for atom # 0 In, 6, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 102244
    [11:23:40] ERROR: Explicit valence for atom # 0 In, 6, is greater than permitted
    [11:23:40] Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:40] ERROR: Could not sanitize molecule ending on line 103429
    [11:23:40] ERROR: Explicit valence for atom # 3 O, 3, is greater than permitted
    [11:23:41] WARNING: not removing hydrogen atom without neighbors
    [11:23:41] Explicit valence for atom # 2 O, 3, is greater than permitted
    [11:23:41] ERROR: Could not sanitize molecule ending on line 104584
    [11:23:41] ERROR: Explicit valence for atom # 2 O, 3, is greater than permitted
    [11:23:41] Explicit valence for atom # 5 N, 4, is greater than permitted
    [11:23:41] ERROR: Could not sanitize molecule ending on line 127594
    [11:23:41] ERROR: Explicit valence for atom # 5 N, 4, is greater than permitted
    [11:23:41] Explicit valence for atom # 5 N, 4, is greater than permitted
    [11:23:41] ERROR: Could not sanitize molecule ending on line 127768
    [11:23:41] ERROR: Explicit valence for atom # 5 N, 4, is greater than permitted
    [11:23:41] Explicit valence for atom # 5 N, 4, is greater than permitted
    [11:23:41] ERROR: Could not sanitize molecule ending on line 127856
    [11:23:41] ERROR: Explicit valence for atom # 5 N, 4, is greater than permitted
    [11:23:41] Explicit valence for atom # 2 N, 4, is greater than permitted
    [11:23:41] ERROR: Could not sanitize molecule ending on line 157013
    [11:23:41] ERROR: Explicit valence for atom # 2 N, 4, is greater than permitted
    [11:23:41] Warning: conflicting stereochemistry at atom 20 ignored.
    [11:23:41] Warning: conflicting stereochemistry at atom 20 ignored.
    [11:23:41] Explicit valence for atom # 0 Cl, 7, is greater than permitted
    [11:23:41] ERROR: Could not sanitize molecule ending on line 175069
    [11:23:41] ERROR: Explicit valence for atom # 0 Cl, 7, is greater than permitted
    [11:23:41] WARNING: not removing hydrogen atom without neighbors
    [11:23:41] WARNING: not removing hydrogen atom without neighbors
    [11:23:42] Explicit valence for atom # 4 N, 4, is greater than permitted
    [11:23:42] ERROR: Could not sanitize molecule ending on line 490585
    [11:23:42] ERROR: Explicit valence for atom # 4 N, 4, is greater than permitted
    [11:23:43] Warning: conflicting stereochemistry at atom 2 ignored.
    [11:23:44] Warning: conflicting stereochemistry at atom 11 ignored.
    [11:23:44] Warning: conflicting stereochemistry at atom 11 ignored.
    [11:23:44] Warning: conflicting stereochemistry at atom 3 ignored.
    [11:23:44] Warning: conflicting stereochemistry at atom 3 ignored.
    [11:23:44] Warning: conflicting stereochemistry at atom 10 ignored.
    [11:23:44] Warning: conflicting stereochemistry at atom 10 ignored.
    [11:23:44] Warning: conflicting stereochemistry at atom 8 ignored.
    [11:23:44] Warning: conflicting stereochemistry at atom 8 ignored.
    [11:23:44] Warning: conflicting stereochemistry at atom 14 ignored.
    [11:23:44] Warning: conflicting stereochemistry at atom 14 ignored.
    [11:23:44] Warning: conflicting stereochemistry at atom 13 ignored.
    [11:23:44] Warning: conflicting stereochemistry at atom 13 ignored.
    Traceback (most recent call last):
    File "22.py", line 20, in
    converter(sys.argv[1])
    File "22.py", line 13, in converter
    smi = Chem.MolToSmiles(mol)
    Boost.Python.ArgumentError: Python argument types in
    rdkit.Chem.rdmolfiles.MolToSmiles(NoneType)
    did not match C++ signature:
    MolToSmiles(RDKit::ROMol mol, bool isomericSmiles=True, bool kekuleSmiles=False, int rootedAtAtom=-1, bool canonical=True, bool allBondsExplicit=False, bool allHsExplicit=False, bool doRandom=False)
import sys
from rdkit import Chem

def converter(file_name):
    mols = [mol for mol in Chem.SDMolSupplier(file_name)]
    outname = file_name.split(".sdf")[0] + ".txt"
    out_file = open(outname, "w")
    for mol in mols:
        smi = Chem.MolToSmiles(mol)
        name = mol.GetProp("_Name")
        out_file.write("{}\t{}\n".format(smi, name))
    out_file.close()

if __name__ == "__main__":
    converter(sys.argv[1])

Most helpful comment

from rdkit.Chem.PandasTools import LoadSDF
df = LoadSDF(sdf_filename, smilesName='SMILES')

This will create a pandas DataFrame with 'SMILES' column

All 3 comments

from rdkit.Chem.PandasTools import LoadSDF
df = LoadSDF(sdf_filename, smilesName='SMILES')

This will create a pandas DataFrame with 'SMILES' column

@BillLawrence111
If you handle thoudsands or millions of compounds at once, you shouldn't keep all mol objects on python array in terms of memory usage. SDMolSupplier is a generator, thus you may directly run iteration over the supplier like this:

import sys
from rdkit import Chem

def converter(file_name):
    sppl = Chem.SDMolSupplier(file_name)
    outname = file_name.replace(".sdf", ".txt")
    out_file = open(outname, "w")
    for mol in sppl:
        if mol is not None:# some compounds cannot be loaded.
            smi = Chem.MolToSmiles(mol)
            name = mol.GetProp("_Name")
            out_file.write(f"{smi}\t{name}\n")
    out_file.close()
if __name__ == "__main__":
    converter(sys.argv[1])

Besides, the error you encountered was caused by invalid forms of structure. You may correct compounds before using RDKit. Otherwise, you must ignore such compounds as the above code does.

So how can we know which molecules are indeed invalid and remove them from the dataset?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mrcblt picture mrcblt  路  5Comments

mc-robinson picture mc-robinson  路  3Comments

panpan2 picture panpan2  路  3Comments

IgnacioJPickering picture IgnacioJPickering  路  3Comments

contrebande-labs picture contrebande-labs  路  5Comments