DrugGen 2: A disease-aware language model for enhancing drug discovery
DrugGen-2 is a disease‑aware language model specialized for generating drug-like SMILES structures based on both disease pathways and protein sequence. By integrating disease-specific context into molecular generation and leveraging the characteristics of approved drug targets through both supervised fine-tuning and reinforcement learning techniques, DrugGen-2 offeres a powerful tool for de novo design and drug repurposing for the complex interplay between diseases and molecular targets.
Model Details
Model Name: DrugGen-2
Training Paradigm: Supervised Fine-Tuning (SFT) + GROUP Relative Policy Optimization (GRPO)
Input: MeSH DAG + Protein Sequence
Output: SMILES Structure
Training Libraries: Hugging Face’s transformers and Transformer Reinforcement Learning (TRL)
Model Sources: liyuesen/druggpt
Getting Started
Set up the environment:
git clone https://github.com/alimotahharynia/DrugGen-2.git
cd DrugGen-2
pip install -r requirements.txt
You can run DrugGen‑2 via a Python API or the command‑line interface (CLI).
Python integration
# Full example of inference using disease and Uniprot IDsfrom druggen2_generator import run_inference
df = run_inference(
disease_names = ["Diabetic Nephropathies"],
mesh_ids = ["D003924"],
mesh_dag = ["C12.050.351.968.419.192", "C12.200.777.419.192", "C12.950.419.192", "C19.246.099.875"],
sequences = "MGAASGRRGPGLLLPLPLLLLLPPQPALALDPGLQPGNFSADEAGAQLFAQSYNSSAEQVLFQSVAASWAHDTNITAENARRQEEAALLSQEFAEAWGQKAKELYEPIWQNFTDPQLRRIIGAVRTLGSANLPLAKRQQYNALLSNMSRIYSTAKVCLPNKTATCWSLDPDLTNILASSRSYAMLLFAWEGWHNAAGIPLKPLYEDFTALSNEAYKQDGFTDTGAYWRSWYNSPTFEDDLEHLYQQLEPLYLNLHAFVRRALHRRYGDRYINLRGPIPAHLLGDMWAQSWENIYDMVVPFPDKPNLDVTSTMLQQGWNATHMFRVAEEFFTSLELSPMPPEFWEGSMLEKPADGREVVCHASAWDFYNRKDFRIKQCTRVTMDQLSTVHHEMGHIQYYLQYKDLPVSLRRGANPGFHEAIGDVLALSVSTPEHLHKIGLLDRVTNDTESDINYLLKMALEKIAFLPFGYLVDQWRWGVFSGRTPPSRYNFDWWYLRTKYQGICPPVTRNETHFDAGAKFHVPNVTPYIRYFVSFVLQFQFHEALCKEAGYEGPLHQCDIYRSTKAGAKLRKVLQAGSSRPWQEVLKDMVGLDALDAQPLLKYFQPVTQWLQEQNQQNGEVLGWPEYQWHPPLPDNYPEGIDLVTDEAEASKFVEEYDRTSQVVWNEYAEANWNYNTNITTETSKILLQKNMQIANHTLKYGTQARKFDVNQLQNTTIKRIIKKVQDLERAALPAQELEEYNKILLDMETTYSVATVCHPNGSCLQLEPDLTNVMATSRKYEDLLWAWEGWRDKAGRAILQFYPKYVELINQAARLNGYVDAGDSWRSMYETPSLEQDLERLFQELQPLYLNLHAYVRRALHRHYGAQHINLEGPIPAHLLGNMWAQTWSNIYDLVVPFPSAPSMDTTEAMLKQGWTPRRMFKEADDFFTSLGLLPVPPEFWNKSMLEKPTDGREVVCHASAWDFYNGKDFRIKQCTTVNLEDLVVAHHEMGHIQYFMQYKDLPVALREGANPGFHEAIGDVLALSVSTPKHLHSLNLLSSEGGSDEHDINFLMKMALDKIAFIPFSYLVDQWRWRVFDGSITKENYNQEWWSLRLKYQGLCPPVPRTQGDFDPGAKFHIPSSVPYIRYFVSFIIQFQFHEALCQAAGHTGPLHKCDIYQSKEAGQRLATAMKLGFSRPWPEAMQLITGQPNMSASAMLSYFKPLLDWLRTENELHGEKLGWPQYNWTPNSARSEGPLPDSGRVSFLGLDLDAQQARVGQWLLLFLGIALLVATLGLSQRLFSIRHRSLHRHSHGPQFGSEVELRHS",
uniprot_ids = ["P12821", "P37231", "P05121", "P29474", "P01137"],
num_generated = 10,
output_file = "generated_SMILES.tsv")
print(df.head())
# Example call for inference using disease and target sequencefrom druggen2_generator import run_inference
df = run_inference(
disease_names = ["Diabetic Nephropathies"],
sequences = "MGAASGRRGPGLLLPLPLLLLLPPQPALALDPGLQPGNFSADEAGAQLFAQSYNSSAEQVLFQSVAASWAHDTNITAENARRQEEAALLSQEFAEAWGQKAKELYEPIWQNFTDPQLRRIIGAV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TENELHGEKLGWPQYNWTPNSARSEGPLPDSGRVSFLGLDLDAQQARVGQWLLLFLGIALLVATLGLSQRLFSIRHRSLHRHSHGPQFGSEVELRHS",
num_generated = 10,
output_file = "generated_SMILES.tsv")
print(df.head())
# Example call for inference using MeSH ID, MeSH DAG, and Uniprot IDfrom druggen2_generator import run_inference
df = run_inference(
mesh_ids = ["D003924"],
mesh_dag = ["C12.050.351.968.419.192"],
uniprot_ids = ["P12821"]
num_generated =10,
output_file ="generated_SMILES.tsv")
print(df.head())
--disease-names
: Exact disease name from the MeSH database.
--mesh-ids
: MeSH identifier(s) for the disease.
--mesh-dag
: Specific MeSH DAG pathway(s) to use (if omitted, all available DAGs are generated).
--sequences
: Amino acid sequences of target proteins.
--uniprot-ids
: UniProt identifiers for the target proteins.
--num-generated
: Number of unique small molecules to generate per combination.
--output-file
: Path to the output TSV file.
Note:
If both a disease name and a separate MeSH ID are provided, the script generates molecules for each independently.
Citation
If you use this model in your research, please cite our paper:
@misc{motahharynia2026druggen2diseaseawarelanguage,
title={DrugGen 2: A disease-aware language model for enhancing drug discovery},
author={Ali Motahharynia and Mohammadreza Ghaffarzadeh-Esfahani and Mahsa Sheikholeslami and Navid Mazrouei and Matin Irajpour and Yousof Gheisari and Hajar Sirous},
year={2026},
eprint={2607.08404},
archivePrefix={arXiv},
primaryClass={q-bio.QM},
url={https://arxiv.org/abs/2607.08404},
}
Runs of introvoyz041 DrugGen-2 on huggingface.co
52
Total runs
2
24-hour runs
-1
3-day runs
28
7-day runs
23
30-day runs
More Information About DrugGen-2 huggingface.co Model
DrugGen-2 huggingface.co is an AI model on huggingface.co that provides DrugGen-2's model effect (), which can be used instantly with this introvoyz041 DrugGen-2 model. huggingface.co supports a free trial of the DrugGen-2 model, and also provides paid use of the DrugGen-2. Support call DrugGen-2 model through api, including Node.js, Python, http.
DrugGen-2 huggingface.co is an online trial and call api platform, which integrates DrugGen-2's modeling effects, including api services, and provides a free online trial of DrugGen-2, you can try DrugGen-2 online for free by clicking the link below.
introvoyz041 DrugGen-2 online free url in huggingface.co:
DrugGen-2 is an open source model from GitHub that offers a free installation service, and any user can find DrugGen-2 on GitHub to install. At the same time, huggingface.co provides the effect of DrugGen-2 install, users can directly use DrugGen-2 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.