{"id":15140773,"url":"https://github.com/minkaixu/confvae-icml21","last_synced_at":"2025-10-23T17:31:41.725Z","repository":{"id":104652274,"uuid":"371652704","full_name":"MinkaiXu/ConfVAE-ICML21","owner":"MinkaiXu","description":"An End-to-End Framework for Molecular Conformation Generation via Bilevel Programming (ICML'21)","archived":false,"fork":false,"pushed_at":"2021-08-03T14:17:42.000Z","size":390,"stargazers_count":51,"open_issues_count":1,"forks_count":16,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-15T22:35:11.978Z","etag":null,"topics":["bilevel-optimization","computational-biology","computational-chemistry","conformation","generative-models","graph-neural-networks","icml-2021","molecule","pytorch","vae"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MinkaiXu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-28T09:41:46.000Z","updated_at":"2024-08-19T14:42:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"f553f8bc-e4e8-4865-9035-ee271c93ca02","html_url":"https://github.com/MinkaiXu/ConfVAE-ICML21","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"d1d7469a67c82fc0e5d0d3bf8ce3572376f15a10"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MinkaiXu%2FConfVAE-ICML21","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MinkaiXu%2FConfVAE-ICML21/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MinkaiXu%2FConfVAE-ICML21/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MinkaiXu%2FConfVAE-ICML21/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MinkaiXu","download_url":"https://codeload.github.com/MinkaiXu/ConfVAE-ICML21/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237869067,"owners_count":19379259,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bilevel-optimization","computational-biology","computational-chemistry","conformation","generative-models","graph-neural-networks","icml-2021","molecule","pytorch","vae"],"created_at":"2024-09-26T08:41:04.251Z","updated_at":"2025-10-23T17:31:41.103Z","avatar_url":"https://github.com/MinkaiXu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ConfVAE for Conformation Generation\n\n![cover](figs/framework.png)\n\n[[arXiv](https://arxiv.org/abs/2105.07246)] [[Code](https://github.com/MinkaiXu/ConfVAE-ICML21)]\n\nThis is the official code repository of our ICML paper \"An End-to-End Framework for Molecular Conformation Generation via Bilevel Programming\" (2021).\n\n## Installation\n\n### Install via Conda (Recommended)\n\nYou can follow the instructions [here](https://github.com/MinkaiXu/CGCF-ConfGen#install-via-conda-recommended). We adopt an environment the same as our another previous project.\n\n### Install Manually\n\n```bash\n# Create conda environment\nconda create --name ConfVAE python=3.7\n\n# Activate the environment\nconda activate ConfVAE\n\n# Install packages\nconda install pytorch torchvision cudatoolkit=10.2 -c pytorch\nconda install rdkit==2020.03.3 -c rdkit\nconda install tqdm networkx scipy scikit-learn h5py tensorboard -c conda-forge\npip install torchdiffeq==0.0.1\n\n# Install PyTorch Geometric\nconda install pytorch-geometric -c rusty1s -c conda-forge\n```\n\n## Data\n\n### Official Datasets\n\nThe official datasets are available [here](https://drive.google.com/drive/folders/1UTxgyWeXbgDehV1okdZ2UkKwZbe3I0hO?usp=sharing).\n\n### Input Format / Make Your Own Datasets\n\nThe dataset file is a pickled Python list consisting of [``rdkit.Chem.rdchem.Mol``](https://www.rdkit.org/docs/source/rdkit.Chem.rdchem.html#rdkit.Chem.rdchem.Mol) objects. Each conformation is stored individually as a `Mol` object. For example, if a dataset contains 3 molecules, where the first molecule has 4 conformations, the second one and the third one have 5 and 6 conformations respectively, then the pickled Python list will contain 4+5+6 `Mol` objects in total.\n\n### Output Format\n\nThe output format is identical to the input format.\n\n## Usage\n\n### Train\n\nExample: training a model for QM9 molecules.\n\n```bash\npython train_vae.py \\\n    --train_dataset ./data/qm9/train_QM9.pkl \\\n    --val_dataset ./data/qm9/val_QM9.pkl\n```\n\nMore training options can be found in `train_vae.py`.\n\n### Generate Conformations\n\nExample: generating conformations for each molecule in the QM9 test-split, with twice the number of test set for each molecule.\n\n```bash\npython eval_vae.py \\\n    --ckpt ./logs/VAE_QM9 \\\n    --dataset ./data/iclr/qm9/test_QM9.pkl \\\n    --num_samples -2\n```\n\nMore generation options can be found in `eval_vae.py`.\n\n## Citation\n\nPlease consider citing our work if you find it helpful.\n\n```\n@inproceedings{\n  xu2021end,\n  title={An End-to-End Framework for Molecular Conformation Generation via Bilevel Programming},\n  author={Xu, Minkai and Wang, Wujie and Luo, Shitong and Shi, Chence and Bengio, Yoshua and Gomez-Bombarelli, Rafael and Tang, Jian},\n  booktitle={International Conference on Machine Learning},\n  year={2021}\n}\n```\n\n## Contact\n\nIf you have any question, please contact me at \u003cminkai.xu@umontreal.ca\u003e or \u003cxuminkai@mila.quebec\u003e.\n\n\n-----\n\n\n# 📢 Attention\n\nPlease also check our another concurrent work on molecular conformation generation, which has also been accepted in ICML'2021 (Long Talk): [Learning Gradient Fields for Molecular Conformation Generation](https://arxiv.org/abs/2105.03902). [[Code](https://github.com/DeepGraphLearning/ConfGF)]\n\n![ConfGF](figs/confgf.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminkaixu%2Fconfvae-icml21","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fminkaixu%2Fconfvae-icml21","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminkaixu%2Fconfvae-icml21/lists"}