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.1.tar.gz (32.4 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.1-cp312-cp312-musllinux_1_2_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

maniverse-1.0.1-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.1-cp311-cp311-musllinux_1_2_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

maniverse-1.0.1-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.1-cp310-cp310-musllinux_1_2_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

maniverse-1.0.1-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.1-cp39-cp39-musllinux_1_2_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.9musllinux: musl 1.2+ x86-64

maniverse-1.0.1-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.1.tar.gz.

File metadata

  • Download URL: maniverse-1.0.1.tar.gz
  • Upload date:
  • Size: 32.4 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.1.tar.gz
Algorithm Hash digest
SHA256 361ebdc19f81425795c35e7ccaebc30d425820cc438dbf2804d8f15fbb7a7ebd
MD5 0891e8530f83bb3be56bb7fb7ba42526
BLAKE2b-256 e6d770fb9ed1b50ed7aa97d012d5b926d5bcd8f630d5ba4bc669375e9660ddcf

See more details on using hashes here.

File details

Details for the file maniverse-1.0.1-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for maniverse-1.0.1-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 efaa8be8609f0f140008132b077eea609a7b04ac4a836a8a3cc8cbfa0ec57086
MD5 474ff39ff80fc5156de38e25b705e20c
BLAKE2b-256 a9160e82abf24676eed3feac2daa3bfd1559a83432949c9883fef89d278e8ce6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for maniverse-1.0.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 72a939b7acd46307ec43c36f260f50cab5ca967a9a756a01a97e36b93fb2ffd0
MD5 647a0915acf3984ab558629b33274b00
BLAKE2b-256 fca0df29d0feccb3d09e291279d2f665d4d82bf7b10b7cca9962a74b6672d5c2

See more details on using hashes here.

File details

Details for the file maniverse-1.0.1-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for maniverse-1.0.1-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 bb20ea8e661a650a665460f9975e9f65df5077c1dd3b9ae76b492a4d8f8a73f5
MD5 0dab3d9d50ce54cd9756d4ec7a6c3547
BLAKE2b-256 e81bdac38152e1a27d5dbcec6d97dde57c837d63e5069eef6ecc30c868077426

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for maniverse-1.0.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6d44afdf78fe41db7465dfa2f346c78c4542dec2fea6a92cc60e590be41db026
MD5 e1906731bec3f815dce65ad7d47a4452
BLAKE2b-256 ec67c7a06ea2b5fd8c7b2cf7e84891eb2cfd5fcf7ee0fd5fb92d94545fb84636

See more details on using hashes here.

File details

Details for the file maniverse-1.0.1-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for maniverse-1.0.1-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 46eea737b9265dfdd91c273269e31987bb23d82b6c7f152cb816e7a52f809167
MD5 84fd15a8f61dc9dcd0bd56598755aebc
BLAKE2b-256 26128a32bac87bef704995094a07251f5e51fd8a12c314cc3ee5101ba408c8ae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for maniverse-1.0.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 38e5cf32159b49572d4e3578385eec192861a5254b67212840316b7a5f008de4
MD5 f72c71c1ee84cf313943381ac68c96ca
BLAKE2b-256 faace9444f1417ae1d349a001455880253f3257b628b2aa2eb7e87a1e2c02ebf

See more details on using hashes here.

File details

Details for the file maniverse-1.0.1-cp39-cp39-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for maniverse-1.0.1-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 da1098b6089021dc0c8692ad829f86ebc10d27f5bf730a928728916e0fcd831a
MD5 ea26ecf95a476e3e2c018aebafa90769
BLAKE2b-256 508580f0620592513545c6503ef0634e5a3a613d198554460ac80d783d42fbaa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for maniverse-1.0.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a87dba6cf9741e783b0acc30f971f89acda49d2fd547a1e84d5bfc4664ef27b3
MD5 32f26c3836585cee13ce5bc3f4eb356a
BLAKE2b-256 f71249363acc72b80efbc200d9f45ac916300c67d0bb6a32691493195cdedc08

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