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

  • 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/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-1.0.0.tar.gz (32.5 kB view details)

Uploaded Source

Built Distributions

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

maniverse-1.0.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

maniverse-1.0.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

maniverse-1.0.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

maniverse-1.0.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

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

File metadata

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

File hashes

Hashes for maniverse-1.0.0.tar.gz
Algorithm Hash digest
SHA256 58429d85590dcae1fa9cbead08e2cc218c5968baf859dd1fb7c5546b460d2f29
MD5 c53ee0d769131478a6163cc2d3d8d27a
BLAKE2b-256 c103ad6f4fcf0534760e2e9bc34f6851a80313e5a289ad5ef86dfad6a9eb404e

See more details on using hashes here.

File details

Details for the file maniverse-1.0.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for maniverse-1.0.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cb9eb8ccaa0bbd939fa7358c00b796d82d4151159a227f3f9e346c4545d2dbac
MD5 cdd298fd13bb87343010f6d688fed316
BLAKE2b-256 e9c5c4d56b3de7b89041b652b4ac4cf6a109a2551728179bc2e5a7697ca7ea47

See more details on using hashes here.

File details

Details for the file maniverse-1.0.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for maniverse-1.0.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c035953b1b418eadab7e6b86aac899e716eae50bd90deabbee8837a05319fdff
MD5 f8af7086563d881b5cf1c33793cb7ad9
BLAKE2b-256 af5c43a5a3dca7643ff61092b01f58bf9cf9a2899871c8a223d788f798100fd7

See more details on using hashes here.

File details

Details for the file maniverse-1.0.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for maniverse-1.0.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ae1c4b55a064dbdd4e710eba81dd2b4983ead0ef6339438fa8a21cadad56601a
MD5 2a944ba45dda84b6f7b9749b323f4947
BLAKE2b-256 1caad40d79c7d5bd6e4c491b90a0a427596760c2812175dcacc803ae29a378d6

See more details on using hashes here.

File details

Details for the file maniverse-1.0.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for maniverse-1.0.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 73315acd1113be6822560df3a0715eca3e477c0cbb91b5ab458f5355dfbb4591
MD5 3b3a06e95d5cc4b028ce8bdd4ba69ee9
BLAKE2b-256 85e83f0dbf6bb2d4975ea40bae5ba7dfb6b759b049938ead724afbd759f5b176

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