mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-04 02:48:24 +01:00
Merge branch 'develop' of https://github.com/QuantumPackage/qp2 into develop
This commit is contained in:
commit
ab5fd75524
@ -12,7 +12,6 @@
|
||||
.. _Irene: http://www-hpc.cea.fr/en/complexe/tgcc-Irene.htm
|
||||
.. _IRPF90: http://irpf90.ups-tlse.fr
|
||||
.. _LAPACK: http://www.netlib.org/lapack/
|
||||
.. _Molden: http://cheminf.cmbi.ru.nl/molden/
|
||||
.. _NECI: https://github.com/ghb24/NECI_STABLE
|
||||
.. _Ninja: https://ninja-build.org/
|
||||
.. _NWChem: http://www.nwchem-sw.org/
|
||||
@ -53,12 +52,15 @@
|
||||
.. |CIPSI| replace:: :abbr:`CIPSI (Configuration Interaction using a Perturbative Selection)`
|
||||
.. |CI| replace:: :abbr:`CI (Configuration Interaction)`
|
||||
.. |CISD| replace:: :abbr:`CISD (Configuration Interaction with Single and Double Excitations)`
|
||||
.. |CASSCF| replace:: |CAS| - |SCF|
|
||||
.. |CIS| replace:: :abbr:`CIS (Configuration Interaction with Single Excitations)`
|
||||
.. |DFT| replace:: :abbr:`DFT (Density Functional Theory)`
|
||||
.. |DDCI| replace:: :abbr:`DDCI (Difference Dedicated Configuration Interaction)`
|
||||
.. |DFT| replace:: :abbr:`DFT (Density Functional Theory)`
|
||||
.. |DIIS| replace:: :abbr:`DIIS (Direct Inversion of the Iterative Subspace)`
|
||||
.. |FCIQMC| replace:: |FCI| - |QMC|
|
||||
.. |FCI| replace:: :abbr:`FCI (Full Configuration Interaction)`
|
||||
.. |HF| replace:: :abbr:`HF (Hartree-Fock)`
|
||||
.. |KS-DFT| replace:: :abbr:`KS-DFT (Kohn-Sham Density Functional Theory)`
|
||||
.. |MO| replace:: :abbr:`MO (Molecular Orbital)`
|
||||
.. |MOs| replace:: :abbr:`MOs (Molecular Orbitals)`
|
||||
.. |MP2| replace:: :abbr:`MP2 (Moller-Plesset second order perturbative correction)`
|
||||
@ -67,15 +69,13 @@
|
||||
.. |MRPT| replace:: :abbr:`MRPT (Multi-Reference Perturbation Theory)`
|
||||
.. |PT2| replace:: :abbr:`PT2 (Second order perturbative correction)`
|
||||
.. |QMC| replace:: :abbr:`QMC (Quantum Monte Carlo)`
|
||||
.. |ROHF| replace:: :abbr:`ROHF (Restricted Open-Shell Hartree-Fock)`
|
||||
.. |RSDFT| replace:: :abbr:`RSDFT (Range Separated Density Functional Theory)`
|
||||
.. |RSH| replace:: :abbr:`RSH (Range Separated Hybrids)`
|
||||
.. |rst| replace:: :abbr:`RST (ReStructured Text)`
|
||||
.. |SCF| replace:: :abbr:`SCF (Self Consistent Field)`
|
||||
.. |RSH| replace:: :abbr:`RSH (Range Separated Hybrids)`
|
||||
.. |RSDFT| replace:: :abbr:`RSDFT (Range Separated Density Functional Theory)`
|
||||
.. |KS-DFT| replace:: :abbr:`KS-DFT (Kohn-Sham Density Functional Theory)`
|
||||
.. |sCI| replace:: :abbr:`sCI (Selected-CI)`
|
||||
.. |WFT| replace:: :abbr:`WFT (Wave Function Theory)`
|
||||
.. |CASSCF| replace:: |CAS| - |SCF|
|
||||
.. |FCIQMC| replace:: |FCI| - |QMC|
|
||||
|
||||
.. |kalpha| replace:: :math:`|\alpha \rangle`
|
||||
.. |H| replace:: :math:`\hat H`
|
||||
|
@ -171,7 +171,7 @@ for f in os.listdir("users_guide"):
|
||||
|
||||
for f in os.listdir("programs"):
|
||||
name = f.split('.')[0]
|
||||
if name not in []:
|
||||
if name not in [""]:
|
||||
filename = os.path.join("programs",name)
|
||||
man_pages.append( (filename, name, qpdoc, [author], 1) )
|
||||
|
||||
|
@ -55,8 +55,6 @@ Simple Algorithm
|
||||
|
||||
.. |SetDI| replace:: `\{|D_I\rangle\}^{(n)}`
|
||||
.. |Psi_n| replace:: `|\Psi^{(n)}\rangle`
|
||||
.. |H| replace:: `\hat H`
|
||||
.. |kalpha| replace:: `|\alpha\rangle`
|
||||
.. |kalpha_star| replace:: `\{ |\alpha \rangle \}_\star ^{(n)}`
|
||||
.. |ealpha| replace:: `e_\alpha`
|
||||
.. |EPT| replace:: `E_\text{PT2}`
|
||||
|
@ -23,9 +23,13 @@ The |AO| coefficients are normalized as:
|
||||
|
||||
{\tilde c}_{ki} = \frac{c_{ki}}{ \int \left( (x-X_A)^a (y-Y_A)^b (z-Z_A)^c e^{-\gamma_{ki} |{\bf r} - {\bf R}_A|^2} \right)^2 dr}
|
||||
|
||||
Warning: `ao_coef` contains the |AO| coefficients given in input. These do not
|
||||
include the normalization constant of the |AO|. The `ao_coef_normalized` provider includes
|
||||
this normalization factor.
|
||||
|
||||
.. warning::
|
||||
|
||||
`ao_coef` contains the |AO| coefficients given in input. These do not
|
||||
include the normalization constant of the |AO|. The `ao_coef_normalized`
|
||||
provider includes this normalization factor.
|
||||
|
||||
|
||||
The |AOs| are also sorted by increasing exponent to accelerate the calculation of
|
||||
the two electron integrals.
|
||||
@ -1076,7 +1080,7 @@ Subroutines / functions
|
||||
double precision function ao_value(i,r)
|
||||
|
||||
|
||||
return the value of the ith ao at point r
|
||||
Returns the value of the i-th ao at point $\textbf{r}$
|
||||
|
||||
Needs:
|
||||
|
||||
@ -1101,9 +1105,12 @@ Subroutines / functions
|
||||
subroutine give_all_aos_and_grad_and_lapl_at_r(r,aos_array,aos_grad_array,aos_lapl_array)
|
||||
|
||||
|
||||
input : r(1) ==> r(1) = x, r(2) = y, r(3) = z
|
||||
output : aos_array(i) = ao(i) evaluated at r
|
||||
: aos_grad_array(1,i) = gradient X of the ao(i) evaluated at r
|
||||
input : r(1) ==> r(1) = x, r(2) = y, r(3) = z
|
||||
|
||||
output :
|
||||
|
||||
* aos_array(i) = ao(i) evaluated at $\textbf{r}$
|
||||
* aos_grad_array(1,i) = $\nabla_x$ of the ao(i) evaluated at $\textbf{r}$
|
||||
|
||||
Needs:
|
||||
|
||||
@ -1138,9 +1145,13 @@ Subroutines / functions
|
||||
subroutine give_all_aos_and_grad_at_r(r,aos_array,aos_grad_array)
|
||||
|
||||
|
||||
input : r(1) ==> r(1) = x, r(2) = y, r(3) = z
|
||||
output : aos_array(i) = ao(i) evaluated at r
|
||||
: aos_grad_array(1,i) = gradient X of the ao(i) evaluated at r
|
||||
input : r(1) ==> r(1) = x, r(2) = y, r(3) = z
|
||||
|
||||
output :
|
||||
|
||||
* aos_array(i) = ao(i) evaluated at ro
|
||||
* aos_grad_array(1,i) = gradient X of the ao(i) evaluated at $\textbf{r}$
|
||||
|
||||
|
||||
Needs:
|
||||
|
||||
@ -1175,8 +1186,9 @@ Subroutines / functions
|
||||
subroutine give_all_aos_at_r(r,aos_array)
|
||||
|
||||
|
||||
input : r == r(1) = x and so on
|
||||
aos_array(i) = aos(i) evaluated in r
|
||||
input : r == r(1) = x and so on
|
||||
|
||||
output : aos_array(i) = aos(i) evaluated in $\textbf{r}$
|
||||
|
||||
Needs:
|
||||
|
||||
@ -1211,7 +1223,7 @@ Subroutines / functions
|
||||
subroutine give_all_aos_at_r_old(r,aos_array)
|
||||
|
||||
|
||||
gives the values of aos at a given point r
|
||||
Gives the values of |AOs| at a given point $\textbf{r}$
|
||||
|
||||
Needs:
|
||||
|
||||
@ -1231,7 +1243,8 @@ Subroutines / functions
|
||||
double precision function primitive_value(i,j,r)
|
||||
|
||||
|
||||
return the value of the jth primitive of ith ao at point r WITHOUT THE COEF
|
||||
Returns the value of the j-th primitive of the i-th |AO| at point $\textbf{r}
|
||||
**without the coefficient**
|
||||
|
||||
Needs:
|
||||
|
||||
|
@ -232,8 +232,10 @@ Providers
|
||||
|
||||
Second derivative matrix elements in the |AO| basis.
|
||||
|
||||
:math:`{\tt ao\_deriv2\_x} =
|
||||
\langle \chi_i(x,y,z) | \frac{\partial^2}{\partial x^2} |\chi_j (x,y,z) \rangle`
|
||||
.. math::
|
||||
|
||||
{\tt ao\_deriv2\_x} =
|
||||
\langle \chi_i(x,y,z) | \frac{\partial^2}{\partial x^2} |\chi_j (x,y,z) \rangle
|
||||
|
||||
|
||||
Needs:
|
||||
@ -271,8 +273,10 @@ Providers
|
||||
|
||||
Second derivative matrix elements in the |AO| basis.
|
||||
|
||||
:math:`{\tt ao\_deriv2\_x} =
|
||||
\langle \chi_i(x,y,z) | \frac{\partial^2}{\partial x^2} |\chi_j (x,y,z) \rangle`
|
||||
.. math::
|
||||
|
||||
{\tt ao\_deriv2\_x} =
|
||||
\langle \chi_i(x,y,z) | \frac{\partial^2}{\partial x^2} |\chi_j (x,y,z) \rangle
|
||||
|
||||
|
||||
Needs:
|
||||
@ -310,8 +314,10 @@ Providers
|
||||
|
||||
Second derivative matrix elements in the |AO| basis.
|
||||
|
||||
:math:`{\tt ao\_deriv2\_x} =
|
||||
\langle \chi_i(x,y,z) | \frac{\partial^2}{\partial x^2} |\chi_j (x,y,z) \rangle`
|
||||
.. math::
|
||||
|
||||
{\tt ao\_deriv2\_x} =
|
||||
\langle \chi_i(x,y,z) | \frac{\partial^2}{\partial x^2} |\chi_j (x,y,z) \rangle
|
||||
|
||||
|
||||
Needs:
|
||||
@ -642,7 +648,8 @@ Providers
|
||||
|
||||
Kinetic energy integrals in the |AO| basis.
|
||||
|
||||
:math:`\langle \chi_i |\hat{T}| \chi_j \rangle`
|
||||
:math:`\langle \chi_i |\hat{T}| \chi_j \rangle`
|
||||
|
||||
|
||||
Needs:
|
||||
|
||||
@ -1331,7 +1338,8 @@ Providers
|
||||
power_A,power_B,C_center,n_pt_in,d,n_pt_out,mu_in)
|
||||
|
||||
|
||||
Returns the explicit polynomial in terms of the $t$ variable of the following polynomial:
|
||||
Returns the explicit polynomial in terms of the $t$ variable of the
|
||||
following polynomial:
|
||||
|
||||
$I_{x1}(a_x, d_x,p,q) \times I_{x1}(a_y, d_y,p,q) \times I_{x1}(a_z, d_z,p,q)$.
|
||||
|
||||
@ -1355,7 +1363,8 @@ Providers
|
||||
power_A,power_B,C_center,n_pt_in,d,n_pt_out,mu_in,p,p_inv,p_inv_2,p_new,P_center)
|
||||
|
||||
|
||||
Returns the explicit polynomial in terms of the $t$ variable of the following polynomial:
|
||||
Returns the explicit polynomial in terms of the $t$ variable of the
|
||||
following polynomial:
|
||||
|
||||
$I_{x1}(a_x, d_x,p,q) \times I_{x1}(a_y, d_y,p,q) \times I_{x1}(a_z, d_z,p,q)$.
|
||||
|
||||
@ -1724,7 +1733,7 @@ Subroutines / functions
|
||||
|
||||
|
||||
Subroutine that returns all integrals over $r$ of type
|
||||
$\frac{ \erf(\mu * |r-R_C|) }{ |r-R_C| }$
|
||||
$\frac{ \erf(\mu * | r - R_C | ) }{ | r - R_C | }$
|
||||
|
||||
Needs:
|
||||
|
||||
@ -1812,8 +1821,12 @@ Subroutines / functions
|
||||
|
||||
|
||||
Computes the following integral :
|
||||
$\int dr (x-A_x)^a (x-B_x)^b \exp(-\alpha (x-A_x)^2 - \beta (x-B_x)^2 )
|
||||
\frac{\erf(\mu |r-R_C|)}{|r-R_c|}$.
|
||||
|
||||
.. math::
|
||||
|
||||
\int dr (x-A_x)^a (x-B_x)^b \exp(-\alpha (x-A_x)^2 - \beta (x-B_x)^2 )
|
||||
\frac{\erf(\mu | r - R_C | )}{ | r - R_C | }$.
|
||||
|
||||
|
||||
Calls:
|
||||
|
||||
@ -1834,7 +1847,7 @@ Subroutines / functions
|
||||
|
||||
|
||||
Computes the following integral :
|
||||
$\int_{-\infty}^{infty} dr \chi_i(r) \chi_j(r) \frac{\erf(\mu |r-R_C|)}{|r-R_C|}$.
|
||||
$\int_{-\infty}^{infty} dr \chi_i(r) \chi_j(r) \frac{\erf(\mu | r - R_C | )}{ | r - R_C | }$.
|
||||
|
||||
Needs:
|
||||
|
||||
|
@ -587,11 +587,13 @@ Subroutines / functions
|
||||
double precision function ERI_erf(alpha,beta,delta,gama,a_x,b_x,c_x,d_x,a_y,b_y,c_y,d_y,a_z,b_z,c_z,d_z)
|
||||
|
||||
|
||||
ATOMIC PRIMTIVE two-electron integral between the 4 primitives ::
|
||||
primitive_1 = x1**(a_x) y1**(a_y) z1**(a_z) exp(-alpha * r1**2)
|
||||
primitive_2 = x1**(b_x) y1**(b_y) z1**(b_z) exp(- beta * r1**2)
|
||||
primitive_3 = x2**(c_x) y2**(c_y) z2**(c_z) exp(-delta * r2**2)
|
||||
primitive_4 = x2**(d_x) y2**(d_y) z2**(d_z) exp(- gama * r2**2)
|
||||
Atomic primtive two-electron integral between the 4 primitives :
|
||||
|
||||
* primitive 1 : $x_1^{a_x} y_1^{a_y} z_1^{a_z} \exp(-\alpha * r1^2)$
|
||||
* primitive 2 : $x_1^{b_x} y_1^{b_y} z_1^{b_z} \exp(- \beta * r1^2)$
|
||||
* primitive 3 : $x_2^{c_x} y_2^{c_y} z_2^{c_z} \exp(-\delta * r2^2)$
|
||||
* primitive 4 : $x_2^{d_x} y_2^{d_y} z_2^{d_z} \exp(-\gamma * r2^2)$
|
||||
|
||||
|
||||
Needs:
|
||||
|
||||
@ -776,9 +778,11 @@ Subroutines / functions
|
||||
subroutine integrale_new_erf(I_f,a_x,b_x,c_x,d_x,a_y,b_y,c_y,d_y,a_z,b_z,c_z,d_z,p,q,n_pt)
|
||||
|
||||
|
||||
calculate the integral of the polynom ::
|
||||
I_x1(a_x+b_x, c_x+d_x,p,q) * I_x1(a_y+b_y, c_y+d_y,p,q) * I_x1(a_z+b_z, c_z+d_z,p,q)
|
||||
between ( 0 ; 1)
|
||||
Calculate the integral of the polynomial :
|
||||
|
||||
$I_x1(a_x+b_x, c_x+d_x,p,q) \, I_x1(a_y+b_y, c_y+d_y,p,q) \, I_x1(a_z+b_z, c_z+d_z,p,q)$
|
||||
|
||||
between $( 0 ; 1)$
|
||||
|
||||
Needs:
|
||||
|
||||
|
@ -362,7 +362,7 @@ Providers
|
||||
recursive subroutine I_x1_pol_mult_a1(c,B_10,B_01,B_00,C_00,D_00,d,nd,n_pt_in)
|
||||
|
||||
|
||||
recursive function involved in the two-electron integral
|
||||
Recursive function involved in the two-electron integral
|
||||
|
||||
Called by:
|
||||
|
||||
@ -392,7 +392,7 @@ Providers
|
||||
recursive subroutine I_x1_pol_mult_a2(c,B_10,B_01,B_00,C_00,D_00,d,nd,n_pt_in)
|
||||
|
||||
|
||||
recursive function involved in the two-electron integral
|
||||
Recursive function involved in the two-electron integral
|
||||
|
||||
Called by:
|
||||
|
||||
@ -422,7 +422,7 @@ Providers
|
||||
recursive subroutine I_x1_pol_mult_recurs(a,c,B_10,B_01,B_00,C_00,D_00,d,nd,n_pt_in)
|
||||
|
||||
|
||||
recursive function involved in the two-electron integral
|
||||
Recursive function involved in the two-electron integral
|
||||
|
||||
Called by:
|
||||
|
||||
@ -487,7 +487,7 @@ Providers
|
||||
recursive subroutine I_x2_pol_mult(c,B_10,B_01,B_00,C_00,D_00,d,nd,dim)
|
||||
|
||||
|
||||
recursive function involved in the two-electron integral
|
||||
Recursive function involved in the two-electron integral
|
||||
|
||||
Called by:
|
||||
|
||||
@ -1027,7 +1027,8 @@ Subroutines / functions
|
||||
|
||||
subroutine that returns the explicit polynom in term of the "t"
|
||||
variable of the following polynomw :
|
||||
I_x1(a_x, d_x,p,q) * I_x1(a_y, d_y,p,q) * I_x1(a_z, d_z,p,q)
|
||||
|
||||
$I_{x_1}(a_x,d_x,p,q) \, I_{x_1}(a_y,d_y,p,q) \ I_{x_1}(a_z,d_z,p,q)$
|
||||
|
||||
Called by:
|
||||
|
||||
@ -1055,7 +1056,7 @@ Subroutines / functions
|
||||
subroutine I_x1_pol_mult(a,c,B_10,B_01,B_00,C_00,D_00,d,nd,n_pt_in)
|
||||
|
||||
|
||||
recursive function involved in the two-electron integral
|
||||
Recursive function involved in the two-electron integral
|
||||
|
||||
Called by:
|
||||
|
||||
@ -1119,9 +1120,10 @@ Subroutines / functions
|
||||
subroutine integrale_new(I_f,a_x,b_x,c_x,d_x,a_y,b_y,c_y,d_y,a_z,b_z,c_z,d_z,p,q,n_pt)
|
||||
|
||||
|
||||
calculate the integral of the polynom ::
|
||||
I_x1(a_x+b_x, c_x+d_x,p,q) * I_x1(a_y+b_y, c_y+d_y,p,q) * I_x1(a_z+b_z, c_z+d_z,p,q)
|
||||
between ( 0 ; 1)
|
||||
Calculates the integral of the polynomial :
|
||||
|
||||
$I_{x_1}(a_x+b_x,c_x+d_x,p,q) \, I_{x_1}(a_y+b_y,c_y+d_y,p,q) \, I_{x_1}(a_z+b_z,c_z+d_z,p,q)$
|
||||
in $( 0 ; 1)$
|
||||
|
||||
Needs:
|
||||
|
||||
@ -1186,8 +1188,9 @@ Subroutines / functions
|
||||
|
||||
|
||||
Returns the upper boundary of the degree of the polynomial involved in the
|
||||
bielctronic integral :
|
||||
Ix(a_x,b_x,c_x,d_x) * Iy(a_y,b_y,c_y,d_y) * Iz(a_z,b_z,c_z,d_z)
|
||||
two-electron integral :
|
||||
|
||||
$I_x(a_x,b_x,c_x,d_x) \, I_y(a_y,b_y,c_y,d_y) \, I_z(a_z,b_z,c_z,d_z)$
|
||||
|
||||
|
||||
.. c:function:: push_integrals:
|
||||
|
@ -10,21 +10,22 @@ aux_quantities
|
||||
|
||||
|
||||
This module contains some global variables (such as densities and energies)
|
||||
which are stored in the EZFIO folder in a different place than determinants.
|
||||
which are stored in the |EZFIO| directory in a different place than determinants.
|
||||
This is used in practice to store density matrices which can be obtained from
|
||||
any methods, as long as they are stored in the same MO basis which is used for
|
||||
any method, as long as they are stored in the same |MO| basis which is used for
|
||||
the calculations. In |RSDFT| calculations, this can be done to perform damping
|
||||
on the density in order to speed up convergence.
|
||||
on the density in order to speed up the convergence.
|
||||
|
||||
The main providers of that module are:
|
||||
|
||||
* `data_one_e_dm_alpha_mo` and `data_one_e_dm_beta_mo` which are the
|
||||
one-body alpha and beta densities which are necessary read from the EZFIO
|
||||
folder.
|
||||
* :c:data:`data_one_e_dm_alpha_mo` and :c:data:`data_one_e_dm_beta_mo` which
|
||||
are the one-body alpha and beta densities which are necessary read from the
|
||||
|EZFIO| directory.
|
||||
|
||||
|
||||
Thanks to these providers you can use any density matrix that does not
|
||||
necessary corresponds to that of the current wave function.
|
||||
necessarily corresponds to that of the current wave function.
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -49,7 +49,7 @@ By default, the program will stop when more than one million determinants have
|
||||
been selected, or when the |PT2| energy is below :math:`10^{-4}`.
|
||||
|
||||
The variational and |PT2| energies of the iterations are stored in the
|
||||
|EZFIO| database, in the :ref:`iterations` module.
|
||||
|EZFIO| database, in the :ref:`module_iterations` module.
|
||||
|
||||
|
||||
|
||||
@ -180,55 +180,6 @@ Providers
|
||||
|
||||
|
||||
|
||||
.. c:function:: pt2_collector:
|
||||
|
||||
|
||||
File : :file:`cipsi/pt2_stoch_routines.irp.f`
|
||||
|
||||
.. code:: fortran
|
||||
|
||||
subroutine pt2_collector(zmq_socket_pull, E, relative_error, pt2, error, &
|
||||
variance, norm, b, N_)
|
||||
|
||||
|
||||
|
||||
Needs:
|
||||
|
||||
.. hlist::
|
||||
:columns: 3
|
||||
|
||||
* :c:data:`pt2_j`
|
||||
* :c:data:`pt2_stoch_istate`
|
||||
* :c:data:`n_states`
|
||||
* :c:data:`pt2_f`
|
||||
* :c:data:`pt2_w`
|
||||
* :c:data:`n_det_generators`
|
||||
* :c:data:`pt2_n_teeth`
|
||||
* :c:data:`pt2_u`
|
||||
|
||||
Called by:
|
||||
|
||||
.. hlist::
|
||||
:columns: 3
|
||||
|
||||
* :c:func:`zmq_pt2`
|
||||
|
||||
Calls:
|
||||
|
||||
.. hlist::
|
||||
:columns: 3
|
||||
|
||||
* :c:func:`add_to_selection_buffer`
|
||||
* :c:func:`check_mem`
|
||||
* :c:func:`create_selection_buffer`
|
||||
* :c:func:`delete_selection_buffer`
|
||||
* :c:func:`end_zmq_to_qp_run_socket`
|
||||
* :c:func:`pull_pt2_results`
|
||||
* :c:func:`sleep`
|
||||
* :c:func:`sort_selection_buffer`
|
||||
* :c:func:`wall_time`
|
||||
|
||||
|
||||
.. c:var:: pt2_cw
|
||||
|
||||
|
||||
@ -311,7 +262,6 @@ Providers
|
||||
* :c:data:`n_core_orb`
|
||||
* :c:data:`n_det_generators`
|
||||
* :c:data:`n_det_selectors`
|
||||
* :c:data:`n_states`
|
||||
* :c:data:`psi_det_sorted_gen`
|
||||
|
||||
|
||||
@ -455,7 +405,6 @@ Providers
|
||||
* :c:data:`n_core_orb`
|
||||
* :c:data:`n_det_generators`
|
||||
* :c:data:`n_det_selectors`
|
||||
* :c:data:`n_states`
|
||||
* :c:data:`psi_det_sorted_gen`
|
||||
|
||||
|
||||
@ -1164,6 +1113,54 @@ Subroutines / functions
|
||||
* :c:func:`run_slave_cipsi`
|
||||
|
||||
|
||||
.. c:function:: pt2_collector:
|
||||
|
||||
|
||||
File : :file:`cipsi/pt2_stoch_routines.irp.f`
|
||||
|
||||
.. code:: fortran
|
||||
|
||||
subroutine pt2_collector(zmq_socket_pull, E, relative_error, pt2, error, variance, norm, b, N_)
|
||||
|
||||
|
||||
|
||||
Needs:
|
||||
|
||||
.. hlist::
|
||||
:columns: 3
|
||||
|
||||
* :c:data:`pt2_j`
|
||||
* :c:data:`pt2_stoch_istate`
|
||||
* :c:data:`n_states`
|
||||
* :c:data:`pt2_f`
|
||||
* :c:data:`pt2_w`
|
||||
* :c:data:`n_det_generators`
|
||||
* :c:data:`pt2_n_teeth`
|
||||
* :c:data:`pt2_u`
|
||||
|
||||
Called by:
|
||||
|
||||
.. hlist::
|
||||
:columns: 3
|
||||
|
||||
* :c:func:`zmq_pt2`
|
||||
|
||||
Calls:
|
||||
|
||||
.. hlist::
|
||||
:columns: 3
|
||||
|
||||
* :c:func:`add_to_selection_buffer`
|
||||
* :c:func:`check_mem`
|
||||
* :c:func:`create_selection_buffer`
|
||||
* :c:func:`delete_selection_buffer`
|
||||
* :c:func:`end_zmq_to_qp_run_socket`
|
||||
* :c:func:`pull_pt2_results`
|
||||
* :c:func:`sleep`
|
||||
* :c:func:`sort_selection_buffer`
|
||||
* :c:func:`wall_time`
|
||||
|
||||
|
||||
.. c:function:: pt2_find_sample:
|
||||
|
||||
|
||||
@ -1633,21 +1630,31 @@ Subroutines / functions
|
||||
.. hlist::
|
||||
:columns: 3
|
||||
|
||||
* :c:data:`pt2_stoch_istate`
|
||||
* :c:data:`psi_det`
|
||||
* :c:data:`zmq_state`
|
||||
* :c:data:`psi_coef`
|
||||
* :c:data:`mpi_rank`
|
||||
* :c:data:`zmq_state`
|
||||
* :c:data:`state_average_weight`
|
||||
* :c:data:`mpi_master`
|
||||
* :c:data:`pt2_stoch_istate`
|
||||
* :c:data:`n_states`
|
||||
* :c:data:`n_det`
|
||||
* :c:data:`pt2_e0_denominator`
|
||||
* :c:data:`n_det_selectors`
|
||||
* :c:data:`n_det_generators`
|
||||
* :c:data:`psi_det`
|
||||
* :c:data:`n_states_diag`
|
||||
* :c:data:`zmq_context`
|
||||
* :c:data:`n_det_selectors`
|
||||
* :c:data:`psi_occ_pattern_hii`
|
||||
* :c:data:`state_average_weight`
|
||||
* :c:data:`mo_num`
|
||||
* :c:data:`nthreads_pt2`
|
||||
* :c:data:`elec_alpha_num`
|
||||
* :c:data:`pt2_e0_denominator`
|
||||
* :c:data:`qp_max_mem`
|
||||
* :c:data:`n_states_diag`
|
||||
* :c:data:`s2_eig`
|
||||
* :c:data:`threshold_generators`
|
||||
* :c:data:`det_to_occ_pattern`
|
||||
* :c:data:`n_states`
|
||||
* :c:data:`pt2_f`
|
||||
* :c:data:`n_det_generators`
|
||||
* :c:data:`n_int`
|
||||
* :c:data:`psi_det_hii`
|
||||
|
||||
Called by:
|
||||
|
||||
@ -1661,9 +1668,11 @@ Subroutines / functions
|
||||
.. hlist::
|
||||
:columns: 3
|
||||
|
||||
* :c:func:`check_mem`
|
||||
* :c:func:`davidson_slave_tcp`
|
||||
* :c:func:`mpi_print`
|
||||
* :c:func:`omp_set_nested`
|
||||
* :c:func:`resident_memory`
|
||||
* :c:func:`run_pt2_slave`
|
||||
* :c:func:`run_selection_slave`
|
||||
* :c:func:`sleep`
|
||||
@ -1832,13 +1841,12 @@ Subroutines / functions
|
||||
* :c:data:`n_states`
|
||||
* :c:data:`n_det`
|
||||
* :c:data:`psi_bilinear_matrix_transp_values`
|
||||
* :c:data:`elec_alpha_num`
|
||||
* :c:data:`psi_bilinear_matrix_values`
|
||||
* :c:data:`n_det_selectors`
|
||||
* :c:data:`psi_bilinear_matrix_transp_values`
|
||||
* :c:data:`psi_bilinear_matrix_values`
|
||||
* :c:data:`n_int`
|
||||
* :c:data:`psi_det_generators`
|
||||
* :c:data:`psi_bilinear_matrix_values`
|
||||
* :c:data:`psi_det_alpha_unique`
|
||||
* :c:data:`psi_det_sorted`
|
||||
* :c:data:`psi_det_sorted`
|
||||
@ -1859,7 +1867,6 @@ Subroutines / functions
|
||||
|
||||
* :c:func:`apply_hole`
|
||||
* :c:func:`bitstring_to_list_ab`
|
||||
* :c:func:`check_mem`
|
||||
* :c:func:`fill_buffer_double`
|
||||
* :c:func:`get_excitation_degree_spin`
|
||||
* :c:func:`isort`
|
||||
@ -2103,14 +2110,15 @@ Subroutines / functions
|
||||
* :c:data:`pt2_stoch_istate`
|
||||
* :c:data:`psi_selectors`
|
||||
* :c:data:`psi_bilinear_matrix_values`
|
||||
* :c:data:`psi_det_alpha_unique`
|
||||
* :c:data:`psi_occ_pattern_hii`
|
||||
* :c:data:`pt2_e0_denominator`
|
||||
* :c:data:`pt2_n_teeth`
|
||||
* :c:data:`psi_selectors_coef_transp`
|
||||
* :c:data:`n_det`
|
||||
* :c:data:`mo_two_e_integrals_in_map`
|
||||
* :c:data:`s2_eig`
|
||||
* :c:data:`pt2_j`
|
||||
* :c:data:`mo_two_e_integrals_in_map`
|
||||
* :c:data:`psi_det_alpha_unique`
|
||||
* :c:data:`psi_bilinear_matrix_transp_values`
|
||||
* :c:data:`state_average_weight`
|
||||
* :c:data:`mo_num`
|
||||
@ -2119,16 +2127,18 @@ Subroutines / functions
|
||||
* :c:data:`mo_one_e_integrals`
|
||||
* :c:data:`elec_alpha_num`
|
||||
* :c:data:`nproc`
|
||||
* :c:data:`qp_max_mem`
|
||||
* :c:data:`psi_bilinear_matrix_columns_loc`
|
||||
* :c:data:`threshold_generators`
|
||||
* :c:data:`psi_det_beta_unique`
|
||||
* :c:data:`qp_max_mem`
|
||||
* :c:data:`det_to_occ_pattern`
|
||||
* :c:data:`psi_bilinear_matrix_transp_rows_loc`
|
||||
* :c:data:`n_states`
|
||||
* :c:data:`pt2_f`
|
||||
* :c:data:`n_det_generators`
|
||||
* :c:data:`psi_bilinear_matrix_transp_values`
|
||||
* :c:data:`n_int`
|
||||
* :c:data:`psi_det_hii`
|
||||
* :c:data:`pt2_j`
|
||||
* :c:data:`psi_det_sorted`
|
||||
* :c:data:`pt2_w`
|
||||
|
@ -8,34 +8,39 @@
|
||||
cis
|
||||
===
|
||||
|
||||
This module contains a CIS program.
|
||||
This module contains a |CIS| program.
|
||||
|
||||
The user point of view
|
||||
----------------------
|
||||
|
||||
The :command:`cis` program performs the CI of the ROHF-like + all single excitations on top of it.
|
||||
This program can be very useful to :
|
||||
The :ref:`cis` program performs the CI to obtain the ROHF reference + all
|
||||
single excitations on top of it. This program can be very useful to:
|
||||
|
||||
* **Ground state calculations**: generate a guess for the ground state wave function if one is not sure that the :c:func:`scf` program gave the lowest SCF solution. In combination with :c:func:`save_natorb` it can produce new |MOs| in order to reperform an :c:func:`scf` optimization.
|
||||
* **Ground state calculations**: generate a guess for the ground state wave
|
||||
function if one is not sure that the :ref:`scf` program gave the lowest |SCF|
|
||||
solution. In combination with :ref:`save_natorb` it can produce new |MOs| in
|
||||
order to reperform an :ref:`scf` optimization.
|
||||
|
||||
* **Excited states calculations**: generate guess for all the :option:`determinants n_states` wave functions, that will be used by the :c:func:`fci` program.
|
||||
* **Excited states calculations**: generate guesses for all the
|
||||
:option:`determinants n_states` wave functions, that will be used by the
|
||||
:ref:`fci` program.
|
||||
|
||||
|
||||
The main keywords/options to be used are:
|
||||
|
||||
* :option:`determinants n_states` : number of states to consider for the |CIS| calculation
|
||||
* :option:`determinants n_states`: number of states to consider for the |CIS| calculation
|
||||
|
||||
* :option:`determinants s2_eig` : force all states to have the desired value of :math:`S^2`
|
||||
* :option:`determinants s2_eig`: force all states to have the desired value of |S^2|
|
||||
|
||||
* :option:`determinants expected_s2` : desired value of :math:`S^2`
|
||||
* :option:`determinants expected_s2`: desired value of |S^2|
|
||||
|
||||
|
||||
|
||||
|
||||
The programmer point of view
|
||||
----------------------------
|
||||
The programmer's point of view
|
||||
------------------------------
|
||||
|
||||
This module have been built by setting the following rules:
|
||||
This module was built by setting the following rules:
|
||||
|
||||
* The only generator determinant is the Hartree-Fock (single-reference method)
|
||||
* All generated singly excited determinants are included in the wave function (no perturbative
|
||||
|
@ -9,15 +9,22 @@ davidson
|
||||
========
|
||||
|
||||
Abstract module for Davidson's diagonalization.
|
||||
It contains everything required for the Davidson algorithm, dressed or not. If
|
||||
a dressing is used, the dressing column should be defined and the
|
||||
:ref:`davidson_dressed` module should be used. If no dressing is required,
|
||||
the :ref:`davidson` module should be used, and it has a default zero dressing vector.
|
||||
It contains everything required for the Davidson algorithm, dressed or
|
||||
not. If a dressing is used, the dressing column should be defined and
|
||||
the :ref:`module_davidson_dressed` module should be used. If no dressing
|
||||
is required, the :ref:`module_davidson` module should be used, and it
|
||||
has a default zero dressing vector.
|
||||
|
||||
The important providers for that module are:
|
||||
|
||||
# `psi_energy` which is the expectation value over the wave function (`psi_det`, `psi_coef`) of the Hamiltonian, dressed or not. It uses the general subroutine `u_0_H_u_0`.
|
||||
# `psi_energy_two_e` which is the expectation value over the wave function (`psi_det`, `psi_coef`) of the standard two-electrons coulomb operator. It uses the general routine `u_0_H_u_0_two_e`.
|
||||
#. :c:data:`psi_energy` which is the expectation value over the wave
|
||||
function (:c:data:`psi_det`, :c:data:`psi_coef`) of the Hamiltonian,
|
||||
dressed or not. It uses the general subroutine :c:func:`u_0_H_u_0`.
|
||||
|
||||
#. :c:data:`psi_energy_two_e` which is the expectation value over the
|
||||
wave function (:c:data:`psi_det`, :c:data:`psi_coef`) of the standard
|
||||
two-electron Coulomb operator. It uses the general routine
|
||||
:c:func:`u_0_H_u_0_two_e`.
|
||||
|
||||
|
||||
|
||||
@ -40,7 +47,7 @@ EZFIO parameters
|
||||
|
||||
Number of micro-iterations before re-contracting
|
||||
|
||||
Default: 8
|
||||
Default: 15
|
||||
|
||||
.. option:: state_following
|
||||
|
||||
@ -585,7 +592,6 @@ Subroutines / functions
|
||||
* :c:data:`psi_det_beta_unique`
|
||||
* :c:data:`only_expected_s2`
|
||||
* :c:data:`distributed_davidson`
|
||||
* :c:data:`n_states`
|
||||
* :c:data:`n_int`
|
||||
|
||||
Called by:
|
||||
@ -626,7 +632,6 @@ Subroutines / functions
|
||||
.. hlist::
|
||||
:columns: 3
|
||||
|
||||
* :c:data:`n_states_diag`
|
||||
* :c:data:`nthreads_davidson`
|
||||
|
||||
|
||||
@ -682,7 +687,6 @@ Subroutines / functions
|
||||
.. hlist::
|
||||
:columns: 3
|
||||
|
||||
* :c:data:`n_states_diag`
|
||||
* :c:data:`nthreads_davidson`
|
||||
|
||||
|
||||
@ -696,7 +700,7 @@ Subroutines / functions
|
||||
subroutine davidson_pull_results(zmq_socket_pull, v_t, s_t, imin, imax, task_id)
|
||||
|
||||
|
||||
Pull the results of $H|U \rangle$ on the master.
|
||||
Pull the results of $H | U \rangle$ on the master.
|
||||
|
||||
Needs:
|
||||
|
||||
@ -724,7 +728,7 @@ Subroutines / functions
|
||||
subroutine davidson_push_results(zmq_socket_push, v_t, s_t, imin, imax, task_id)
|
||||
|
||||
|
||||
Push the results of $H|U \rangle$ from a worker to the master.
|
||||
Push the results of $H | U \rangle$ from a worker to the master.
|
||||
|
||||
Needs:
|
||||
|
||||
@ -850,6 +854,7 @@ Subroutines / functions
|
||||
:columns: 3
|
||||
|
||||
* :c:data:`psi_det_beta_unique`
|
||||
* :c:data:`mpi_rank`
|
||||
* :c:data:`psi_bilinear_matrix_order_transp_reverse`
|
||||
* :c:data:`psi_det_alpha_unique`
|
||||
* :c:data:`mpi_initialized`
|
||||
@ -858,6 +863,7 @@ Subroutines / functions
|
||||
* :c:data:`psi_bilinear_matrix_values`
|
||||
* :c:data:`nproc`
|
||||
* :c:data:`ref_bitmask_energy`
|
||||
* :c:data:`n_states_diag`
|
||||
* :c:data:`psi_bilinear_matrix_columns_loc`
|
||||
|
||||
Called by:
|
||||
@ -874,7 +880,6 @@ Subroutines / functions
|
||||
|
||||
* :c:func:`davidson_push_results`
|
||||
* :c:func:`h_s2_u_0_nstates_openmp_work`
|
||||
* :c:func:`sleep`
|
||||
|
||||
|
||||
.. c:function:: diagonalize_ci:
|
||||
@ -934,7 +939,7 @@ Subroutines / functions
|
||||
subroutine H_S2_u_0_nstates_openmp(v_0,s_0,u_0,N_st,sze)
|
||||
|
||||
|
||||
Computes $v_0 = H|u_0\rangle$ and $s_0 = S^2 |u_0\rangle$.
|
||||
Computes $v_0 = H | u_0\rangle$ and $s_0 = S^2 | u_0\rangle$.
|
||||
|
||||
Assumes that the determinants are in psi_det
|
||||
|
||||
@ -977,7 +982,7 @@ Subroutines / functions
|
||||
subroutine H_S2_u_0_nstates_openmp_work(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
|
||||
|
||||
|
||||
Computes $v_t = H|u_t\rangle$ and $s_t = S^2 |u_t\rangle$
|
||||
Computes $v_t = H | u_t\rangle$ and $s_t = S^2 | u_t\rangle$
|
||||
|
||||
Default should be 1,N_det,0,1
|
||||
|
||||
@ -1020,7 +1025,7 @@ Subroutines / functions
|
||||
subroutine H_S2_u_0_nstates_openmp_work_1(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
|
||||
|
||||
|
||||
Computes $v_t = H|u_t
angle$ and $s_t = S^2 |u_t
angle$
|
||||
Computes $v_t = H | u_t \rangle$ and $s_t = S^2 | u_t\rangle$
|
||||
|
||||
Default should be 1,N_det,0,1
|
||||
|
||||
@ -1072,7 +1077,7 @@ Subroutines / functions
|
||||
subroutine H_S2_u_0_nstates_openmp_work_2(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
|
||||
|
||||
|
||||
Computes $v_t = H|u_t
angle$ and $s_t = S^2 |u_t
angle$
|
||||
Computes $v_t = H | u_t \rangle$ and $s_t = S^2 | u_t\rangle$
|
||||
|
||||
Default should be 1,N_det,0,1
|
||||
|
||||
@ -1124,7 +1129,7 @@ Subroutines / functions
|
||||
subroutine H_S2_u_0_nstates_openmp_work_3(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
|
||||
|
||||
|
||||
Computes $v_t = H|u_t
angle$ and $s_t = S^2 |u_t
angle$
|
||||
Computes $v_t = H | u_t \rangle$ and $s_t = S^2 | u_t\rangle$
|
||||
|
||||
Default should be 1,N_det,0,1
|
||||
|
||||
@ -1176,7 +1181,7 @@ Subroutines / functions
|
||||
subroutine H_S2_u_0_nstates_openmp_work_4(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
|
||||
|
||||
|
||||
Computes $v_t = H|u_t
angle$ and $s_t = S^2 |u_t
angle$
|
||||
Computes $v_t = H | u_t \rangle$ and $s_t = S^2 | u_t\rangle$
|
||||
|
||||
Default should be 1,N_det,0,1
|
||||
|
||||
@ -1228,7 +1233,7 @@ Subroutines / functions
|
||||
subroutine H_S2_u_0_nstates_openmp_work_N_int(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
|
||||
|
||||
|
||||
Computes $v_t = H|u_t
angle$ and $s_t = S^2 |u_t
angle$
|
||||
Computes $v_t = H | u_t \rangle$ and $s_t = S^2 | u_t\rangle$
|
||||
|
||||
Default should be 1,N_det,0,1
|
||||
|
||||
@ -1280,13 +1285,13 @@ Subroutines / functions
|
||||
subroutine H_S2_u_0_nstates_zmq(v_0,s_0,u_0,N_st,sze)
|
||||
|
||||
|
||||
Computes $v_0 = H|u_0\rangle$ and $s_0 = S^2 |u_0\rangle$
|
||||
Computes $v_0 = H | u_0\rangle$ and $s_0 = S^2 | u_0\rangle$
|
||||
|
||||
n : number of determinants
|
||||
|
||||
H_jj : array of $\langle j|H|j \rangle$
|
||||
H_jj : array of $\langle j | H | j \rangle$
|
||||
|
||||
S2_jj : array of $\langle j|S^2|j \rangle$
|
||||
S2_jj : array of $\langle j | S^2 | j \rangle$
|
||||
|
||||
Needs:
|
||||
|
||||
@ -1303,7 +1308,6 @@ Subroutines / functions
|
||||
* :c:data:`psi_bilinear_matrix_values`
|
||||
* :c:data:`nproc`
|
||||
* :c:data:`ref_bitmask_energy`
|
||||
* :c:data:`n_states_diag`
|
||||
* :c:data:`psi_bilinear_matrix_columns_loc`
|
||||
|
||||
Called by:
|
||||
@ -1327,13 +1331,6 @@ Subroutines / functions
|
||||
* :c:func:`new_parallel_job`
|
||||
* :c:func:`omp_set_nested`
|
||||
|
||||
Touches:
|
||||
|
||||
.. hlist::
|
||||
:columns: 3
|
||||
|
||||
* :c:data:`n_states_diag`
|
||||
|
||||
|
||||
.. c:function:: h_s2_u_0_two_e_nstates_openmp:
|
||||
|
||||
@ -1345,7 +1342,7 @@ Subroutines / functions
|
||||
subroutine H_S2_u_0_two_e_nstates_openmp(v_0,s_0,u_0,N_st,sze)
|
||||
|
||||
|
||||
Computes $v_0 = H|u_0\rangle$ and $s_0 = S^2 |u_0\rangle$
|
||||
Computes $v_0 = H | u_0\rangle$ and $s_0 = S^2 | u_0\rangle$
|
||||
|
||||
Assumes that the determinants are in psi_det
|
||||
|
||||
@ -1387,7 +1384,7 @@ Subroutines / functions
|
||||
subroutine H_S2_u_0_two_e_nstates_openmp_work(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
|
||||
|
||||
|
||||
Computes $v_t = H|u_t\rangle$ and $s_t = S^2 |u_t\rangle$
|
||||
Computes $v_t = H | u_t\rangle$ and $s_t = S^2 | u_t\rangle$
|
||||
|
||||
Default should be 1,N_det,0,1
|
||||
|
||||
@ -1429,7 +1426,7 @@ Subroutines / functions
|
||||
subroutine H_S2_u_0_two_e_nstates_openmp_work_1(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
|
||||
|
||||
|
||||
Computes $v_t = H|u_t
angle$ and $s_t = S^2 |u_t
angle$
|
||||
Computes $v_t = H | u_t \rangle$ and $s_t = S^2 | u_t \rangle$
|
||||
|
||||
Default should be 1,N_det,0,1
|
||||
|
||||
@ -1479,7 +1476,7 @@ Subroutines / functions
|
||||
subroutine H_S2_u_0_two_e_nstates_openmp_work_2(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
|
||||
|
||||
|
||||
Computes $v_t = H|u_t
angle$ and $s_t = S^2 |u_t
angle$
|
||||
Computes $v_t = H | u_t \rangle$ and $s_t = S^2 | u_t \rangle$
|
||||
|
||||
Default should be 1,N_det,0,1
|
||||
|
||||
@ -1529,7 +1526,7 @@ Subroutines / functions
|
||||
subroutine H_S2_u_0_two_e_nstates_openmp_work_3(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
|
||||
|
||||
|
||||
Computes $v_t = H|u_t
angle$ and $s_t = S^2 |u_t
angle$
|
||||
Computes $v_t = H | u_t \rangle$ and $s_t = S^2 | u_t \rangle$
|
||||
|
||||
Default should be 1,N_det,0,1
|
||||
|
||||
@ -1579,7 +1576,7 @@ Subroutines / functions
|
||||
subroutine H_S2_u_0_two_e_nstates_openmp_work_4(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
|
||||
|
||||
|
||||
Computes $v_t = H|u_t
angle$ and $s_t = S^2 |u_t
angle$
|
||||
Computes $v_t = H | u_t \rangle$ and $s_t = S^2 | u_t \rangle$
|
||||
|
||||
Default should be 1,N_det,0,1
|
||||
|
||||
@ -1629,7 +1626,7 @@ Subroutines / functions
|
||||
subroutine H_S2_u_0_two_e_nstates_openmp_work_N_int(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
|
||||
|
||||
|
||||
Computes $v_t = H|u_t
angle$ and $s_t = S^2 |u_t
angle$
|
||||
Computes $v_t = H | u_t \rangle$ and $s_t = S^2 | u_t \rangle$
|
||||
|
||||
Default should be 1,N_det,0,1
|
||||
|
||||
@ -1679,9 +1676,9 @@ Subroutines / functions
|
||||
subroutine u_0_H_u_0(e_0,s_0,u_0,n,keys_tmp,Nint,N_st,sze)
|
||||
|
||||
|
||||
Computes $E_0 = \frac{\langle u_0|H|u_0 \rangle}{\langle u_0|u_0 \rangle}$
|
||||
Computes $E_0 = \frac{\langle u_0 | H | u_0 \rangle}{\langle u_0 | u_0 \rangle}$
|
||||
|
||||
and $S_0 = \frac{\langle u_0|S^2|u_0 \rangle}{\langle u_0|u_0 \rangle}$
|
||||
and $S_0 = \frac{\langle u_0 | S^2 | u_0 \rangle}{\langle u_0 | u_0 \rangle}$
|
||||
|
||||
n : number of determinants
|
||||
|
||||
@ -1692,7 +1689,6 @@ Subroutines / functions
|
||||
:columns: 3
|
||||
|
||||
* :c:data:`n_states_diag`
|
||||
* :c:data:`n_states`
|
||||
* :c:data:`distributed_davidson`
|
||||
|
||||
Called by:
|
||||
@ -1710,13 +1706,6 @@ Subroutines / functions
|
||||
* :c:func:`h_s2_u_0_nstates_openmp`
|
||||
* :c:func:`h_s2_u_0_nstates_zmq`
|
||||
|
||||
Touches:
|
||||
|
||||
.. hlist::
|
||||
:columns: 3
|
||||
|
||||
* :c:data:`n_states_diag`
|
||||
|
||||
|
||||
.. c:function:: u_0_h_u_0_two_e:
|
||||
|
||||
@ -1728,7 +1717,7 @@ Subroutines / functions
|
||||
subroutine u_0_H_u_0_two_e(e_0,u_0,n,keys_tmp,Nint,N_st,sze)
|
||||
|
||||
|
||||
Computes $E_0 = \frac{ \langle u_0|H|u_0\rangle}{\langle u_0|u_0 \rangle}$.
|
||||
Computes $E_0 = \frac{ \langle u_0 | H | u_0\rangle}{\langle u_0 | u_0 \rangle}$.
|
||||
|
||||
n : number of determinants
|
||||
|
||||
|
@ -9,12 +9,16 @@ density_for_dft
|
||||
===============
|
||||
|
||||
|
||||
This module defines the *provider* of the density used for the DFT related calculations.
|
||||
This definition is done through the keyword :option:`density_for_dft density_for_dft`.
|
||||
The density can be:
|
||||
This module defines the *provider* of the density used for the |DFT| related
|
||||
calculations. This definition is done through the keyword
|
||||
:option:`density_for_dft density_for_dft`. The density can be:
|
||||
|
||||
* WFT : the density is computed with a potentially multi determinant wave function (see variables `psi_det` and `psi_det`)# input_density : the density is set to a density previously stored in the |EZFIO| folder (see ``aux_quantities``)
|
||||
* damping_rs_dft : the density is damped between the input_density and the WFT density, with a damping factor of :option:`density_for_dft damping_for_rs_dft`
|
||||
* `WFT`: the density is computed with a potentially multi determinant wave
|
||||
function (see variables `psi_det` and `psi_det`)# input_density: the density
|
||||
is set to a density previously stored in the |EZFIO| directory (see
|
||||
``aux_quantities``)
|
||||
* `damping_rs_dft`: the density is damped between the input_density and the WFT
|
||||
density, with a damping factor of :option:`density_for_dft damping_for_rs_dft`
|
||||
|
||||
|
||||
|
||||
|
@ -13,15 +13,15 @@ Contains everything for the computation of the Hamiltonian matrix elements in th
|
||||
The main providers for this module are:
|
||||
|
||||
* :option:`determinants n_states`: number of states to be computed
|
||||
* `psi_det`: list of determinants in the wave function used in many routines/providers of the |QP|.
|
||||
* `psi_coef`: list of coefficients, for all :option:`determinants n_states` states, and all determinants.
|
||||
* :c:data:`psi_det`: list of determinants in the wave function used in many routines/providers of the |QP|.
|
||||
* :c:data:`psi_coef`: list of coefficients, for all :option:`determinants n_states` states, and all determinants.
|
||||
|
||||
The main routines for this module are:
|
||||
|
||||
* `i_H_j`: computes the Hamiltonian matrix element between two arbitrary Slater determinants.
|
||||
* `i_H_j_s2`: computes the Hamiltonian and (:math:`S^2`) matrix element between two arbitrary Slater determinants.
|
||||
* `i_H_j_verbose`: returns the decomposition in terms of one- and two-body components of the Hamiltonian matrix elements between two arbitrary Slater determinants. Also return the fermionic phase factor.
|
||||
* `i_H_psi`: computes the Hamiltonian matrix element between an arbitrary Slater determinant and a wave function composed of a sum of arbitrary Slater determinants.
|
||||
* :c:func:`i_H_j`: computes the Hamiltonian matrix element between two arbitrary Slater determinants.
|
||||
* :c:func:`i_H_j_s2`: computes the Hamiltonian and (|S^2|) matrix element between two arbitrary Slater determinants.
|
||||
* :c:func:`i_H_j_verbose`: returns the decomposition in terms of one- and two-body components of the Hamiltonian matrix elements between two arbitrary Slater determinants. Also return the fermionic phase factor.
|
||||
* :c:func:`i_H_psi`: computes the Hamiltonian matrix element between an arbitrary Slater determinant and a wave function composed of a sum of arbitrary Slater determinants.
|
||||
|
||||
|
||||
For an example of how to use these routines and providers, take a look at :file:`example.irp.f`.
|
||||
@ -81,12 +81,12 @@ EZFIO parameters
|
||||
|
||||
.. option:: n_int
|
||||
|
||||
Number of integers required to represent bitstrings (set in module :ref:`bitmask`)
|
||||
Number of integers required to represent bitstrings (set in module :ref:`module_bitmask`)
|
||||
|
||||
|
||||
.. option:: bit_kind
|
||||
|
||||
(set in module :ref:`bitmask`)
|
||||
(set in module :ref:`module_bitmask`)
|
||||
|
||||
|
||||
.. option:: mo_label
|
||||
|
@ -769,13 +769,19 @@ Subroutines / functions
|
||||
subroutine density_and_grad_alpha_beta_and_all_aos_and_grad_aos_at_r(r,dm_a,dm_b, grad_dm_a, grad_dm_b, aos_array, grad_aos_array)
|
||||
|
||||
|
||||
input : r(1) ==> r(1) = x, r(2) = y, r(3) = z
|
||||
output : dm_a = alpha density evaluated at r
|
||||
: dm_b = beta density evaluated at r
|
||||
: aos_array(i) = ao(i) evaluated at r
|
||||
: grad_dm_a(1) = X gradient of the alpha density evaluated in r
|
||||
: grad_dm_a(1) = X gradient of the beta density evaluated in r
|
||||
: grad_aos_array(1) = X gradient of the aos(i) evaluated at r
|
||||
input:
|
||||
|
||||
* r(1) ==> r(1) = x, r(2) = y, r(3) = z
|
||||
|
||||
output:
|
||||
|
||||
* dm_a = alpha density evaluated at r
|
||||
* dm_b = beta density evaluated at r
|
||||
* aos_array(i) = ao(i) evaluated at r
|
||||
* grad_dm_a(1) = X gradient of the alpha density evaluated in r
|
||||
* grad_dm_a(1) = X gradient of the beta density evaluated in r
|
||||
* grad_aos_array(1) = X gradient of the aos(i) evaluated at r
|
||||
|
||||
|
||||
Needs:
|
||||
|
||||
|
@ -15,43 +15,52 @@ fci
|
||||
The user point of view
|
||||
----------------------
|
||||
|
||||
* :c:func:`fci` performs |CIPSI| calculations using a stochastic scheme for both the selection and the |PT2| contribution,
|
||||
* :c:func:`pt2` computes the |PT2| contribution using the wave function stored in the |EZFIO|
|
||||
database.
|
||||
* :ref:`fci` performs |CIPSI| calculations using a stochastic scheme for both
|
||||
the selection and the |PT2| contribution,
|
||||
|
||||
* :ref:`pt2` computes the |PT2| contribution using the wave function stored in
|
||||
the |EZFIO| database.
|
||||
|
||||
|
||||
The main keywords/options for this module are:
|
||||
|
||||
* :option:`determinants n_det_max` : maximum number of Slater determinants in the CIPSI wave function. The :command:`fci` program will stop when the size of the CIPSI wave function will exceed :option:`determinants n_det_max`.
|
||||
* :option:`determinants n_det_max` : maximum number of Slater determinants in
|
||||
the |CIPSI| wave function. The :ref:`fci` program will stop when the size of
|
||||
the |CIPSI| wave function will exceed :option:`determinants n_det_max`.
|
||||
|
||||
* :option:`perturbation pt2_max` : absolute value of the |PT2| to stop the CIPSI calculation. Once the |PT2| :math:`<` :option:`perturbation pt2_max`, the CIPSI calculation stops.
|
||||
* :option:`perturbation pt2_max` : absolute value of the |PT2| to stop the
|
||||
|CIPSI| calculation. Once the abs(|PT2|) :math:`<` :option:`perturbation pt2_max`,
|
||||
the |CIPSI| calculation stops.
|
||||
|
||||
* :option:`determinants n_states` : number of states to consider in the CIPSI calculation.
|
||||
* :option:`determinants n_states` : number of states to consider in the |CIPSI|
|
||||
calculation.
|
||||
|
||||
* :option:`determinants read_wf` : if False, starts with a ROHF-like determinant, if True, starts with the current wave function(s) stored in the |EZFIO| folder.
|
||||
* :option:`determinants read_wf` : if |false|, starts with a |ROHF|-like
|
||||
determinant, if |true|, starts with the current wave function(s) stored in
|
||||
the |EZFIO| directory.
|
||||
|
||||
.. note::
|
||||
For a multi-state calculation, it is recommended to start with :c:func:`cis` or :c:func:`cisd`
|
||||
wave functions as a guess.
|
||||
For a multi-state calculation, it is recommended to start with :ref:`cis`
|
||||
or :ref:`cisd` wave functions as a guess.
|
||||
|
||||
* :option:`determinants s2_eig` : if True, systematically add all the determinants needed to have a pure value of :math:`S^2`. Also, if True, it tracks only the states having the good :option:`determinants expected_s2`.
|
||||
* :option:`determinants expected_s2` : expected value of |S^2| for the
|
||||
desired spin multiplicity.
|
||||
|
||||
.. note::
|
||||
For a multi-state calculation, it is recommended to start with :c:func:`cis` or :c:func:`cisd`
|
||||
wave functions as a guess.
|
||||
|
||||
* :option:`determinants expected_s2` : expected value of :math:`S^2` for the desired spin multiplicity.
|
||||
* :option:`determinants s2_eig` : if |true|, systematically add all the
|
||||
determinants needed to have a pure value of |S^2|. Also, if |true|, it
|
||||
tracks only the states having the good :option:`determinants expected_s2`.
|
||||
|
||||
|
||||
|
||||
The programmer point of view
|
||||
----------------------------
|
||||
|
||||
This module have been created with the :ref:`cipsi` module.
|
||||
The programmer's point of view
|
||||
------------------------------
|
||||
|
||||
This module was created with the :ref:`module_cipsi` module.
|
||||
|
||||
.. seealso::
|
||||
|
||||
The documentation of the :ref:`cipsi` module.
|
||||
The documentation of the :ref:`module_cipsi` module.
|
||||
|
||||
|
||||
|
||||
|
@ -14,9 +14,9 @@ calculations (the spatial part of the |MOs| is common for alpha and beta
|
||||
spinorbitals).
|
||||
|
||||
The Hartree-Fock algorithm is a |SCF| and therefore is based on the
|
||||
:ref:`module_scf_utils`` module.
|
||||
:ref:`module_scf_utils` module.
|
||||
|
||||
The Fock matrix is defined in :file:`hartree_fock fock_matrix_hf.irp.f`.
|
||||
The Fock matrix is defined in :file:`fock_matrix_hf.irp.f`.
|
||||
|
||||
|
||||
|
||||
|
@ -562,9 +562,9 @@ Subroutines / functions
|
||||
|
||||
Rotates the j-th |MO| with the k-th |MO| to give two new |MOs| that are
|
||||
|
||||
* $+ = \frac{1}{\sqrt{2}} (|j\rangle + |k\rangle)$
|
||||
* $+ = \frac{1}{\sqrt{2}} ( | j\rangle + | k\rangle)$
|
||||
|
||||
* $- = \frac{1}{\sqrt{2}} (|j\rangle - |k\rangle)$
|
||||
* $- = \frac{1}{\sqrt{2}} ( | j\rangle - | k\rangle)$
|
||||
|
||||
by convention, the '+' |MO| is in the lowest index (min(j,k))
|
||||
by convention, the '-' |MO| is in the highest index (max(j,k))
|
||||
|
@ -106,39 +106,6 @@ EZFIO parameters
|
||||
Providers
|
||||
---------
|
||||
|
||||
.. c:function:: fill_h_apply_buffer_selection:
|
||||
|
||||
|
||||
File : :file:`perturbation/selection.irp.f`
|
||||
|
||||
.. code:: fortran
|
||||
|
||||
subroutine fill_H_apply_buffer_selection(n_selected,det_buffer,e_2_pert_buffer,coef_pert_buffer, &
|
||||
N_st,Nint,iproc,select_max_out)
|
||||
|
||||
|
||||
Fill the H_apply buffer with determiants for the selection
|
||||
|
||||
Needs:
|
||||
|
||||
.. hlist::
|
||||
:columns: 3
|
||||
|
||||
* :c:data:`selection_criterion`
|
||||
* :c:data:`h_apply_buffer_allocated`
|
||||
* :c:data:`n_det`
|
||||
* :c:data:`n_int`
|
||||
|
||||
Calls:
|
||||
|
||||
.. hlist::
|
||||
:columns: 3
|
||||
|
||||
* :c:func:`omp_set_lock`
|
||||
* :c:func:`omp_unset_lock`
|
||||
* :c:func:`resize_h_apply_buffer`
|
||||
|
||||
|
||||
.. c:var:: h0_type
|
||||
|
||||
|
||||
@ -253,6 +220,38 @@ Providers
|
||||
Subroutines / functions
|
||||
-----------------------
|
||||
|
||||
.. c:function:: fill_h_apply_buffer_selection:
|
||||
|
||||
|
||||
File : :file:`perturbation/selection.irp.f`
|
||||
|
||||
.. code:: fortran
|
||||
|
||||
subroutine fill_H_apply_buffer_selection(n_selected,det_buffer,e_2_pert_buffer,coef_pert_buffer, N_st,Nint,iproc,select_max_out)
|
||||
|
||||
|
||||
Fill the H_apply buffer with determiants for the selection
|
||||
|
||||
Needs:
|
||||
|
||||
.. hlist::
|
||||
:columns: 3
|
||||
|
||||
* :c:data:`selection_criterion`
|
||||
* :c:data:`h_apply_buffer_allocated`
|
||||
* :c:data:`n_det`
|
||||
* :c:data:`n_int`
|
||||
|
||||
Calls:
|
||||
|
||||
.. hlist::
|
||||
:columns: 3
|
||||
|
||||
* :c:func:`omp_set_lock`
|
||||
* :c:func:`omp_unset_lock`
|
||||
* :c:func:`resize_h_apply_buffer`
|
||||
|
||||
|
||||
.. c:function:: perturb_buffer_by_mono_dummy:
|
||||
|
||||
|
||||
@ -263,7 +262,7 @@ Subroutines / functions
|
||||
subroutine perturb_buffer_by_mono_dummy(i_generator,buffer,buffer_size,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert,sum_norm_pert,sum_H_pert_diag,N_st,Nint,key_mask,fock_diag_tmp,electronic_energy)
|
||||
|
||||
|
||||
Applly pertubration ``dummy`` to the buffer of determinants generated in the H_apply
|
||||
Apply pertubration ``dummy`` to the buffer of determinants generated in the H_apply
|
||||
routine.
|
||||
|
||||
Needs:
|
||||
@ -298,7 +297,7 @@ Subroutines / functions
|
||||
subroutine perturb_buffer_by_mono_epstein_nesbet(i_generator,buffer,buffer_size,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert,sum_norm_pert,sum_H_pert_diag,N_st,Nint,key_mask,fock_diag_tmp,electronic_energy)
|
||||
|
||||
|
||||
Applly pertubration ``epstein_nesbet`` to the buffer of determinants generated in the H_apply
|
||||
Apply pertubration ``epstein_nesbet`` to the buffer of determinants generated in the H_apply
|
||||
routine.
|
||||
|
||||
Needs:
|
||||
@ -333,7 +332,7 @@ Subroutines / functions
|
||||
subroutine perturb_buffer_by_mono_epstein_nesbet_2x2(i_generator,buffer,buffer_size,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert,sum_norm_pert,sum_H_pert_diag,N_st,Nint,key_mask,fock_diag_tmp,electronic_energy)
|
||||
|
||||
|
||||
Applly pertubration ``epstein_nesbet_2x2`` to the buffer of determinants generated in the H_apply
|
||||
Apply pertubration ``epstein_nesbet_2x2`` to the buffer of determinants generated in the H_apply
|
||||
routine.
|
||||
|
||||
Needs:
|
||||
@ -368,7 +367,7 @@ Subroutines / functions
|
||||
subroutine perturb_buffer_by_mono_epstein_nesbet_2x2_no_ci_diag(i_generator,buffer,buffer_size,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert,sum_norm_pert,sum_H_pert_diag,N_st,Nint,key_mask,fock_diag_tmp,electronic_energy)
|
||||
|
||||
|
||||
Applly pertubration ``epstein_nesbet_2x2_no_ci_diag`` to the buffer of determinants generated in the H_apply
|
||||
Apply pertubration ``epstein_nesbet_2x2_no_ci_diag`` to the buffer of determinants generated in the H_apply
|
||||
routine.
|
||||
|
||||
Needs:
|
||||
@ -403,7 +402,7 @@ Subroutines / functions
|
||||
subroutine perturb_buffer_by_mono_moller_plesset(i_generator,buffer,buffer_size,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert,sum_norm_pert,sum_H_pert_diag,N_st,Nint,key_mask,fock_diag_tmp,electronic_energy)
|
||||
|
||||
|
||||
Applly pertubration ``moller_plesset`` to the buffer of determinants generated in the H_apply
|
||||
Apply pertubration ``moller_plesset`` to the buffer of determinants generated in the H_apply
|
||||
routine.
|
||||
|
||||
Needs:
|
||||
@ -438,7 +437,7 @@ Subroutines / functions
|
||||
subroutine perturb_buffer_by_mono_qdpt(i_generator,buffer,buffer_size,e_2_pert_buffer,coef_pert_buffer,sum_e_2_pert,sum_norm_pert,sum_H_pert_diag,N_st,Nint,key_mask,fock_diag_tmp,electronic_energy)
|
||||
|
||||
|
||||
Applly pertubration ``qdpt`` to the buffer of determinants generated in the H_apply
|
||||