ChemBERTa embeddings and ensemble learning for prediction of density and melting point of deep eutectic solvents with hybrid features
Python
7
13 commits
updated Jun 24, 2026
Deep eutectic solvents (DESs) have emerged as promising sustainable alternatives to conventional solvents due to their low toxicity, biodegradability, and broad applicability. However, predicting crucial DES properties, such as melting point and density, is challenging due to their complex molecular structures. Traditional predictive models often struggle to capture subtle structural features from SMILES (Simplified Molecular Input Line Entry System) representations, resulting in limited accuracy.
In this study, we utilize ChemBERTa, a pre-trained Transformer model, to extract high-dimensional embeddings from SMILES strings, which effectively capture complex molecular interactions and nuanced structural characteristics. We identified certain limitations in ChemBERTa embeddings through feature importance analysis and supplemented them with additional physicochemical descriptors from RDKit. This combined feature set enhances both interpretability and predictive accuracy.
Optimized ensemble models, including ExtraTreesRegressor (ETR) and XGBRegressor (XGBR), are applied to this enriched feature set, achieving significant improvements in prediction accuracy for DES melting point and density. Rigorous grid search and ten-fold cross-validation are employed to ensure model robustness and generalizability. Our findings underscore the transformative role of pre-trained deep learning models in chemical informatics, supporting scalable, sustainable DES design.
The directory structure of this project is organized as follows:
Model architecture/
├── README.md # Project description and usage instructions
├── Fast running/
│ ├── __init__.py
│ ├── melting_point.py
│ ├── density.py
├── data/ # Data folder
│ ├── __init__.py
│ ├── descriptor_extraction.py # Extracts molecular descriptors from SMILES
│ ├── DESs_density_data.csv # Density data for DESs
│ └── DESs_melting_point_data.csv # Melting point data for DESs
├── src/ # Source code
│ ├── __init__.py
│ ├── models/ # Model scripts
│ │ ├── __init__.py
│ │ ├── chemberta_model_comparison.py
│ │ └── chemberta_model_grid_search.py
│ └── utils/ # Utility scripts
│ ├── __init__.py
│ ├── correlation_heatmap.py
│ └── feature_importance_extraction.py
└── requirements.txt # Project dependencies
To set up the environment, install the required Python packages listed in requirements.txt:
pip install -r requirements.txt
descriptor_extraction.py: This script generates two types of features:
The extracted features are saved for model training.
Ensure all dependencies are installed by running:
pip install -r requirements.txt
Run descriptor_extraction.py to extract molecular descriptors and ChemBERTa embeddings. Make sure the input data files (DESs_density_data.csv, DESs_melting_point_data.csv) are in the data/ directory.
python data/descriptor_extraction.py
Execute chemberta_model_comparison.py to train and evaluate different models on the extracted features, comparing performance across models to identify the most effective predictor.
python src/models/chemberta_model_comparison.py
Run chemberta_model_grid_search.py to perform grid search and cross-validation on selected models, further enhancing predictive performance.
python src/models/chemberta_model_grid_search.py
Use correlation_heatmap.py to visualize the correlation matrix for all features, aiding in understanding feature relationships and identifying possible redundancies.
python src/utils/correlation_heatmap.py
Run feature_importance_extraction.py to compute and display the importance of each feature, highlighting descriptors that significantly impact DES property predictions.
python src/utils/feature_importance_extraction.py
After following the steps above, various outputs will be stored in the output/ directory, including:
By combining ChemBERTa embeddings with physicochemical descriptors, this project establishes a robust framework for DES property prediction, emphasizing both feature interpretability and predictive accuracy. This approach represents a significant step forward in chemical informatics, contributing to sustainable solvent design.
ChemBERTa embeddings and ensemble learning for prediction of density and melting point of deep eutectic solvents with hybrid features
Python
7
13 commits
updated Jun 24, 2026
Deep eutectic solvents (DESs) have emerged as promising sustainable alternatives to conventional solvents due to their low toxicity, biodegradability, and broad applicability. However, predicting crucial DES properties, such as melting point and density, is challenging due to their complex molecular structures. Traditional predictive models often struggle to capture subtle structural features from SMILES (Simplified Molecular Input Line Entry System) representations, resulting in limited accuracy.
In this study, we utilize ChemBERTa, a pre-trained Transformer model, to extract high-dimensional embeddings from SMILES strings, which effectively capture complex molecular interactions and nuanced structural characteristics. We identified certain limitations in ChemBERTa embeddings through feature importance analysis and supplemented them with additional physicochemical descriptors from RDKit. This combined feature set enhances both interpretability and predictive accuracy.
Optimized ensemble models, including ExtraTreesRegressor (ETR) and XGBRegressor (XGBR), are applied to this enriched feature set, achieving significant improvements in prediction accuracy for DES melting point and density. Rigorous grid search and ten-fold cross-validation are employed to ensure model robustness and generalizability. Our findings underscore the transformative role of pre-trained deep learning models in chemical informatics, supporting scalable, sustainable DES design.
The directory structure of this project is organized as follows:
Model architecture/
├── README.md # Project description and usage instructions
├── Fast running/
│ ├── __init__.py
│ ├── melting_point.py
│ ├── density.py
├── data/ # Data folder
│ ├── __init__.py
│ ├── descriptor_extraction.py # Extracts molecular descriptors from SMILES
│ ├── DESs_density_data.csv # Density data for DESs
│ └── DESs_melting_point_data.csv # Melting point data for DESs
├── src/ # Source code
│ ├── __init__.py
│ ├── models/ # Model scripts
│ │ ├── __init__.py
│ │ ├── chemberta_model_comparison.py
│ │ └── chemberta_model_grid_search.py
│ └── utils/ # Utility scripts
│ ├── __init__.py
│ ├── correlation_heatmap.py
│ └── feature_importance_extraction.py
└── requirements.txt # Project dependencies
To set up the environment, install the required Python packages listed in requirements.txt:
pip install -r requirements.txt
descriptor_extraction.py: This script generates two types of features:
The extracted features are saved for model training.
Ensure all dependencies are installed by running:
pip install -r requirements.txt
Run descriptor_extraction.py to extract molecular descriptors and ChemBERTa embeddings. Make sure the input data files (DESs_density_data.csv, DESs_melting_point_data.csv) are in the data/ directory.
python data/descriptor_extraction.py
Execute chemberta_model_comparison.py to train and evaluate different models on the extracted features, comparing performance across models to identify the most effective predictor.
python src/models/chemberta_model_comparison.py
Run chemberta_model_grid_search.py to perform grid search and cross-validation on selected models, further enhancing predictive performance.
python src/models/chemberta_model_grid_search.py
Use correlation_heatmap.py to visualize the correlation matrix for all features, aiding in understanding feature relationships and identifying possible redundancies.
python src/utils/correlation_heatmap.py
Run feature_importance_extraction.py to compute and display the importance of each feature, highlighting descriptors that significantly impact DES property predictions.
python src/utils/feature_importance_extraction.py
After following the steps above, various outputs will be stored in the output/ directory, including:
By combining ChemBERTa embeddings with physicochemical descriptors, this project establishes a robust framework for DES property prediction, emphasizing both feature interpretability and predictive accuracy. This approach represents a significant step forward in chemical informatics, contributing to sustainable solvent design.