Skip to main content

Numerical optimization on manifolds

Project description

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.

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

  • Cloning the repository
$ git clone https://github.com/FreemanTheMaverick/Maniverse.git
  • Edit the first few lines of /Maniverse/makefile for 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
  • make -j[N] and you will find the newly created directories /Maniverse/include and /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
      

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

maniverse-0.3.3.tar.gz (28.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

maniverse-0.3.3-cp313-cp313-manylinux_2_39_x86_64.whl (818.0 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.39+ x86-64

maniverse-0.3.3-cp311-cp311-manylinux_2_34_x86_64.whl (741.1 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

File details

Details for the file maniverse-0.3.3.tar.gz.

File metadata

  • Download URL: maniverse-0.3.3.tar.gz
  • Upload date:
  • Size: 28.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for maniverse-0.3.3.tar.gz
Algorithm Hash digest
SHA256 cdf887671f6fe46ccc87be5a119446830572321e0ab02f0483493c52887660c0
MD5 64a4c754e1f59432e15df07d6dc07b70
BLAKE2b-256 10af81f49ea662a545bd33720db173c807c6769f6bb60cf2b40821a27ea26c4d

See more details on using hashes here.

File details

Details for the file maniverse-0.3.3-cp313-cp313-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for maniverse-0.3.3-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 fdfb2420bc859ab5c3d764129c3349ccaf0df23db60109d7c6d0e67db6c6adf5
MD5 b86fc373b3cacd014c503ff888814402
BLAKE2b-256 e3fb81bfac4c0dde3a06889381064033e0dbb5d9e7e31969886820dbd392fcc2

See more details on using hashes here.

File details

Details for the file maniverse-0.3.3-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for maniverse-0.3.3-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 d4c208b38563401d3a5a0b7d822209a387cd9510e48a340c759370f59131cd34
MD5 bf481fc96071243bd5940e726c40c7c3
BLAKE2b-256 6100ea9c4ec381de353c6ac1a77e9f712032541db14d16da8555631392a91dea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page