Dear Shojiro,

To count the number of on bits, you can use GetNumOnBits.
http://www.rdkit.org/Python_Docs/rdkit.DataStructs.cDataStructs.ExplicitBitVect-class.html#GetNumOnBits

from rdkit import Chem

from rdkit.Chem import AllChem

mol = Chem.MolFromSmiles('O1ccnccc1')

maccsfp = AllChem.GetMACCSKeysFingerprint(mol)

print(macsfp.GetNumOnBits())

# output is 16


Kind regards,

Takayuki

2018年8月4日(土) 17:14 Shojiro Shibayama <[email protected]>:

> Hi, community members,
>
> I'm looking for a way to count all fragments that I give for some
> quantitative analysis. I want the count data based on e.g. MACCS key's
> fragments instead of MACCS key 0/1 descriptor itself. Could anyone please
> help me with this? Thanks in advance.
>
> Sincerely,
> Shojiro
>
> ------------------------------------------------------------------------------
> 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
> [email protected]
> 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to