Re: [Rdkit-discuss] how to calculate the Morgan Fingerprint of a molecule smart?
Open-Source Cheminformatics and Machine Learning
Brought to you by:
glandrum
|
From: Omar H. <oma...@gm...> - 2020-05-12 11:39:14
|
Dear Shaozhen,
You may try:
from rdkit.Chem import AllChem
from rdkit import Chem
m1 = Chem.MolFromSmarts('[*:1]-[C;H0;+0:2](-[*:3])=[O;H0;+0:4]')
AllChem.Compute2DCoords(m1)
m1.UpdatePropertyCache()
fp1 = AllChem.GetMorganFingerprint(m1,2)
print (fp1)
I hope this works for you.
Best regards,
Omar
On Tue, May 12, 2020 at 1:34 PM 丁邵珍 <164...@qq...> wrote:
> Dear Developers:
> I want to calculate the Morgan Fingerprint of a molecule smart, so I ran
> the code shown below.
>
> from rdkit.Chem import AllChem
> from rdkit import Chem
> m1 = Chem.MolFromSmarts('[*:1]-[C;H0;+0:2](-[*:3])=[O;H0;+0:4]')
> print (m1)
> fp1 = AllChem.GetMorganFingerprint(m1,2)
> print (fp1)
>
> However, it raised error.
> Could you help me to solve this issue?
> The version of rdkit installed in my computer is 2019.03.01.
>
> Thanks a lot
> Best wishes.
> shaozhen
> _______________________________________________
> Rdkit-discuss mailing list
> Rdk...@li...
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
|