Physical basis
This is the "physical basis", a set of radial basis functions specifically designed for atomistic machine learning models. You can find the theory behind these basis functions here:
Installation
You can install the package with pip install physical-basis.
Usage
The package contains two classes: one for use in NumPy and one for use in Torch.
NumPy
The NumPy class can be used as follows:
import numpy as np
from physical_basis import PhysicalBasis
physical_basis = PhysicalBasis()
x = np.array([0.1, 0.2, 0.3])
n = 2
l = 1
result = physical_basis.compute(n, l, x)
derivatives = physical_basis.compute_derivative(n, l, x)
eigenvalue = physical_basis.return_eigenvalue(n, l)
Torch
The Torch class inherits from torch.nn.Module, and it can be used as follows:
import torch
from physical_basis.torch import PhysicalBasis
physical_basis = PhysicalBasis()
x = torch.tensor([0.1, 0.2, 0.3])
n = 2
l = 1
result = physical_basis(n, l, x)
eigenvalue = physical_basis.return_eigenvalue(n, l)
Especially if you plan to use autograd, splining the functions is recommended for speed, as the computational graph generated by calls to this class can be large.
Solving the physical basis eigenvalue equation
The physical basis is generated from an eigenvalue equation that is solved numerically.
This procedure finds coefficients that are then used to calculate the physical basis from
a basis of trigonometric functions.
Scripts to solve the eigenvalue equation, as well as instructions, are available in
generate_coefficients.
Metadata
Release files for physical-basis 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| physical_basis-1.0.0.tar.gz | 15.8 MB | Without provenance | Details for physical_basis-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| physical_basis-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for physical_basis-1.0.0-py3-none-any.whl |
Total release size: 31.6 MB
Release files / physical_basis-1.0.0.tar.gz
| Download URL | physical_basis-1.0.0.tar.gz |
|---|---|
| Size | 15.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b545636efa87ef048be036b5d5c61627d2aca367fa4bb27300e93b593202fb04
|
|
BLAKE2b-256 checksum How to use checksums |
81c266c005f882c2c0f524abfd8cec48287a43c5f2f5a91df2968017519964cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.3
|
Release files / physical_basis-1.0.0-py3-none-any.whl
| Download URL | physical_basis-1.0.0-py3-none-any.whl |
|---|---|
| Size | 15.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
adaa701a6f4d13b00b20151c0d257a71d9e342c032a11d2bba9f29d26691d90b
|
|
BLAKE2b-256 checksum How to use checksums |
4dff9198fdbae41b42dd68184b90ad5ed5939e9f077e5232249feec5d502d260
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.3
|
Security for physical-basis 1.0.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.