Here’s code to draw the on-bit fragments in the hashed Morgan fingerprints.
mol = Chem.MolFromSmiles('CCC')
bi = {}
cfp = AllChem.GetHashedMorganFingerprint(mol, 2, nBits=1024, bitInfo=bi)
on_bits = [x for x in bi]
prints = [(mol, x, bi) for x in on_bits]
Draw.DrawMorganBits(prints, molsPerRow=4, legends=[str(x) for x in on_bits])
On 2 Nov 2022, at 16.52, Brianna Greenstein
<[email protected]<mailto:[email protected]>> wrote:
You don't often get email from [email protected]<mailto:[email protected]>. Learn why
this is important<https://aka.ms/LearnAboutSenderIdentification>
Some people who received this message don't often get email from
[email protected]<mailto:[email protected]>. Learn why this is
important<https://aka.ms/LearnAboutSenderIdentification>
Hi, I had some questions about Morgan fingerprint counts. I used
AllChem.GetHashedMorganFingerprint(mol, 2, nBits=2048) to get counts as
descriptors for ML models. I am looking at the feature importance and some of
these bits came up as important. I had a few questions on understanding these
hashed fingerprints.
1. Are the structures the bits represent the same for
GetHashedMorganFingerprint and GetMorganFingerprintasBitVect?
1. How can I visualize what a specific bit in the hashed morgan fingerprint
looks like? Can I use DrawMorganBit to visualize it the same way I would for
the normal fingerprint?
_______________________________________________
Rdkit-discuss mailing list
[email protected]<mailto:[email protected]>
https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Frdkit-discuss&data=05%7C01%7Cjhjensen%40chem.ku.dk%7C03ef15818e8042dcc1e108dabd082573%7Ca3927f91cda14696af898c9f1ceffa91%7C0%7C0%7C638030139958745514%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=Df42SquCavEVi8efFOKYIEYif8yW9baNhbf8%2BELDSmY%3D&reserved=0
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss