Skip to main content

Fast calculation of spherical harmonics

Project description

sphericart

Test

This is sphericart, a multi-language library for the efficient calculation of the spherical harmonics and their derivatives in Cartesian coordinates.

For instructions and examples on the usage of the library, please refer to our documentation.

Installation

Python API

From source

git clone https://github.com/lab-cosmo/sphericart
pip install .

# if you also want the torch bindings
pip install .[torch]

# torch bindings, CPU-only version
pip install --extra-index-url https://download.pytorch.org/whl/cpu .[torch]

Pre-built (https://pypi-hypernode.com/project/sphericart/).

pip install sphericart             # numpy version
pip install sphericart[torch]      # including also the torch bindings

C and C++ API

From source

git clone https://github.com/lab-cosmo/sphericart
cd sphericart

mkdir build && cd build

cmake .. <cmake configuration options>
cmake --build . --target install

The following cmake configuration options are available:

  • -DSPHERICART_BUILD_TORCH=ON/OFF: build the torch bindings in addition to the main library
  • -DSPHERICART_BUILD_TESTS=ON/OFF: build C++ unit tests
  • -DSPHERICART_OPENMP=ON/OFF: enable OpenMP parallelism
  • -DCMAKE_INSTALL_PREFIX=<where/you/want/to/install> set the root path for installation

Running tests and documentation

Tests and the local build of the documentation can be run with tox. The default tests, which are also run on the CI, can be executed by simply running

tox

in the main folder of the repository.

To run tests in a CPU-only environment you can set the environment variable PIP_EXTRA_INDEX_URL before calling tox, e.g.

PIP_EXTRA_INDEX_URL=https://download.pytorch.org/whl/cpu tox -e docs

will build the documentation in a CPU-only environment.

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

sphericart-0.3.0.tar.gz (29.1 kB view details)

Uploaded Source

Built Distributions

sphericart-0.3.0-py3-none-macosx_11_0_x86_64.whl (284.1 kB view details)

Uploaded Python 3 macOS 11.0+ x86-64

sphericart-0.3.0-py3-none-macosx_11_0_arm64.whl (256.9 kB view details)

Uploaded Python 3 macOS 11.0+ ARM64

File details

Details for the file sphericart-0.3.0.tar.gz.

File metadata

  • Download URL: sphericart-0.3.0.tar.gz
  • Upload date:
  • Size: 29.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for sphericart-0.3.0.tar.gz
Algorithm Hash digest
SHA256 a3e04c62b41532a3aae200c2930678c3f019a51206031265d8e6da63614acea2
MD5 4f9bedb7d5eb580a1885bf397c825280
BLAKE2b-256 16e805c92598fd8118e30e19bc0ee964ca2533ca6fc0bd5ea6f159fe4c0900f5

See more details on using hashes here.

File details

Details for the file sphericart-0.3.0-py3-none-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for sphericart-0.3.0-py3-none-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 3288156b8ffbb93c47f9116c4826eee613674b2e7f9e3a6d2d369a631c9feb40
MD5 a96cdb5db3218366e82fe8faea45c7ca
BLAKE2b-256 fe60cf0d206585431f504e265cbdd24e711106a11e2498e4bdb661efe16a33be

See more details on using hashes here.

File details

Details for the file sphericart-0.3.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for sphericart-0.3.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a4c81fa22a4a90df4a47054546a0fa4bb2b0570365cc5b8a0339be4887912fdc
MD5 9dd7ef3cc5f3b222c8c59fb80b25ffac
BLAKE2b-256 379e82b6e56bf5e9d3a32f48e23496bf1ceb7e07e000c657c8128c05642b6128

See more details on using hashes here.

Supported by

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