Spaces:
Sleeping
Sleeping
File size: 473 Bytes
6ae852e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
from rdkit.Chem import AllChem
from rdkit.Chem import DataStructs
import numpy as np
import pandas as pd
import os
_type = 'SMARTS-based'
file_path = os.path.dirname(__file__)
def GetMACCSFPs(mol):
'''
166 bits
'''
fp = AllChem.GetMACCSKeysFingerprint(mol)
arr = np.zeros((0,), dtype=np.bool_)
DataStructs.ConvertToNumpyArray(fp, arr)
return arr
def GetMACCSFPInfos():
return pd.read_excel(os.path.join(file_path, 'maccskeys.xlsx'))
|