Re: [Rdkit-discuss] difficulties with AllChem.EmbedMultipleConfs() on a macrocycle

2017-05-08 Thread Curt Fischer
Thanks Greg!  This was the impetus I needed to upgrade to 2017.03.

I now confirm that conformer generation happens very quickly.  It's so nice
to be able to visualize so nicely with py3dmol too.

Curt

On Sun, May 7, 2017 at 9:37 PM, Greg Landrum  wrote:

> Going back through old mail I realized that I never did follow up on this
> one.
>
> It looks like these structures now embed (using the 2017.03.1 release). I
> assume that the changes I made to fix #1240 (https://github.com/rdkit/
> rdkit/issues/1240) - which make the code more permissive in how the
> conformers are filtered - are responsible for that.
>
> -greg
>
>
>
>
> On Sat, Mar 4, 2017 at 7:39 AM, Greg Landrum 
> wrote:
>
>> Hi Curt,
>>
>> I believe that the problem here is caused by the number of specified
>> chiral centers in a ring. I'm basing that guess on the fact that if I turn
>> off the option to enforce chirality I get an answer very quickly:
>>
>> In [12]: ps = AllChem.ETKDG()
>>
>> In [13]: ps.randomSeed = 0xf00d
>>
>> In [14]: ps.enforceChirality=False
>>
>> In [15]: AllChem.EmbedMolecule(mh,ps)
>> Out[15]: 0
>>
>>
>> but if I go back to the defaults I get the same lack of results that you
>> were seeing:
>>
>> In [16]: ps.enforceChirality=True
>>
>> In [17]: AllChem.EmbedMolecule(mh,ps)
>> Out[17]: -1
>>
>>
>>
>> I'm not sure that there's a straightforward solution to this problem
>> without code changes, but I'll do a bit of looking to see if I can figure
>> something out.
>>
>> -greg
>>
>>
>>
>> On Thu, Mar 2, 2017 at 7:34 PM, Curt Fischer 
>> wrote:
>>
>>> Hi all,
>>>
>>> I really like combination of rdkit and py3dmol and have been able to
>>> replicate e.g. Greg's notebook here: http://nbviewer.jupyter.
>>> org/github/greglandrum/rdkit_blog/blob/master/notebooks/Tryi
>>> ng%20py3Dmol.ipynb
>>>
>>> But I can't seem to get AllChem.EmbedMultipleConfs() to generate any
>>> valid conformers for a macrotriolide, macrosphelide A.
>>>
>>> *macrosphelide_a_smiles =
>>> 'C[C@H]1CC(O[C@H](C)[C@H](O)/C=C/C(O[C@@H](C)[C@@H](O)/C=C/C(O1)=O)=O)=O'*
>>> *m = Chem.MolFromSmiles(macrosphelide_a_smiles)*
>>> *mh = Chem.AddHs(m)*
>>> *AllChem.EmbedMultipleConfs(mh, useExpTorsionAnglePrefs=True,
>>> useBasicKnowledge=True)*
>>> *mb = Chem.MolToMolBlock(mh)*
>>>
>>> The EmbedMultipleConfs() call never terminates for me.  If I use a
>>> non-zero value for *maxAttempts*, the call does terminate, but when I
>>> look at *mb*, the coordinates for all atoms are zero.
>>>
>>> I've tried playing around with a few of the other options, without
>>> luck.  Either all atom coordinates are still zero after
>>> *EmbedMultipleConfs()*, or the function call never terminates.
>>>
>>> Any chance someone knows how to coax this function into yielding a
>>> useful conformation for my molecule?
>>>
>>> Curt
>>>
>>>
>>> 
>>> --
>>> 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
>>>
>>>
>>
>
--
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


Re: [Rdkit-discuss] difficulties with AllChem.EmbedMultipleConfs() on a macrocycle

2017-05-07 Thread Greg Landrum
Going back through old mail I realized that I never did follow up on this
one.

It looks like these structures now embed (using the 2017.03.1 release). I
assume that the changes I made to fix #1240 (
https://github.com/rdkit/rdkit/issues/1240) - which make the code more
permissive in how the conformers are filtered - are responsible for that.

-greg




On Sat, Mar 4, 2017 at 7:39 AM, Greg Landrum  wrote:

