Maniverse
Numerical optimization on manifolds
Overview
Maniverse is a library for optimization on manifolds (OOM).
What is Maniverse intended for?
I wrote Maniverse primarily for my quantum chemistry packages Chinium and Orbaplaw, which take care of some classic constraints in quantum chemistry via OOM. However, Maniverse is intended for more general use than merely quantum chemistry.
Why another library for OOM?
The two packages mentioned above are written in C++ and Python separately, so I hoped to have a single library for both C++ and Python. As far as I know, none of the existing libraries are 2-in-1.
How will Maniverse be maintained?
Optimization on manifolds has two aspects: the manifolds and the optimization algorithms. Therefore, this question should be divided into two: how will the two aspects be maintained separately?
For the manifolds, as a quantum chemist, I focused more on the Stiefel manifold and the Grassmann manifold (and their derivatives), so major emphasis will be laid on these two.
However, users are welcomed to give advice on more manifolds to be supported.
Additionally, Maniverse provides a base class Manifold from which users can derive their own manifold class.
For the optimization algorithms, the attention is paid to the second-order methods, because nearly all the functions to be optimized in quantum chemistry are smooth and well-behaved. These methods include Riemannian trust region method and Riemannian BFGS. I would like to keep track of the popular field of OOM and implement more efficient algorithms as they are being proposed, as long as they enhance the performance in my projects on quantum chemistry.
Are you an expert on OOM?
No. It has just occurred to me that OOM can be extremely powerful in some topics in quantum chemistry in middle 2024, so I set out to develop Maniverse. However, my knowledge in OOM is deficient, and I am still learning through textbooks, papers and discussions on webs. For helping make Maniverse real, I have a long namelist to thank. The good thing is that the current codes do work as they are expected, at least in my projects.
Features
Manifolds
- Stiefel manifold and its derivatives (Flag, Grassmann, Orthogonal)
- Simplex manifold
- User-defined manifolds
- Any products of the manifolds above
Optimizers
- Trust-region Newton's method with conjugate gradient or minimal residual as the linear subproblem solver
- L-BFGS
- Anderson acceleration (rarely used; not fully tested yet)
- Augmented Lagrangian method for extra non-manifold constraints with one of the unconstrained optimizers above for internal optimization
Linear system solvers
- Conjugate gradient
- Minimal residual
They can be set to be vigilant about non-positive curvatures of the Hessian in Newton's method.
Diagonalizers
- Lanczos method
Prerequisites
- A C++ compiler that supports C++17 standard
- GNU make
- Eigen3 >= 3.4.90
- PyBind11 >= 2.13.6 (For interface to python)
- Python3 with numpy (For interface to python)
Installation
Manual build
- Downloading the latest stable release
$ wget https://github.com/FreemanTheMaverick/Maniverse/archive/refs/tags/v0.3.5.tar.gz
- Edit the first few lines of
/Maniverse/makefilefor your own computer configuration, including- the commands that call the C++ compiler, the GNU make and
ar - the option that indicates whether to build for C++ use or python use
- the directories that contain the necessary libraries
- the commands that call the C++ compiler, the GNU make and
make -j[N]and you will find the newly created directories/Maniverse/includeand/Maniverse/lib.- Utilize Maniverse in your project
- For C++,
$ g++ test.cpp -isystem $(MANIVERSE)/include/ -L$(MANIVERSE)/lib/ -l:libmaniverse.a # Static linking $ g++ test.cpp -isystem $(MANIVERSE)/include/ -L$(MANIVERSE)/lib/ -lmaniverse # Shared linking - For Python,
$ export PYTHONPATH=$PYTHONPATH:$(MANIVERSE)/lib/ $ python >>> import Maniverse as mv
- For C++,
Pip (for Python only)
- Installation with
pip
pip install Maniverse
Usually pip installs packages to a lib/ directory that is already in $PYTHONPATH, so you do not need to set the environment variable for Maniverse.
- Utilize Maniverse in your project
$ python
>>> import Maniverse as mv
Metadata
Release files for Maniverse 2.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 18.0 MB
Release files / maniverse-2.2.0-cp313-cp313-musllinux_1_2_x86_64.whl
| Download URL | maniverse-2.2.0-cp313-cp313-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.13 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
ca24a2f7642e93f62a7db0b0cc1284879f1e216ab0a3695695b4ed7b4b7fc18c
|
|
BLAKE2b-256 checksum How to use checksums |
84e3d04fa8a56a3ba9f9139620d346950ec8ae94c31fb975355f32e984d23df9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / maniverse-2.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | maniverse-2.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
b8dc4920816319cc144c4da55e67dfb6700450448eb729f97bf944fe3e7ce8eb
|
|
BLAKE2b-256 checksum How to use checksums |
af0c418e716f21e27052eec74a30ee9ea091145f2d59ea7606253ec8d9eea32c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / maniverse-2.2.0-cp312-cp312-musllinux_1_2_x86_64.whl
| Download URL | maniverse-2.2.0-cp312-cp312-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.12 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
36a4a08eed8838e62bcd67c398577251a1262aafda8532a452fe7aaf5a4dbc65
|
|
BLAKE2b-256 checksum How to use checksums |
4d8ee47e3711988db456e72b831fb669762282a7a3bce253de55d74cb106f6b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / maniverse-2.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | maniverse-2.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
ff388dcbf6ee358302b2b840fb55a08b7a9d9d08405e406f5dda4b0d6f675dcd
|
|
BLAKE2b-256 checksum How to use checksums |
5a9b7a80e4793e45cd5db6db83bbd2a90c73751d72a3363b79efd8c25c81e740
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / maniverse-2.2.0-cp311-cp311-musllinux_1_2_x86_64.whl
| Download URL | maniverse-2.2.0-cp311-cp311-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.11 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
d1b4ca77a11b8bfb6e01be8abfd9cc8563c7d13c8e81afaa99abad43d8019dcb
|
|
BLAKE2b-256 checksum How to use checksums |
c4f68b15ec2c76459005dd82caee80bd5bc39ede9192c12294d67f6062773d65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / maniverse-2.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | maniverse-2.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
30e55f34afa60e1b82918a5284d8d7b8e4158ef1a5869c6fc54056da90a5223c
|
|
BLAKE2b-256 checksum How to use checksums |
a976ee9f89e77fc6fe54e284bb9ca689a5f9e7ec01a436f243d22ad635347981
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / maniverse-2.2.0-cp310-cp310-musllinux_1_2_x86_64.whl
| Download URL | maniverse-2.2.0-cp310-cp310-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
787c157cf7b39c6ed342eda1c025453bcf3416b0d9faa96273b30c5c72dbe34c
|
|
BLAKE2b-256 checksum How to use checksums |
f9f7ae8c312ef73f011e9fd9c83d9f663599660a08818414b599895649c2f55c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / maniverse-2.2.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | maniverse-2.2.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
65c80878379958602ae33c3e913f623dc48dfeb2de0e2dd879a03e2da10b9342
|
|
BLAKE2b-256 checksum How to use checksums |
aecb3ac9a5daa660a0e7051db9bf6c06a811d0ba2d232e19267ee13fa2b345a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / maniverse-2.2.0-cp39-cp39-musllinux_1_2_x86_64.whl
| Download URL | maniverse-2.2.0-cp39-cp39-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.9 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
4af33d351ccc13195f508360647d35774507b3e764d77875d8e00ecb48ebf1b8
|
|
BLAKE2b-256 checksum How to use checksums |
91296f0c04dcec3db165c2cff6b3220aba593e726decf568ffb09a613b7ac55c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / maniverse-2.2.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | maniverse-2.2.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.9 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
aa8221728dc048d227e017b00eb81da3154ed4c0ed9c1acc9443144c27314f4a
|
|
BLAKE2b-256 checksum How to use checksums |
d7781b89f54af6c9c27bc536ec0ab7bd853e82cc8570d68c184588bf20d0e346
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for Maniverse 2.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.