Hattie's picture
Add model files
91f863a
Raw
History Blame Contribute Delete
565 Bytes
from rdkit import Chem
from rdkit.Chem import Descriptors
def load_rdkit_description(smiles:str):
mol = Chem.MolFromSmiles(smiles)
EXCL = {
"qed","SPS","HeavyAtomMolWt","ExactMolWt","BCUT2D_LOGPHI","BCUT2D_LOGPLOW",
"MolLogP","SlogP_VSA1","SlogP_VSA2","SlogP_VSA3","SlogP_VSA4","SlogP_VSA5",
"SlogP_VSA6","SlogP_VSA7","SlogP_VSA8","SlogP_VSA9","SlogP_VSA10","SlogP_VSA11","SlogP_VSA12"
}
names_funcs = [(n,f) for (n,f) in Descriptors.descList if n not in EXCL]
vals = {n: f(mol) for n,f in names_funcs}
return vals