> Hi Curt,
>
> I believe that the problem here is caused by the number of specified
> chiral centers in a ring. I'm basing that guess on the fact that if I turn
> off the option to enforce chirality I get an answer very quickly:
>
> In [12]: ps = AllChem.ETKDG()
>
> In [13]: ps.randomSeed = 0xf00d
>
> In [14]: ps.enforceChirality=False
>
> In [15]: AllChem.EmbedMolecule(mh,ps)
> Out[15]: 0
>
>
> but if I go back to the defaults I get the same lack of results that you
> were seeing:
>
> In [16]: ps.enforceChirality=True
>
> In [17]: AllChem.EmbedMolecule(mh,ps)
> Out[17]: -1
>
>
>
> I'm not sure that there's a straightforward solution to this problem
> without code changes, but I'll do a bit of looking to see if I can figure
> something out.
>
> -greg
>
>
>
> On Thu, Mar 2, 2017 at 7:34 PM, Curt Fischer 
> wrote:
>
>> Hi all,
>>
>> I really like combination of rdkit and py3dmol and have been able to
>> replicate e.g. Greg's notebook here: http://nbviewer.jupyter.
>> org/github/greglandrum/rdkit_blog/blob/master/notebooks/Tryi
>> ng%20py3Dmol.ipynb
>>
>> But I can't seem to get AllChem.EmbedMultipleConfs() to generate any
>> valid conformers for a macrotriolide, macrosphelide A.
>>
>> *macrosphelide_a_smiles =
>> 'C[C@H]1CC(O[C@H](C)[C@H](O)/C=C/C(O[C@@H](C)[C@@H](O)/C=C/C(O1)=O)=O)=O'*
>> *m = Chem.MolFromSmiles(macrosphelide_a_smiles)*
>> *mh = Chem.AddHs(m)*
>> *AllChem.EmbedMultipleConfs(mh, useExpTorsionAnglePrefs=True,
>> useBasicKnowledge=True)*
>> *mb = Chem.MolToMolBlock(mh)*
>>
>> The EmbedMultipleConfs() call never terminates for me.  If I use a
>> non-zero value for *maxAttempts*, the call does terminate, but when I
>> look at *mb*, the coordinates for all atoms are zero.
>>
>> I've tried playing around with a few of the other options, without luck.
>> Either all atom coordinates are still zero after *EmbedMultipleConfs()*,
>> or the function call never terminates.
>>
>> Any chance someone knows how to coax this function into yielding a useful
>> conformation for my molecule?
>>
>> Curt
>>
>>
>> 
>> --
>> 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
>>
>>
>
--
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


Re: [Rdkit-discuss] difficulties with AllChem.EmbedMultipleConfs() on a macrocycle

2017-03-03 Thread Sereina
Hi Curt,

Yes, I’m sorry, I used accidentally a modified version of mine where I played 
with a new feature to favour longer distances. With the standard RDKit version, 
I also get no conformation for the molecule without Hs. I indend to commit this 
feature as an option, but did not yet manage to do so. I will try to get to it 
in the next days and then write a short email to the mailing list when it is in.

Best,
Sereina


On 03 Mar 2017, at 00:15, Curt Fischer  wrote:

