{"id":19000402,"url":"https://github.com/daoyuanli2816/molecule-generator","last_synced_at":"2025-06-10T12:07:13.424Z","repository":{"id":245349584,"uuid":"817995286","full_name":"DaoyuanLi2816/Molecule-Generator","owner":"DaoyuanLi2816","description":"Variational Autoencoder (VAE)-based molecular SMILES string generator","archived":false,"fork":false,"pushed_at":"2025-04-23T04:23:37.000Z","size":632,"stargazers_count":12,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-06T22:06:45.938Z","etag":null,"topics":["ai4science","chemistry","generative-model","molecular-simulation","smiles-strings","tokenizer","vae-pytorch"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DaoyuanLi2816.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-06-20T21:59:49.000Z","updated_at":"2025-05-28T08:55:31.000Z","dependencies_parsed_at":"2024-06-21T17:08:17.234Z","dependency_job_id":"47bccd24-5a26-4f3c-8c40-a9b32f3f1430","html_url":"https://github.com/DaoyuanLi2816/Molecule-Generator","commit_stats":null,"previous_names":["daoyuanli2816/molecule-generator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaoyuanLi2816%2FMolecule-Generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaoyuanLi2816%2FMolecule-Generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaoyuanLi2816%2FMolecule-Generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaoyuanLi2816%2FMolecule-Generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DaoyuanLi2816","download_url":"https://codeload.github.com/DaoyuanLi2816/Molecule-Generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaoyuanLi2816%2FMolecule-Generator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259072717,"owners_count":22801074,"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":["ai4science","chemistry","generative-model","molecular-simulation","smiles-strings","tokenizer","vae-pytorch"],"created_at":"2024-11-08T18:07:08.202Z","updated_at":"2025-06-10T12:07:13.416Z","avatar_url":"https://github.com/DaoyuanLi2816.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# VAE-Based SMILES String Generator\n\nThis project is a Variational Autoencoder (VAE)-based molecular SMILES string generator. It generates molecules composed of CHOH/CH2OH (referred to as A) and CH/CH2/CH3 (referred to as B) repeat units. The generated molecules are saturated and contain no rings. \n\n![Image](./molecule.png)\n\n## Project Structure\n\nThe project consists of the following Python scripts:\n\n- `VAE.py`: Defines the VAE model and includes functions for training and testing the model.\n- `generate.py`: Generates new SMILES strings by perturbing the latent space of the trained VAE.\n- `interpolate.py`: Generates interpolated SMILES strings between two given SMILES strings using the latent space of the trained VAE.\n- `synthetic_dataset.py`: Generates a synthetic dataset of SMILES strings based on specified constraints.\n\n## Features\n\n- Generates over 100,000 synthetic SMILES strings.\n- Only A and B repeat units are included.\n- No molecule contains more than six consecutive A repeat units.\n- All molecules in the dataset are saturated and contain no rings.\n\n## Installation\n\n1. Clone the repository:\n    ```bash\n    git clone https://github.com/DaoyuanLi2816/Molecule-Generator.git\n    cd Molecule-Generator\n    ```\n\n2. Install the required dependencies:\n    ```bash\n    pip install -r requirements.txt\n    ```\n\n3. Ensure you have RDKit installed. RDKit is required for molecular operations. Installation instructions can be found [here](https://www.rdkit.org/docs/Install.html).\n\n## Usage\n\n### Generating Synthetic Dataset\n\nTo generate a synthetic dataset of SMILES strings, run `synthetic_dataset.py`:\n```bash\npython synthetic_dataset.py\n```\nThis will create a CSV file named `molecules.csv` containing the generated SMILES strings.\n\n### Training the VAE Model\n\nTo train the VAE model, run `VAE.py`:\n```bash\npython VAE.py\n```\nThis will train the VAE model on the generated dataset and save the trained model as `beta_tc_vae_model.pth`.\n\n### Generating New SMILES Strings\n\nTo generate new SMILES strings using the trained VAE model, run `generate.py`:\n```bash\npython generate.py\n```\nThis will output new SMILES strings generated by perturbing the latent space of the trained VAE.\n\n### Interpolating Between Two SMILES Strings\n\nTo generate interpolated SMILES strings between two given SMILES strings, run `interpolate.py`:\n```bash\npython interpolate.py\n```\nThis will output SMILES strings that are interpolations between the two input SMILES strings in the latent space of the trained VAE.\n\n\n## Contributing\n\nIf you would like to contribute to this project, please open an issue or submit a pull request. We welcome contributions from the community.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaoyuanli2816%2Fmolecule-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaoyuanli2816%2Fmolecule-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaoyuanli2816%2Fmolecule-generator/lists"}