{"id":32178246,"url":"https://github.com/william-dawson/ntpoly","last_synced_at":"2026-02-19T02:32:44.144Z","repository":{"id":22904857,"uuid":"94492286","full_name":"william-dawson/NTPoly","owner":"william-dawson","description":"A massively parallel library for computing the functions of sparse matrices. ","archived":false,"fork":false,"pushed_at":"2025-07-09T06:45:49.000Z","size":16376,"stargazers_count":24,"open_issues_count":5,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-21T20:51:56.439Z","etag":null,"topics":["centrality","density-functional-theory","electronic-structure","graph-algorithms","high-performance-computing","linear-algebra","massively-parallel","matrix-functions","matrix-library","quantum-chemistry","sparse-matrices","sparse-matrix"],"latest_commit_sha":null,"homepage":"https://william-dawson.github.io/NTPoly/","language":"Fortran","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/william-dawson.png","metadata":{"files":{"readme":"ReadMe.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-06-16T01:19:35.000Z","updated_at":"2025-07-29T14:15:26.000Z","dependencies_parsed_at":"2024-01-22T12:49:35.451Z","dependency_job_id":"115c552e-9c12-4de2-a68b-83c055b0d9f1","html_url":"https://github.com/william-dawson/NTPoly","commit_stats":{"total_commits":631,"total_committers":6,"mean_commits":"105.16666666666667","dds":0.2155309033280507,"last_synced_commit":"b5fa45dcb60bf64a12acebc850c03f743dcbcc75"},"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"purl":"pkg:github/william-dawson/NTPoly","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/william-dawson%2FNTPoly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/william-dawson%2FNTPoly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/william-dawson%2FNTPoly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/william-dawson%2FNTPoly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/william-dawson","download_url":"https://codeload.github.com/william-dawson/NTPoly/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/william-dawson%2FNTPoly/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280333492,"owners_count":26312845,"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","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["centrality","density-functional-theory","electronic-structure","graph-algorithms","high-performance-computing","linear-algebra","massively-parallel","matrix-functions","matrix-library","quantum-chemistry","sparse-matrices","sparse-matrix"],"created_at":"2025-10-21T20:52:16.566Z","updated_at":"2025-10-21T20:52:17.753Z","avatar_url":"https://github.com/william-dawson.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":"Project Overview\n================================================================================\n![Build Status](https://github.com/william-dawson/NTPoly/workflows/CI/badge.svg)\n\nNTPoly is a massively parallel library for computing the functions of sparse,\nHermitian matrices based on polynomial expansions. For sufficiently sparse\nmatrices, most of the matrix functions in NTPoly can be computed in linear\ntime.\n\nSet Up Guide\n--------------------------------------------------------------------------------\nNTPoly is freely available and open source under the MIT license. It can be\ndownloaded from the [Github](https://github.com/william-dawson/NTPoly)\nrepository. We of course recommend that you download a\n[release version](https://github.com/william-dawson/NTPoly/releases)\nto get started.\n\nInstalling NTPoly requires the following software:\n\n* A Fortran Compiler.\n* An MPI Installation (MPI-3 Standard+).\n* CMake (Version 3.2+).\n* BLAS: for multiplying dense matrices, if they emerge in the calculation.\n* LAPACK: for dense solvers.\n\nThe following optional software can greatly enhance the NTPoly experience:\n\n* A C++ Compiler for building C++ bindings.\n* Ford: for building documentation.\n* Doxygen: for building C++ documentation.\n* SWIG (Version 3.0+): for building the Python bindings.\n* Python (Version 2.7+): if you would like python bindings.\n* MPI4PY: for testing.\n* SciPy: for testing.\n* NumPy: for testing.\n* EigenExa: for dense, parallel calculations.\n\nNTPoly uses CMake as a build system. First, take a look in the Targets\ndirectory. You'll find a list of `.cmake` files which have example\nconfigurations on popular systems. You should copy one of these files, and\ncreate your own mymachine.cmake file. Then, cd into the Build directory, and\ntype:\n\u003e cmake -DCMAKE_TOOLCHAIN_FILE=../Targets/mymachine.cmake ..\n\nAfter that you can build using:\n\u003e make\n\nAnd for the documentation:\n\u003e make doc\n\nIf you aren't cross compiling and have built the python bindings, you can\nperform local tests using:\n\u003e make test\n\nThere are a few options you can pass to CMake to modify the build. A few\nuseful standard options are:\n* `-DCMAKE_BUILD_TYPE=` `Debug` or `Release`.\n* `-DCMAKE_INSTALL_PREFIX=` followed by the path to your desired install\n directory.\n\nThere are also some custom options special for NTPoly:\n* `-DFORTRAN_ONLY=` set to `Yes` if you only want to build the Fortran bindings.\n* `-DNOSWIG=` set to `Yes` if you don't want to build Python bindings.\n* `-DUSE_MPIH=` on some systems, there is no `use mpi` feature for Fortran,\n just `#include \"mpi.h\"`. You can set this option to activate the later.\n* `-DNOIALLGATHER=` on older MPI implementations, there is no non blocking\n collective operations. You can disable this feature using this option, but\n beware this might reduce performance.\n\n[Online documentation](https://william-dawson.github.io/NTPoly/documentation/)\nis also available. Further details about the library can be found on the\n[Wiki](https://github.com/william-dawson/NTPoly/wiki).\n\nBasic Theory\n--------------------------------------------------------------------------------\nThe theory of matrix functions is a long studied branch of matrix algebra.\nMatrix functions have a wide range of applications, including graph problems,\ndifferential equations, and materials science. Common examples of matrix\nfunctions include the matrix exponential:\n\n\u003e f(A) = e^A.\n\nfrom the study of networks, or the inverse square root:\n\n\u003e f(A) = A^(-1/2)\n\nfrom quantum chemistry. NTPoly is a massively parallel library that can be used\nto compute a variety of matrix using polynomial expansions. Consider for example\nthe Taylor series expansion of a function *f(x)* .\n\n\u003e f(x) = f(0) + f'(0)x + f''(0)x^2/2! + ...\n\nWe can imagine expanding this from the function of a single variable, to a\nfunction of a matrix:\n\n\u003e f(A) = f(0) + f'(0)A + f''(0)A^2/2! + ...\n\nwhere matrices can be summed using matrix addition, and raised to a power\nusing matrix multiplication. At the heart of NTPoly are polynomial expansions\nlike this. We implement not only Taylor expansions, but also Chebyshev\npolynomial expansions, and other specialized expansions based on the function\nof interest.\n\nWhen the input matrix *A* and the output matrix *f(A)* are sparse, we can\nreplace the dense matrix addition and multiplication routines with sparse\nmatrix routines. This allows us to use NTPoly to efficiently compute many\nfunctions of sparse matrices.\n\nGetting Start With Examples\n--------------------------------------------------------------------------------\nIn the examples directory, there are a number of different example programs that\nuse NTPoly. You can check the ReadMe.md file in each example directory to\nlearn how to build and run each example. The simplest example is PremadeMatrix,\nwhich includes sample output you can compare to.\n\nFeature Outline\n--------------------------------------------------------------------------------\nThe following features and methods have been implemented in NTPoly:\n\n* General Polynomials\n    * Standard Polynomials\n    * Chebyshev Polynomials\n    * Hermite Polynomials\n* Transcendental Functions\n    * Trigonometric Functions\n    * Exponential and Logarithm\n* Matrix Roots\n    * Square Root and Inverse Square Root\n    * Matrix *p* th Root\n* Quantum Chemistry\n    * Density Matrix Purification\n    * Chemical Potential Calculation\n    * Geometry Optimization\n* Other\n    * Matrix Inverse/Moore-Penrose Pseudo Inverse\n    * Sign Function/Polar Decomposition\n    * Interface to Dense Eigen/Singular Value Decomposition\n    * Load Balancing Matrices\n    * File I/O\n\nCitation\n--------------------------------------------------------------------------------\nA description of the techniques used in NTPoly can be found in the following\nComputer Physics Communications paper:\n\n\u003e Dawson, William, and Takahito Nakajima. \"Massively parallel sparse matrix\n\u003e function calculations with NTPoly.\" Computer Physics Communications (2017).\n\nPlease cite this paper in accordance to the practices in your field.\n\nHow To Contribute\n--------------------------------------------------------------------------------\nTo begin contributing to NTPoly, take a look at the\n[Wiki](https://github.com/william-dawson/NTPoly/wiki) pages. The\n[Contributing Guide](https://github.com/william-dawson/NTPoly/blob/master/CONTRIBUTING.md)\nprovides an overview of best development practices. Additionally, there is a\n[Adding New Functionality](https://github.com/william-dawson/NTPoly/wiki/Adding-New-Functionality-(Example))\npage which documents how one would go about adding a matrix function to NTPoly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliam-dawson%2Fntpoly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwilliam-dawson%2Fntpoly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliam-dawson%2Fntpoly/lists"}