Skip to content

Commit

Permalink
update admet model
Browse files Browse the repository at this point in the history
  • Loading branch information
kexinhuang12345 committed Jun 9, 2021
1 parent 319bee0 commit c7bd695
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions examples/single_pred/admet/run.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from rdkit.DataStructs import cDataStructs
from DeepPurpose import CompoundPred as models
from DeepPurpose.utils import *

Expand All @@ -14,11 +15,14 @@
args = parser.parse_args()
drug_encoding = args.model

if drug_encoding not in ['RDKit2D', 'Morgan', 'CNN']:
raise ValueError("You have to specify from 'RDKit2D', 'Morgan', 'CNN'!")
if drug_encoding not in ['RDKit2D', 'Morgan', 'CNN', 'NeuralFP', 'MPNN', 'AttentiveFP', 'AttrMasking', 'ContextPred']:
raise ValueError("You have to specify from 'RDKit2D', 'Morgan', 'CNN', 'NeuralFP', 'MPNN', 'AttentiveFP', 'AttrMasking', 'ContextPred'!")

if drug_encoding == 'RDKit2D':
drug_encoding = 'rdkit_2d_normalized'

if drug_encoding in ['NeuralFP', 'AttentiveFP', 'AttrMasking', 'ContextPred']:
drug_encoding = 'DGL_' + drug_encoding

predictions_all_seeds = {}
results_all_seeds = {}
Expand Down Expand Up @@ -67,4 +71,4 @@ def get_metric(x):
return [round(np.mean(metric), 3), round(np.std(metric), 3)]
return dict(df.apply(get_metric, axis = 1))

print(to_submission_format(results_all_seeds))
print(to_submission_format(results_all_seeds))

0 comments on commit c7bd695

Please sign in to comment.