{"id":29950737,"url":"https://github.com/mlund/coulombgalore","last_synced_at":"2026-02-28T15:02:15.130Z","repository":{"id":35169789,"uuid":"189717079","full_name":"mlund/coulombgalore","owner":"mlund","description":"C++ Library for Electrostatics","archived":false,"fork":false,"pushed_at":"2025-09-19T09:29:56.000Z","size":598,"stargazers_count":18,"open_issues_count":2,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-09-19T11:36:15.934Z","etag":null,"topics":["chemistry","cpp14","dipole","electrostatics","intermolecular-interactions","molecular-dynamics","molecular-simulation","monte-carlo","multipole","physics"],"latest_commit_sha":null,"homepage":null,"language":"C++","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/mlund.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":".zenodo.json","notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-06-01T09:58:59.000Z","updated_at":"2025-09-19T09:30:00.000Z","dependencies_parsed_at":"2025-09-19T11:15:07.826Z","dependency_job_id":null,"html_url":"https://github.com/mlund/coulombgalore","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/mlund/coulombgalore","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlund%2Fcoulombgalore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlund%2Fcoulombgalore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlund%2Fcoulombgalore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlund%2Fcoulombgalore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlund","download_url":"https://codeload.github.com/mlund/coulombgalore/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlund%2Fcoulombgalore/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29938979,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T13:49:17.081Z","status":"ssl_error","status_checked_at":"2026-02-28T13:48:50.396Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["chemistry","cpp14","dipole","electrostatics","intermolecular-interactions","molecular-dynamics","molecular-simulation","monte-carlo","multipole","physics"],"created_at":"2025-08-03T11:19:03.018Z","updated_at":"2026-02-28T15:02:15.093Z","avatar_url":"https://github.com/mlund.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Documentation](https://codedocs.xyz/mlund/coulombgalore.svg)](https://codedocs.xyz/mlund/coulombgalore/)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3522058.svg)](https://doi.org/10.5281/zenodo.3522058)\n\n\n\n# Coulomb Galore\n\nThis is a C++ library for calculating the potential, field, forces, and interactions from and between electric multipoles.\nFocus is on approximate truncation schemes that offer fast alternatives to Ewald summation. All implemented methods are unit tested.\n\n## Usage\n\n### Requirements\n\n- C++14 compiler\n- The Eigen matrix library\n- nlohmann::json (optional)\n- doctest (optional)\n- doxygen (optional, for building API manual)\n\n### Building\n\nThe CMake build will automatically download Eigen, json, and doctest.\n\n~~~ bash\ncmake .\nmake\nmake test (optional)\ndoxygen (optional)\n~~~\n\n### Use in your own code\n\nSimply copy the `include/coulombgalore` directory to your project. All functions and classes are encapsulated in the `CoulombGalore` namespace.\nVectors are currently handled by the Eigen library, but it should be possible to change to another library.\nYou can import everything with `#include \"coulombgalore/all.h\"`, or only what you need:\n\n### Example\n\n~~~{.cpp}\n#include \"coulombgalore/plain.h\"\nint main() {\n   Eigen::Vector3d R = {0,0,10};                      // distance vector\n   CoulombGalore::Plain pot(14.0);                    // cutoff distance as constructor argument\n   double u = pot.ion_ion_energy(1.0, 1.0, R.norm()); // potential energy = 1.0 x 1.0 / 10\n\n   Eigen::Vector3d mu = {2,5,2};                      // dipole moment\n   Eigen::Vector3d E = pot.dipole_field(mu, R);       // field from dipole at 𝐑\n}\n~~~\n\n### Available Truncation Schemes\n\nClass name                                      | _S(q)_\n----------------------------------------------- | ------------------------\n[`Plain`](http://doi.org/ctnnsj)                | 1\n[`ReactionField`](http://doi.org/10/dscmwg)     | ![equation](https://latex.codecogs.com/svg.latex?1\u0026plus;%5Cfrac%7B%5Cepsilon_%7BRF%7D-%5Cepsilon_r%7D%7B2%5Cepsilon_%7BRF%7D\u0026plus;%5Cepsilon_r%7Dq%5E3-3%5Cfrac%7B%5Cepsilon_%7BRF%7D%7D%7B2%5Cepsilon_%7BRF%7D\u0026plus;%5Cepsilon_r%7Dq)\n[`Poisson`](http://doi.org/10/c5fr)             | ![equation](https://latex.codecogs.com/svg.latex?%281-%5Ctilde%7Bq%7D%29%5E%7BD\u0026plus;1%7D%5Csum_%7Bc%3D0%7D%5E%7BC-1%7D%5Cfrac%7BC-c%7D%7BC%7D%7BD-1\u0026plus;c%5Cchoose%20c%7D%5Ctilde%7Bq%7D%5Ec)\n[`qPotential`](http://doi.org/10/dc89)          | ![equation](https://latex.codecogs.com/svg.latex?%5Cprod_%7Bn%3D1%7D%5E%7B%5Ctext%7Border%7D%7D%281-q%5En%29)\n[`Fanourgakis`](http://doi.org/f639q5)          | ![equation](https://latex.codecogs.com/svg.latex?1-%5Cfrac%7B7%7D%7B4%7Dq\u0026plus;%5Cfrac%7B21%7D%7B4%7Dq%5E5-7q%5E6\u0026plus;%5Cfrac%7B5%7D%7B2%7Dq%5E7)\n[`Fennell`](http://doi.org/10.1063/1.2206581)   | ![equation](https://latex.codecogs.com/svg.latex?%5Ctext%7Berfc%7D%28%5Ceta%20q%29-q%5Ctext%7Berfc%7D%28%5Ceta%29\u0026plus;%28q-1%29q%5Cleft%28%5Ctext%7Berfc%7D%28%5Ceta%29\u0026plus;%5Cfrac%7B2%5Ceta%7D%7B%5Csqrt%7B%5Cpi%7D%7D%5Ctext%7Bexp%7D%28-%5Ceta%5E2%29%5Cright%29)\n[`ZeroDipole`](http://doi.org/10.1063/1.3582791)| ![equation](https://latex.codecogs.com/svg.latex?%5Ctext%7Berfc%7D%28%5Ceta%20q%29-q%5Ctext%7Berfc%7D%28%5Ceta%29\u0026plus;%5Cfrac%7B%28q%5E2-1%29%7D%7B2%7Dq%5Cleft%28%5Ctext%7Berfc%7D%28%5Ceta%29\u0026plus;%5Cfrac%7B2%5Ceta%7D%7B%5Csqrt%7B%5Cpi%7D%7D%5Ctext%7Bexp%7D%28-%5Ceta%5E2%29%5Cright%29)\n[`Zahn`](http://doi.org/10.1021/jp025949h)      | ![equation](https://latex.codecogs.com/svg.latex?%5Ctext%7Berfc%7D%28%5Ceta%20q%29-%28q-1%29q%5Cleft%28%5Ctext%7Berfc%7D%28%5Ceta%29\u0026plus;%5Cfrac%7B2%5Ceta%7D%7B%5Csqrt%7B%5Cpi%7D%7D%5Ctext%7Bexp%7D%28-%5Ceta%5E2%29%5Cright%29)\n[`Wolf`](http://doi.org/cfcxdk)                 | ![equation](https://latex.codecogs.com/svg.latex?%5Ctext%7Berfc%7D%28%5Ceta%20q%29-%5Ctext%7Berfc%7D%28%5Ceta%29q)\n[`Ewald`](http://doi.org/dgpdmc)                | ![equation](https://latex.codecogs.com/svg.latex?%5Cfrac%7B1%7D%7B2%7D%5Ctext%7Berfc%7D%5Cleft%28%5Ceta%20q%20\u0026plus;%20%5Cfrac%7B%5Ckappa%5E*%7D%7B2%5Ceta%7D%5Cright%29%5Ctext%7Bexp%7D%5Cleft%282%5Ckappa%5E*%20q%5Cright%29%20\u0026plus;%20%5Cfrac%7B1%7D%7B2%7D%5Ctext%7Berfc%7D%5Cleft%28%5Ceta%20q%20-%20%5Cfrac%7B%5Ckappa%5E*%7D%7B2%5Ceta%7D%5Cright%29)\n[`EwaldT`](http://doi.org/dsd6)                 | ![equation](https://latex.codecogs.com/svg.latex?%5Cfrac%7B%5Ctext%7Berfc%7D%7B%5Cleft%28%5Ceta%20q%5Cright%29%7D%20-%20%5Ctext%7Berfc%7D%7B%5Cleft%28%5Ceta%5Cright%29%7D%20-%20%281-q%29%5Cfrac%7B2%5Ceta%7D%7B%5Csqrt%7B%5Cpi%7D%7D%5Cexp%7B%5Cleft%28-%5Ceta%5E2%5Cright%29%7D%7D%7B1%20-%20%5Ctext%7Berfc%7D%7B%5Cleft%28%5Ceta%5Cright%29%7D%20-%20%5Cfrac%7B2%5Ceta%7D%7B%5Csqrt%7B%5Cpi%7D%7D%5Cexp%7B%5Cleft%28-%5Ceta%5E2%5Cright%29%7D%7D)\n`Splined`                                       | Splined version of any of the above\n\nHere \n\n![equation](https://latex.codecogs.com/svg.latex?q%3D%5Cfrac%7Br%7D%7BR_c%7D%5Cquad%5Cquad%20%5Ctilde%7Bq%7D%3D%5Cfrac%7B1-%5Cexp%282%5Ckappa%5E*q%29%7D%7B1-%5Cexp%282%5Ckappa%5E*%29%7D%20%5Cquad%5Cquad%20%5Ceta%20%3D%20%5Calpha%20R_c%20%5Cquad%5Cquad%20%5Ckappa%5E*%3D%5Ckappa%20R_c.) \n\n### Units\n\nIt is vital that the units of the input parameters and function input values are consistent, such that correct output units are retrieved.\nIn terms of the charge unit `Z`, and length unit `L`, the input parameters and function outputs are listed in tables below.\nAll charges must have units `Z`, dipoles `Z*L`, distances `L`, volumes `L^3`, and fields `Z/L^2`.\nAlso note that the input `M2V` for function `calc_dielectric` has to be unitless.http://doi.org/10.1021/acs.jpca.0c01684\n\nInput parameter | Unit\n--------------- | -------------------\n`cutoff`        | `L`\n`debye_length`  | `L`\n`alpha`         | `L^-1`\n`order`         | `positive integer`\n`C`             | `positive integer`\n`D`             | `integer`\n`epss`          | `unitless`\n`epsRF`         | `unitless`\n`epsr`          | `unitless`\n`shifted`       | `boolean`\n\n\nFunction                    | Output unit\n--------------------------- | -------------\n`ion_potential`             | `Z / L`\n`dipole_potential`          | `Z / L`\n`ion_field`                 | `Z / L^2`\n`dipole_field`              | `Z / L^2`\n`multipole_field`           | `Z / L^2`\n`ion_ion_energy`            | `Z^2 / L`\n`ion_dipole_energy`         | `Z^2 / L`\n`dipole_dipole_energy`      | `Z^2 / L`\n`multipole_multipole_energy`| `Z^2 / L`\n`ion_ion_force`             | `Z^2 / L^2`\n`ion_dipole_force`          | `Z^2 / L^2`\n`dipole_dipole_force`       | `Z^2 / L^2`\n`multipole_multipole_force` | `Z^2 / L^2`\n`dipole_torque`             | `Z^2 / L`\n`self_energy`               | `Z^2 / L`\n`neutralization_energy`     | `Z^2 / L`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlund%2Fcoulombgalore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlund%2Fcoulombgalore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlund%2Fcoulombgalore/lists"}