{"id":37617638,"url":"https://github.com/bio-phys/forcespectroscopymle","last_synced_at":"2026-01-16T10:33:31.064Z","repository":{"id":45984791,"uuid":"413319111","full_name":"bio-phys/ForceSpectroscopyMLE","owner":"bio-phys","description":"Analyze rupture force spectra from single-molecule force spectroscopy experiments to extract disassociation rates and parameters characterizing the free-energy profile underlying the bond.","archived":false,"fork":false,"pushed_at":"2023-08-07T13:05:42.000Z","size":71,"stargazers_count":2,"open_issues_count":5,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-09-09T19:35:13.365Z","etag":null,"topics":["forcible-bond-rupture","julia","maximum-likelihood-estimation","single-molecule-force-spectroscopy"],"latest_commit_sha":null,"homepage":"","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bio-phys.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}},"created_at":"2021-10-04T07:33:19.000Z","updated_at":"2023-07-10T16:40:31.000Z","dependencies_parsed_at":"2022-08-26T09:21:28.650Z","dependency_job_id":null,"html_url":"https://github.com/bio-phys/ForceSpectroscopyMLE","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bio-phys/ForceSpectroscopyMLE","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bio-phys%2FForceSpectroscopyMLE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bio-phys%2FForceSpectroscopyMLE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bio-phys%2FForceSpectroscopyMLE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bio-phys%2FForceSpectroscopyMLE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bio-phys","download_url":"https://codeload.github.com/bio-phys/ForceSpectroscopyMLE/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bio-phys%2FForceSpectroscopyMLE/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478050,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"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":["forcible-bond-rupture","julia","maximum-likelihood-estimation","single-molecule-force-spectroscopy"],"created_at":"2026-01-16T10:33:30.550Z","updated_at":"2026-01-16T10:33:31.055Z","avatar_url":"https://github.com/bio-phys.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ForceSpectroscopyMLE\n\nThis package provides a robust framework to analyze rupture force data from single-molecule force spectroscopy experiments.  It includes a systematic protocol for trimming unwanted outliers and an efficient maximum likelihood estimator, based on the Dudko-Hummer-Szabo (DHS) bond rupture model, to extract parameters characterizing the free-energy landscape of the bond and the force-free disassociation rate.  \n\nFor more details on the theoretical framework, please refer to the associated publication:\n\u003e W. Cai, J. T. Bullerjahn, M. Lallemang, K. Kroy, B. N. Balzer, and T. Hugel, \"Angle-dependent strength of a single chemical bond by stereographic force spectroscopy\", *Chemical Science* **13**, 5734-5740 (2022). https://doi.org/10.1039/D2SC01077A\n\nThe code makes use of the DHS model of forcible bond rupture, which was originally published in:\n\u003e O. K. Dudko, G. Hummer, and A. Szabo, \"Intrinsic rates and activation free energies from single-molecule pulling experiments\", *Physical Review Letters* **96**, 108101 (2006). https://doi.org/10.1103/PhysRevLett.96.108101\n\nPlease cite the references above if you use `ForceSpectroscopyMLE` to analyze your data.  \n\n\n\n## Try without installation\n\nClick this [link](https://bio-phys.pages.mpcdf.de/forcespectroscopymle) to run the `pipeline_example.ipynb` notebook in a cloud environment.  \n\nYou can either analyze the data sets found in `examples/mock_data/` or upload your own.  The interactive session is only temporary and files will be deleted after termination (File -\u003e Shut Down).  \n\n**Important:** Please shut down JupyterLab properly after use via the drop-down menu (File -\u003e Shut Down) to free resources for other users.  \n\n\n\n## Installation\n\nThe package is written in the open-source programming language [Julia](https://github.com/JuliaLang/julia), which can be downloaded from their [webpage](https://julialang.org/downloads/#download_julia).  \n\nCurrently, the package is not in a registry.  It must therefore be added by specifying a URL to the repository:\n```julia\nusing Pkg; Pkg.add(url=\"https://github.com/bio-phys/ForceSpectroscopyMLE\")\n```\nUsers of older versions of Julia may need to wrap the contents of the brackets with `PackageSpec()`.  \n\n\n\n## Usage\n\n### Importing data\n\nThe rupture force data should be of the type `Array{Float64,2}`, where the first column contains the rupture forces `F` (in *pN*) and the second column the associated loading rates `dF` (in *pN/s*).  In principle, users can lump all their measured force spectra into a single file and, e.g., read it in as follows:\n```julia\nusing DelimitedFiles\n\ndata = readdlm(file_name)\n```\nHowever, in order to make use of our data trimming protocol, we recommend keeping data measured at different pulling speeds in separate files (stored in the directory `rupture_forces`), which can be read in using our specialized function:\n```julia\nusing ForceSpectroscopyMLE\n\ndata = read_data(\"./rupture_forces/\")\n```\nThe array `data` is then of the type `Array{Array{Float64,2},1}`.  \n\n\n\n### Parameter and error estimation\n\nWe can estimate the parameters `βΔG_u`, `x_u` and `k_0` of the DHS model using the `MLE_estimator` function:\n```julia\nall_data = vcat(data...) # only necessary if 'data' is of the type Array{Array{Float64,2},1}\nparameters = MLE_estimator(all_data,ν) # βΔG_u, x_u, k_0\n```\nThe parameter `ν` can be set to `1/2` or `2/3` depending on the shape of the underlying free-energy landscape.  For `ν = 1` the DHS model reduces to the Bell-Evans model, which only depends on the parameters `x_u` and `k_0`.  `MLE_estimator` has various optional arguments, most of which are inputs for the [optimizer](https://github.com/robertfeldt/BlackBoxOptim.jl) except for the absolute temperature `T` (in *K*):\n```julia\nMLE_estimator(all_data,ν,T=295,βΔE_range=(0.1,100.0),Δx_b_range=(0.001,10.0),msteps=100000,mode=:compact,psize=50,tint=60.0)\n```\nThe `MLE_errors` function provides an estimate of the parameter uncertainties:\n```julia\nerrors = MLE_errors(all_data,ν) # δβΔG_u, δx_u, δk_0\n```\nwith (almost) the same optional arguments as `MLE_estimator`:\n```julia\nMLE_errors(all_data,ν,N=100,T=295,βΔE_range=(0.1,100.0),Δx_b_range=(0.001,10.0),msteps=100000,mode=:silent,psize=50,tint=60.0)\n```\nWe rely on bootstrapping to gauge the uncertainty of the estimates, by generating `N` new data sets from our sample of rupture forces and analyzing the results.  This can become rather sluggish for large `N`, so it is recommended to run the command `export JULIA_NUM_THREADS=n`, with `n` being the number of available (physical) cores, before launching Julia.  This speeds up the numerics significantly.  \n\nTo check the number of available cores for threading, simply run\n```julia\nusing Base.Threads; nthreads()\n```\nThis should print the number `n` if the above-mentioned command was executed properly.  \n\n\n\n### Data trimming\n\nThe function `read_data` sorts the data sets in ascending order with respect to the rupture forces.  We can therefore use `reduce_data` to trim the last `i` datapoints from each data set, resulting in a reduced data set:\n```julia\nreduced_data = reduce_data(data,i)\n```\nFor comparison, we can also randomly remove `i` datapoints from each data set:\n```julia\nrandomly_reduced_data = random_reduce_data(data,i)\n```\nA more detailed example that systematically investigates the effect of data trimming on the parameter estimates can be found in [the examples directory](examples).  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbio-phys%2Fforcespectroscopymle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbio-phys%2Fforcespectroscopymle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbio-phys%2Fforcespectroscopymle/lists"}