{"id":20240077,"url":"https://github.com/plainerman/latent-tps","last_synced_at":"2025-04-10T19:50:44.187Z","repository":{"id":208412706,"uuid":"721568898","full_name":"plainerman/Latent-TPS","owner":"plainerman","description":"Source code of the paper: Transition Path Sampling with Boltzmann Generator-based MCMC Moves","archived":false,"fork":false,"pushed_at":"2024-05-07T12:14:39.000Z","size":5157,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T17:22:05.836Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/plainerman.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":"2023-11-21T10:32:56.000Z","updated_at":"2024-12-08T11:06:29.000Z","dependencies_parsed_at":"2024-05-07T13:40:03.684Z","dependency_job_id":null,"html_url":"https://github.com/plainerman/Latent-TPS","commit_stats":null,"previous_names":["plainerman/latent-tps"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plainerman%2FLatent-TPS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plainerman%2FLatent-TPS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plainerman%2FLatent-TPS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plainerman%2FLatent-TPS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plainerman","download_url":"https://codeload.github.com/plainerman/Latent-TPS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248283085,"owners_count":21077768,"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":[],"created_at":"2024-11-14T08:43:01.694Z","updated_at":"2025-04-10T19:50:44.169Z","avatar_url":"https://github.com/plainerman.png","language":"Jupyter Notebook","readme":"# Transition Path Sampling with Boltzmann Generator-based MCMC Moves\n[![arXiv](https://img.shields.io/badge/arXiv-2312.05340-b31b1b.svg?style=flat-square)](https://arxiv.org/abs/2312.05340)\n[![python](https://img.shields.io/badge/language-python%20-%2300599C.svg?style=flat-square)](https://github.com/plainerman/Latent-TPS)\n[![License](https://img.shields.io/github/license/plainerman/Latent-TPS?style=flat-square)](LICENSE)\n\nIn this repository we provide code to train a [Boltzmann generator](https://www.science.org/doi/full/10.1126/science.aaw1147) on alanine dipeptide and use it to perform Latent TPS (Transition Path Sampling).\n\n## Setting up the conda environment\nWe provide a conda environment file for CUDA and CPU. You can create it by using one of the files (with or without the cpu flag).\n\n```bash\nconda env create -f environment[-cpu].yml\n```\n\n## Training the Boltzmann Generator\nTo train the Boltzmann Generator, you can use the `train.py` script. It has a number of options, but for ALDP you can train the model like this:\n\n```bash\npython -m train --system AlanineDipeptideImplicit --data_save_frequency 120 --num_frames 1000000 --print_freq 250 --ckpt_freq 250 --val_freq 250 --flow_type internal_coords --batch_size 1024 --lr 5.e-4 --weight_decay 1.e-5 --lr_schedule cosine --warmup_dur 1000 --grad_clip 1000 --kl_loss_weight 1 --rkl_loss_weight 0 --hidden_dim 256 --update_layers 12 --run_name ALDP_RKL0_KL1_h256_u12_warmup_lrcosine_rerun\n```\n\nIf you are working with cuda, you can add the flags\n\n```bash\n--torch_device cuda --md_device CUDA\n```\n\n## Run Latent TPS\nYou can find all the different options in `inference.py`. \nYou can change the states to find paths between by changing the `--start_state_idx` and `--end_state_idx` flags.\n\nHere is an example using the gaussian kernel, which adds random gaussian noise to the frames in latent space.\n```bash\npython -m inference --run_name mcmc_prob_langevin_40_noise0.05_seed0 --sampling_method mcmc --model_dir ./workdir/best --ckpt model_4250.ckpt --path_density langevin --noise_scale 0.05 --num_steps 40 --langevin_timestep 40 --num_paths 100 --seed 0\n```\n\n# Acknowledgements\nWe thank the authors of [Flow Annealed Importance Sampling Bootstrap](https://github.com/lollcat/fab-torch) and [normflows](https://github.com/VincentStimper/normalizing-flows) which our flow training uses.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplainerman%2Flatent-tps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplainerman%2Flatent-tps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplainerman%2Flatent-tps/lists"}