Crate rest_tensors
source · [−]Expand description
rest_tensors
rest_tensors is a linear algebra library, which aims at providing efficient tensor operations for the Rustbased 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"
 REST_BLAS_DIR: The path to the openblas library:

Simply add the following to your Carto.toml file:
[dependencies]
// replace the * by the latest version
rest_tensors = "*"
Fetures

MatrixFull
: thecolumnmajor
rank2 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
: thecolumnmajor
rank3 tensor structure, which is used for the threecenter integrals in the resoutionofidentity 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 3rank tensors 
ERIFull
: thecolumnmajor
4dimention tensors for electronic repulsive integrals (ERI).
NOTE:: ERIFull is created to handle the analytic electronicrepulsive integrals in REST. Because REST mainly uses the ResolutionofIdentity (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.
ToDoList
 Introduce more LAPACK and BLAS functions to the 2dimention matrix struct in resttensors, like
MatrixFull
,MatrixFullSlice
,SubMatrixFull
and so forth.  Reoptimize the API for the rank3 tensor, mainly
RIFull
and complete the detailed usage accordingly.  Enable the ScaLAPCK (scalable linear algebra package) functions to the 2dimention matrix struct in resttensors, like
MatrixFull
.  Conversions between
rest_tensors
andnumpy
in python
Reexports
pub use crate::tensor_basic_operation::*;
pub use crate::eri::*;
pub use crate::matrix::*;
pub use crate::matrix::matrixfull::*;
pub use crate::matrix::matrixfullslice::*;
pub use crate::matrix::matrixupper::*;
pub use crate::matrix::submatrixfull::*;
pub use crate::ri::*;
pub use crate::davidson::*;