10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-06-14 09:15:28 +02:00
quantum_package/src/Utils/README.rst

267 lines
11 KiB
ReStructuredText
Raw Normal View History

2014-04-03 16:23:27 +02:00
============
Utils Module
============
2014-04-07 20:01:30 +02:00
Contains general purpose utilities.
2014-04-03 16:23:27 +02:00
2014-05-13 13:57:58 +02:00
Documentation
=============
.. Do not edit this section. It was auto-generated from the
.. NEEDED_MODULES file.
2015-04-13 10:44:49 +02:00
`apply_rotation <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/LinearAlgebra.irp.f#L168>`_
Apply the rotation found by find_rotation
`find_rotation <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/LinearAlgebra.irp.f#L149>`_
Find A.C = B
`get_pseudo_inverse <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/LinearAlgebra.irp.f#L95>`_
Find C = A^-1
`lapack_diag <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/LinearAlgebra.irp.f#L247>`_
Diagonalize matrix H
.br
H is untouched between input and ouptut
.br
eigevalues(i) = ith lowest eigenvalue of the H matrix
.br
eigvectors(i,j) = <i|psi_j> where i is the basis function and psi_j is the j th eigenvector
.br
`lapack_diag_s2 <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/LinearAlgebra.irp.f#L310>`_
Diagonalize matrix H
.br
H is untouched between input and ouptut
.br
eigevalues(i) = ith lowest eigenvalue of the H matrix
.br
eigvectors(i,j) = <i|psi_j> where i is the basis function and psi_j is the j th eigenvector
.br
`lapack_diagd <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/LinearAlgebra.irp.f#L180>`_
Diagonalize matrix H
.br
H is untouched between input and ouptut
.br
eigevalues(i) = ith lowest eigenvalue of the H matrix
.br
eigvectors(i,j) = <i|psi_j> where i is the basis function and psi_j is the j th eigenvector
.br
`lapack_partial_diag <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/LinearAlgebra.irp.f#L376>`_
Diagonalize matrix H
.br
H is untouched between input and ouptut
.br
eigevalues(i) = ith lowest eigenvalue of the H matrix
.br
eigvectors(i,j) = <i|psi_j> where i is the basis function and psi_j is the j th eigenvector
.br
`ortho_lowdin <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/LinearAlgebra.irp.f#L1>`_
Compute C_new=C_old.S^-1/2 canonical orthogonalization.
.br
overlap : overlap matrix
.br
LDA : leftmost dimension of overlap array
.br
N : Overlap matrix is NxN (array is (LDA,N) )
.br
C : Coefficients of the vectors to orthogonalize. On exit,
orthogonal vectors
.br
LDC : leftmost dimension of C
.br
m : Coefficients matrix is MxN, ( array is (LDC,N) )
.br
`set_zero_extra_diag <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/LinearAlgebra.irp.f#L433>`_
Undocumented
2014-05-30 18:07:04 +02:00
`abort_all <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/abort.irp.f#L1>`_
If True, all the calculation is aborted
2015-04-13 10:44:49 +02:00
`abort_here <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/abort.irp.f#L11>`_
2014-05-30 18:07:04 +02:00
If True, all the calculation is aborted
2015-04-13 10:44:49 +02:00
`catch_signal <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/abort.irp.f#L30>`_
2014-05-30 18:07:04 +02:00
What to do on Ctrl-C. If two Ctrl-C are pressed within 1 sec, the calculation if aborted.
2015-04-13 10:44:49 +02:00
`trap_signals <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/abort.irp.f#L19>`_
2014-05-30 18:07:04 +02:00
What to do when a signal is caught. Here, trap Ctrl-C and call the control_C subroutine.
2015-04-13 10:44:49 +02:00
`add_poly <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/integration.irp.f#L306>`_
2014-05-13 13:57:58 +02:00
Add two polynomials
D(t) =! D(t) +( B(t)+C(t))
2015-04-13 10:44:49 +02:00
`add_poly_multiply <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/integration.irp.f#L334>`_
2014-05-13 13:57:58 +02:00
Add a polynomial multiplied by a constant
D(t) =! D(t) +( cst * B(t))
2015-04-13 10:44:49 +02:00
`f_integral <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/integration.irp.f#L408>`_
2014-05-13 13:57:58 +02:00
function that calculates the following integral
\int_{\-infty}^{+\infty} x^n \exp(-p x^2) dx
2015-04-13 10:44:49 +02:00
`gaussian_product <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/integration.irp.f#L184>`_
2014-05-13 13:57:58 +02:00
Gaussian product in 1D.
e^{-a (x-x_A)^2} e^{-b (x-x_B)^2} = K_{ab}^x e^{-p (x-x_P)^2}
2015-04-13 10:44:49 +02:00
`gaussian_product_x <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/integration.irp.f#L226>`_
2014-05-13 13:57:58 +02:00
Gaussian product in 1D.
e^{-a (x-x_A)^2} e^{-b (x-x_B)^2} = K_{ab}^x e^{-p (x-x_P)^2}
2014-05-14 00:01:31 +02:00
`give_explicit_poly_and_gaussian <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/integration.irp.f#L46>`_
2014-05-13 13:57:58 +02:00
Transforms the product of
(x-x_A)^a(1) (x-x_B)^b(1) (x-x_A)^a(2) (y-y_B)^b(2) (z-z_A)^a(3) (z-z_B)^b(3) exp(-(r-A)^2 alpha) exp(-(r-B)^2 beta)
into
fact_k * [ sum (l_x = 0,i_order(1)) P_new(l_x,1) * (x-P_center(1))^l_x ] exp (- p (x-P_center(1))^2 )
* [ sum (l_y = 0,i_order(2)) P_new(l_y,2) * (y-P_center(2))^l_y ] exp (- p (y-P_center(2))^2 )
* [ sum (l_z = 0,i_order(3)) P_new(l_z,3) * (z-P_center(3))^l_z ] exp (- p (z-P_center(3))^2 )
2015-04-13 10:44:49 +02:00
`give_explicit_poly_and_gaussian_double <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/integration.irp.f#L122>`_
Transforms the product of
(x-x_A)^a(1) (x-x_B)^b(1) (x-x_A)^a(2) (y-y_B)^b(2) (z-z_A)^a(3) (z-z_B)^b(3)
exp(-(r-A)^2 alpha) exp(-(r-B)^2 beta) exp(-(r-Nucl_center)^2 gama
.br
into
fact_k * [ sum (l_x = 0,i_order(1)) P_new(l_x,1) * (x-P_center(1))^l_x ] exp (- p (x-P_center(1))^2 )
* [ sum (l_y = 0,i_order(2)) P_new(l_y,2) * (y-P_center(2))^l_y ] exp (- p (y-P_center(2))^2 )
* [ sum (l_z = 0,i_order(3)) P_new(l_z,3) * (z-P_center(3))^l_z ] exp (- p (z-P_center(3))^2 )
2014-05-14 00:01:31 +02:00
`give_explicit_poly_and_gaussian_x <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/integration.irp.f#L1>`_
2014-05-13 13:57:58 +02:00
Transform the product of
(x-x_A)^a(1) (x-x_B)^b(1) (x-x_A)^a(2) (y-y_B)^b(2) (z-z_A)^a(3) (z-z_B)^b(3) exp(-(r-A)^2 alpha) exp(-(r-B)^2 beta)
into
fact_k (x-x_P)^iorder(1) (y-y_P)^iorder(2) (z-z_P)^iorder(3) exp(-p(r-P)^2)
2015-04-13 10:44:49 +02:00
`hermite <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/integration.irp.f#L540>`_
2014-05-13 13:57:58 +02:00
Hermite polynomial
2015-04-13 10:44:49 +02:00
`multiply_poly <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/integration.irp.f#L264>`_
2014-05-13 13:57:58 +02:00
Multiply two polynomials
D(t) =! D(t) +( B(t)*C(t))
2015-04-13 10:44:49 +02:00
`recentered_poly2 <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/integration.irp.f#L363>`_
2014-05-13 13:57:58 +02:00
Recenter two polynomials
2015-04-13 10:44:49 +02:00
`rint <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/integration.irp.f#L436>`_
2014-05-13 13:57:58 +02:00
.. math::
.br
\int_0^1 dx \exp(-p x^2) x^n
.br
2015-04-13 10:44:49 +02:00
`rint1 <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/integration.irp.f#L596>`_
2014-05-13 13:57:58 +02:00
Standard version of rint
2015-04-13 10:44:49 +02:00
`rint_large_n <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/integration.irp.f#L565>`_
2014-05-13 13:57:58 +02:00
Version of rint for large values of n
2015-04-13 10:44:49 +02:00
`rint_sum <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/integration.irp.f#L484>`_
2014-05-13 13:57:58 +02:00
Needed for the calculation of two-electron integrals.
2015-04-13 10:44:49 +02:00
`overlap_a_b_c <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/one_e_integration.irp.f#L35>`_
Undocumented
2014-05-14 00:01:31 +02:00
`overlap_gaussian_x <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/one_e_integration.irp.f#L1>`_
2014-05-13 13:57:58 +02:00
.. math::
.br
\sum_{-infty}^{+infty} (x-A_x)^ax (x-B_x)^bx exp(-alpha(x-A_x)^2) exp(-beta(x-B_X)^2) dx
.br
2015-04-13 10:44:49 +02:00
`overlap_gaussian_xyz <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/one_e_integration.irp.f#L113>`_
2014-05-13 13:57:58 +02:00
.. math::
.br
S_x = \int (x-A_x)^{a_x} exp(-\alpha(x-A_x)^2) (x-B_x)^{b_x} exp(-beta(x-B_x)^2) dx \\
S = S_x S_y S_z
.br
2015-04-13 10:44:49 +02:00
`overlap_x_abs <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/one_e_integration.irp.f#L175>`_
2014-05-13 13:57:58 +02:00
.. math ::
.br
\int_{-infty}^{+infty} (x-A_center)^(power_A) * (x-B_center)^power_B * exp(-alpha(x-A_center)^2) * exp(-beta(x-B_center)^2) dx
.br
2015-04-13 10:44:49 +02:00
`progress_active <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/progress.irp.f#L29>`_
Current status for displaying progress bars. Global variable.
`progress_bar <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/progress.irp.f#L27>`_
Current status for displaying progress bars. Global variable.
`progress_timeout <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/progress.irp.f#L28>`_
Current status for displaying progress bars. Global variable.
`progress_title <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/progress.irp.f#L31>`_
Current status for displaying progress bars. Global variable.
`progress_value <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/progress.irp.f#L30>`_
Current status for displaying progress bars. Global variable.
`run_progress <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/progress.irp.f#L45>`_
Display a progress bar with documentation of what is happening
`start_progress <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/progress.irp.f#L1>`_
Starts the progress bar
2014-05-13 13:57:58 +02:00
2015-04-13 10:44:49 +02:00
`stop_progress <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/progress.irp.f#L19>`_
Stop the progress bar
2014-05-14 00:01:31 +02:00
2015-04-13 10:44:49 +02:00
`align_double <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/util.irp.f#L48>`_
Compute 1st dimension such that it is aligned for vectorization.
`approx_dble <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/util.irp.f#L341>`_
2014-07-16 15:31:02 +02:00
Undocumented
2015-04-13 10:44:49 +02:00
`binom <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/util.irp.f#L31>`_
2014-05-13 13:57:58 +02:00
Binomial coefficients
2015-04-13 10:44:49 +02:00
`binom_func <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/util.irp.f#L1>`_
2014-05-13 13:57:58 +02:00
.. math ::
.br
\frac{i!}{j!(i-j)!}
.br
2015-04-13 10:44:49 +02:00
`binom_transp <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/util.irp.f#L32>`_
2014-05-13 13:57:58 +02:00
Binomial coefficients
2015-04-13 10:44:49 +02:00
`dble_fact <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/util.irp.f#L137>`_
n!!
`dble_logfact <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/util.irp.f#L171>`_
2014-05-13 13:57:58 +02:00
n!!
2015-04-13 10:44:49 +02:00
`fact <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/util.irp.f#L63>`_
2014-05-13 13:57:58 +02:00
n!
2015-04-13 10:44:49 +02:00
`fact_inv <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/util.irp.f#L125>`_
2014-05-13 13:57:58 +02:00
1/n!
2015-04-13 10:44:49 +02:00
`inv_int <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/util.irp.f#L218>`_
2014-05-13 13:57:58 +02:00
1/i
2015-04-13 10:44:49 +02:00
`logfact <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/util.irp.f#L93>`_
n!
`normalize <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/util.irp.f#L317>`_
2014-05-14 00:01:31 +02:00
Normalizes vector u
u is expected to be aligned in memory.
2015-04-13 10:44:49 +02:00
`nproc <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/util.irp.f#L244>`_
2014-05-13 13:57:58 +02:00
Number of current OpenMP threads
2015-04-13 10:44:49 +02:00
`u_dot_u <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/util.irp.f#L286>`_
2014-05-14 00:01:31 +02:00
Compute <u|u>
2015-04-13 10:44:49 +02:00
`u_dot_v <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/util.irp.f#L260>`_
2014-05-14 00:01:31 +02:00
Compute <u|v>
2015-04-13 10:44:49 +02:00
`wall_time <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/util.irp.f#L229>`_
2014-05-13 13:57:58 +02:00
The equivalent of cpu_time, but for the wall time.
2015-04-13 10:44:49 +02:00
`write_git_log <http://github.com/LCPQ/quantum_package/tree/master/src/Utils/util.irp.f#L204>`_
2014-05-13 13:57:58 +02:00
Write the last git commit in file iunit.
2015-04-13 10:44:49 +02:00