2 releases
0.1.1 | Mar 19, 2023 |
---|---|
0.1.0 | Mar 19, 2023 |
#1452 in Algorithms
265KB
5K
SLoC
rest_tensors
rest_tensors is a linear algebra library, which aims at providing efficient tensor operations for the Rust-based electronic structure tool (REST).
Using rest_tensors
- Several global environment variables should be specified
- REST_BLAS_DIR: The path to the openblas library:
libopenblas.so
- REST_FORTRAN_COMPILER: The compiler to build a fortran library for effcient tensor operations:
restmatr.f90
->librestmatr.so
- REST_EXT_DIR: The path to store the fortran library:
librestmatr.so
after compilation - LD_LIBRARY_PATH: attach REST_BLAS_DIR and REST_EXT_DIR to LD_LIBRARY_PATH:
export LD_LIBRARY_PATH="$REST_BLAS_DIR:$REST_EXT_DIR:$LD_LIBRARY_PATH"
- Simply add the following to your Carto.toml file:
[dependencies]
// replace the * by the latest version
rest_tensors = "*"
Fetures
-
MatrixFull
: thecolumn-major
rank-2 tensor, i.e.matrix
, which is used for the molecular geometries, orbital coefficients, density matrix, and most of intermediate data for REST.
There are several relevant structures for matrix, which share the same trait, namelyBasicMatrix
,BasicMatrixOpt
,MathMatrix
and so forth. -
MatrixUpper
: the structure storing the upper triangle of the matrix, which is used for Hamiltonian matrix, and many other Hermitian matrices in the REST package. -
RIFull
: thecolumn-major
rank-3 tensor structure, which is used for the three-center integrals in the resoution-of-identity approximation (RI). For example, ri3ao, ri3mo, and so forth.
NOTE:: Although RIFull is created for very specific purpose use in REST, most of the relevant operations provided here are quite general and can be easily extended to any other 3-rank tensors -
ERIFull
: thecolumn-major
4-dimention tensors for electronic repulsive integrals (ERI).
NOTE:: ERIFull is created to handle the analytic electronic-repulsive integrals in REST. Because REST mainly uses the Resolution-of-Identity (RI) technique. The analytic ERI is provided for benchmark, and thus is not fully optimized. -
Detailed usage of
MatrixFull
can be find in the corresponding pages; while those ofRIFull
andERIFull
are not yet ready.
To-Do-List
- Introduce more LAPACK and BLAS functions to the 2-dimention matrix struct in rest-tensors, like
MatrixFull
,MatrixFullSlice
,SubMatrixFull
and so forth. - Reoptimize the API for the rank-3 tensor, mainly
RIFull
and complete the detailed usage accordingly. - Enable the ScaLAPCK (scalable linear algebra package) functions to the 2-dimention matrix struct in rest-tensors, like
MatrixFull
. - Conversions between
rest_tensors
andnumpy
in python
Dependencies
~65MB
~875K SLoC