Greg,

Once again - many thanks.

I admit to making my solution way harder, 'cos I'm an idiot: I was deleting
all conformers but the one I needed. Your solution is much more elegant
(and safer!). This now works flawlessly for me.

Best,
Andy

On Tue, Oct 31, 2017 at 2:06 AM, Greg Landrum <greg.land...@gmail.com>
wrote:

>
>
> On Mon, Oct 30, 2017 at 10:14 PM, Andy Jennings <andy.j.jenni...@gmail.com
> > wrote:
>
>>
>> Next question on this topic, as I can't find it from digging into various
>> sources.
>>
>> The solution you pointed me to works very well. I'm now expanding it to
>> compare the 'color' between two conformations from different molecules. I
>> cannot, however, see how to do this. Is there an option such as
>> 'confId1/confId2' like the ShapeTanimotoDist routine?
>>
>
> Interesting question. It looks like the answer is currently "no".
> The underlying C++ feature objects do have a setActiveConformer() method
> that would allow you to do this, but it seems like this isn't currently
> available in Python.
>
> It's not hard to fix that (and I will), but that doesn't help you
> immediately. In the short term, you probably need to create single
> conformer molecules for this. Here's a way to do that:
>
>
> In [6]: AllChem.EmbedMultipleConfs(m)
>
> In [7]: nm = Chem.Mol(m)
>
> In [8]: nm.RemoveAllConformers()
>
> In [10]: nm.AddConformer(m.GetConformer(2),assignId=True)
> Out[10]: 0
>
> Best,
> -greg
>
>
>
------------------------------------------------------------------------------
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