First, install the dependencies from requirements.txt, preferably in a virtual environment.
For instance, with conda run
conda create -n chemlml python=3.9
conda activate chemlml
pip install -r requirements.txt
Then, run python train_ChEBI-20.py to train on the ChEBI-20 dataset.
Parameters include:
Run python test.py to test on different datasets.
The only difference is the dataset_name parameters.
Select from "ChEBI-20", "PubChem_filtered", or "PubChem_unfiltered".
PubChem_unfiltered must be downloaded from Zenodo into the PubChem subdirectory first.
To evaluate the result, run python evaluation/fingerprint_metrics.py and specify the test file.
The pretrained ChemLML models are available on Zenodo.
Chemical Language Model Linker: blending text and molecules with modular adapters
Yifan Deng, Spencer S. Ericksen, Anthony Gitter
Journal of Chemical Information and Modeling (2025)
See the ChEBI-20 and PubChem dataset subdirectories for details and licenses.
The result evaluation code fingerprint_metrics.py is from the MolT5 repository, available under the BSD 3-Clause License Copyright (c) 2023, blender-nlp.
ChemLML uses the following models from Hugging Face:
model.pySee the Hugging Face model cards for licenses, limitations, and citations.
First, install the dependencies from requirements.txt, preferably in a virtual environment.
For instance, with conda run
conda create -n chemlml python=3.9
conda activate chemlml
pip install -r requirements.txt
Then, run python train_ChEBI-20.py to train on the ChEBI-20 dataset.
Parameters include:
Run python test.py to test on different datasets.
The only difference is the dataset_name parameters.
Select from "ChEBI-20", "PubChem_filtered", or "PubChem_unfiltered".
PubChem_unfiltered must be downloaded from Zenodo into the PubChem subdirectory first.
To evaluate the result, run python evaluation/fingerprint_metrics.py and specify the test file.
The pretrained ChemLML models are available on Zenodo.
Chemical Language Model Linker: blending text and molecules with modular adapters
Yifan Deng, Spencer S. Ericksen, Anthony Gitter
Journal of Chemical Information and Modeling (2025)
See the ChEBI-20 and PubChem dataset subdirectories for details and licenses.
The result evaluation code fingerprint_metrics.py is from the MolT5 repository, available under the BSD 3-Clause License Copyright (c) 2023, blender-nlp.
ChemLML uses the following models from Hugging Face:
model.pySee the Hugging Face model cards for licenses, limitations, and citations.