{"id":17287633,"url":"https://github.com/dnlbauer/adaptiveumbrella","last_synced_at":"2025-06-15T18:07:36.019Z","repository":{"id":40986673,"uuid":"137638169","full_name":"dnlbauer/adaptiveumbrella","owner":"dnlbauer","description":"A Framework for Adaptive Umbrella Sampling written in Python","archived":false,"fork":false,"pushed_at":"2022-07-12T20:07:32.000Z","size":447,"stargazers_count":0,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-30T23:47:13.236Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dnlbauer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-17T07:54:21.000Z","updated_at":"2024-09-06T13:28:24.000Z","dependencies_parsed_at":"2022-09-05T04:10:54.246Z","dependency_job_id":null,"html_url":"https://github.com/dnlbauer/adaptiveumbrella","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnlbauer%2Fadaptiveumbrella","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnlbauer%2Fadaptiveumbrella/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnlbauer%2Fadaptiveumbrella/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnlbauer%2Fadaptiveumbrella/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dnlbauer","download_url":"https://codeload.github.com/dnlbauer/adaptiveumbrella/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228192339,"owners_count":17882756,"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-10-15T10:03:53.505Z","updated_at":"2024-12-04T21:13:10.092Z","avatar_url":"https://github.com/dnlbauer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/danijoo/adaptiveumbrella.svg?branch=master)](https://travis-ci.org/danijoo/adaptiveumbrella)\n\n# Python module for adaptive umbrella sampling\n\nThis module can be used to perform adaptive umbrella sampling of a multi-dimensional potential of mean force. The\nalgorithm involves::\n\n1) calculate the free energy landscape\n2) Among existing windows, select windows with E \u003c E_max\n3) For each selected window, generate 3^N-1 neighbor windows\n4) Sample new windows, then go to 1) or stop if no new windows can be found\n\nFor more details about the algorithm, see\n\nSelf-Learning Adaptive Umbrella Sampling Method for the Determination of Free Energy Landscapes in Multiple Dimensions (Wojtas-Niziurski, Meng, Roux, Bernèche, 2013)\n[(https://doi.org/10.1021/ct300978b)](https://doi.org/10.1021/ct300978b)\n\n\n![Example](https://raw.githubusercontent.com/danijoo/adaptiveumbrella/master/examples/example.gif)\n\n## Installation\n\nAdaptiveumbrella supports python version 3.4+ and can be installed via pip or manually:\n\n```bash\npip install --user git+https://github.com/danijoo/adaptiveumbrella.git\n```\n\nAlternative:\n```bash\ngit clone https://github.com/danijoo/adaptiveumbrella.git\ncd adaptiveumbrella\npython setup.py install --user\n```\n\n\n## Usage\n\nImplement the UmbrellaRunner class according to your needs: \n\n```python\nfrom adaptiveumbrella.runner import UmbrellaRunner\n\nclass MyUmbrellaRunner(UmbrellaRunner):\n  pass\n```\n\nwithin the class we need to define two methods. First we have to define how the simulation windows should be sampled:\n\n```python\n  def simulate_frames(self, lambdas, frames):\n    \"\"\" Run simulations for all passed lambda steps. `lambdas` is a dictionary where each key\n    is a tuple of coordinates in the phase space and each value are the lambda values of the root\n    from which this frame should be created. `frames` is an identical dict, but with indeces of the pmf\n    numpy array defining the phase space \"\"\"\n    pass\n```\n\nthen, we have to implement a method that updates the pmf:\n \n```python\n  def calculate_new_pmf(self):\n  \"\"\" This is called after `simulate_frames` and should calculate the new PMF. return value must be a numpy\n  array of similar dimensions then the lambda states.\"\"\"\n  pass\n```\n\nFinally, we can instantiate the class, pass the configuration variables and start the simulations:\n\n```python\nrunner = MyUmbrellaRunner()\n\n# 2 dimensional phase space ranging from -3 to 3 in both dimensions\n# lambda spacing is 0.2 in x and y\nrunner.cvs = np.array([\n    (-3, 3, 0.2),\n    (-3, 3, 0.2),\n])\n# initial lambda coordinates\nrunner.cvs_init = (1.4, -1.4)\n\n# initial energy for finding new frames\nrunner.E_min = 10\n\n# max. energy before sampling stops\nrunner.E_max = 100\n\n# energy change between steps\nrunner.E_incr = 10\n\n# max. number of iterations before stopping\nrunner.max_iterations = 100\n\n# let's go\nrunner.run()\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnlbauer%2Fadaptiveumbrella","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdnlbauer%2Fadaptiveumbrella","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnlbauer%2Fadaptiveumbrella/lists"}