{"id":16975899,"url":"https://github.com/dgasmith/gau2grid","last_synced_at":"2025-03-17T08:38:05.972Z","repository":{"id":55087154,"uuid":"109175582","full_name":"dgasmith/gau2grid","owner":"dgasmith","description":"Fast computation of a gaussian and its derivative on a grid.","archived":false,"fork":false,"pushed_at":"2024-05-05T19:20:15.000Z","size":929,"stargazers_count":30,"open_issues_count":5,"forks_count":17,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-27T21:48:36.002Z","etag":null,"topics":["c","collocations","grid","numpy","python"],"latest_commit_sha":null,"homepage":"https://gau2grid.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dgasmith.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}},"created_at":"2017-11-01T19:39:46.000Z","updated_at":"2025-02-06T17:38:19.000Z","dependencies_parsed_at":"2024-10-27T12:47:33.173Z","dependency_job_id":"2bfec5dc-466a-43cb-ac0f-8e015d85e84c","html_url":"https://github.com/dgasmith/gau2grid","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgasmith%2Fgau2grid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgasmith%2Fgau2grid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgasmith%2Fgau2grid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgasmith%2Fgau2grid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dgasmith","download_url":"https://codeload.github.com/dgasmith/gau2grid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243853647,"owners_count":20358454,"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":["c","collocations","grid","numpy","python"],"created_at":"2024-10-14T01:24:18.962Z","updated_at":"2025-03-17T08:38:05.536Z","avatar_url":"https://github.com/dgasmith.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003ca href=\"https://travis-ci.org/dgasmith/gau2grid\"\u003e\n  \u003cimg src=\"https://travis-ci.org/dgasmith/gau2grid.svg?branch=master\" alt=\"Travis CI\"/\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://ci.appveyor.com/project/MolSSI/gau2grid\"\u003e\n  \u003cimg src=\"https://ci.appveyor.com/api/projects/status/d3l5nid8a2dww8dc?svg=true\" alt=\"Appveyor\"/\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://codecov.io/gh/dgasmith/gau2grid\"\u003e\n  \u003cimg src=\"https://codecov.io/gh/dgasmith/gau2grid/branch/master/graph/badge.svg\" alt=\"Codecov\" /\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://anaconda.org/psi4/gau2grid\"\u003e\n  \u003cimg src=\"https://anaconda.org/psi4/gau2grid/badges/version.svg\" /\u003e\n\u003c/a\u003e\n\n\u003ca href='https://gau2grid.readthedocs.io/en/latest/?badge=latest'\u003e\n    \u003cimg src='https://readthedocs.org/projects/gau2grid/badge/?version=latest' alt='Documentation Status' /\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n# gau2grid\nA collocation code for computing gaussians on a grid of the form:\n```\nout_Lp = x^l y^m z^n \\sum_i coeff_i e^(exponent_i * (|center - p|)^2)\n```\nWhere the returned matrix dimension are the angular momentum (L) by number of requested points (p).\n\n```python\nimport gau2grid\nimport numpy as np\n\n# Build coordinates along the Z axis\n\u003e\u003e\u003e xyz = np.zeros((3, 5))\n\u003e\u003e\u003e xyz[2] = np.arange(5)\n\n# Compute a 's' gaussian with a scaling and exponent of one at the origin\n\u003e\u003e\u003e ret = gau2grid.collocation(xyz, 0, [1], [1], [0, 0, 0])\n\u003e\u003e\u003e print(ret[\"PHI\"])\n[[  1.00000e+00   3.67879e-01   1.83156e-02   1.23409e-04   1.12535e-07]]\n\n# Compute a 'p' gaussian with a scaling and exponent of one at the origin\n\u003e\u003e\u003e ret = gau2grid.collocation(xyz, 1, [1], [1], [0, 0, 0], spherical=False)\n\u003e\u003e\u003e print(ret[\"PHI\"])\n[[  0.00000e+00   0.00000e+00   0.00000e+00   0.00000e+00   0.00000e+00]\n [  0.00000e+00   0.00000e+00   0.00000e+00   0.00000e+00   0.00000e+00]\n [  0.00000e+00   3.67879e-01   3.66312e-02   3.70229e-04   4.50140e-07]]\n\n# Note that the X and Y components are zero as they are orthogonal to our Z vector.\n```\n\nThe returned matrix can be in either cartesian or regular solid harmonics. There are currently\nthree algorithms in which to compute these collocation matrices:\n - Optimize C: A autogenerated C library that optimizes for cache,\n    vectorization, and sparsity. Fastest, requires compilation, found at\n    `gau2grid.collocation`.\n- Optimized/Generated NumPy: A exploratory tool to\n    examine the sparsity in the gaussians. No compilation required, found at\n    `gau2grid.np_gen.collocation`.\n- NumPy Reference: A simple NumPy-based loop\n    code. No compilation required, found at `gau2grid.ref.collocation`.\n\nSee the [documentation](https://gau2grid.readthedocs.io/en/latest/?badge=latest) for more information!\n\n## Building Gau2Grid\nThe C library is built with CMake and has C no required dependancies other than\nthe standard library. A CMake and build example can found below:\n\n```bash\ncmake -H. -Bobjdir\ncd objdir; make -j2\n```\n\nSeveral common CMake options are as follow:\n - `-DPYTHON_EXECUTABLE` - Path to the desired Python executable\n - `-DMAX_AM` - Maximum angular momentum to compile to, default 6\n - `-DCMAKE_INSTALL_PREFIX` - Installation directory\n\n## Python installation\nThe gau2grid program (without the optimized C library) can be installed using\nthe canonical `setup.py` script,\n```\npython setup.py install\n```\n\n# Authors\nThis code was inspired by a number of folks and quite a few provided excellent advice.\n\n - Daniel G. A. Smith - Code author\n - Rob M. Parrish - Author of the Psi4 section which contains the original equations\n - Lori A. Burns - CMake, building, and library linking\n - Andy C. Simmonett - RSH coefficients\n - Ben Pritchard - Generator and vectorization recommendations\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgasmith%2Fgau2grid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdgasmith%2Fgau2grid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgasmith%2Fgau2grid/lists"}