> Thanks for the notebook Sereina!
> 
> Unfortunately when I run it I get different results.  In your version, the 
> very first call to EmbedMolecule() returns 0, which presumably means that 
> embedding went OK.
> 
> ## Embed the molecule without Hs
> AllChem.EmbedMolecule(m, useExpTorsionAnglePrefs=True, useBasicKnowledge=True)
> 
> Out[7]: 0
> 
> 
> When I run your notebook, this same call returns -1.  Maybe my rdkit is 
> different than yours?  I'm using '2016.09.2' on Mac OSX 64-bit.
> 
> 
> 
> On Thu, Mar 2, 2017 at 12:00 PM, Sereina  wrote:
> Hi Curt,
> 
> This is an interesting one. If you add the hydrogens before generating the 
> conformer as in your example, then no conformation can be found. However, if 
> you add them *after* the conformer generation, it works fine. Maybe that 
> could serve as a work around for you. I attach a notebook as illustration. As 
> this occurs with both DG and ETKDG, it may be due to the tests to ensure that 
> the chiral centers are correct. I will have a closer look (hopefully with 
> Greg’s help).
> 
> Best,
> Sereina
> 
> 
> 
> 
> 
> On 02 Mar 2017, at 19:34, Curt Fischer  wrote:
> 
>> Hi all,
>> 
>> I really like combination of rdkit and py3dmol and have been able to 
>> replicate e.g. Greg's notebook here: 
>> http://nbviewer.jupyter.org/github/greglandrum/rdkit_blog/blob/master/notebooks/Trying%20py3Dmol.ipynb
>> 
>> But I can't seem to get AllChem.EmbedMultipleConfs() to generate any valid 
>> conformers for a macrotriolide, macrosphelide A.
>> 
>> macrosphelide_a_smiles = 
>> 'C[C@H]1CC(O[C@H](C)[C@H](O)/C=C/C(O[C@@H](C)[C@@H](O)/C=C/C(O1)=O)=O)=O'
>> m = Chem.MolFromSmiles(macrosphelide_a_smiles)
>> mh = Chem.AddHs(m)
>> AllChem.EmbedMultipleConfs(mh, useExpTorsionAnglePrefs=True, 
>> useBasicKnowledge=True)
>> mb = Chem.MolToMolBlock(mh)
>> 
>> The EmbedMultipleConfs() call never terminates for me.  If I use a non-zero 
>> value for maxAttempts, the call does terminate, but when I look at mb, the 
>> coordinates for all atoms are zero.
>> 
>> I've tried playing around with a few of the other options, without luck.  
>> Either all atom coordinates are still zero after EmbedMultipleConfs(), or 
>> the function call never terminates.
>> 
>> Any chance someone knows how to coax this function into yielding a useful 
>> conformation for my molecule?
>> 
>> Curt
>> 
>> --
>> 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
> 
> 
> 

--
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


Re: [Rdkit-discuss] difficulties with AllChem.EmbedMultipleConfs() on a macrocycle

2017-03-02 Thread Curt Fischer
Thanks for the notebook Sereina!

Unfortunately when I run it I get different results.  In your version, the
very first call to EmbedMolecule() returns 0, which presumably means that
embedding went OK.




*## Embed the molecule without HsAllChem.EmbedMolecule(m,
useExpTorsionAnglePrefs=True, useBasicKnowledge=True)Out[7]: 0*


When I run your notebook, this same call returns -1.  Maybe my rdkit is
different than yours?  I'm using '2016.09.2' on Mac OSX 64-bit.



On Thu, Mar 2, 2017 at 12:00 PM, Sereina  wrote:

> Hi Curt,
>
> This is an interesting one. If you add the hydrogens before generating the
> conformer as in your example, then no conformation can be found. However,
> if you add them *after* the conformer generation, it works fine. Maybe that
> could serve as a work around for you. I attach a notebook as illustration.
> As this occurs with both DG and ETKDG, it may be due to the tests to ensure
> that the chiral centers are correct. I will have a closer look (hopefully
> with Greg’s help).
>
> Best,
> Sereina
>
>
>
>
>
> On 02 Mar 2017, at 19:34, Curt Fischer  wrote:
>
> Hi all,
>
> I really like combination of rdkit and py3dmol and have been able to
> replicate e.g. Greg's notebook here: http://nbviewer.jupyter.
> org/github/greglandrum/rdkit_blog/blob/master/notebooks/
> Trying%20py3Dmol.ipynb
>
> But I can't seem to get AllChem.EmbedMultipleConfs() to generate any
> valid conformers for a macrotriolide, macrosphelide A.
>
> *macrosphelide_a_smiles =
> 'C[C@H]1CC(O[C@H](C)[C@H](O)/C=C/C(O[C@@H](C)[C@@H](O)/C=C/C(O1)=O)=O)=O'*
> *m = Chem.MolFromSmiles(macrosphelide_a_smiles)*
> *mh = Chem.AddHs(m)*
> *AllChem.EmbedMultipleConfs(mh, useExpTorsionAnglePrefs=True,
> useBasicKnowledge=True)*
> *mb = Chem.MolToMolBlock(mh)*
>
> The EmbedMultipleConfs() call never terminates for me.  If I use a
> non-zero value for *maxAttempts*, the call does terminate, but when I
> look at *mb*, the coordinates for all atoms are zero.
>
> I've tried playing around with a few of the other options, without luck.
> Either all atom coordinates are still zero after *EmbedMultipleConfs()*,
> or the function call never terminates.
>
> Any chance someone knows how to coax this function into yielding a useful
> conformation for my molecule?
>
> Curt
>
> 
> --
> 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
>
>
>
>
--
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