{"id":27873298,"url":"https://github.com/wpbonelli/dla","last_synced_at":"2025-06-25T19:33:10.545Z","repository":{"id":149699969,"uuid":"481764167","full_name":"wpbonelli/dla","owner":"wpbonelli","description":"diffusion-limited aggregation on a square grid","archived":false,"fork":false,"pushed_at":"2022-05-13T22:50:48.000Z","size":35,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-05T01:09:04.048Z","etag":null,"topics":["brownian-motion","brownian-tree","diffusion-limited-aggregation","fractal","random-walk","simulation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wpbonelli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-04-14T22:15:55.000Z","updated_at":"2024-10-28T11:13:08.000Z","dependencies_parsed_at":"2023-04-19T03:05:57.227Z","dependency_job_id":null,"html_url":"https://github.com/wpbonelli/dla","commit_stats":null,"previous_names":["wpbonelli/dla"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpbonelli%2Fdla","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpbonelli%2Fdla/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpbonelli%2Fdla/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpbonelli%2Fdla/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wpbonelli","download_url":"https://codeload.github.com/wpbonelli/dla/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252420954,"owners_count":21745154,"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":["brownian-motion","brownian-tree","diffusion-limited-aggregation","fractal","random-walk","simulation"],"created_at":"2025-05-05T01:09:06.315Z","updated_at":"2025-05-05T01:09:06.801Z","avatar_url":"https://github.com/wpbonelli.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DLA Simulation\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Optimizations](#optimizations)\n- [Outputs](#outputs)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\nA basic diffusion-limited aggregation simulation on a square grid.\n\n## Installation\n\nThe most portable way to run this simulation is Docker. A public image is available on Docker Hub at [`wbonelli/dla`](https://hub.docker.com/r/wbonelli/dla).\n\nTo use Python instead of Docker, make a fresh environment with your tool of choice (e.g. `venv`, Anaconda), then install the packages in `requirements.txt` (e.g., `pip install -r requirements.txt`).\n\n## Usage\n\nAt its simplest, the script can be invoked with:\n\n```shell\npython dla.py\n```\n\nBy default a 100x100 grid will be used, with 100 particles (walkers), and sticking probability unity. Each of these parameters can be provided explicitly as well:\n\n- `--side (-s)`: The length of a side of the square grid\n- `--mass (-m)`: The number of walkers to attach to the cluster\n- `--prob (-p)`: The probability of a walker to stick to an adjacent cluster cell\n\nFor instance, to use a 200x200 grid with 1000 walkers and a 50/50 chance of sticking:\n\n```shell\npython dla.py -s 200 -m 1000 -p 0.5\n```\n\n## Optimizations\n\nNone, save for boundary-aware step selection, i.e., not wasting cycles bumping into walls.\n\n## Outputs\n\nA GUID is generated each time the script is invoked. This GUID is written with status messages to `stdout` and forms the stem of the names of the output files produced by each invocation.\n\nWhen a cluster is completed and a trial ends, the cluster's mass (M) and mean radius of gyration (R) are calculated, printed, and persisted to file:\n\n- `{guid}.png`: a plot of the fully grown cluster (with M and R overlaid)\n- `{guid}.csv`: a 1-line, 2-value CSV file whose first value is M, second is R\n\nThese quantities are helpful in estimating fractal dimension.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpbonelli%2Fdla","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwpbonelli%2Fdla","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpbonelli%2Fdla/lists"}