This repository provides a PyTorch implementation of
DeepViscosity is an ensemble deep learning ANN model developed to predict high-concentration monoclonal antibody viscosity classes:
- Low viscosity: <= 20 cP
- High viscosity: > 20 cP
The model uses 30 spatial descriptors generated by the DeepSP surrogate model as input features and applies an ANN ensemble for classification.
The original model was trained on 229 monoclonal antibodies (mAbs).
This PyTorch version:
-
All DeepSP CNN models and ANN ensemble models are converted to ONNX graphs with PyTorch wrappers
-
No TensorFlow or Keras is required during inference
-
Models are loaded in eval() mode for deterministic predictions
-
Supports headless / backend execution on Linux or HPC systems.
-
Set up Linux environment
- git clone https://github.com:ichxw/DeepViscosity.git
- cd DeepViscosity
- create an environment and install necessary package
- conda create -n deepViscosity python=3.12 -y
- conda activate deepViscosity
- conda install -c bioconda anarci
- pip install -r requirements.txt
-
Prepare input data. Format your input file according to:
DeepViscosity_input.csv
-
Run the Jupyter notebook:
DeepViscosity_Predictor.ipynb
-
DeepSP spatial properties and DeepViscosity Classes will be saved to csv files.
-
Users can also import dv_tools.py directly to integrate viscosity prediction to a platform.
If you use DeepViscosity in your work, please cite the original research: https://doi.org/10.1080/19420862.2025.2483944