ED2Mol
Electron-density-informed effective and reliable de novo molecular design and optimization with ED2Mol
Install / Use
/learn @pineappleK/ED2MolREADME
ED2Mol
<div align=center> <img src="./figs/Fig1.png" width="50%" height="50%" alt="TOC" align=center /> </div>Section 1: Setup Environment
You can follow the instructions to setup the environment
We use mamba here. You can install it using conda install mamba. If you encounter any errors with mamba, please use conda instead.
- you can install manually (cuda 11.7)
mamba create -n ed2mol
mamba activate ed2mol
mamba install python=3.8.19 pytorch=1.13.1 pytorch-cuda=11.7 rdkit=2023.03.2 plip biopython cctbx-base scikit-learn -y -c pytorch -c nvidia -c conda-forge
pip install torch_geometric==2.3.0
- or you can install via conda yaml file
mamba env create -f ed2mol_env.yml -n ed2mol
mamba activate ed2mol
Section 2: Weights and Datasets
The model weights can be downloaded at the release page.
wget https://github.com/pineappleK/ED2Mol/releases/download/v1.1/weights.zip
unzip weights.zip
The main data used for training is from PDB or ZINC database.
For tranining ED extraction model, you can download the source data and unzip it.
For training fragment extension model, you can download the processed data and unzip it.
Section 3: Generation
Run ED2Mol on the test examples
- Please setup the env dependencies
- Just change to the base directory and run the
Generate.pywith prepared yml file
for denovo generation
CUDA_VISIBLE_DEVICES="0" python Generate.py --config ./configs/denovo.yml
for hit optimization
CUDA_VISIBLE_DEVICES="0" python Generate.py --config ./configs/hitopt.yml
Run ED2Mol on your own targets
For the denovo generation task, prepare your receptor PDB file and modify the example denovo.yml file.
- setting the
output_dirandreceptorparameters to your designated output path and receptor file. - specifying the
x,y, andzparameters as the center coordinates of the pocket of interest.
For the lead optimization task, you need also prepare a reference ligand core SDF file (Hint: You can use PyMOL to edit, delete, or export the file as an SDF) and modify the example leadopt.yml file.
- updating the
reference_coreparameter accordingly.
Then, you can run ED2Mol with your yml file.
CUDA_VISIBLE_DEVICES="0" python Generate.py --config path-to-your.yml
Section 4: Citation
If you find this work interesting, please cite
Li, M., Song, K., He, J. et al. Electron-density-informed effective and reliable de novo molecular design and optimization with ED2Mol. Nat Mach Intell 7, 1355–1368 (2025). https://doi.org/10.1038/s42256-025-01095-7
@article{li2025electron,
title={Electron-density-informed effective and reliable de novo molecular design and optimization with ED2Mol},
author={Li, Mingyu and Song, Kun and He, Jixiao and Zhao, Mingzhu and You, Gengshu and Zhong, Jie and Zhao, Mengxi and Li, Arong and Chen, Yu and Li, Guobin and others},
journal={Nature Machine Intelligence},
volume={7},
number={8},
pages={1355--1368},
year={2025},
publisher={Nature Publishing Group UK London}
}
Section 5: License
MIT
