From 96a27caab29db7eb572eb491a0a66dbca33b1a35 Mon Sep 17 00:00:00 2001 From: RYDE-WORK Date: Sun, 18 Jan 2026 22:06:03 +0800 Subject: [PATCH] ... --- cal_features.py | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 cal_features.py diff --git a/cal_features.py b/cal_features.py deleted file mode 100644 index 124c451..0000000 --- a/cal_features.py +++ /dev/null @@ -1,35 +0,0 @@ -import logging -import numpy as np -import pandas as pd -import multiprocessing as mp -from typing import List -from tqdm import tqdm -from rdkit import Chem -from rdkit.Chem import ( - Mol, - AllChem, - MACCSkeys, - Descriptors -) - -mp.set_start_method('fork') # Screw MacOS -logger = logging.getLogger(__name__) -logger.setLevel(logging.INFO) - - -def get_morgan(mol: Mol, radius: int = 2, nBits: int = 1024) -> List[int]: - return AllChem.GetMorganFingerprintAsBitVect( - mol, - radius=radius, - nBits=nBits, - useChirality=False - ).ToList() - - -def get_maccs(mol: Mol) -> List[int]: - return MACCSkeys.GenMACCSKeys(mol).ToList() - - -def get_rdkit_descriptors(mol: Mol) -> List[float]: - desc_dict = Descriptors.CalcMolDescriptors(mol) - return list(desc_dict.values()) \ No newline at end of file