{"id":19339541,"url":"https://github.com/becksteinlab/multibind","last_synced_at":"2026-04-01T19:07:51.845Z","repository":{"id":43716648,"uuid":"301552078","full_name":"Becksteinlab/multibind","owner":"Becksteinlab","description":"A Python package for building thermodynamically consistent state graphs.","archived":false,"fork":false,"pushed_at":"2026-03-20T03:22:04.000Z","size":433,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-03-20T18:13:29.293Z","etag":null,"topics":["freeenergy","mle","python","thermodynamics"],"latest_commit_sha":null,"homepage":"https://multibind.readthedocs.io","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/Becksteinlab.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","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":"2020-10-05T22:12:13.000Z","updated_at":"2026-03-20T03:22:08.000Z","dependencies_parsed_at":"2023-12-18T20:04:39.631Z","dependency_job_id":"0fe42fcf-0726-4528-a59f-054d0f901454","html_url":"https://github.com/Becksteinlab/multibind","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Becksteinlab/multibind","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Becksteinlab%2Fmultibind","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Becksteinlab%2Fmultibind/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Becksteinlab%2Fmultibind/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Becksteinlab%2Fmultibind/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Becksteinlab","download_url":"https://codeload.github.com/Becksteinlab/multibind/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Becksteinlab%2Fmultibind/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31291070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["freeenergy","mle","python","thermodynamics"],"created_at":"2024-11-10T03:22:46.244Z","updated_at":"2026-04-01T19:07:51.832Z","avatar_url":"https://github.com/Becksteinlab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Multibind\n\n\n[![DOI](https://zenodo.org/badge/301552078.svg)](https://zenodo.org/badge/latestdoi/301552078) ![Tests](https://github.com/BecksteinLab/multibind/actions/workflows/tests.yml/badge.svg) [![codecov](https://codecov.io/gh/Becksteinlab/multibind/branch/develop/graph/badge.svg?token=7T3Z19P4W5)](https://codecov.io/gh/Becksteinlab/multibind) [![docs](https://readthedocs.org/projects/multibind/badge/?version=latest)](https://multibind.readthedocs.io/en/latest/?badge=latest)\n\n\nThermodynamic cycles which are defined by a set of individually determined free energy differences are not guaranteed to be thermodynamically consistent.\nThis criterion is only satisfied when all the differences in a closed loop vanish.\nMultibind is a Python package that allows for the combination of these differences, along with their variances, into a set of data-informed and thermodynamically consistent state free energies.\nAdditionally, multibind supports cycles whose free energies are dependent on multiple ligand concentrations.\n\n## Installation\n\n**multibind** is on [PyPI](https://pypi.org/project/multibind/). **Python 3.10** through **3.14** is supported.\n\n```bash\npip install multibind\n```\n\nUsing conda or mamba, create an environment with a suitable Python version, then run the same command inside it.\n\nTo work from a Git clone (editable install), run tests, build docs, or use Poetry, see **[INSTALL.md](INSTALL.md)**.\n\n## State definitions\n\nStates are minimally defined by a name and should be added to a csv file.\nMacrostate classes can be added as additional columns with the name of the class being the column header.\n\n```text\nname,n_protons,n_sodium\n1,0,0\n2,0,1\n3,1,0\n4,1,1\n```\n\n## Graph definition\n\nStates are not enough to define the graph, you'll need edges. \nThese edges are the free energy differences between states and are characterized by a specific type of process.\n\nMultibind allows for three process type, which are specified under the ligand column:\n\n- \"H+\": proton binding which takes as its free energy value, the pKa.\n- general ligand: binding of a general ligand. The standard state free energy in kT. By defining the concentration to build the cycle, this free energy becomes concentration dependent.\n- \"helm\": undefined process which takes a free energy directly in kT.\n\nIn defining the edges, always treat the free energies as going from state 1 to state 2 for that process.\nFor 'H+', state 1 should be the deprotonated state and state 2 is the protonated state.\nFor a general ligand, state 1 is the unbound state and state 2 is the bound state.\nFailure to do so will assign the negative of the desired free energy to that edge.\n\n```text\n# graph.csv\nstate1,state2,value,variance,ligand,standard_state\n1,2,-10,0.1,Na+,1\n2,3,5.697116,0.1,H+,1\n4,3,-6,0.1,Na+,1\n1,4,7.434294,0.1,H+,1\n```\n\n## Example code\n\nThe standard `Multibind` object is used to solve the graph at one point in concentration space.\n\n```python\nimport multibind as mb\n\nconcentrations = {'Na': 0.150}\n\nc = mb.Multibind()\nc.read_graph(\"examples/input/4-state-diamond/graph.csv\",comment=\"#\")\nc.read_states(\"examples/input/4-state-diamond/states.csv\")\nc.concentrations = concentrations\nc.build_cycle(pH=7)\nc.MLE(svd=True) \n# compute the effective energy difference between two macrostates\n# if you are unsure of the values to pass to the function, look\n# at either your state file or the contents of c.states\nc.effective_energy_difference(\"N_protons\",1,2)\n```\n\nThe `MultibindScanner` can be used to scan across a bunch of concentrations.\n\n```python\nimport multibind as mb\n\nstate_file = 'examples/input/4-state-diamond/states.csv'\ngraph_file = 'examples/input/4-state-diamond/graph.csv'\n\nscanner = mb.MultibindScanner(state_file, graph_file, comment_char='#')\n\nconcentrations = {'H+': [7, 8, 9], 'Na+': [0.200, 0.150, 0.100]}\n# This will MLE calculations across 9 points in concentration space\n# the results will be in an xarray Dataset that can be accessed with\n# scanner.results\nscanner.run(concentrations, svd=True)\n```\n\n## Citation\n\nWhen using **multibind** in published works, please cite the published paper\n\nKenney, Ian Michael, and Oliver Beckstein. *Thermodynamically Consistent Determination of Free Energies and Rates in Kinetic Cycle Models.* Biophysical Reports 3 (2023), 100120. doi:[10.1016/j.bpr.2023.100120](https://doi.org/10.1016/j.bpr.2023.100120).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbecksteinlab%2Fmultibind","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbecksteinlab%2Fmultibind","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbecksteinlab%2Fmultibind/lists"}