PROTAC Synthesizability β MLP
A PyTorch MLP that predicts the heavy-atom-count weighted synthesizability score
(hac_weighted_score) of PROTAC molecules from SMILES.
Nested 5Γ5 scaffold cross-validation, Optuna tuning. Mean CV RΒ² = 0.598.
Files
mlp_v3_final.ptβ network weights + architecturemlp_v3_final.skopsβ fitted preprocessor + target transformermlp_v3_final_hparams.yamlβ hyperparameters
(.pt and .skops are both required to load the model.)
Usage
Requires the project code: https://github.com/ribesstefano/PROTAC-Synthesizability
Install the package (editable) so protac_synth is importable, then:
from protac_synth.models.mlp.model import TorchMLPRegressor
from protac_synth.chem_utils import (
standardize_all, compute_fingerprints, compute_descriptors,
)
model = TorchMLPRegressor.load("mlp_v3_final") # base path, no extension
smiles = ["O=C(O)c1ccccc1"]
# featurization consumes standardized RDKit Mols, not raw SMILES
mols = standardize_all(smiles)
preds = model.predict(
smiles,
X_fp=compute_fingerprints(mols, model.fp_size, model.fp_radius),
X_desc=compute_descriptors(mols),
)
Notes:
compute_fingerprints/compute_descriptorstake pre-standardized Mols (fromstandardize_all), so each molecule is parsed and standardized once.- Using
model.fp_size/model.fp_radiusguarantees the fingerprint settings match those the model was trained with.
Dependencies
The .skops preprocessor and the RDKit descriptor set are version-sensitive β
loading under a different version can raise InconsistentVersionWarning or produce
a feature-count mismatch. Pin the versions the model was exported with:
scikit-learn==1.6.1(the version the.skopspipeline was saved with)rdkitβ pin the exact version used at training; the RDKit descriptor list changes across releases, and a mismatch changes the descriptor column count.skops,torch,numpyβ pin to the training environment.
License
MIT