Spaces:
Sleeping
Sleeping
File size: 952 Bytes
2225f77 |
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 27 28 29 30 31 32 33 34 35 36 |
# from syba.syba import SybaClassifier
# def SYBAscore(smiles_list):
# """
# Compute the average SYBA score for a list of SMILES strings.
# Parameters:
# - smiles_list (list of str): A list of SMILES strings representing molecules.
# Returns:
# - float: The average SYBA score for the list of molecules.
# """
# syba = SybaClassifier()
# syba.fitDefaultScore()
# scores = []
# for smiles in smiles_list:
# try:
# score = syba.predict(smi=smiles)
# scores.append(score)
# except Exception as e:
# print(f"Error processing SMILES '{smiles}': {e}")
# continue
# if scores:
# return sum(scores) / len(scores)
# else:
# return None # Or handle empty list or all failed predictions as needed
# syba = SybaClassifier()
# syba.fitDefaultScore()
# smi = "O=C(C)Oc1ccccc1C(=O)O"
# print(syba.predict(smi))
import sascorer |