Update moppit.py
Browse files
moppit.py
CHANGED
|
@@ -25,7 +25,7 @@ tokenizer = AutoTokenizer.from_pretrained("facebook/esm2_t33_650M_UR50D")
|
|
| 25 |
target_sequence = tokenizer(target, return_tensors='pt')['input_ids'].to(device)
|
| 26 |
|
| 27 |
# Load Models
|
| 28 |
-
solver = load_solver('/
|
| 29 |
|
| 30 |
score_models = []
|
| 31 |
if 'Hemolysis' in args.objectives:
|
|
@@ -41,11 +41,11 @@ if 'Half-Life' in args.objectives:
|
|
| 41 |
halflife_model = HalfLifeModel(device=device)
|
| 42 |
score_models.append(halflife_model)
|
| 43 |
if 'Affinity' in args.objectives:
|
| 44 |
-
affinity_predictor = load_affinity_predictor('/
|
| 45 |
affinity_model = AffinityModel(affinity_predictor, target_sequence)
|
| 46 |
score_models.append(affinity_model)
|
| 47 |
if 'Motif' in args.objectives or 'Specificity' in args.objectives:
|
| 48 |
-
bindevaluator = load_bindevaluator('/
|
| 49 |
if 'Specificity' in args.objectives:
|
| 50 |
motif_penalty = True
|
| 51 |
else:
|
|
|
|
| 25 |
target_sequence = tokenizer(target, return_tensors='pt')['input_ids'].to(device)
|
| 26 |
|
| 27 |
# Load Models
|
| 28 |
+
solver = load_solver('./ckpt/peptide/cnn_epoch200_lr0.0001_embed512_hidden256_loss3.1051.ckpt', vocab_size, device)
|
| 29 |
|
| 30 |
score_models = []
|
| 31 |
if 'Hemolysis' in args.objectives:
|
|
|
|
| 41 |
halflife_model = HalfLifeModel(device=device)
|
| 42 |
score_models.append(halflife_model)
|
| 43 |
if 'Affinity' in args.objectives:
|
| 44 |
+
affinity_predictor = load_affinity_predictor('./classifier_ckpt/binding_affinity_unpooled.pt', device)
|
| 45 |
affinity_model = AffinityModel(affinity_predictor, target_sequence)
|
| 46 |
score_models.append(affinity_model)
|
| 47 |
if 'Motif' in args.objectives or 'Specificity' in args.objectives:
|
| 48 |
+
bindevaluator = load_bindevaluator('./classifier_ckpt/finetuned_BindEvaluator.ckpt', device)
|
| 49 |
if 'Specificity' in args.objectives:
|
| 50 |
motif_penalty = True
|
| 51 |
else:
|