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

Reply via email to