Re: [Rdkit-discuss] How can I count the substructures with RDKit?

2018-08-04 Thread Shojiro Shibayama
Dear Takayuki, Thank you for your reply. What I want to do is to count substructures based on fragments in MACCS key, not to count the number of types of fragments that appear in a molecule. My temporary measure is to simply count the substructures using `mol.GetSubstructMatches`. A sample code

Re: [Rdkit-discuss] How can I count the substructures with RDKit?

2018-08-04 Thread Taka Seri
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 =

[Rdkit-discuss] How can I count the substructures with RDKit?

2018-08-04 Thread Shojiro Shibayama
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