-
Notifications
You must be signed in to change notification settings - Fork 0
Home
TNUM and TANA are two components of a Fortran library or code that deal with Kinetic Energy Operators (KEO),
- TANA computes
$\hat{\mathbf{T}}$ analytically or the metric tensor. It is restricted to polyspherical coordinate types. - TNUM computes
$\hat{\mathbf{T}}$ , or more precisely, the metric tensor numerically but exactly using automatic differentiation techniques. In terms of curvilinear coordinates, TNUM can handle complicated curvilinear coordinates by adding coordinate transformations to the polyspherical or z-matrix coordinates.
Both codes share many functionalities, in particular for the input data file, and TNUM is used to check the exactness of TANA KEO.
For instance, the system, 
Then, the deformation part of the KEO,
With TANA, the KEO can be exported in several formats. However, with TNUM, the numerical values of the metric tensor components or of the functions in front of the differential operators are computed at a given geometrical configuration (i.e., numerical values of the internal coordinates,
For a molecular system with
-
$n$ are the number of active coordinates. It can be smaller than$3N_{at}-6$ when reduced dimensionality is used, i.e. the quantum dynamics is performed only with$n$ coordinates. -
$m$ are the number of inactive coordinates ($n+m=3N_{at}-6$ ). In full dimensionality$m=0$ . These$n$ active coordinates,$\mathbf{Q}_{act}=[Q_{act}^1,Q_{act}^2,...,Q_{act}^{n}]$ , will be call just$\mathbf{Q}$ in the following.
There are several equivalent expressions for the deformation part of KEO:
The presence of the extra-potential term,
With this volume element, the scalar product is defined as follows:
and a wave function,
For a given numerical value of the set of coordinates,
- The values of the metric tensor components, contravariant
$G^{i,j}(\mathbf{Q})$ or covariant$g_{i,j}(\mathbf{Q})$ - The values of the functions,
$f_2^{i,j}(\mathbf{Q})$ ,$f_1^{i}(\mathbf{Q})$ and$V_{ep}(\mathbf{Q})$ - The values of the Body-Fixed (or Laboratory-Fixed or Space-Fixed) Cartesian coordinates,
$\mathbf{x}(\mathbf{Q})$ as function of the curvilinear ones$\mathbf{Q}$ (or the reverse).
However, TNUM does not compute the KEO action on a quantum state.
TANA will compute the analytical expressions of
- MCTDH operator file (Heidelberg or Quantics version). TANA has been primary designed for that.
- MidasCpp operator file
- Fortan subroutines
- Latex equation
For TNUM, see:
- Lauvergnat, D., & Nauts, A. (2002). Exact numerical computation of a kinetic energy operator in curvilinear coordinates. Journal of Chemical Physics, 116(19), 8560.
- Marsili, E., Agostini, F., Nauts, A., & Lauvergnat, D. (2022). Quantum dynamics with curvilinear coordinates: models and kinetic energy operator. Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences, 380(2223).
For TANA, see:
- Ndong, M., Joubert-Doriol, L., Meyer, H.-D., Nauts, A., Gatti, F., & Lauvergnat, D. (2012). Automatic computer procedure for generating exact and analytical kinetic energy operators based on the polyspherical approach. The Journal of Chemical Physics, 136(3), 034107.
- Ndong, M., Nauts, A., Joubert-Doriol, L., Meyer, H., Gatti, F., & Lauvergnat, D. (2013). Automatic computer procedure for generating exact and analytical kinetic energy operators based on the polyspherical approach: General formulation and removal of singularities. The Journal of Chemical Physics, 139(20), 204107.
You can get the code from GitHub:
- By cloning the repository
git clone https://github.com/lauvergn/Tnum-Tana.git local-directory- Download a release with a browser (https://github.com/lauvergn/Tnum-Tana/releases) or with "curl"
curl -LJ https://github.com/lauvergn/Tnum-Tana/archive/refs/tags/v0.9.zip --output Tnum-Tana-0.9.zipYou should get a zip Tnum-Tana-0.9.zip
unzip Tnum-Tana-0.9.zipThe installation is simple with a makefile. However, we do not have an fully automatic procedure (like configure ...). The program uses some Fortran 2003 features. Therefore, the compilers gfortran need to be recent. The code has been tested with the following compilers:
- gfortran (version 11 and above)
- ifx(2024)
- nagfor (nAG compiler version 7.1)
For instance, the main executables can be built:
# Main Tnum/Tana executable:
make Tnum
# Example of Fortran drivers:
make Tnum_FDriver
# Example of c drivers:
make Tnum_cDriver
# Special Tnum/Tana executable for MCTDH:
make Tnum_MCTDH
# Special Tnum/Tana executable for MidasCpp:
make Tnum_MidasCppTo build the TnumTana library:
make libFurthermore, one can add options:
make FC=ifort OMP=0 OPT=0 LAPACK=0 INT=4
# FC=ifort to change the compiller to ifort
# OMP=0/1 to turn off/on the OpenMP fortran flag.
# OPT=0/1 to turn off/on the fortran optimization.
# LAPACK=0/1 to turn off/on the lapack use
# INT=4/8 to change the default integerThe library, libTnum-Tana_XXX_oppY_ompZ_lapackW_intV.a is created in the main directory. Remarks :
- XXX is the compiller (gfortran, ifort ...)
- Y is 0 or 1 (opt0 / opt1: compiler optimization)
- Z is 0 or 1 (omp0 / omp1: whitout/with OpenMP)
- W is 0 or 1 (lapack0 / lapack1: whitout/with lapack)
- V is 4 or 8 (int4 / int8)
If needed, the .mod files are in the obj/obj_XXX_oppY_ompZ_lapackW_intV directory.
With the following example:
make FC=ifort OMP=1 OPT=1 LAPACK=1 INT=4Two libraries are generated:
- The first one, libTnum-Tana_ifort_opt1_omp1_lapack1_int4.a, contains only Tnum-Tana subroutines. Therefore, other libraries are needed.
- The second one, libTnumTanaFull_ifort_opt1_omp1_lapack1_int4.a or libTnumTanaFull.a, contains everything.
For the installation, on can use fpm (Fortran Package Manager). To build the library:
fpm buildTo run some tests with fpm:
fpm run Tnum90 --< TESTS/exa_TnumDriver/dat_driver0 > res