Dear Greg,
Thank you for your response.
The suggestion f.GetPos(confId=f.GetActiveConformer()) works and the
retrieved feat position matches its actual position in the given conformer
Id.

Thanks for the help,
Omar


On Mon, Jul 8, 2019 at 9:13 AM Greg Landrum <greg.land...@gmail.com> wrote:

> Hi Omar,
>
> This is a bug. Thanks for pointing it out.
> Until this is fixed, ff you want to get the position of the feature in its
> associated conformer, you can do the following:
> f.GetPos(confId=f.GetActiveConformer())
>
> I hope this helps,
> -greg
>
>
> On Sun, Jul 7, 2019 at 1:44 PM Omar H94 <omar8...@gmail.com> wrote:
>
>> Dear RDKit users,
>> I have a molecule with 100 generated conformers. I want to calculate the
>> MolFeatures for each conformer. However, when using GetFeaturesForMol(mol,
>> confId= ), the function generate features for first conformer only even
>> when the confId is set to another number.
>>
>> This is the code:
>>
>> # Conformers generation:
>> mol = Chem.MolFromSmiles('C1CCC1OC')
>> m2=Chem.AddHs(mol)
>> AllChem.EmbedMultipleConfs(m2, numConfs=100, params=AllChem.ETKDG())
>>
>> # Feature generation (e.g. for conformers 10 and 40)
>> fdefName = os.path.join(RDConfig.RDDataDir,'BaseFeatures.fdef')
>> factory = ChemicalFeatures.BuildFeatureFactory(fdefName)
>> feats_10 = factory.GetFeaturesForMol(m2, confId=10)
>> feats_40 = factory.GetFeaturesForMol(m2, confId=40)
>>
>> However, when I check the positions of the features in feats_10 and
>> feats_40, they are identical and correspond to the first conformer's
>> features position (not 10 or 40). This happens regardless of what conformer
>> number I supply in confId. Although I manually confirmed the conformers
>> have different features positions.
>>
>> Thanks,
>> Omar
>>
>> _______________________________________________
>> 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