Created
November 5, 2019 15:15
-
-
Save goraj/2302fe0fe9609cf68fbbf32e06e09569 to your computer and use it in GitHub Desktop.
GetSparseCountFingerprint.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scipy.sparse import csr_matrix | |
from rdkit import Chem | |
from rdkit.Chem.rdFingerprintGenerator import GetRDKitFPGenerator | |
smiles = 'CC1=C(C=C(C=C1)NC(=O)C2=CC=C(C=C2)CN3CCN(CC3)C)NC4=NC=CC(=N4)C5=CN=CC=C5' | |
molobj = Chem.MolFromSmiles(smiles) | |
for max_path in [2,3,4,5,6,7]: | |
rdk_gen = GetRDKitFPGenerator(maxPath=max_path) | |
fp = rdk_gen.GetSparseCountFingerprint(molobj) | |
print(fp.GetLength()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output:
18446744073709551615
18446744073709551615
18446744073709551615
18446744073709551615
18446744073709551615
18446744073709551615