As Dan said: you should be adding Hs to the molecule before generating
conformations. That clears up the problem:

In [17]: AllChem.EmbedMolecule(Chem.MolFromSmiles('CC[C@H](C)O'))

Out[17]: -1

In [18]: AllChem.EmbedMolecule(Chem.AddHs(Chem.MolFromSmiles('CC[C@H](C)O')))

Out[18]: 0


I would have actually expected that you could get a conformer with the Hs
and think there's likely a bug connected to the way chiral centers are
handed in the conformer generation code (embedding the non-chiral SMILES
CCC(C)O works just fine) that's causing this failure, but that doesn't
change the fact that it's always better to add Hs before generating
conformations.

-greg


On Fri, Sep 27, 2019 at 10:12 PM Dan Nealschneider <
dan.nealschnei...@schrodinger.com> wrote:

> Guillaume-
> You may want to add hydrogens before embedding. Not sure *specifically*
> why it's required in this case - maybe the stereo center needs a hydrogen
> in order to pop it into 3d?
>
> *dan nealschneider* | senior developer
> [image: Schrodinger Logo] <https://www.schrodinger.com/>
>
>
> On Wed, Sep 25, 2019 at 1:45 AM Guillaume GODIN <
> guillaume.go...@firmenich.com> wrote:
>
>> Dear All,
>>
>>
>>
>> One question why this is not working ?
>>
>>
>>
>> def mol3D(mol):
>>
>>     tot = AllChem.EmbedMolecule(mol)
>>
>>     try:
>>
>>         X = AllChem.Get3DDistanceMatrix(mol)
>>
>>     except:
>>
>>         print('err')
>>
>>         print(tot)
>>
>>         n = mol.GetNumAtoms()
>>
>>         X = np.zeros(n,n)
>>
>>     return X
>>
>>
>>
>> mol = Chem.MolFromSmiles('CC[C@H](C)O')
>>
>> X = mol3D(mol)
>>
>>
>>
>> Result:
>>
>>
>>
>> err
>>
>> -1
>>
>>
>> ---------------------------------------------------------------------------
>>
>> ValueError                                Traceback (most recent call
>> last)
>>
>> <ipython-input-17-f18aabd854d2> in mol3D(mol)
>>
>> *      3*     try:
>>
>> ----> 4         X = AllChem.Get3DDistanceMatrix(mol)
>>
>> *      5*     except:
>>
>>
>>
>> ValueError: Bad Conformer Id
>>
>>
>>
>> During handling of the above exception, another exception occurred:
>>
>>
>>
>> Thanks in advance,
>>
>>
>>
>> Guillaume
>>
>> ***********************************************************************************
>> DISCLAIMER
>> This email and any files transmitted with it, including replies and
>> forwarded copies (which may contain alterations) subsequently transmitted
>> from Firmenich, are confidential and solely for the use of the intended
>> recipient. The contents do not represent the opinion of Firmenich except to
>> the extent that it relates to their official business.
>>
>> ***********************************************************************************
>> _______________________________________________
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
> _______________________________________________
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to