{"id":20388179,"url":"https://github.com/adam-kerrigan/pybader","last_synced_at":"2025-04-12T10:36:16.533Z","repository":{"id":44432263,"uuid":"254662955","full_name":"adam-kerrigan/pybader","owner":"adam-kerrigan","description":"Threaded implementation of grid-based Bader charge analysis.","archived":false,"fork":false,"pushed_at":"2023-10-19T17:21:44.000Z","size":317,"stargazers_count":13,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T05:23:37.631Z","etag":null,"topics":["bader-charge-analysis","chemistry","materials-science","multithreading","numba","numpy","physics","physics-analysis","python","science"],"latest_commit_sha":null,"homepage":null,"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/adam-kerrigan.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}},"created_at":"2020-04-10T15:01:42.000Z","updated_at":"2025-02-28T12:18:56.000Z","dependencies_parsed_at":"2023-11-07T06:33:40.586Z","dependency_job_id":null,"html_url":"https://github.com/adam-kerrigan/pybader","commit_stats":{"total_commits":56,"total_committers":2,"mean_commits":28.0,"dds":0.0357142857142857,"last_synced_commit":"1d675ae69ab64fe336b936b00990681e01258031"},"previous_names":["kerrigoon/pybader"],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adam-kerrigan%2Fpybader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adam-kerrigan%2Fpybader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adam-kerrigan%2Fpybader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adam-kerrigan%2Fpybader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adam-kerrigan","download_url":"https://codeload.github.com/adam-kerrigan/pybader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248553778,"owners_count":21123517,"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":["bader-charge-analysis","chemistry","materials-science","multithreading","numba","numpy","physics","physics-analysis","python","science"],"created_at":"2024-11-15T03:07:46.045Z","updated_at":"2025-04-12T10:36:16.461Z","avatar_url":"https://github.com/adam-kerrigan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pybader (v0.3.12)\n\npybader is a threaded implementation of grid-based Bader charge analysis. It performs grid-based Bader charge analysis as presented in [W Tang et al 2009 J. Phys.: Condens. Matter 21 084204]. Methods have been updated to allow threading over multiple threads. It runs on POSIX systems, Mac OS, and Windows.\n\n## Usage\n\nInstallation will create 2 executeables (bader, bader-read) that can be used to run and read the output of the Bader calculation. To view available flags run:\n\n```sh\n$ bader --help\n$ bader-read --help\n```\n\nBy default the program bader will output a file called bader.p which is a pickled Bader object. This file can be interpreted by the bader-read script. Human readable files can also be created in place of the bader.p file by supplying the flag --output dat to the main bader program. If you would like this to be the default behaviour (bader.p files contain the entire charge denisty and voxel to Bader volume and/or atom map so can be quite large) there is a config.ini file with sections for all the configurable variables. The location of this varies depending on platform but can be found by checking the pybader.\\_\\_config\\_\\_ variable. The current default settings are shown below\n```ini\n[DEFAULT]\nmethod = neargrid\nrefine_method = neargrid\nvacuum_tol = None\nrefine_mode = ('changed', 2)\nbader_volume_tol = 0.001\nexport_mode = None\nprefix = ''\noutput = pickle\nthreads = 1\nfortran_format = 0\nspeed_flag = False\nspin_flag = False\n```\n\nCheck the examples folder and function doc strings for information on how to interface with the python module.\n\n```python\nimport pybader\nfrom pybader import (\n    methods,\n    refinement,\n    thread_handlers,\n    interface,\n)\nimport pybader.io\nfrom inspect import getmembers, ismodule\n\nhelp(pybader)\nhelp(methods)\nhelp(refinement)\nhelp(thread_handlers)\nhelp(interface)\n\nfor name, module in getmemebers(pybader.io, ismodule):\n    help(module)\n```\n\n## Requirements\n\npyBader requires a small number of open source projects to work properly, if using pip to install they should be installed automatically:\n\n* [Numpy] - NumPy is the fundamental package for scientific computing with Python.\n* [Numba] - A Just-In-Time Compiler for Numerical Functions in Python.\n* [tqdm] - A Fast, Extensible Progress Bar for Python and CLI.\n* [pandas] - A Library providing high-performance, easy-to-use data structures and data analysis tools for the Python programming language.\n\n## Installation\n\nIt's recommended to create a virtual python environment for the installation using a manager of your choice, this is optional and the docuemented manager is [pyenv]:\n\n```sh\n$ pyenv virtualenv pybader\n$ pyenv activate pybader\n```\nThen the package can be installed using one of the methods described below:\n\n### Pip\n\nUse the standard pip installer\n\n```sh\n$ pip install pybader\n```\n\n### From source\n\nClone the repositry and make sure setuptools is installed\n\n```sh\n$ git clone https://github.com/kerrigoon/pybader\n$ python pybader/setup.py install\n```\n\n### Development\n\nWant to contribute? Great!\nOpen your favorite Terminal and run these commands.\n\n```sh\n$ git clone https://github.com/kerrigoon/pybader\n$ pip install -e pybader/\n```\n\nFiddle away and submit pull requests.\n\n## License\n\nMIT\n\n[//]: # (These are reference links used in the body of this note and get stripped out when the markdown processor does its job. There is no need to format nicely because it shouldn't be seen. Thanks SO - http://stackoverflow.com/questions/4823468/store-comments-in-markdown-syntax)\n\n\n   [Numpy]: \u003chttps://numpy.org/\u003e\n   [Numba]: \u003chttps://numba.pydata.org/\u003e\n   [tqdm]: \u003chttps://tqdm.github.io/\u003e\n   [pandas]: \u003chttps://pandas.pydata.org/\u003e\n   [pyenv]: \u003chttps://github.com/pyenv/pyenv-virtualenv/\u003e\n   [W Tang et al 2009 J. Phys.: Condens. Matter 21 084204]: \u003chttps://doi.org/10.1088/0953-8984/21/8/084204\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadam-kerrigan%2Fpybader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadam-kerrigan%2Fpybader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadam-kerrigan%2Fpybader/lists"}