Hello All,

I am parsing a set of 2D sd files in rdkit in order to generate a 3D structure. 
 The code is below and is based on what I could find on the  list for errors in 
generating 3D coordinates.
Temp.mol is the downloaded molfile from chembl for compound CHEMBL500809.  I 
must be doing something incorrectly in the code below as it still throws a -1 
at the embed step.


>>suppl = Chem.SDMolSupplier('temp.mol')
>>ms = [x for x in suppl if x is not None]
>>print ("This is the number of entries read in",len(ms))
1
>>for m in ms:
>>tmp=AllChem.Compute2DCoords(m)
>>m3=Chem.AddHs(m)
>>print (AllChem.EmbedMolecule(m3,useRandomCoords=True))
-1
Just finished embedding Molecule
Traceback (most recent call last):
  File "sdf2D2Canonical3DSDF.py", line 45, in <module>
    AllChem.UFFOptimizeMolecule(m3,4000)
ValueError: Bad Conformer Id


This is the 2D structure from CHEMBL

[cid:image001.png@01D31681.8EFC2D80]
  SciTegic12231509382D CHEMBL500809

68 77  0  0  0  0            999 V2000
   -1.7837    1.4355    0.0000 C   0  0
   -2.4967    1.0206    0.0000 C   0  0  1  0  0  0
   -3.2126    1.4306    0.0000 C   0  0  1  0  0  0
   -3.2155    2.2556    0.0000 O   0  0
   -3.9256    1.0156    0.0000 C   0  0  1  0  0  0
   -4.7139    0.7721    0.0000 O   0  0
   -2.9339    1.0873    0.0000 O   0  0
   -2.8213    0.3944    0.0000 C   0  0
   -3.2069   -0.2194    0.0000 C   0  0  1  0  0  0
   -3.2040   -1.0444    0.0000 C   0  0  1  0  0  0
   -3.9170   -1.4594    0.0000 C   0  0
   -4.6329   -1.0494    0.0000 C   0  0  1  0  0  0
   -5.3460   -1.4644    0.0000 C   0  0
   -6.0619   -1.0543    0.0000 C   0  0
   -6.0647   -0.2293    0.0000 C   0  0
   -6.7806    0.1807    0.0000 O   0  0
   -5.3517    0.1856    0.0000 C   0  0  1  0  0  0
   -5.3546    1.0106    0.0000 O   0  0
   -4.6358   -0.2244    0.0000 C   0  0  1  0  0  0
   -4.8935    0.5594    0.0000 C   0  0
   -3.9228    0.1906    0.0000 C   0  0  1  0  0  0
   -5.3431   -2.2894    0.0000 C   0  0
   -2.4881   -1.4544    0.0000 O   0  0
   -1.7751   -1.0394    0.0000 C   0  0
   -1.0592   -1.4495    0.0000 O   0  0
   -1.7779   -0.2144    0.0000 C   0  0  2  0  0  0
   -1.0649    0.2005    0.0000 O   0  0
   -0.3490   -0.2095    0.0000 C   0  0
   -0.3461   -1.0345    0.0000 O   0  0
    0.3640    0.2055    0.0000 C   0  0
    0.3612    1.0305    0.0000 O   0  0
    1.0799   -0.2045    0.0000 O   0  0
    1.7930    0.2105    0.0000 C   0  0  2  0  0  0
    2.2833   -0.1399    0.0000 C   0  0  1  0  0  0
    2.5117   -1.0245    0.0000 C   0  0  1  0  0  0
    1.7987   -1.4395    0.0000 C   0  0
    3.2276   -1.4346    0.0000 C   0  0  1  0  0  0
    3.2305   -2.2595    0.0000 O   0  0
    3.9407   -1.0196    0.0000 C   0  0  1  0  0  0
    4.7289   -0.7761    0.0000 O   0  0
    2.9489   -1.0912    0.0000 O   0  0
    2.6107   -0.3387    0.0000 C   0  0
    3.2219    0.2154    0.0000 C   0  0  2  0  0  0
    3.2190    1.0404    0.0000 C   0  0  1  0  0  0
    3.9321    1.4554    0.0000 C   0  0
    4.6480    1.0454    0.0000 C   0  0  1  0  0  0
    5.3610    1.4604    0.0000 C   0  0
    6.0769    1.0504    0.0000 C   0  0
    6.0798    0.2254    0.0000 C   0  0
    6.7957   -0.1846    0.0000 O   0  0
    5.3667   -0.1896    0.0000 C   0  0  1  0  0  0
    5.3696   -1.0146    0.0000 O   0  0
    4.6508    0.2204    0.0000 C   0  0  1  0  0  0
    4.9085   -0.5633    0.0000 C   0  0
    3.9378   -0.1946    0.0000 C   0  0  1  0  0  0
    5.3581    2.2854    0.0000 C   0  0
    2.5031    1.4504    0.0000 O   0  0
    1.7901    1.0355    0.0000 C   0  0
    1.0742    1.4455    0.0000 O   0  0
   -2.4938    0.1956    0.0000 C   0  0  1  0  0  0
   -1.6295    0.6986    0.0000 H   0  0
    4.8056   -0.6916    0.0000 H   0  0
    4.6445    2.0454    0.0000 H   0  0
    3.2155    2.0404    0.0000 H   0  0
    1.4588   -0.7058    0.0000 H   0  0
   -4.7905    0.6876    0.0000 H   0  0
   -4.6294   -2.0494    0.0000 H   0  0
   -3.2005   -2.0444    0.0000 H   0  0
  2  1  1  6
  2  3  1  0
  3  4  1  6
  3  5  1  0
  5  6  1  6
  5  7  1  0
  7  8  1  0
 9  8  1  1
  9 10  1  0
10 11  1  0
12 11  1  0
12 13  1  0
13 14  2  0
14 15  1  0
15 16  2  0
15 17  1  0
17 18  1  1
17 19  1  0
19 12  1  0
19 20  1  1
21 19  1  0
21  5  1  0
21  9  1  0
13 22  1  0
10 23  1  0
23 24  1  0
24 25  2  0
24 26  1  0
26 27  1  1
27 28  1  0
28 29  2  0
28 30  1  0
30 31  2  0
30 32  1  0
33 32  1  1
34 33  1  0
34 35  1  0
35 36  1  6
35 37  1  0
37 38  1  6
37 39  1  0
39 40  1  6
39 41  1  0
41 42  1  0
43 42  1  1
43 34  1  0
43 44  1  0
44 45  1  0
46 45  1  0
46 47  1  0
47 48  2  0
48 49  1  0
49 50  2  0
49 51  1  0
51 52  1  1
51 53  1  0
53 46  1  0
53 54  1  1
55 53  1  0
55 39  1  0
55 43  1  0
47 56  1  0
44 57  1  0
57 58  1  0
58 33  1  0
58 59  2  0
60 26  1  0
60  2  1  0
60  9  1  0
60 61  1  1
55 62  1  6
46 63  1  6
44 64  1  1
34 65  1  1
21 66  1  6
12 67  1  6
10 68  1  1
M  END
------------------------------------------------------------------------------
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
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to