mirror of
https://github.com/LCPQ/quantum_package
synced 2024-09-27 03:51:01 +02:00
merge with Toto
This commit is contained in:
commit
15c15a65f7
5
TODO
5
TODO
@ -1,4 +1,3 @@
|
||||
|
||||
* Mettre le fichier LIB
|
||||
|
||||
# Web/doc
|
||||
@ -17,8 +16,8 @@
|
||||
|
||||
# Tests:
|
||||
|
||||
* Extrapolation
|
||||
* DFT
|
||||
* Extrapolation
|
||||
* DFT
|
||||
|
||||
|
||||
# User doc:
|
||||
|
@ -11,10 +11,13 @@ BUILDDIR = build
|
||||
help:
|
||||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
|
||||
.PHONY: help Makefile
|
||||
.PHONY: help Makefile auto
|
||||
|
||||
auto:
|
||||
cd source ; python2 auto_generate.py
|
||||
|
||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||
%: Makefile
|
||||
cd source ; python2 auto_generate.py
|
||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
|
||||
|
@ -123,7 +123,12 @@ def generate_providers(abs_module):
|
||||
state = 0
|
||||
entity = { "decl": [], "doc": [] ,
|
||||
"name": name , "module": module }
|
||||
for line in f.readlines():
|
||||
text=f.read()
|
||||
text_old = None
|
||||
while text_old != text:
|
||||
text_old = text
|
||||
text = text.replace("$"," :math:`",1).replace("$","` ",1)
|
||||
for line in text.splitlines():
|
||||
line = line.rstrip()
|
||||
if line.startswith(".SH Declaration"):
|
||||
state = 1
|
||||
|
@ -1,657 +0,0 @@
|
||||
.. _ao_basis:
|
||||
|
||||
.. program:: ao_basis
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
========
|
||||
ao_basis
|
||||
========
|
||||
|
||||
This module describes the atomic orbitals basis set.
|
||||
|
||||
An |AO| :math:`\chi` centered on nucleus A is represented as:
|
||||
|
||||
.. math::
|
||||
|
||||
\chi_i({\bf r}) = (x-X_A)^a (y-Y_A)^b (z-Z_A)^c \sum_k c_{ki} e^{-\gamma_{ki} |{\bf r} - {\bf R}_A|^2}
|
||||
|
||||
|
||||
The |AO| coefficients are normalized as:
|
||||
|
||||
.. math::
|
||||
|
||||
{\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.
|
||||
|
||||
The |AOs| are also sorted by increasing exponent to accelerate the calculation of
|
||||
the two electron integrals.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
EZFIO parameters
|
||||
----------------
|
||||
|
||||
.. option:: ao_basis
|
||||
|
||||
Name of the |AO| basis set
|
||||
|
||||
|
||||
.. option:: ao_num
|
||||
|
||||
Number of |AOs|
|
||||
|
||||
|
||||
.. option:: ao_prim_num
|
||||
|
||||
Number of primitives per |AO|
|
||||
|
||||
|
||||
.. option:: ao_prim_num_max
|
||||
|
||||
Maximum number of primitives
|
||||
|
||||
Default: =maxval(ao_basis.ao_prim_num)
|
||||
|
||||
.. option:: ao_nucl
|
||||
|
||||
Index of the nucleus on which the |AO| is centered
|
||||
|
||||
|
||||
.. option:: ao_power
|
||||
|
||||
Powers of x, y and z for each |AO|
|
||||
|
||||
|
||||
.. option:: ao_coef
|
||||
|
||||
Primitive coefficients, read from input. Those should not be used directly, as the MOs are expressed on the basis of **normalized** AOs.
|
||||
|
||||
|
||||
.. option:: ao_expo
|
||||
|
||||
Exponents for each primitive of each |AO|
|
||||
|
||||
|
||||
.. option:: ao_md5
|
||||
|
||||
MD5 key, specific of the |AO| basis
|
||||
|
||||
|
||||
.. option:: ao_cartesian
|
||||
|
||||
If |true|, use |AOs| in Cartesian coordinates (6d,10f,...)
|
||||
|
||||
Default: false
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
||||
|
||||
.. c:var:: ao_coef_normalization_factor
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: ao_coef_normalized (ao_num,ao_prim_num_max)
|
||||
double precision, allocatable :: ao_coef_normalization_factor (ao_num)
|
||||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
Coefficients including the |AO| normalization
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: ao_coef_normalization_libint_factor
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: ao_coef_normalization_libint_factor (ao_num)
|
||||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
|AO| normalization for interfacing with libint
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: ao_coef_normalized
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: ao_coef_normalized (ao_num,ao_prim_num_max)
|
||||
double precision, allocatable :: ao_coef_normalization_factor (ao_num)
|
||||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
Coefficients including the |AO| normalization
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: ao_coef_normalized_ordered
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: ao_coef_normalized_ordered (ao_num,ao_prim_num_max)
|
||||
double precision, allocatable :: ao_expo_ordered (ao_num,ao_prim_num_max)
|
||||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
Sorted primitives to accelerate 4 index |MO| transformation
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: ao_coef_normalized_ordered_transp
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: ao_coef_normalized_ordered_transp (ao_prim_num_max,ao_num)
|
||||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
Transposed :c:data:`ao_coef_normalized_ordered`
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: ao_coef_normalized_ordered_transp_per_nucl
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: ao_coef_normalized_ordered_transp_per_nucl (ao_prim_num_max,N_AOs_max,nucl_num)
|
||||
|
||||
File: :file:`aos_transp.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: ao_expo_ordered
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: ao_coef_normalized_ordered (ao_num,ao_prim_num_max)
|
||||
double precision, allocatable :: ao_expo_ordered (ao_num,ao_prim_num_max)
|
||||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
Sorted primitives to accelerate 4 index |MO| transformation
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: ao_expo_ordered_transp
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: ao_expo_ordered_transp (ao_prim_num_max,ao_num)
|
||||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
Transposed :c:data:`ao_expo_ordered`
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: ao_expo_ordered_transp_per_nucl
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: ao_expo_ordered_transp_per_nucl (ao_prim_num_max,N_AOs_max,nucl_num)
|
||||
|
||||
File: :file:`aos_transp.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: ao_l
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: ao_l (ao_num)
|
||||
integer :: ao_l_max
|
||||
character*(128), allocatable :: ao_l_char (ao_num)
|
||||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
:math:`l` value of the |AO|: :math`a+b+c` in :math:`x^a y^b z^c`
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: ao_l_char
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: ao_l (ao_num)
|
||||
integer :: ao_l_max
|
||||
character*(128), allocatable :: ao_l_char (ao_num)
|
||||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
:math:`l` value of the |AO|: :math`a+b+c` in :math:`x^a y^b z^c`
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: ao_l_char_space
|
||||
|
||||
.. code:: text
|
||||
|
||||
character*(4), allocatable :: ao_l_char_space (ao_num)
|
||||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
Converts an l value to a string
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: ao_l_max
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: ao_l (ao_num)
|
||||
integer :: ao_l_max
|
||||
character*(128), allocatable :: ao_l_char (ao_num)
|
||||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
:math:`l` value of the |AO|: :math`a+b+c` in :math:`x^a y^b z^c`
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: ao_power_ordered_transp_per_nucl
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: ao_power_ordered_transp_per_nucl (3,N_AOs_max,nucl_num)
|
||||
|
||||
File: :file:`aos_transp.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: ao_prim_num_max
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: ao_prim_num_max
|
||||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
Max number of primitives.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: cart_to_sphe_0
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: cart_to_sphe_0 (1,1)
|
||||
|
||||
File: :file:`spherical_to_cartesian.irp.f`
|
||||
|
||||
Spherical -> Cartesian Transformation matrix for l=0
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: cart_to_sphe_1
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: cart_to_sphe_1 (3,3)
|
||||
|
||||
File: :file:`spherical_to_cartesian.irp.f`
|
||||
|
||||
Spherical -> Cartesian Transformation matrix for l=1
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: cart_to_sphe_2
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: cart_to_sphe_2 (6,5)
|
||||
|
||||
File: :file:`spherical_to_cartesian.irp.f`
|
||||
|
||||
Spherical -> Cartesian Transformation matrix for l=2
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: cart_to_sphe_3
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: cart_to_sphe_3 (10,7)
|
||||
|
||||
File: :file:`spherical_to_cartesian.irp.f`
|
||||
|
||||
Spherical -> Cartesian Transformation matrix for l=3
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: cart_to_sphe_4
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: cart_to_sphe_4 (15,9)
|
||||
|
||||
File: :file:`spherical_to_cartesian.irp.f`
|
||||
|
||||
Spherical -> Cartesian Transformation matrix for l=4
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: cart_to_sphe_5
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: cart_to_sphe_5 (21,11)
|
||||
|
||||
File: :file:`spherical_to_cartesian.irp.f`
|
||||
|
||||
Spherical -> Cartesian Transformation matrix for l=5
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: cart_to_sphe_6
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: cart_to_sphe_6 (28,13)
|
||||
|
||||
File: :file:`spherical_to_cartesian.irp.f`
|
||||
|
||||
Spherical -> Cartesian Transformation matrix for l=6
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: cart_to_sphe_7
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: cart_to_sphe_7 (36,15)
|
||||
|
||||
File: :file:`spherical_to_cartesian.irp.f`
|
||||
|
||||
Spherical -> Cartesian Transformation matrix for l=7
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: cart_to_sphe_8
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: cart_to_sphe_8 (45,17)
|
||||
|
||||
File: :file:`spherical_to_cartesian.irp.f`
|
||||
|
||||
Spherical -> Cartesian Transformation matrix for l=8
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: cart_to_sphe_9
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: cart_to_sphe_9 (55,19)
|
||||
|
||||
File: :file:`spherical_to_cartesian.irp.f`
|
||||
|
||||
Spherical -> Cartesian Transformation matrix for l=9
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: l_to_charater
|
||||
|
||||
.. code:: text
|
||||
|
||||
character*(128), allocatable :: l_to_charater (0:7)
|
||||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
Character corresponding to the "l" value of an |AO|
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: n_aos_max
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: nucl_n_aos (nucl_num)
|
||||
integer :: n_aos_max
|
||||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
Number of |AOs| per atom
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: n_pt_max_i_x
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: n_pt_max_integrals
|
||||
integer :: n_pt_max_i_x
|
||||
|
||||
File: :file:`dimensions_integrals.irp.f`
|
||||
|
||||
Number of points used in the numerical integrations.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: n_pt_max_integrals
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: n_pt_max_integrals
|
||||
integer :: n_pt_max_i_x
|
||||
|
||||
File: :file:`dimensions_integrals.irp.f`
|
||||
|
||||
Number of points used in the numerical integrations.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: nucl_aos
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: nucl_aos (nucl_num,N_AOs_max)
|
||||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
List of |AOs| centered on each atom
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: nucl_aos_transposed
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: nucl_aos_transposed (N_AOs_max,nucl_num)
|
||||
|
||||
File: :file:`aos_transp.irp.f`
|
||||
|
||||
List of AOs attached on each atom
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: nucl_list_shell_aos
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: nucl_list_shell_aos (nucl_num,N_AOs_max)
|
||||
integer, allocatable :: nucl_num_shell_aos (nucl_num)
|
||||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
Index of the shell type |AOs| and of the corresponding |AOs| By convention, for p,d,f and g |AOs|, we take the index of the |AO| with the the corresponding power in the x axis
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: nucl_n_aos
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: nucl_n_aos (nucl_num)
|
||||
integer :: n_aos_max
|
||||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
Number of |AOs| per atom
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: nucl_num_shell_aos
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: nucl_list_shell_aos (nucl_num,N_AOs_max)
|
||||
integer, allocatable :: nucl_num_shell_aos (nucl_num)
|
||||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
Index of the shell type |AOs| and of the corresponding |AOs| By convention, for p,d,f and g |AOs|, we take the index of the |AO| with the the corresponding power in the x axis
|
||||
|
||||
|
||||
|
||||
|
||||
Subroutines / functions
|
||||
-----------------------
|
||||
|
||||
|
||||
|
||||
.. c:function:: ao_power_index
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function ao_power_index(nx,ny,nz)
|
||||
|
||||
File: :file:`aos.irp.f`
|
||||
|
||||
Unique index given to a triplet of powers:
|
||||
|
||||
:math:`\frac{1}{2} (l-n_x) (l-n_x+1) + n_z + 1`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: ao_value
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision function ao_value(i,r)
|
||||
|
||||
File: :file:`aos_value.irp.f`
|
||||
|
||||
return the value of the ith ao at point r
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: give_all_aos_and_grad_and_lapl_at_r
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine give_all_aos_and_grad_and_lapl_at_r(r,aos_array,aos_grad_array,aos_lapl_array)
|
||||
|
||||
File: :file:`aos_value.irp.f`
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: give_all_aos_and_grad_at_r
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine give_all_aos_and_grad_at_r(r,aos_array,aos_grad_array)
|
||||
|
||||
File: :file:`aos_value.irp.f`
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: give_all_aos_at_r
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine give_all_aos_at_r(r,aos_array)
|
||||
|
||||
File: :file:`aos_value.irp.f`
|
||||
|
||||
input : r == r(1) = x and so on aos_array(i) = aos(i) evaluated in r
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: give_all_aos_at_r_old
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine give_all_aos_at_r_old(r,aos_array)
|
||||
|
||||
File: :file:`aos_value.irp.f`
|
||||
|
||||
gives the values of aos at a given point r
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: primitive_value
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision function primitive_value(i,j,r)
|
||||
|
||||
File: :file:`aos_value.irp.f`
|
||||
|
||||
return the value of the jth primitive of ith ao at point r WITHOUT THE COEF
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,52 +0,0 @@
|
||||
.. _aux_quantities:
|
||||
|
||||
.. program:: aux_quantities
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
==============
|
||||
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.
|
||||
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
|
||||
the calculations. In |RSDFT| calculations, this can be done to perform damping
|
||||
on the density in order to speed up convergence.
|
||||
|
||||
The main providers of that module are:
|
||||
|
||||
* `data_one_body_alpha_dm_mo` and `data_one_body_beta_dm_mo` which are the
|
||||
one-body alpha and beta densities which are necessary read from the EZFIO
|
||||
folder.
|
||||
|
||||
|
||||
Thanks to these providers you can use any density matrix that does not
|
||||
necessary corresponds to that of the current wave function.
|
||||
|
||||
|
||||
|
||||
EZFIO parameters
|
||||
----------------
|
||||
|
||||
.. option:: data_energy_var
|
||||
|
||||
Variational energy computed with the wave function
|
||||
|
||||
|
||||
.. option:: data_energy_proj
|
||||
|
||||
Projected energy computed with the wave function
|
||||
|
||||
|
||||
.. option:: data_one_body_alpha_dm_mo
|
||||
|
||||
Alpha one body density matrix on the MO basis computed with the wave function
|
||||
|
||||
|
||||
.. option:: data_one_body_beta_dm_mo
|
||||
|
||||
Beta one body density matrix on the MO basis computed with the wave function
|
||||
|
@ -1,454 +0,0 @@
|
||||
.. _becke_numerical_grid:
|
||||
|
||||
.. program:: becke_numerical_grid
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
====================
|
||||
becke_numerical_grid
|
||||
====================
|
||||
|
||||
This module contains all quantities needed to build the Becke's grid used in general for DFT integration. Note that it can be used for whatever integration in R^3 as long as the functions to be integrated are mostly concentrated near the atomic regions.
|
||||
|
||||
This grid is built as the reunion of a spherical grid around each atom. Each spherical grid contains
|
||||
a certain number of radial and angular points. No pruning is done on the angular part of the grid.
|
||||
|
||||
The main keyword for that modue is:
|
||||
|
||||
* :option:`becke_numerical_grid grid_type_sgn` which controls the precision of the grid according the standard **SG-n** grids. This keyword controls the two providers `n_points_integration_angular` `n_points_radial_grid`.
|
||||
|
||||
The main providers of that module are:
|
||||
|
||||
* `n_points_integration_angular` which is the number of angular integration points. WARNING: it obeys to specific rules so it cannot be any integer number. Some of the possible values are [ 50 | 74 | 170 | 194 | 266 | 302 | 590 | 1202 | 2030 | 5810 ] for instance. See :file:`angular.f` for more details.
|
||||
* `n_points_radial_grid` which is the number of radial angular points. This can be any strictly positive integer. Nevertheless, a minimum of 50 is in general necessary.
|
||||
* `final_grid_points` which are the (x,y,z) coordinates of the grid points.
|
||||
* `final_weight_at_r_vector` which are the weights at each grid point
|
||||
|
||||
|
||||
For a simple example of how to use the grid, see :file:`example.irp.f`.
|
||||
|
||||
The spherical integration uses Lebedev-Laikov grids, which was used from the code distributed through CCL (http://www.ccl.net/).
|
||||
See next section for explanations and citation policies.
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
This subroutine is part of a set of subroutines that generate
|
||||
Lebedev grids [1-6] for integration on a sphere. The original
|
||||
C-code [1] was kindly provided by Dr. Dmitri N. Laikov and
|
||||
translated into fortran by Dr. Christoph van Wuellen.
|
||||
This subroutine was translated using a C to fortran77 conversion
|
||||
tool written by Dr. Christoph van Wuellen.
|
||||
|
||||
Users of this code are asked to include reference [1] in their
|
||||
publications, and in the user- and programmers-manuals
|
||||
describing their codes.
|
||||
|
||||
This code was distributed through CCL (http://www.ccl.net/).
|
||||
|
||||
[1] V.I. Lebedev, and D.N. Laikov
|
||||
"A quadrature formula for the sphere of the 131st
|
||||
algebraic order of accuracy"
|
||||
Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481.
|
||||
|
||||
[2] V.I. Lebedev
|
||||
"A quadrature formula for the sphere of 59th algebraic
|
||||
order of accuracy"
|
||||
Russian Acad. Sci. Dokl. Math., Vol. 50, 1995, pp. 283-286.
|
||||
|
||||
[3] V.I. Lebedev, and A.L. Skorokhodov
|
||||
"Quadrature formulas of orders 41, 47, and 53 for the sphere"
|
||||
Russian Acad. Sci. Dokl. Math., Vol. 45, 1992, pp. 587-592.
|
||||
|
||||
[4] V.I. Lebedev
|
||||
"Spherical quadrature formulas exact to orders 25-29"
|
||||
Siberian Mathematical Journal, Vol. 18, 1977, pp. 99-107.
|
||||
|
||||
[5] V.I. Lebedev
|
||||
"Quadratures on a sphere"
|
||||
Computational Mathematics and Mathematical Physics, Vol. 16,
|
||||
1976, pp. 10-24.
|
||||
|
||||
[6] V.I. Lebedev
|
||||
"Values of the nodes and weights of ninth to seventeenth
|
||||
order Gauss-Markov quadrature formulae invariant under the
|
||||
octahedron group with inversion"
|
||||
Computational Mathematics and Mathematical Physics, Vol. 15,
|
||||
1975, pp. 44-51.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
EZFIO parameters
|
||||
----------------
|
||||
|
||||
.. option:: grid_type_sgn
|
||||
|
||||
Type of grid used for the Becke's numerical grid. Can be, by increasing accuracy: [ 0 | 1 | 2 | 3 ]
|
||||
|
||||
Default: 2
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
||||
|
||||
.. c:var:: alpha_knowles
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: alpha_knowles (100)
|
||||
|
||||
File: :file:`integration_radial.irp.f`
|
||||
|
||||
Recommended values for the alpha parameters according to the paper of Knowles (JCP, 104, 1996) as a function of the nuclear charge
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: angular_quadrature_points
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: angular_quadrature_points (n_points_integration_angular,3)
|
||||
double precision, allocatable :: weights_angular_points (n_points_integration_angular)
|
||||
|
||||
File: :file:`grid_becke.irp.f`
|
||||
|
||||
weights and grid points for the integration on the angular variables on the unit sphere centered on (0,0,0) According to the LEBEDEV scheme
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: dr_radial_integral
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: grid_points_radial (n_points_radial_grid)
|
||||
double precision :: dr_radial_integral
|
||||
|
||||
File: :file:`grid_becke.irp.f`
|
||||
|
||||
points in [0,1] to map the radial integral [0,\infty]
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: final_grid_points
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: final_grid_points (3,n_points_final_grid)
|
||||
double precision, allocatable :: final_weight_at_r_vector (n_points_final_grid)
|
||||
integer, allocatable :: index_final_points (3,n_points_final_grid)
|
||||
integer, allocatable :: index_final_points_reverse (n_points_integration_angular,n_points_radial_grid,nucl_num)
|
||||
|
||||
File: :file:`grid_becke_vector.irp.f`
|
||||
|
||||
final_grid_points(1:3,j) = (/ x, y, z /) of the jth grid point
|
||||
|
||||
final_weight_at_r_vector(i) = Total weight function of the ith grid point which contains the Lebedev, Voronoi and radial weights contributions
|
||||
|
||||
index_final_points(1:3,i) = gives the angular, radial and atomic indices associated to the ith grid point
|
||||
|
||||
index_final_points_reverse(i,j,k) = index of the grid point having i as angular, j as radial and l as atomic indices
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: final_weight_at_r
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: final_weight_at_r (n_points_integration_angular,n_points_radial_grid,nucl_num)
|
||||
|
||||
File: :file:`grid_becke.irp.f`
|
||||
|
||||
Total weight on each grid point which takes into account all Lebedev, Voronoi and radial weights.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: final_weight_at_r_vector
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: final_grid_points (3,n_points_final_grid)
|
||||
double precision, allocatable :: final_weight_at_r_vector (n_points_final_grid)
|
||||
integer, allocatable :: index_final_points (3,n_points_final_grid)
|
||||
integer, allocatable :: index_final_points_reverse (n_points_integration_angular,n_points_radial_grid,nucl_num)
|
||||
|
||||
File: :file:`grid_becke_vector.irp.f`
|
||||
|
||||
final_grid_points(1:3,j) = (/ x, y, z /) of the jth grid point
|
||||
|
||||
final_weight_at_r_vector(i) = Total weight function of the ith grid point which contains the Lebedev, Voronoi and radial weights contributions
|
||||
|
||||
index_final_points(1:3,i) = gives the angular, radial and atomic indices associated to the ith grid point
|
||||
|
||||
index_final_points_reverse(i,j,k) = index of the grid point having i as angular, j as radial and l as atomic indices
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: grid_points_per_atom
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: grid_points_per_atom (3,n_points_integration_angular,n_points_radial_grid,nucl_num)
|
||||
|
||||
File: :file:`grid_becke.irp.f`
|
||||
|
||||
x,y,z coordinates of grid points used for integration in 3d space
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: grid_points_radial
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: grid_points_radial (n_points_radial_grid)
|
||||
double precision :: dr_radial_integral
|
||||
|
||||
File: :file:`grid_becke.irp.f`
|
||||
|
||||
points in [0,1] to map the radial integral [0,\infty]
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: index_final_points
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: final_grid_points (3,n_points_final_grid)
|
||||
double precision, allocatable :: final_weight_at_r_vector (n_points_final_grid)
|
||||
integer, allocatable :: index_final_points (3,n_points_final_grid)
|
||||
integer, allocatable :: index_final_points_reverse (n_points_integration_angular,n_points_radial_grid,nucl_num)
|
||||
|
||||
File: :file:`grid_becke_vector.irp.f`
|
||||
|
||||
final_grid_points(1:3,j) = (/ x, y, z /) of the jth grid point
|
||||
|
||||
final_weight_at_r_vector(i) = Total weight function of the ith grid point which contains the Lebedev, Voronoi and radial weights contributions
|
||||
|
||||
index_final_points(1:3,i) = gives the angular, radial and atomic indices associated to the ith grid point
|
||||
|
||||
index_final_points_reverse(i,j,k) = index of the grid point having i as angular, j as radial and l as atomic indices
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: index_final_points_reverse
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: final_grid_points (3,n_points_final_grid)
|
||||
double precision, allocatable :: final_weight_at_r_vector (n_points_final_grid)
|
||||
integer, allocatable :: index_final_points (3,n_points_final_grid)
|
||||
integer, allocatable :: index_final_points_reverse (n_points_integration_angular,n_points_radial_grid,nucl_num)
|
||||
|
||||
File: :file:`grid_becke_vector.irp.f`
|
||||
|
||||
final_grid_points(1:3,j) = (/ x, y, z /) of the jth grid point
|
||||
|
||||
final_weight_at_r_vector(i) = Total weight function of the ith grid point which contains the Lebedev, Voronoi and radial weights contributions
|
||||
|
||||
index_final_points(1:3,i) = gives the angular, radial and atomic indices associated to the ith grid point
|
||||
|
||||
index_final_points_reverse(i,j,k) = index of the grid point having i as angular, j as radial and l as atomic indices
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: m_knowles
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: m_knowles
|
||||
|
||||
File: :file:`grid_becke.irp.f`
|
||||
|
||||
value of the "m" parameter in the equation (7) of the paper of Knowles (JCP, 104, 1996)
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: n_points_final_grid
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: n_points_final_grid
|
||||
|
||||
File: :file:`grid_becke_vector.irp.f`
|
||||
|
||||
Number of points which are non zero
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: n_points_grid_per_atom
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: n_points_grid_per_atom
|
||||
|
||||
File: :file:`grid_becke.irp.f`
|
||||
|
||||
Number of grid points per atom
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: n_points_integration_angular
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: n_points_radial_grid
|
||||
integer :: n_points_integration_angular
|
||||
|
||||
File: :file:`grid_becke.irp.f`
|
||||
|
||||
n_points_radial_grid = number of radial grid points per atom
|
||||
|
||||
n_points_integration_angular = number of angular grid points per atom
|
||||
|
||||
These numbers are automatically set by setting the grid_type_sgn parameter
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: n_points_radial_grid
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: n_points_radial_grid
|
||||
integer :: n_points_integration_angular
|
||||
|
||||
File: :file:`grid_becke.irp.f`
|
||||
|
||||
n_points_radial_grid = number of radial grid points per atom
|
||||
|
||||
n_points_integration_angular = number of angular grid points per atom
|
||||
|
||||
These numbers are automatically set by setting the grid_type_sgn parameter
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: weight_at_r
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: weight_at_r (n_points_integration_angular,n_points_radial_grid,nucl_num)
|
||||
|
||||
File: :file:`grid_becke.irp.f`
|
||||
|
||||
Weight function at grid points : w_n(r) according to the equation (22) of Becke original paper (JCP, 88, 1988)
|
||||
|
||||
The "n" discrete variable represents the nucleis which in this array is represented by the last dimension and the points are labelled by the other dimensions.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: weights_angular_points
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: angular_quadrature_points (n_points_integration_angular,3)
|
||||
double precision, allocatable :: weights_angular_points (n_points_integration_angular)
|
||||
|
||||
File: :file:`grid_becke.irp.f`
|
||||
|
||||
weights and grid points for the integration on the angular variables on the unit sphere centered on (0,0,0) According to the LEBEDEV scheme
|
||||
|
||||
|
||||
|
||||
|
||||
Subroutines / functions
|
||||
-----------------------
|
||||
|
||||
|
||||
|
||||
.. c:function:: cell_function_becke
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision function cell_function_becke(r,atom_number)
|
||||
|
||||
File: :file:`step_function_becke.irp.f`
|
||||
|
||||
atom_number :: atom on which the cell function of Becke (1988, JCP,88(4)) r(1:3) :: x,y,z coordinantes of the current point
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: derivative_knowles_function
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision function derivative_knowles_function(alpha,m,x)
|
||||
|
||||
File: :file:`integration_radial.irp.f`
|
||||
|
||||
Derivative of the function proposed by Knowles (JCP, 104, 1996) for distributing the radial points
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: example_becke_numerical_grid
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine example_becke_numerical_grid
|
||||
|
||||
File: :file:`example.irp.f`
|
||||
|
||||
subroutine that illustrates the main features available in becke_numerical_grid
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: f_function_becke
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision function f_function_becke(x)
|
||||
|
||||
File: :file:`step_function_becke.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: knowles_function
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision function knowles_function(alpha,m,x)
|
||||
|
||||
File: :file:`integration_radial.irp.f`
|
||||
|
||||
Function proposed by Knowles (JCP, 104, 1996) for distributing the radial points : the Log "m" function ( equation (7) in the paper )
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: step_function_becke
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision function step_function_becke(x)
|
||||
|
||||
File: :file:`step_function_becke.irp.f`
|
||||
|
||||
Step function of the Becke paper (1988, JCP,88(4))
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,117 +0,0 @@
|
||||
.. _cis:
|
||||
|
||||
.. program:: cis
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
===
|
||||
cis
|
||||
===
|
||||
|
||||
This module contains a CIS program, 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
|
||||
selection)
|
||||
|
||||
These rules are set in the ``H_apply.irp.f`` file.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
EZFIO parameters
|
||||
----------------
|
||||
|
||||
.. option:: energy
|
||||
|
||||
Variational |CIS| energy
|
||||
|
||||
|
||||
|
||||
Subroutines / functions
|
||||
-----------------------
|
||||
|
||||
|
||||
|
||||
.. c:function:: cis
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine cis
|
||||
|
||||
File: :file:`cis.irp.f`
|
||||
|
||||
Configuration Interaction with Single excitations.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_apply_cis
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_apply_cis()
|
||||
|
||||
File: :file:`h_apply.irp.f_shell_8`
|
||||
|
||||
Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_apply_cis_diexc
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_apply_cis_diexc(key_in, key_prev, hole_1,particl_1, hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in )
|
||||
|
||||
File: :file:`h_apply.irp.f_shell_8`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_apply_cis_diexcorg
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_apply_cis_diexcOrg(key_in,key_mask,hole_1,particl_1,hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in )
|
||||
|
||||
File: :file:`h_apply.irp.f_shell_8`
|
||||
|
||||
Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_apply_cis_diexcp
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_apply_cis_diexcP(key_in, fs1, fh1, particl_1, fs2, fh2, particl_2, fock_diag_tmp, i_generator, iproc_in )
|
||||
|
||||
File: :file:`h_apply.irp.f_shell_8`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_apply_cis_monoexc
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_apply_cis_monoexc(key_in, hole_1,particl_1,fock_diag_tmp,i_generator,iproc_in )
|
||||
|
||||
File: :file:`h_apply.irp.f_shell_8`
|
||||
|
||||
Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided.
|
||||
|
||||
|
@ -1,117 +0,0 @@
|
||||
.. _cisd:
|
||||
|
||||
.. program:: cisd
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
====
|
||||
cisd
|
||||
====
|
||||
|
||||
This module contains a CISD program, built by setting the following rules:
|
||||
|
||||
* The only generator determinant is the Hartree-Fock (single-reference method)
|
||||
* All generated determinants are included in the wave function (no perturbative
|
||||
selection)
|
||||
|
||||
These rules are set in the ``H_apply.irp.f`` file.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
EZFIO parameters
|
||||
----------------
|
||||
|
||||
.. option:: energy
|
||||
|
||||
Variational |CISD| energy
|
||||
|
||||
|
||||
|
||||
Subroutines / functions
|
||||
-----------------------
|
||||
|
||||
|
||||
|
||||
.. c:function:: cisd
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine cisd
|
||||
|
||||
File: :file:`cisd.irp.f`
|
||||
|
||||
Configuration Interaction with Single and Double excitations.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_apply_cisd
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_apply_cisd()
|
||||
|
||||
File: :file:`h_apply.irp.f_shell_8`
|
||||
|
||||
Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_apply_cisd_diexc
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_apply_cisd_diexc(key_in, key_prev, hole_1,particl_1, hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in )
|
||||
|
||||
File: :file:`h_apply.irp.f_shell_8`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_apply_cisd_diexcorg
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_apply_cisd_diexcOrg(key_in,key_mask,hole_1,particl_1,hole_2, particl_2, fock_diag_tmp, i_generator, iproc_in )
|
||||
|
||||
File: :file:`h_apply.irp.f_shell_8`
|
||||
|
||||
Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_apply_cisd_diexcp
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_apply_cisd_diexcP(key_in, fs1, fh1, particl_1, fs2, fh2, particl_2, fock_diag_tmp, i_generator, iproc_in )
|
||||
|
||||
File: :file:`h_apply.irp.f_shell_8`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_apply_cisd_monoexc
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_apply_cisd_monoexc(key_in, hole_1,particl_1,fock_diag_tmp,i_generator,iproc_in )
|
||||
|
||||
File: :file:`h_apply.irp.f_shell_8`
|
||||
|
||||
Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided.
|
||||
|
||||
|
@ -1,720 +0,0 @@
|
||||
.. _davidson:
|
||||
|
||||
.. program:: davidson
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
========
|
||||
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.
|
||||
|
||||
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_bielec` 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_bielec`.
|
||||
|
||||
|
||||
|
||||
EZFIO parameters
|
||||
----------------
|
||||
|
||||
.. option:: threshold_davidson
|
||||
|
||||
Thresholds of Davidson's algorithm
|
||||
|
||||
Default: 1.e-10
|
||||
|
||||
.. option:: n_states_diag
|
||||
|
||||
Number of states to consider during the Davdison diagonalization
|
||||
|
||||
Default: 4
|
||||
|
||||
.. option:: davidson_sze_max
|
||||
|
||||
Number of micro-iterations before re-contracting
|
||||
|
||||
Default: 8
|
||||
|
||||
.. option:: state_following
|
||||
|
||||
If |true|, the states are re-ordered to match the input states
|
||||
|
||||
Default: False
|
||||
|
||||
.. option:: disk_based_davidson
|
||||
|
||||
If |true|, disk space is used to store the vectors
|
||||
|
||||
Default: False
|
||||
|
||||
.. option:: distributed_davidson
|
||||
|
||||
If |true|, use the distributed algorithm
|
||||
|
||||
Default: True
|
||||
|
||||
.. option:: only_expected_s2
|
||||
|
||||
If |true|, use filter out all vectors with bad |S^2| values
|
||||
|
||||
Default: True
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
||||
|
||||
.. c:var:: ci_eigenvectors
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: ci_electronic_energy (N_states_diag)
|
||||
double precision, allocatable :: ci_eigenvectors (N_det,N_states_diag)
|
||||
double precision, allocatable :: ci_eigenvectors_s2 (N_states_diag)
|
||||
|
||||
File: :file:`diagonalize_ci.irp.f`
|
||||
|
||||
Eigenvectors/values of the CI matrix
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: ci_eigenvectors_s2
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: ci_electronic_energy (N_states_diag)
|
||||
double precision, allocatable :: ci_eigenvectors (N_det,N_states_diag)
|
||||
double precision, allocatable :: ci_eigenvectors_s2 (N_states_diag)
|
||||
|
||||
File: :file:`diagonalize_ci.irp.f`
|
||||
|
||||
Eigenvectors/values of the CI matrix
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: ci_electronic_energy
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: ci_electronic_energy (N_states_diag)
|
||||
double precision, allocatable :: ci_eigenvectors (N_det,N_states_diag)
|
||||
double precision, allocatable :: ci_eigenvectors_s2 (N_states_diag)
|
||||
|
||||
File: :file:`diagonalize_ci.irp.f`
|
||||
|
||||
Eigenvectors/values of the CI matrix
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: ci_energy
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: ci_energy (N_states_diag)
|
||||
|
||||
File: :file:`diagonalize_ci.irp.f`
|
||||
|
||||
N_states lowest eigenvalues of the CI matrix
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: davidson_criterion
|
||||
|
||||
.. code:: text
|
||||
|
||||
character(64) :: davidson_criterion
|
||||
|
||||
File: :file:`parameters.irp.f`
|
||||
|
||||
Can be : [ energy | residual | both | wall_time | cpu_time | iterations ]
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: dressed_column_idx
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: dressed_column_idx (N_states)
|
||||
|
||||
File: :file:`diagonalization_hs2_dressed.irp.f`
|
||||
|
||||
Index of the dressed columns
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: n_states_diag
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: n_states_diag
|
||||
|
||||
File: :file:`input.irp.f`
|
||||
|
||||
Number of states to consider during the Davdison diagonalization
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: nthreads_davidson
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: nthreads_davidson
|
||||
|
||||
File: :file:`davidson_parallel.irp.f`
|
||||
|
||||
Number of threads for Davdison
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: psi_energy
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: psi_energy (N_states)
|
||||
|
||||
File: :file:`u0_h_u0.irp.f`
|
||||
|
||||
Electronic energy of the current wave function
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: psi_energy_bielec
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: psi_energy_bielec (N_states)
|
||||
|
||||
File: :file:`u0_wee_u0.irp.f`
|
||||
|
||||
Energy of the current wave function
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: psi_energy_with_nucl_rep
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: psi_energy_with_nucl_rep (N_states)
|
||||
|
||||
File: :file:`u0_h_u0.irp.f`
|
||||
|
||||
Energy of the wave function with the nuclear repulsion energy.
|
||||
|
||||
|
||||
|
||||
|
||||
Subroutines / functions
|
||||
-----------------------
|
||||
|
||||
|
||||
|
||||
.. c:function:: davidson_collector
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine davidson_collector(zmq_to_qp_run_socket, zmq_socket_pull, v0, s0, sze, N_st)
|
||||
|
||||
File: :file:`davidson_parallel.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: davidson_converged
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine davidson_converged(energy,residual,wall,iterations,cpu,N_st,converged)
|
||||
|
||||
File: :file:`parameters.irp.f`
|
||||
|
||||
True if the Davidson algorithm is converged
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: davidson_diag_hjj_sjj
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine davidson_diag_hjj_sjj(dets_in,u_in,H_jj,s2_out,energies,dim_in,sze,N_st,N_st_diag,Nint,dressing_state,converged)
|
||||
|
||||
File: :file:`diagonalization_hs2_dressed.irp.f`
|
||||
|
||||
Davidson diagonalization with specific diagonal elements of the H matrix
|
||||
|
||||
H_jj : specific diagonal H matrix elements to diagonalize de Davidson
|
||||
|
||||
S2_out : Output : s^2
|
||||
|
||||
dets_in : bitmasks corresponding to determinants
|
||||
|
||||
u_in : guess coefficients on the various states. Overwritten on exit
|
||||
|
||||
dim_in : leftmost dimension of u_in
|
||||
|
||||
sze : Number of determinants
|
||||
|
||||
N_st : Number of eigenstates
|
||||
|
||||
N_st_diag : Number of states in which H is diagonalized. Assumed > sze
|
||||
|
||||
Initial guess vectors are not necessarily orthonormal
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: davidson_diag_hs2
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine davidson_diag_hs2(dets_in,u_in,s2_out,dim_in,energies,sze,N_st,N_st_diag,Nint,dressing_state,converged)
|
||||
|
||||
File: :file:`diagonalization_hs2_dressed.irp.f`
|
||||
|
||||
Davidson diagonalization.
|
||||
|
||||
dets_in : bitmasks corresponding to determinants
|
||||
|
||||
u_in : guess coefficients on the various states. Overwritten on exit
|
||||
|
||||
dim_in : leftmost dimension of u_in
|
||||
|
||||
sze : Number of determinants
|
||||
|
||||
N_st : Number of eigenstates
|
||||
|
||||
Initial guess vectors are not necessarily orthonormal
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: davidson_pull_results
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine davidson_pull_results(zmq_socket_pull, v_t, s_t, imin, imax, task_id)
|
||||
|
||||
File: :file:`davidson_parallel.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: davidson_push_results
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine davidson_push_results(zmq_socket_push, v_t, s_t, imin, imax, task_id)
|
||||
|
||||
File: :file:`davidson_parallel.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: davidson_run_slave
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine davidson_run_slave(thread,iproc)
|
||||
|
||||
File: :file:`davidson_parallel.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: davidson_slave_inproc
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine davidson_slave_inproc(i)
|
||||
|
||||
File: :file:`davidson_parallel.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: davidson_slave_tcp
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine davidson_slave_tcp(i)
|
||||
|
||||
File: :file:`davidson_parallel.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: davidson_slave_work
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine davidson_slave_work(zmq_to_qp_run_socket, zmq_socket_push, N_st, sze, worker_id)
|
||||
|
||||
File: :file:`davidson_parallel.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: diagonalize_ci
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine diagonalize_CI
|
||||
|
||||
File: :file:`diagonalize_ci.irp.f`
|
||||
|
||||
Replace the coefficients of the CI states by the coefficients of the eigenstates of the CI matrix
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_s2_u_0_bielec_nstates_openmp
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_S2_u_0_bielec_nstates_openmp(v_0,s_0,u_0,N_st,sze)
|
||||
|
||||
File: :file:`u0_wee_u0.irp.f`
|
||||
|
||||
Computes v_0 = H|u_0> and s_0 = S^2 |u_0>
|
||||
|
||||
Assumes that the determinants are in psi_det
|
||||
|
||||
istart, iend, ishift, istep are used in ZMQ parallelization.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_s2_u_0_bielec_nstates_openmp_work
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_S2_u_0_bielec_nstates_openmp_work(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
|
||||
|
||||
File: :file:`u0_wee_u0.irp.f`
|
||||
|
||||
Computes v_t = H|u_t> and s_t = S^2 |u_t>
|
||||
|
||||
Default should be 1,N_det,0,1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_s2_u_0_bielec_nstates_openmp_work_1
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_S2_u_0_bielec_nstates_openmp_work_1(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
|
||||
|
||||
File: :file:`u0_wee_u0.irp.f_template_457`
|
||||
|
||||
Computes v_t = H|u_t> and s_t = S^2 |u_t>
|
||||
|
||||
Default should be 1,N_det,0,1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_s2_u_0_bielec_nstates_openmp_work_2
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_S2_u_0_bielec_nstates_openmp_work_2(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
|
||||
|
||||
File: :file:`u0_wee_u0.irp.f_template_457`
|
||||
|
||||
Computes v_t = H|u_t> and s_t = S^2 |u_t>
|
||||
|
||||
Default should be 1,N_det,0,1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_s2_u_0_bielec_nstates_openmp_work_3
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_S2_u_0_bielec_nstates_openmp_work_3(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
|
||||
|
||||
File: :file:`u0_wee_u0.irp.f_template_457`
|
||||
|
||||
Computes v_t = H|u_t> and s_t = S^2 |u_t>
|
||||
|
||||
Default should be 1,N_det,0,1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_s2_u_0_bielec_nstates_openmp_work_4
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_S2_u_0_bielec_nstates_openmp_work_4(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
|
||||
|
||||
File: :file:`u0_wee_u0.irp.f_template_457`
|
||||
|
||||
Computes v_t = H|u_t> and s_t = S^2 |u_t>
|
||||
|
||||
Default should be 1,N_det,0,1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_s2_u_0_bielec_nstates_openmp_work_n_int
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_S2_u_0_bielec_nstates_openmp_work_N_int(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
|
||||
|
||||
File: :file:`u0_wee_u0.irp.f_template_457`
|
||||
|
||||
Computes v_t = H|u_t> and s_t = S^2 |u_t>
|
||||
|
||||
Default should be 1,N_det,0,1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_s2_u_0_nstates_openmp
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_S2_u_0_nstates_openmp(v_0,s_0,u_0,N_st,sze)
|
||||
|
||||
File: :file:`u0_h_u0.irp.f`
|
||||
|
||||
Computes v_0 = H|u_0> and s_0 = S^2 |u_0>
|
||||
|
||||
Assumes that the determinants are in psi_det
|
||||
|
||||
istart, iend, ishift, istep are used in ZMQ parallelization.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_s2_u_0_nstates_openmp_work
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_S2_u_0_nstates_openmp_work(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
|
||||
|
||||
File: :file:`u0_h_u0.irp.f`
|
||||
|
||||
Computes v_t = H|u_t> and s_t = S^2 |u_t>
|
||||
|
||||
Default should be 1,N_det,0,1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_s2_u_0_nstates_openmp_work_1
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_S2_u_0_nstates_openmp_work_1(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
|
||||
|
||||
File: :file:`u0_h_u0.irp.f_template_468`
|
||||
|
||||
Computes v_t = H|u_t> and s_t = S^2 |u_t>
|
||||
|
||||
Default should be 1,N_det,0,1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_s2_u_0_nstates_openmp_work_2
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_S2_u_0_nstates_openmp_work_2(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
|
||||
|
||||
File: :file:`u0_h_u0.irp.f_template_468`
|
||||
|
||||
Computes v_t = H|u_t> and s_t = S^2 |u_t>
|
||||
|
||||
Default should be 1,N_det,0,1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_s2_u_0_nstates_openmp_work_3
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_S2_u_0_nstates_openmp_work_3(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
|
||||
|
||||
File: :file:`u0_h_u0.irp.f_template_468`
|
||||
|
||||
Computes v_t = H|u_t> and s_t = S^2 |u_t>
|
||||
|
||||
Default should be 1,N_det,0,1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_s2_u_0_nstates_openmp_work_4
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_S2_u_0_nstates_openmp_work_4(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
|
||||
|
||||
File: :file:`u0_h_u0.irp.f_template_468`
|
||||
|
||||
Computes v_t = H|u_t> and s_t = S^2 |u_t>
|
||||
|
||||
Default should be 1,N_det,0,1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_s2_u_0_nstates_openmp_work_n_int
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_S2_u_0_nstates_openmp_work_N_int(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
|
||||
|
||||
File: :file:`u0_h_u0.irp.f_template_468`
|
||||
|
||||
Computes v_t = H|u_t> and s_t = S^2 |u_t>
|
||||
|
||||
Default should be 1,N_det,0,1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: h_s2_u_0_nstates_zmq
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine H_S2_u_0_nstates_zmq(v_0,s_0,u_0,N_st,sze)
|
||||
|
||||
File: :file:`davidson_parallel.irp.f`
|
||||
|
||||
Computes v_0 = H|u_0> and s_0 = S^2 |u_0>
|
||||
|
||||
n : number of determinants
|
||||
|
||||
H_jj : array of <j|H|j>
|
||||
|
||||
S2_jj : array of <j|S^2|j>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: u_0_h_u_0
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine u_0_H_u_0(e_0,u_0,n,keys_tmp,Nint,N_st,sze)
|
||||
|
||||
File: :file:`u0_h_u0.irp.f`
|
||||
|
||||
Computes e_0 = <u_0|H|u_0>/<u_0|u_0>
|
||||
|
||||
n : number of determinants
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: u_0_h_u_0_bielec
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine u_0_H_u_0_bielec(e_0,u_0,n,keys_tmp,Nint,N_st,sze)
|
||||
|
||||
File: :file:`u0_wee_u0.irp.f`
|
||||
|
||||
Computes e_0 = <u_0|H|u_0>/<u_0|u_0>
|
||||
|
||||
n : number of determinants
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_get_n_states_diag
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function zmq_get_N_states_diag(zmq_to_qp_run_socket, worker_id)
|
||||
|
||||
File: :file:`davidson_parallel.irp.f`
|
||||
|
||||
Get N_states_diag from the qp_run scheduler
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_put_n_states_diag
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function zmq_put_N_states_diag(zmq_to_qp_run_socket,worker_id)
|
||||
|
||||
File: :file:`davidson_parallel.irp.f`
|
||||
|
||||
Put N_states_diag on the qp_run scheduler
|
||||
|
||||
|
@ -1,13 +0,0 @@
|
||||
.. _davidson_dressed:
|
||||
|
||||
.. program:: davidson_dressed
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
================
|
||||
davidson_dressed
|
||||
================
|
||||
|
||||
Davidson with single-column dressing.
|
||||
|
||||
|
@ -1,45 +0,0 @@
|
||||
.. _davidson_undressed:
|
||||
|
||||
.. program:: davidson_undressed
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
==================
|
||||
davidson_undressed
|
||||
==================
|
||||
|
||||
Module for main files Davidson's algorithm with no dressing.
|
||||
|
||||
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
||||
|
||||
.. c:var:: dressing_column_h
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: dressing_column_h (N_det,N_states)
|
||||
double precision, allocatable :: dressing_column_s (N_det,N_states)
|
||||
|
||||
File: :file:`null_dressing_vector.irp.f`
|
||||
|
||||
Null dressing vectors
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: dressing_column_s
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: dressing_column_h (N_det,N_states)
|
||||
double precision, allocatable :: dressing_column_s (N_det,N_states)
|
||||
|
||||
File: :file:`null_dressing_vector.irp.f`
|
||||
|
||||
Null dressing vectors
|
||||
|
||||
|
@ -1,119 +0,0 @@
|
||||
.. _density_for_dft:
|
||||
|
||||
.. program:: density_for_dft
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
===============
|
||||
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:
|
||||
|
||||
* 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`
|
||||
|
||||
|
||||
|
||||
|
||||
EZFIO parameters
|
||||
----------------
|
||||
|
||||
.. option:: density_for_dft
|
||||
|
||||
Type of density used for DFT calculation. If set to WFT , it uses the density of the wave function stored in (psi_det,psi_coef). If set to input_density it uses the one-body dm stored in aux_quantities/ . If set to damping_rs_dft it uses the damped density between WFT and input_density. In the ks_scf and rs_ks_scf programs, it is set to WFT.
|
||||
|
||||
Default: WFT
|
||||
|
||||
.. option:: damping_for_rs_dft
|
||||
|
||||
damping factor for the density used in RSFT.
|
||||
|
||||
Default: 0.5
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
||||
|
||||
.. c:var:: one_body_dm_alpha_ao_for_dft
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: one_body_dm_alpha_ao_for_dft (ao_num,ao_num,N_states)
|
||||
double precision, allocatable :: one_body_dm_beta_ao_for_dft (ao_num,ao_num,N_states)
|
||||
|
||||
File: :file:`density_for_dft.irp.f`
|
||||
|
||||
one body density matrix on the AO basis based on one_body_dm_mo_alpha_for_dft
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: one_body_dm_average_mo_for_dft
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: one_body_dm_average_mo_for_dft (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`density_for_dft.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: one_body_dm_beta_ao_for_dft
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: one_body_dm_alpha_ao_for_dft (ao_num,ao_num,N_states)
|
||||
double precision, allocatable :: one_body_dm_beta_ao_for_dft (ao_num,ao_num,N_states)
|
||||
|
||||
File: :file:`density_for_dft.irp.f`
|
||||
|
||||
one body density matrix on the AO basis based on one_body_dm_mo_alpha_for_dft
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: one_body_dm_mo_alpha_for_dft
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: one_body_dm_mo_alpha_for_dft (mo_tot_num,mo_tot_num,N_states)
|
||||
|
||||
File: :file:`density_for_dft.irp.f`
|
||||
|
||||
density matrix for alpha electrons in the MO basis used for all DFT calculations based on the density
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: one_body_dm_mo_beta_for_dft
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: one_body_dm_mo_beta_for_dft (mo_tot_num,mo_tot_num,N_states)
|
||||
|
||||
File: :file:`density_for_dft.irp.f`
|
||||
|
||||
density matrix for beta electrons in the MO basis used for all DFT calculations based on the density
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: one_body_dm_mo_for_dft
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: one_body_dm_mo_for_dft (mo_tot_num,mo_tot_num,N_states)
|
||||
|
||||
File: :file:`density_for_dft.irp.f`
|
||||
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,59 +0,0 @@
|
||||
.. _dft_keywords:
|
||||
|
||||
.. program:: dft_keywords
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
============
|
||||
dft_keywords
|
||||
============
|
||||
|
||||
This module contains the main keywords related to a DFT calculation or RS-DFT calculation, such as:
|
||||
|
||||
* :option:`dft_keywords exchange_functional`
|
||||
* :option:`dft_keywords correlation_functional`
|
||||
* :option:`dft_keywords HF_exchange` : only relevent for the :c:func:`rs_ks_scf` program
|
||||
|
||||
The keyword for the **range separation parameter** :math:`\mu` is the :option:`ao_two_e_erf_integrals mu_erf` keyword.
|
||||
|
||||
The keyword for the type of density used in RS-DFT calculation with a multi-configurational wave function is the :option:`density_for_dft density_for_dft` keyword.
|
||||
|
||||
|
||||
|
||||
EZFIO parameters
|
||||
----------------
|
||||
|
||||
.. option:: exchange_functional
|
||||
|
||||
name of the exchange functional
|
||||
|
||||
Default: short_range_LDA
|
||||
|
||||
.. option:: correlation_functional
|
||||
|
||||
name of the correlation functional
|
||||
|
||||
Default: short_range_LDA
|
||||
|
||||
.. option:: HF_exchange
|
||||
|
||||
Percentage of HF exchange in the DFT model
|
||||
|
||||
Default: 0.
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
||||
|
||||
.. c:var:: dft_type
|
||||
|
||||
.. code:: text
|
||||
|
||||
character*(32) :: dft_type
|
||||
|
||||
File: :file:`keywords.irp.f`
|
||||
|
||||
defines the type of DFT applied: LDA, GGA etc ...
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,36 +0,0 @@
|
||||
.. _dressing:
|
||||
|
||||
.. program:: dressing
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
=========
|
||||
dress_zmq
|
||||
=========
|
||||
|
||||
Module to facilitate the construction of modules using dressed
|
||||
Hamiltonians, parallelized with |ZeroMQ|.
|
||||
|
||||
|
||||
|
||||
|
||||
EZFIO parameters
|
||||
----------------
|
||||
|
||||
.. option:: thresh_dressed_ci
|
||||
|
||||
Threshold on the convergence of the dressed |CI| energy
|
||||
|
||||
Default: 1.e-5
|
||||
|
||||
.. option:: n_it_max_dressed_ci
|
||||
|
||||
Maximum number of dressed |CI| iterations
|
||||
|
||||
Default: 10
|
||||
|
||||
.. option:: dress_relative_error
|
||||
|
||||
Stop stochastic dressing when the relative error is smaller than :option:`perturbation PT2_relative_error`
|
||||
|
||||
Default: 0.001
|
@ -1,76 +0,0 @@
|
||||
.. _electrons:
|
||||
|
||||
.. program:: electrons
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
=========
|
||||
electrons
|
||||
=========
|
||||
|
||||
Describes the electrons. For the moment, only the number of alpha
|
||||
and beta electrons are provided by this module.
|
||||
|
||||
|
||||
Assumptions
|
||||
===========
|
||||
|
||||
* `elec_num` >= 0
|
||||
* `elec_alpha_num` >= 0
|
||||
* `elec_beta_num` >= 0
|
||||
* `elec_alpha_num` >= `elec_beta_num`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
EZFIO parameters
|
||||
----------------
|
||||
|
||||
.. option:: elec_alpha_num
|
||||
|
||||
Numbers of electrons alpha ("up")
|
||||
|
||||
|
||||
.. option:: elec_beta_num
|
||||
|
||||
Numbers of electrons beta ("down")
|
||||
|
||||
|
||||
.. option:: elec_num
|
||||
|
||||
Numbers total of electrons (alpha + beta)
|
||||
|
||||
Default: = electrons.elec_alpha_num + electrons.elec_beta_num
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
||||
|
||||
.. c:var:: elec_num
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: elec_num
|
||||
integer, allocatable :: elec_num_tab (2)
|
||||
|
||||
File: :file:`electrons.irp.f`
|
||||
|
||||
Numbers of alpha ("up") , beta ("down") and total electrons
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: elec_num_tab
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: elec_num
|
||||
integer, allocatable :: elec_num_tab (2)
|
||||
|
||||
File: :file:`electrons.irp.f`
|
||||
|
||||
Numbers of alpha ("up") , beta ("down") and total electrons
|
||||
|
||||
|
@ -1,151 +0,0 @@
|
||||
.. _ezfio_files:
|
||||
|
||||
.. program:: ezfio_files
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
===========
|
||||
ezfio_files
|
||||
===========
|
||||
|
||||
This modules essentially contains the name of the |EZFIO| directory in the
|
||||
:c:data:`ezfio_filename` variable. This is read as the first argument of the
|
||||
command-line, or as the :envvar:`QP_INPUT` environment variable.
|
||||
|
||||
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
||||
|
||||
.. c:var:: ezfio_filename
|
||||
|
||||
.. code:: text
|
||||
|
||||
character*(128) :: ezfio_filename
|
||||
|
||||
File: :file:`ezfio.irp.f`
|
||||
|
||||
Name of EZFIO file. It is obtained from the QPACKAGE_INPUT environment variable if it is set, or as the 1st argument of the command line.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: ezfio_work_dir
|
||||
|
||||
.. code:: text
|
||||
|
||||
character*(128) :: ezfio_work_dir
|
||||
|
||||
File: :file:`ezfio.irp.f`
|
||||
|
||||
EZFIO/work/
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: output_cpu_time_0
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: output_wall_time_0
|
||||
double precision :: output_cpu_time_0
|
||||
|
||||
File: :file:`output.irp.f`
|
||||
|
||||
Initial CPU and wall times when printing in the output files
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: output_wall_time_0
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: output_wall_time_0
|
||||
double precision :: output_cpu_time_0
|
||||
|
||||
File: :file:`output.irp.f`
|
||||
|
||||
Initial CPU and wall times when printing in the output files
|
||||
|
||||
|
||||
|
||||
|
||||
Subroutines / functions
|
||||
-----------------------
|
||||
|
||||
|
||||
|
||||
.. c:function:: getunitandopen
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function getUnitAndOpen(f,mode)
|
||||
|
||||
File: :file:`get_unit_and_open.irp.f`
|
||||
|
||||
:f: file name
|
||||
|
||||
:mode: 'R' : READ, UNFORMATTED 'W' : WRITE, UNFORMATTED 'r' : READ, FORMATTED 'w' : WRITE, FORMATTED 'a' : APPEND, FORMATTED 'x' : READ/WRITE, FORMATTED
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: write_bool
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine write_bool(iunit,value,label)
|
||||
|
||||
File: :file:`output.irp.f`
|
||||
|
||||
Write an logical value in output
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: write_double
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine write_double(iunit,value,label)
|
||||
|
||||
File: :file:`output.irp.f`
|
||||
|
||||
Write a double precision value in output
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: write_int
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine write_int(iunit,value,label)
|
||||
|
||||
File: :file:`output.irp.f`
|
||||
|
||||
Write an integer value in output
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: write_time
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine write_time(iunit)
|
||||
|
||||
File: :file:`output.irp.f`
|
||||
|
||||
Write a time stamp in the output for chronological reconstruction
|
||||
|
||||
|
@ -1,921 +0,0 @@
|
||||
.. _fci:
|
||||
|
||||
.. program:: fci
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
===
|
||||
fci
|
||||
===
|
||||
|
||||
Selected Full Configuration Interaction.
|
||||
|
||||
The :command:`FCI` program starts with a single determinant, or with the wave
|
||||
function in the |EZFIO| database if :option:`determinants read_wf` is |true|.
|
||||
Then, it will iteratively:
|
||||
|
||||
* Select the most important determinants from the external space and add them to the
|
||||
internal space
|
||||
* If :option:`determinants s2_eig` is |true|, add all the necessary
|
||||
determinants to allow the eigenstates of |H| to be eigenstates of |S^2|
|
||||
* Diagonalize |H| in the enlarged internal space
|
||||
* Compute (stochastically) the second-order perturbative contribution to the energy
|
||||
* Extrapolate the variational energy by fitting
|
||||
:math:`E=E_\text{FCI} - \alpha\, E_\text{PT2}`
|
||||
|
||||
|
||||
The number of selected determinants at each iteration will be such that the
|
||||
size of the wave function will double at every iteration. If :option:`determinants
|
||||
s2_eig` is |true|, then the number of selected determinants will be 1.5x the
|
||||
current number, and then all the additional determinants will be added.
|
||||
|
||||
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.
|
||||
|
||||
|
||||
|
||||
Computation of the |PT2| energy
|
||||
-------------------------------
|
||||
|
||||
At each iteration, the |PT2| energy is computed considering the Epstein-Nesbet
|
||||
zeroth-order Hamiltonian:
|
||||
|
||||
.. math::
|
||||
|
||||
E_{\text{PT2}} = \sum_{ \alpha }
|
||||
\frac{|\langle \Psi_S | \hat{H} | \alpha \rangle|^2}
|
||||
{E - \langle \alpha | \hat{H} | \alpha \rangle}
|
||||
|
||||
where the |kalpha| determinants are generated by applying all the single and
|
||||
double excitation operators to all the determinants of the wave function
|
||||
:math:`\Psi_G`.
|
||||
|
||||
When the hybrid-deterministic/stochastic algorithm is chosen
|
||||
(default), :math:`Psi_G = \Psi_S = \Psi`, the full wavefunction expanded in the
|
||||
internal space.
|
||||
When the deterministic algorithm is chosen (:option:`perturbation do_pt2`
|
||||
is set to |false|), :math:`Psi_G` is a truncation of |Psi| using
|
||||
:option:`determinants threshold_generators`, and :math:`Psi_S` is a truncation
|
||||
of |Psi| using :option:`determinants threshold_selectors`, and re-weighted
|
||||
by :math:`1/\langle \Psi_s | \Psi_s \rangle`.
|
||||
|
||||
At every iteration, while computing the |PT2|, the variance of the wave
|
||||
function is also computed:
|
||||
|
||||
.. math::
|
||||
|
||||
\sigma^2 & = \langle \Psi | \hat{H}^2 | \Psi \rangle -
|
||||
\langle \Psi | \hat{H} | \Psi \rangle^2 \\
|
||||
& = \sum_{i \in \text{FCI}}
|
||||
\langle \Psi | \hat{H} | i \rangle
|
||||
\langle i | \hat{H} | \Psi \rangle -
|
||||
\langle \Psi | \hat{H} | \Psi \rangle^2 \\
|
||||
& = \sum_{ \alpha }
|
||||
\langle |\Psi | \hat{H} | \alpha \rangle|^2.
|
||||
|
||||
The expression of the variance is the same as the expression of the |PT2|, with
|
||||
a denominator of 1. It measures how far the wave function is from the |FCI|
|
||||
solution. Note that the absence of denominator in the Heat-Bath selected |CI|
|
||||
method is selection method by minimization of the variance, whereas |CIPSI| is
|
||||
a selection method by minimization of the energy.
|
||||
|
||||
|
||||
If :option:`perturbation do_pt2` is set to |false|, then the stochastic
|
||||
|PT2| is not computed, and an approximate value is obtained from the |CIPSI|
|
||||
selection. The calculation is faster, but the extrapolated |FCI| value is
|
||||
less accurate. This way of running the code should be used when the only
|
||||
goal is to generate a wave function, as for using |CIPSI| wave functions as
|
||||
trial wave functions of |QMC| calculations for example.
|
||||
|
||||
|
||||
The :command:`PT2` program reads the wave function of the |EZFIO| database
|
||||
and computes the energy and the |PT2| contribution.
|
||||
|
||||
|
||||
State-averaging
|
||||
---------------
|
||||
|
||||
Extrapolated |FCI| energy
|
||||
-------------------------
|
||||
|
||||
An estimate of the |FCI| energy is computed by extrapolating
|
||||
|
||||
.. math::
|
||||
|
||||
E=E_\text{FCI} - \alpha\, E_\text{PT2}
|
||||
|
||||
This extrapolation is done for all the requested states, and excitation
|
||||
energies are printed as energy differences between the extrapolated
|
||||
energies of the excited states and the extrapolated energy of the ground
|
||||
state.
|
||||
|
||||
The extrapolations are given considering the 2 last points, the 3 last points, ...,
|
||||
the 7 last points. The extrapolated value should be chosen such that the extrpolated
|
||||
value is stable with the number of points.
|
||||
|
||||
|
||||
|
||||
|
||||
EZFIO parameters
|
||||
----------------
|
||||
|
||||
.. option:: energy
|
||||
|
||||
Calculated Selected |FCI| energy
|
||||
|
||||
|
||||
.. option:: energy_pt2
|
||||
|
||||
Calculated |FCI| energy + |PT2|
|
||||
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
||||
|
||||
.. c:var:: initialize_pt2_e0_denominator
|
||||
|
||||
.. code:: text
|
||||
|
||||
logical :: initialize_pt2_e0_denominator
|
||||
|
||||
File: :file:`energy.irp.f`
|
||||
|
||||
If true, initialize pt2_E0_denominator
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: pt2_cw
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: pt2_w (N_det_generators)
|
||||
double precision, allocatable :: pt2_cw (0:N_det_generators)
|
||||
double precision :: pt2_w_t
|
||||
double precision :: pt2_u_0
|
||||
integer, allocatable :: pt2_n_0 (pt2_N_teeth+1)
|
||||
|
||||
File: :file:`pt2_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: pt2_e0_denominator
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: pt2_e0_denominator (N_states)
|
||||
|
||||
File: :file:`energy.irp.f`
|
||||
|
||||
E0 in the denominator of the PT2
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: pt2_f
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: pt2_f (N_det_generators)
|
||||
integer :: pt2_n_tasks_max
|
||||
|
||||
File: :file:`pt2_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: pt2_j
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: pt2_j (N_det_generators)
|
||||
integer, allocatable :: pt2_r (N_det_generators)
|
||||
|
||||
File: :file:`pt2_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: pt2_mindetinfirstteeth
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: pt2_n_teeth
|
||||
integer :: pt2_mindetinfirstteeth
|
||||
|
||||
File: :file:`pt2_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: pt2_n_0
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: pt2_w (N_det_generators)
|
||||
double precision, allocatable :: pt2_cw (0:N_det_generators)
|
||||
double precision :: pt2_w_t
|
||||
double precision :: pt2_u_0
|
||||
integer, allocatable :: pt2_n_0 (pt2_N_teeth+1)
|
||||
|
||||
File: :file:`pt2_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: pt2_n_tasks
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: pt2_n_tasks
|
||||
|
||||
File: :file:`pt2_stoch_routines.irp.f`
|
||||
|
||||
Number of parallel tasks for the Monte Carlo
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: pt2_n_tasks_max
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: pt2_f (N_det_generators)
|
||||
integer :: pt2_n_tasks_max
|
||||
|
||||
File: :file:`pt2_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: pt2_n_teeth
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: pt2_n_teeth
|
||||
integer :: pt2_mindetinfirstteeth
|
||||
|
||||
File: :file:`pt2_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: pt2_r
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: pt2_j (N_det_generators)
|
||||
integer, allocatable :: pt2_r (N_det_generators)
|
||||
|
||||
File: :file:`pt2_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: pt2_stoch_istate
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: pt2_stoch_istate
|
||||
|
||||
File: :file:`pt2_stoch_routines.irp.f`
|
||||
|
||||
State for stochatsic PT2
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: pt2_u
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: pt2_u (N_det_generators)
|
||||
|
||||
File: :file:`pt2_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: pt2_u_0
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: pt2_w (N_det_generators)
|
||||
double precision, allocatable :: pt2_cw (0:N_det_generators)
|
||||
double precision :: pt2_w_t
|
||||
double precision :: pt2_u_0
|
||||
integer, allocatable :: pt2_n_0 (pt2_N_teeth+1)
|
||||
|
||||
File: :file:`pt2_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: pt2_w
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: pt2_w (N_det_generators)
|
||||
double precision, allocatable :: pt2_cw (0:N_det_generators)
|
||||
double precision :: pt2_w_t
|
||||
double precision :: pt2_u_0
|
||||
integer, allocatable :: pt2_n_0 (pt2_N_teeth+1)
|
||||
|
||||
File: :file:`pt2_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: pt2_w_t
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: pt2_w (N_det_generators)
|
||||
double precision, allocatable :: pt2_cw (0:N_det_generators)
|
||||
double precision :: pt2_w_t
|
||||
double precision :: pt2_u_0
|
||||
integer, allocatable :: pt2_n_0 (pt2_N_teeth+1)
|
||||
|
||||
File: :file:`pt2_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Subroutines / functions
|
||||
-----------------------
|
||||
|
||||
|
||||
|
||||
.. c:function:: add_to_selection_buffer
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine add_to_selection_buffer(b, det, val)
|
||||
|
||||
File: :file:`selection_buffer.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: bitstring_to_list_in_selection
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine bitstring_to_list_in_selection( string, list, n_elements, Nint)
|
||||
|
||||
File: :file:`selection.irp.f`
|
||||
|
||||
Gives the inidices(+1) of the bits set to 1 in the bit string
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: create_selection_buffer
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine create_selection_buffer(N, siz_, res)
|
||||
|
||||
File: :file:`selection_buffer.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: delete_selection_buffer
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine delete_selection_buffer(b)
|
||||
|
||||
File: :file:`selection_buffer.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: fci
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine fci
|
||||
|
||||
File: :file:`fci.irp.f`
|
||||
|
||||
Selected Full Configuration Interaction.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: fill_buffer_double
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_diag_tmp, E0, pt2, variance, norm, mat, buf)
|
||||
|
||||
File: :file:`selection.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: get_d0
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine get_d0(gen, phasemask, bannedOrb, banned, mat, mask, h, p, sp, coefs)
|
||||
|
||||
File: :file:`selection.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: get_d1
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine get_d1(gen, phasemask, bannedOrb, banned, mat, mask, h, p, sp, coefs)
|
||||
|
||||
File: :file:`selection.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: get_d2
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine get_d2(gen, phasemask, bannedOrb, banned, mat, mask, h, p, sp, coefs)
|
||||
|
||||
File: :file:`selection.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: get_m0
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine get_m0(gen, phasemask, bannedOrb, vect, mask, h, p, sp, coefs)
|
||||
|
||||
File: :file:`selection.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: get_m1
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine get_m1(gen, phasemask, bannedOrb, vect, mask, h, p, sp, coefs)
|
||||
|
||||
File: :file:`selection.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: get_m2
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine get_m2(gen, phasemask, bannedOrb, vect, mask, h, p, sp, coefs)
|
||||
|
||||
File: :file:`selection.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: get_mask_phase
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine get_mask_phase(det1, pm, Nint)
|
||||
|
||||
File: :file:`selection.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: get_phase_bi
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision function get_phase_bi(phasemask, s1, s2, h1, p1, h2, p2, Nint)
|
||||
|
||||
File: :file:`selection.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: make_selection_buffer_s2
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine make_selection_buffer_s2(b)
|
||||
|
||||
File: :file:`selection_buffer.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: merge_selection_buffers
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine merge_selection_buffers(b1, b2)
|
||||
|
||||
File: :file:`selection_buffer.irp.f`
|
||||
|
||||
Merges the selection buffers b1 and b2 into b2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: past_d1
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine past_d1(bannedOrb, p)
|
||||
|
||||
File: :file:`selection.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: past_d2
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine past_d2(banned, p, sp)
|
||||
|
||||
File: :file:`selection.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: pt2
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine pt2
|
||||
|
||||
File: :file:`pt2.irp.f`
|
||||
|
||||
Second order perturbative correction to the wave function contained in the EZFIO directory.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: pt2_collector
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine pt2_collector(zmq_socket_pull, E, relative_error, pt2, error, variance, norm)
|
||||
|
||||
File: :file:`pt2_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: pt2_find_sample
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function pt2_find_sample(v, w)
|
||||
|
||||
File: :file:`pt2_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: pt2_find_sample_lr
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function pt2_find_sample_lr(v, w, l_in, r_in)
|
||||
|
||||
File: :file:`pt2_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: pt2_slave_inproc
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine pt2_slave_inproc(i)
|
||||
|
||||
File: :file:`pt2_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: pull_pt2_results
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine pull_pt2_results(zmq_socket_pull, index, pt2, variance, norm, task_id, n_tasks)
|
||||
|
||||
File: :file:`run_pt2_slave.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: pull_selection_results
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine pull_selection_results(zmq_socket_pull, pt2, variance, norm, val, det, N, task_id, ntask)
|
||||
|
||||
File: :file:`run_selection_slave.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: push_pt2_results
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine push_pt2_results(zmq_socket_push, index, pt2, variance, norm, task_id, n_tasks)
|
||||
|
||||
File: :file:`run_pt2_slave.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: push_selection_results
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine push_selection_results(zmq_socket_push, pt2, variance, norm, b, task_id, ntask)
|
||||
|
||||
File: :file:`run_selection_slave.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: run_pt2_slave
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine run_pt2_slave(thread,iproc,energy)
|
||||
|
||||
File: :file:`run_pt2_slave.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: run_selection_slave
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine run_selection_slave(thread,iproc,energy)
|
||||
|
||||
File: :file:`run_selection_slave.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: select_connected
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine select_connected(i_generator,E0,pt2,variance,norm,b,subset,csubset)
|
||||
|
||||
File: :file:`selection.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: select_singles_and_doubles
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine select_singles_and_doubles(i_generator,hole_mask,particle_mask,fock_diag_tmp,E0,pt2,variance,norm,buf,subset,csubset)
|
||||
|
||||
File: :file:`selection.irp.f`
|
||||
|
||||
WARNING /!\ : It is assumed that the generators and selectors are psi_det_sorted
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: selection_collector
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine selection_collector(zmq_socket_pull, b, N, pt2, variance, norm)
|
||||
|
||||
File: :file:`zmq_selection.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: selection_slave_inproc
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine selection_slave_inproc(i)
|
||||
|
||||
File: :file:`zmq_selection.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: sort_selection_buffer
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine sort_selection_buffer(b)
|
||||
|
||||
File: :file:`selection_buffer.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: splash_pq
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine splash_pq(mask, sp, det, i_gen, N_sel, bannedOrb, banned, mat, interesting)
|
||||
|
||||
File: :file:`selection.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: spot_isinwf
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine spot_isinwf(mask, det, i_gen, N, banned, fullMatch, interesting)
|
||||
|
||||
File: :file:`selection.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: testteethbuilding
|
||||
|
||||
.. code:: text
|
||||
|
||||
logical function testTeethBuilding(minF, N)
|
||||
|
||||
File: :file:`pt2_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_pt2
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine ZMQ_pt2(E, pt2,relative_error, error, variance, norm)
|
||||
|
||||
File: :file:`pt2_stoch_routines.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_selection
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine ZMQ_selection(N_in, pt2, variance, norm)
|
||||
|
||||
File: :file:`zmq_selection.irp.f`
|
||||
|
||||
|
||||
|
||||
|
@ -1,19 +0,0 @@
|
||||
.. _generators_cas:
|
||||
|
||||
.. program:: generators_cas
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
==============
|
||||
generators_cas
|
||||
==============
|
||||
|
||||
Module defining the generator determinants as those belonging to a |CAS|.
|
||||
The |MOs| belonging to the |CAS| are those which were set as active with
|
||||
the :ref:`qp_set_mo_class` command.
|
||||
|
||||
This module is intended to be included in the :file:`NEED` file to define
|
||||
the generators as the |CAS| determinants, which can be useful to define post-CAS approaches (see cassd module for instance).
|
||||
|
||||
|
||||
|
@ -1,78 +0,0 @@
|
||||
.. _generators_full:
|
||||
|
||||
.. program:: generators_full
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
===============
|
||||
generators_full
|
||||
===============
|
||||
|
||||
Module defining the generator determinants as all the determinants of the
|
||||
variational space.
|
||||
|
||||
This module is intended to be included in the :file:`NEED` file to define
|
||||
a full set of generators.
|
||||
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
||||
|
||||
.. c:var:: degree_max_generators
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: degree_max_generators
|
||||
|
||||
File: :file:`generators.irp.f`
|
||||
|
||||
Max degree of excitation (respect to HF) of the generators
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: psi_coef_sorted_gen
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer(bit_kind), allocatable :: psi_det_sorted_gen (N_int,2,psi_det_size)
|
||||
double precision, allocatable :: psi_coef_sorted_gen (psi_det_size,N_states)
|
||||
integer, allocatable :: psi_det_sorted_gen_order (psi_det_size)
|
||||
|
||||
File: :file:`generators.irp.f`
|
||||
|
||||
For Single reference wave functions, the generator is the Hartree-Fock determinant
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: psi_det_sorted_gen
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer(bit_kind), allocatable :: psi_det_sorted_gen (N_int,2,psi_det_size)
|
||||
double precision, allocatable :: psi_coef_sorted_gen (psi_det_size,N_states)
|
||||
integer, allocatable :: psi_det_sorted_gen_order (psi_det_size)
|
||||
|
||||
File: :file:`generators.irp.f`
|
||||
|
||||
For Single reference wave functions, the generator is the Hartree-Fock determinant
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: psi_det_sorted_gen_order
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer(bit_kind), allocatable :: psi_det_sorted_gen (N_int,2,psi_det_size)
|
||||
double precision, allocatable :: psi_coef_sorted_gen (psi_det_size,N_states)
|
||||
integer, allocatable :: psi_det_sorted_gen_order (psi_det_size)
|
||||
|
||||
File: :file:`generators.irp.f`
|
||||
|
||||
For Single reference wave functions, the generator is the Hartree-Fock determinant
|
||||
|
||||
|
@ -1,227 +0,0 @@
|
||||
.. _hartree_fock:
|
||||
|
||||
.. program:: hartree_fock
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
============
|
||||
hartree_fock
|
||||
============
|
||||
|
||||
|
||||
The Hartree-Fock module performs *Restricted* Hartree-Fock calculations (the
|
||||
spatial part of the |MOs| is common for alpha and beta spinorbitals).
|
||||
|
||||
The Hartree-Fock in an SCF and therefore is based on the ``scf_utils`` structure.
|
||||
It performs the following actions:
|
||||
|
||||
#. Compute/Read all the one- and two-electron integrals, and store them in memory
|
||||
|
||||
#. Check in the |EZFIO| database if there is a set of |MOs|. If there is, it
|
||||
will read them as initial guess. Otherwise, it will create a guess.
|
||||
#. Perform the |SCF| iterations
|
||||
|
||||
The definition of the Fock matrix is in :file:`hartree_fock fock_matrix_hf.irp.f`
|
||||
For the keywords related to the |SCF| procedure, see the ``scf_utils`` directory where you will find all options.
|
||||
The main are:
|
||||
|
||||
# :option:`scf_utils thresh_scf`
|
||||
|
||||
# :option:`scf_utils level_shift`
|
||||
|
||||
At each iteration, the |MOs| are saved in the |EZFIO| database. Hence, if the calculation
|
||||
crashes for any unexpected reason, the calculation can be restarted by running again
|
||||
the |SCF| with the same |EZFIO| database.
|
||||
|
||||
The `DIIS`_ algorithm is implemented, as well as the `level-shifting`_ method.
|
||||
If the |SCF| does not converge, try again with a higher value of :option:`level_shift`.
|
||||
|
||||
To start a calculation from scratch, the simplest way is to remove the
|
||||
``mo_basis`` directory from the |EZFIO| database, and run the |SCF| again.
|
||||
|
||||
|
||||
|
||||
|
||||
.. _DIIS: https://en.wikipedia.org/w/index.php?title=DIIS
|
||||
.. _level-shifting: https://doi.org/10.1002/qua.560070407
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
EZFIO parameters
|
||||
----------------
|
||||
|
||||
.. option:: energy
|
||||
|
||||
Energy HF
|
||||
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
||||
|
||||
.. c:var:: ao_bi_elec_integral_alpha
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: ao_bi_elec_integral_alpha (ao_num,ao_num)
|
||||
double precision, allocatable :: ao_bi_elec_integral_beta (ao_num,ao_num)
|
||||
|
||||
File: :file:`fock_matrix_hf.irp.f`
|
||||
|
||||
Alpha Fock matrix in AO basis set
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: ao_bi_elec_integral_beta
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: ao_bi_elec_integral_alpha (ao_num,ao_num)
|
||||
double precision, allocatable :: ao_bi_elec_integral_beta (ao_num,ao_num)
|
||||
|
||||
File: :file:`fock_matrix_hf.irp.f`
|
||||
|
||||
Alpha Fock matrix in AO basis set
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: extra_e_contrib_density
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: extra_e_contrib_density
|
||||
|
||||
File: :file:`hf_energy.irp.f`
|
||||
|
||||
Extra contribution to the SCF energy coming from the density.
|
||||
|
||||
For a Hartree-Fock calculation: extra_e_contrib_density = 0
|
||||
|
||||
For a Kohn-Sham or Range-separated Kohn-Sham: the exchange/correlation - trace of the V_xc potential
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: fock_matrix_ao_alpha
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: fock_matrix_ao_alpha (ao_num,ao_num)
|
||||
double precision, allocatable :: fock_matrix_ao_beta (ao_num,ao_num)
|
||||
|
||||
File: :file:`fock_matrix_hf.irp.f`
|
||||
|
||||
Alpha Fock matrix in AO basis set
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: fock_matrix_ao_beta
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: fock_matrix_ao_alpha (ao_num,ao_num)
|
||||
double precision, allocatable :: fock_matrix_ao_beta (ao_num,ao_num)
|
||||
|
||||
File: :file:`fock_matrix_hf.irp.f`
|
||||
|
||||
Alpha Fock matrix in AO basis set
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: hf_energy
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: hf_energy
|
||||
double precision :: hf_two_electron_energy
|
||||
double precision :: hf_one_electron_energy
|
||||
|
||||
File: :file:`hf_energy.irp.f`
|
||||
|
||||
Hartree-Fock energy containing the nuclear repulsion, and its one- and two-body components.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: hf_one_electron_energy
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: hf_energy
|
||||
double precision :: hf_two_electron_energy
|
||||
double precision :: hf_one_electron_energy
|
||||
|
||||
File: :file:`hf_energy.irp.f`
|
||||
|
||||
Hartree-Fock energy containing the nuclear repulsion, and its one- and two-body components.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: hf_two_electron_energy
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: hf_energy
|
||||
double precision :: hf_two_electron_energy
|
||||
double precision :: hf_one_electron_energy
|
||||
|
||||
File: :file:`hf_energy.irp.f`
|
||||
|
||||
Hartree-Fock energy containing the nuclear repulsion, and its one- and two-body components.
|
||||
|
||||
|
||||
|
||||
|
||||
Subroutines / functions
|
||||
-----------------------
|
||||
|
||||
|
||||
|
||||
.. c:function:: create_guess
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine create_guess
|
||||
|
||||
File: :file:`scf_old.irp.f`
|
||||
|
||||
Create a MO guess if no MOs are present in the EZFIO directory
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: run
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine run
|
||||
|
||||
File: :file:`scf_old.irp.f`
|
||||
|
||||
Run SCF calculation
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: scf
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine scf
|
||||
|
||||
File: :file:`scf_old.irp.f`
|
||||
|
||||
Produce `Hartree_Fock` MO orbital output: mo_basis.mo_tot_num mo_basis.mo_label mo_basis.ao_md5 mo_basis.mo_coef mo_basis.mo_occ output: hartree_fock.energy optional: mo_basis.mo_coef
|
||||
|
||||
|
@ -1,114 +0,0 @@
|
||||
.. _iterations:
|
||||
|
||||
.. program:: iterations
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
==========
|
||||
iterations
|
||||
==========
|
||||
|
||||
Module which saves the computed energies for an extrapolation to
|
||||
the |FCI| limit.
|
||||
|
||||
|
||||
|
||||
EZFIO parameters
|
||||
----------------
|
||||
|
||||
.. option:: n_iter
|
||||
|
||||
Number of saved iterations
|
||||
|
||||
Default: 1
|
||||
|
||||
.. option:: n_det_iterations
|
||||
|
||||
Number of determinants at each iteration
|
||||
|
||||
|
||||
.. option:: energy_iterations
|
||||
|
||||
The variational energy at each iteration
|
||||
|
||||
|
||||
.. option:: pt2_iterations
|
||||
|
||||
The |PT2| correction at each iteration
|
||||
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
||||
|
||||
.. c:var:: extrapolated_energy
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: extrapolated_energy (N_iter,N_states)
|
||||
|
||||
File: :file:`iterations.irp.f`
|
||||
|
||||
Extrapolated energy, using E_var = f(PT2) where PT2=0
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: n_iter
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: n_iter
|
||||
|
||||
File: :file:`io.irp.f`
|
||||
|
||||
number of iterations
|
||||
|
||||
|
||||
|
||||
|
||||
Subroutines / functions
|
||||
-----------------------
|
||||
|
||||
|
||||
|
||||
.. c:function:: print_extrapolated_energy
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine print_extrapolated_energy(e_,pt2_)
|
||||
|
||||
File: :file:`print_extrapolation.irp.f`
|
||||
|
||||
Print the extrapolated energy in the output
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: print_summary
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine print_summary(e_,pt2_,error_,variance_,norm_)
|
||||
|
||||
File: :file:`print_summary.irp.f`
|
||||
|
||||
Print the extrapolated energy in the output
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: save_iterations
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine save_iterations(e_, pt2_,n_)
|
||||
|
||||
File: :file:`iterations.irp.f`
|
||||
|
||||
Update the energy in the EZFIO file.
|
||||
|
||||
|
@ -1,251 +0,0 @@
|
||||
.. _kohn_sham:
|
||||
|
||||
.. program:: kohn_sham
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
=========
|
||||
kohn_sham
|
||||
=========
|
||||
|
||||
|
||||
The Kohn-Sham module performs *Restricted* Kohn-Sham calculations (the
|
||||
spatial part of the |MOs| is common for alpha and beta spinorbitals).
|
||||
|
||||
The Kohn-Sham in an SCF and therefore is based on the ``scf_utils`` structure.
|
||||
It performs the following actions:
|
||||
|
||||
#. Compute/Read all the one- and two-electron integrals, and store them in memory
|
||||
#. Check in the |EZFIO| database if there is a set of |MOs|. If there is, it
|
||||
will read them as initial guess. Otherwise, it will create a guess.
|
||||
#. Perform the |SCF| iterations
|
||||
|
||||
The definition of the Fock matrix is in :file:`kohn_sham fock_matrix_ks.irp.f`
|
||||
For the keywords related to the |SCF| procedure, see the ``scf_utils`` directory where you will find all options.
|
||||
The main are:
|
||||
|
||||
#. :option:`scf_utils thresh_scf`
|
||||
#. :option:`scf_utils level_shift`
|
||||
|
||||
At each iteration, the |MOs| are saved in the |EZFIO| database. Hence, if the calculation
|
||||
crashes for any unexpected reason, the calculation can be restarted by running again
|
||||
the |SCF| with the same |EZFIO| database.
|
||||
|
||||
The `DIIS`_ algorithm is implemented, as well as the `level-shifting`_ method.
|
||||
If the |SCF| does not converge, try again with a higher value of :option:`level_shift`.
|
||||
|
||||
To start a calculation from scratch, the simplest way is to remove the
|
||||
``mo_basis`` directory from the |EZFIO| database, and run the |SCF| again.
|
||||
|
||||
|
||||
|
||||
|
||||
.. _DIIS: https://en.wikipedia.org/w/index.php?title=DIIS
|
||||
.. _level-shifting: https://doi.org/10.1002/qua.560070407
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
||||
|
||||
.. c:var:: ao_potential_alpha_xc
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: ao_potential_alpha_xc (ao_num,ao_num)
|
||||
double precision, allocatable :: ao_potential_beta_xc (ao_num,ao_num)
|
||||
|
||||
File: :file:`pot_functionals.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: ao_potential_beta_xc
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: ao_potential_alpha_xc (ao_num,ao_num)
|
||||
double precision, allocatable :: ao_potential_beta_xc (ao_num,ao_num)
|
||||
|
||||
File: :file:`pot_functionals.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: e_correlation_dft
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: e_correlation_dft
|
||||
|
||||
File: :file:`pot_functionals.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: e_exchange_dft
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: e_exchange_dft
|
||||
|
||||
File: :file:`pot_functionals.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: fock_matrix_alpha_no_xc_ao
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: fock_matrix_alpha_no_xc_ao (ao_num,ao_num)
|
||||
double precision, allocatable :: fock_matrix_beta_no_xc_ao (ao_num,ao_num)
|
||||
|
||||
File: :file:`fock_matrix_ks.irp.f`
|
||||
|
||||
Mono electronic an Coulomb matrix in ao basis set
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: fock_matrix_beta_no_xc_ao
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: fock_matrix_alpha_no_xc_ao (ao_num,ao_num)
|
||||
double precision, allocatable :: fock_matrix_beta_no_xc_ao (ao_num,ao_num)
|
||||
|
||||
File: :file:`fock_matrix_ks.irp.f`
|
||||
|
||||
Mono electronic an Coulomb matrix in ao basis set
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: fock_matrix_energy
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: ks_energy
|
||||
double precision :: two_electron_energy
|
||||
double precision :: one_electron_energy
|
||||
double precision :: fock_matrix_energy
|
||||
double precision :: trace_potential_xc
|
||||
|
||||
File: :file:`ks_enery.irp.f`
|
||||
|
||||
Kohn-Sham energy containing the nuclear repulsion energy, and the various components of this quantity.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: ks_energy
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: ks_energy
|
||||
double precision :: two_electron_energy
|
||||
double precision :: one_electron_energy
|
||||
double precision :: fock_matrix_energy
|
||||
double precision :: trace_potential_xc
|
||||
|
||||
File: :file:`ks_enery.irp.f`
|
||||
|
||||
Kohn-Sham energy containing the nuclear repulsion energy, and the various components of this quantity.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: one_electron_energy
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: ks_energy
|
||||
double precision :: two_electron_energy
|
||||
double precision :: one_electron_energy
|
||||
double precision :: fock_matrix_energy
|
||||
double precision :: trace_potential_xc
|
||||
|
||||
File: :file:`ks_enery.irp.f`
|
||||
|
||||
Kohn-Sham energy containing the nuclear repulsion energy, and the various components of this quantity.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: trace_potential_xc
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: ks_energy
|
||||
double precision :: two_electron_energy
|
||||
double precision :: one_electron_energy
|
||||
double precision :: fock_matrix_energy
|
||||
double precision :: trace_potential_xc
|
||||
|
||||
File: :file:`ks_enery.irp.f`
|
||||
|
||||
Kohn-Sham energy containing the nuclear repulsion energy, and the various components of this quantity.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: two_electron_energy
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: ks_energy
|
||||
double precision :: two_electron_energy
|
||||
double precision :: one_electron_energy
|
||||
double precision :: fock_matrix_energy
|
||||
double precision :: trace_potential_xc
|
||||
|
||||
File: :file:`ks_enery.irp.f`
|
||||
|
||||
Kohn-Sham energy containing the nuclear repulsion energy, and the various components of this quantity.
|
||||
|
||||
|
||||
|
||||
|
||||
Subroutines / functions
|
||||
-----------------------
|
||||
|
||||
|
||||
|
||||
.. c:function:: check_coherence_functional
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine check_coherence_functional
|
||||
|
||||
File: :file:`ks_scf.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: srs_ks_cf
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine srs_ks_cf
|
||||
|
||||
File: :file:`ks_scf.irp.f`
|
||||
|
||||
Produce `Kohn_Sham` MO orbital output: mo_basis.mo_tot_num mo_basis.mo_label mo_basis.ao_md5 mo_basis.mo_coef mo_basis.mo_occ output: kohn_sham.energy optional: mo_basis.mo_coef
|
||||
|
||||
|
@ -1,95 +0,0 @@
|
||||
.. _kohn_sham_rs:
|
||||
|
||||
.. program:: kohn_sham_rs
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
============
|
||||
kohn_sham_rs
|
||||
============
|
||||
|
||||
|
||||
The Range-separated Kohn-Sham module performs *Restricted* Kohn-Sham calculations (the
|
||||
spatial part of the |MOs| is common for alpha and beta spinorbitals) where the coulomb interaction is partially treated using exact exchange.
|
||||
The splitting of the interaction between long- and short-range is determined by the range-separation parameter :option:`ao_two_e_erf_integrals mu_erf`. The long-range part of the interaction is explicitly treated with exact exchange, and the short-range part of the interaction is treated with appropriate DFT functionals.
|
||||
|
||||
The Range-separated Kohn-Sham in an SCF and therefore is based on the ``scf_utils`` structure.
|
||||
It performs the following actions:
|
||||
|
||||
#. Compute/Read all the one- and two-electron integrals, and store them in memory
|
||||
#. Check in the |EZFIO| database if there is a set of |MOs|. If there is, it
|
||||
will read them as initial guess. Otherwise, it will create a guess.
|
||||
#. Perform the |SCF| iterations
|
||||
|
||||
The definition of the Fock matrix is in :file:`kohn_sham_rs fock_matrix_rs_ks.irp.f`
|
||||
For the keywords related to the |SCF| procedure, see the ``scf_utils`` directory where you will find all options.
|
||||
The main are:
|
||||
# :option:`scf_utils thresh_scf`
|
||||
# :option:`scf_utils level_shift`
|
||||
|
||||
|
||||
At each iteration, the |MOs| are saved in the |EZFIO| database. Hence, if the calculation
|
||||
crashes for any unexpected reason, the calculation can be restarted by running again
|
||||
the |SCF| with the same |EZFIO| database.
|
||||
|
||||
The `DIIS`_ algorithm is implemented, as well as the `level-shifting`_ method.
|
||||
If the |SCF| does not converge, try again with a higher value of :option:`level_shift`.
|
||||
|
||||
To start a calculation from scratch, the simplest way is to remove the
|
||||
``mo_basis`` directory from the |EZFIO| database, and run the |SCF| again.
|
||||
|
||||
|
||||
.. _DIIS: https://en.wikipedia.org/w/index.php?title=DIIS
|
||||
.. _level-shifting: https://doi.org/10.1002/qua.560070407
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
EZFIO parameters
|
||||
----------------
|
||||
|
||||
.. option:: energy
|
||||
|
||||
Energy range separated hybrid
|
||||
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
||||
|
||||
.. c:var:: rs_ks_energy
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: rs_ks_energy
|
||||
double precision :: two_electron_energy
|
||||
double precision :: one_electron_energy
|
||||
double precision :: fock_matrix_energy
|
||||
double precision :: trace_potential_xc
|
||||
|
||||
File: :file:`rs_ks_energy.irp.f`
|
||||
|
||||
Range-separated Kohn-Sham energy containing the nuclear repulsion energy, and the various components of this quantity.
|
||||
|
||||
|
||||
|
||||
|
||||
Subroutines / functions
|
||||
-----------------------
|
||||
|
||||
|
||||
|
||||
.. c:function:: rs_ks_scf
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine rs_ks_scf
|
||||
|
||||
File: :file:`rs_ks_scf.irp.f`
|
||||
|
||||
Produce `Range_separated_Kohn_Sham` MO orbital output: mo_basis.mo_tot_num mo_basis.mo_label mo_basis.ao_md5 mo_basis.mo_coef mo_basis.mo_occ output: kohn_sham.energy optional: mo_basis.mo_coef
|
||||
|
||||
|
@ -1,375 +0,0 @@
|
||||
.. _mo_basis:
|
||||
|
||||
.. program:: mo_basis
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
========
|
||||
mo_basis
|
||||
========
|
||||
|
||||
Molecular orbitals are expressed as
|
||||
|
||||
.. math::
|
||||
|
||||
\phi_k({\bf r}) = \sum_i C_{ik} \chi_k({\bf r})
|
||||
|
||||
|
||||
where :math:`\chi_k` are *normalized* atomic basis functions.
|
||||
|
||||
The current set of |MOs| has a label `mo_label`.
|
||||
When the orbitals are modified, the label should also be updated to keep
|
||||
everything consistent.
|
||||
|
||||
When saving the |MOs|, the :file:`mo_basis` directory of the |EZFIO| database
|
||||
is copied in the :file:`save` directory, named by the current `mo_label`. All
|
||||
this is done with the script named :file:`save_current_mos.sh` in the
|
||||
:file:`$QP_ROOT/scripts` directory.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
EZFIO parameters
|
||||
----------------
|
||||
|
||||
.. option:: mo_tot_num
|
||||
|
||||
Total number of |MOs|
|
||||
|
||||
|
||||
.. option:: mo_coef
|
||||
|
||||
Coefficient of the i-th |AO| on the j-th |MO|
|
||||
|
||||
|
||||
.. option:: mo_label
|
||||
|
||||
Label characterizing the MOS (Local, Canonical, Natural, *etc*)
|
||||
|
||||
|
||||
.. option:: mo_occ
|
||||
|
||||
|MO| occupation numbers
|
||||
|
||||
|
||||
.. option:: mo_class
|
||||
|
||||
[ Core | Inactive | Active | Virtual | Deleted ], as defined by :ref:`qp_set_mo_class`
|
||||
|
||||
|
||||
.. option:: ao_md5
|
||||
|
||||
MD5 checksum characterizing the |AO| basis set.
|
||||
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
||||
|
||||
.. c:var:: mo_coef
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_coef (ao_num,mo_tot_num)
|
||||
|
||||
File: :file:`mos.irp.f`
|
||||
|
||||
Molecular orbital coefficients on AO basis set mo_coef(i,j) = coefficient of the ith ao on the jth mo mo_label : Label characterizing the MOS (local, canonical, natural, etc)
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_coef_begin_iteration
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_coef_begin_iteration (ao_num,mo_tot_num)
|
||||
|
||||
File: :file:`track_orb.irp.f`
|
||||
|
||||
Void provider to store the coefficients of the |MO| basis at the beginning of the SCF iteration
|
||||
|
||||
Usefull to track some orbitals
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_coef_in_ao_ortho_basis
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_coef_in_ao_ortho_basis (ao_num,mo_tot_num)
|
||||
|
||||
File: :file:`mos.irp.f`
|
||||
|
||||
MO coefficients in orthogonalized AO basis
|
||||
|
||||
C^(-1).C_mo
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_coef_transp
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_coef_transp (mo_tot_num,ao_num)
|
||||
|
||||
File: :file:`mos.irp.f`
|
||||
|
||||
Molecular orbital coefficients on AO basis set
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_label
|
||||
|
||||
.. code:: text
|
||||
|
||||
character*(64) :: mo_label
|
||||
|
||||
File: :file:`mos.irp.f`
|
||||
|
||||
Molecular orbital coefficients on AO basis set mo_coef(i,j) = coefficient of the ith ao on the jth mo mo_label : Label characterizing the MOS (local, canonical, natural, etc)
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_num
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: mo_num
|
||||
|
||||
File: :file:`mos.irp.f`
|
||||
|
||||
mo_tot_num without the highest deleted MOs
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_occ
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_occ (mo_tot_num)
|
||||
|
||||
File: :file:`mos.irp.f`
|
||||
|
||||
MO occupation numbers
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_tot_num
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: mo_tot_num
|
||||
|
||||
File: :file:`mos.irp.f`
|
||||
|
||||
Number of MOs
|
||||
|
||||
|
||||
|
||||
|
||||
Subroutines / functions
|
||||
-----------------------
|
||||
|
||||
|
||||
|
||||
.. c:function:: ao_ortho_cano_to_ao
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine ao_ortho_cano_to_ao(A_ao,LDA_ao,A,LDA)
|
||||
|
||||
File: :file:`mos.irp.f`
|
||||
|
||||
Transform A from the AO basis to the orthogonal AO basis
|
||||
|
||||
C^(-1).A_ao.Ct^(-1)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: ao_to_mo
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine ao_to_mo(A_ao,LDA_ao,A_mo,LDA_mo)
|
||||
|
||||
File: :file:`mos.irp.f`
|
||||
|
||||
Transform A from the AO basis to the MO basis
|
||||
|
||||
Ct.A_ao.C
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: give_all_mos_and_grad_and_lapl_at_r
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine give_all_mos_and_grad_and_lapl_at_r(r,mos_array,mos_grad_array,mos_lapl_array)
|
||||
|
||||
File: :file:`mos_in_r.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: give_all_mos_and_grad_at_r
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine give_all_mos_and_grad_at_r(r,mos_array,mos_grad_array)
|
||||
|
||||
File: :file:`mos_in_r.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: give_all_mos_at_r
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine give_all_mos_at_r(r,mos_array)
|
||||
|
||||
File: :file:`mos_in_r.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: initialize_mo_coef_begin_iteration
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine initialize_mo_coef_begin_iteration
|
||||
|
||||
File: :file:`track_orb.irp.f`
|
||||
|
||||
|
||||
|
||||
Initialize :c:data:`mo_coef_begin_iteration` to the current :c:data:`mo_coef`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: mix_mo_jk
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine mix_mo_jk(j,k)
|
||||
|
||||
File: :file:`mos.irp.f`
|
||||
|
||||
Rotates the jth MO with the kth MO to give two new MO's that are
|
||||
|
||||
'+' = 1/sqrt(2) (|j> + |k>)
|
||||
|
||||
'-' = 1/sqrt(2) (|j> - |k>)
|
||||
|
||||
by convention, the '+' MO is in the lower index (min(j,k)) by convention, the '-' MO is in the larger index (max(j,k))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: mo_as_eigvectors_of_mo_matrix
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine mo_as_eigvectors_of_mo_matrix(matrix,n,m,label,sign,output)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: mo_as_svd_vectors_of_mo_matrix
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine mo_as_svd_vectors_of_mo_matrix(matrix,lda,m,n,label)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: mo_as_svd_vectors_of_mo_matrix_eig
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine mo_as_svd_vectors_of_mo_matrix_eig(matrix,lda,m,n,eig,label)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: reorder_active_orb
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine reorder_active_orb
|
||||
|
||||
File: :file:`track_orb.irp.f`
|
||||
|
||||
routines that takes the current :c:data:`mo_coef` and reorder the active orbitals (see :c:data:`list_act` and :c:data:`n_act_orb`) according to the overlap with :c:data:`mo_coef_begin_iteration`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: save_mos
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine save_mos
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: save_mos_truncated
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine save_mos_truncated(n)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
|
||||
|
||||
|
@ -1,87 +0,0 @@
|
||||
.. _mo_guess:
|
||||
|
||||
.. program:: mo_guess
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
========
|
||||
mo_guess
|
||||
========
|
||||
|
||||
Guess for |MOs|.
|
||||
|
||||
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
||||
|
||||
.. c:var:: ao_ortho_canonical_nucl_elec_integral
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: ao_ortho_canonical_nucl_elec_integral (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`pot_mo_ortho_canonical_ints.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: ao_ortho_lowdin_coef
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: ao_ortho_lowdin_coef (ao_num,ao_num)
|
||||
|
||||
File: :file:`mo_ortho_lowdin.irp.f`
|
||||
|
||||
matrix of the coefficients of the mos generated by the orthonormalization by the S^{-1/2} canonical transformation of the aos ao_ortho_lowdin_coef(i,j) = coefficient of the ith ao on the jth ao_ortho_lowdin orbital
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: ao_ortho_lowdin_nucl_elec_integral
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: ao_ortho_lowdin_nucl_elec_integral (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`pot_mo_ortho_lowdin_ints.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: ao_ortho_lowdin_overlap
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: ao_ortho_lowdin_overlap (ao_num,ao_num)
|
||||
|
||||
File: :file:`mo_ortho_lowdin.irp.f`
|
||||
|
||||
overlap matrix of the ao_ortho_lowdin supposed to be the Identity
|
||||
|
||||
|
||||
|
||||
|
||||
Subroutines / functions
|
||||
-----------------------
|
||||
|
||||
|
||||
|
||||
.. c:function:: hcore_guess
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine hcore_guess
|
||||
|
||||
File: :file:`h_core_guess_routine.irp.f`
|
||||
|
||||
Produce `H_core` MO orbital
|
||||
|
||||
|
@ -1,292 +0,0 @@
|
||||
.. _mo_one_e_integrals:
|
||||
|
||||
.. program:: mo_one_e_integrals
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
==================
|
||||
mo_one_e_integrals
|
||||
==================
|
||||
|
||||
All the one-electron integrals in |MO| basis are defined here.
|
||||
|
||||
The most important providers for usual quantum-chemistry calculation are:
|
||||
|
||||
* `mo_kinetic_integral` which are the kinetic operator integrals on the |AO| basis (see :file:`kin_mo_ints.irp.f`)
|
||||
* `mo_nucl_elec_integral` which are the nuclear-elctron operator integrals on the |AO| basis (see :file:`pot_mo_ints.irp.f`)
|
||||
* `mo_mono_elec_integral` which are the the h_core operator integrals on the |AO| basis (see :file:`mo_mono_ints.irp.f`)
|
||||
|
||||
Note that you can find other interesting integrals related to the position operator in :file:`spread_dipole_mo.irp.f`.
|
||||
|
||||
|
||||
|
||||
EZFIO parameters
|
||||
----------------
|
||||
|
||||
.. option:: integral_nuclear
|
||||
|
||||
Nucleus-electron integrals in |MO| basis set
|
||||
|
||||
|
||||
.. option:: integral_kinetic
|
||||
|
||||
Kinetic energy integrals in |MO| basis set
|
||||
|
||||
|
||||
.. option:: integral_pseudo
|
||||
|
||||
Pseudopotential integrals in |MO| basis set
|
||||
|
||||
|
||||
.. option:: disk_access_mo_one_integrals
|
||||
|
||||
Read/Write |MO| one-electron integrals from/to disk [ Write | Read | None ]
|
||||
|
||||
Default: None
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
||||
|
||||
.. c:var:: mo_dipole_x
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_dipole_x (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_dipole_y (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_dipole_z (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`spread_dipole_mo.irp.f`
|
||||
|
||||
array of the integrals of MO_i * x MO_j array of the integrals of MO_i * y MO_j array of the integrals of MO_i * z MO_j
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_dipole_y
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_dipole_x (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_dipole_y (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_dipole_z (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`spread_dipole_mo.irp.f`
|
||||
|
||||
array of the integrals of MO_i * x MO_j array of the integrals of MO_i * y MO_j array of the integrals of MO_i * z MO_j
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_dipole_z
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_dipole_x (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_dipole_y (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_dipole_z (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`spread_dipole_mo.irp.f`
|
||||
|
||||
array of the integrals of MO_i * x MO_j array of the integrals of MO_i * y MO_j array of the integrals of MO_i * z MO_j
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_kinetic_integral
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_kinetic_integral (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`kin_mo_ints.irp.f`
|
||||
|
||||
Kinetic energy integrals in the MO basis
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_mono_elec_integral
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_mono_elec_integral (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`mo_mono_ints.irp.f`
|
||||
|
||||
array of the mono electronic hamiltonian on the MOs basis : sum of the kinetic and nuclear electronic potential (and pseudo potential if needed)
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_nucl_elec_integral
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_nucl_elec_integral (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`pot_mo_ints.irp.f`
|
||||
|
||||
interaction nuclear electron on the MO basis
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_nucl_elec_integral_per_atom
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_nucl_elec_integral_per_atom (mo_tot_num,mo_tot_num,nucl_num)
|
||||
|
||||
File: :file:`pot_mo_ints.irp.f`
|
||||
|
||||
mo_nucl_elec_integral_per_atom(i,j,k) = -<MO(i)|1/|r-Rk|MO(j)> where Rk is the geometry of the kth atom
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_overlap
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_overlap (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`mo_overlap.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_pseudo_integral
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_pseudo_integral (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`pot_mo_pseudo_ints.irp.f`
|
||||
|
||||
interaction nuclear electron on the MO basis
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_spread_x
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_spread_x (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_spread_y (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_spread_z (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`spread_dipole_mo.irp.f`
|
||||
|
||||
array of the integrals of MO_i * x^2 MO_j array of the integrals of MO_i * y^2 MO_j array of the integrals of MO_i * z^2 MO_j
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_spread_y
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_spread_x (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_spread_y (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_spread_z (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`spread_dipole_mo.irp.f`
|
||||
|
||||
array of the integrals of MO_i * x^2 MO_j array of the integrals of MO_i * y^2 MO_j array of the integrals of MO_i * z^2 MO_j
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_spread_z
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_spread_x (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_spread_y (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_spread_z (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`spread_dipole_mo.irp.f`
|
||||
|
||||
array of the integrals of MO_i * x^2 MO_j array of the integrals of MO_i * y^2 MO_j array of the integrals of MO_i * z^2 MO_j
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: read_mo_one_integrals
|
||||
|
||||
.. code:: text
|
||||
|
||||
logical :: read_mo_one_integrals
|
||||
logical :: write_mo_one_integrals
|
||||
|
||||
File: :file:`read_write.irp.f`
|
||||
|
||||
One level of abstraction for disk_access_mo_integrals
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: s_mo_coef
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: s_mo_coef (ao_num,mo_tot_num)
|
||||
|
||||
File: :file:`ao_to_mo.irp.f`
|
||||
|
||||
Product S.C where S is the overlap matrix in the AO basis and C the mo_coef matrix.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: write_mo_one_integrals
|
||||
|
||||
.. code:: text
|
||||
|
||||
logical :: read_mo_one_integrals
|
||||
logical :: write_mo_one_integrals
|
||||
|
||||
File: :file:`read_write.irp.f`
|
||||
|
||||
One level of abstraction for disk_access_mo_integrals
|
||||
|
||||
|
||||
|
||||
|
||||
Subroutines / functions
|
||||
-----------------------
|
||||
|
||||
|
||||
|
||||
.. c:function:: mo_to_ao
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine mo_to_ao(A_mo,LDA_mo,A_ao,LDA_ao)
|
||||
|
||||
File: :file:`ao_to_mo.irp.f`
|
||||
|
||||
Transform A from the MO basis to the AO basis
|
||||
|
||||
(S.C).A_mo.(S.C)t
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: orthonormalize_mos
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine orthonormalize_mos
|
||||
|
||||
File: :file:`orthonormalize.irp.f`
|
||||
|
||||
|
||||
|
||||
|
@ -1,512 +0,0 @@
|
||||
.. _mo_two_e_erf_integrals:
|
||||
|
||||
.. program:: mo_two_e_erf_integrals
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
======================
|
||||
mo_two_e_erf_integrals
|
||||
======================
|
||||
|
||||
Here, all two-electron integrals (:math:`erf({\mu}_{erf} * r_{12})/r_{12}`) are computed.
|
||||
As they have 4 indices and many are zero, they are stored in a map, as defined
|
||||
in :file:`Utils/map_module.f90`.
|
||||
|
||||
The range separation parameter :math:`{\mu}_{erf}` is the variable :option:`ao_two_e_erf_integrals mu_erf`.
|
||||
|
||||
To fetch an |MO| integral, use
|
||||
`get_mo_bielec_integral_erf(i,j,k,l,mo_integrals_map_erf)`
|
||||
|
||||
The conventions are:
|
||||
|
||||
* For |MO| integrals : <ij|kl> = <12|12>
|
||||
|
||||
Be aware that it might not be the same conventions for |MO| and |AO| integrals.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
EZFIO parameters
|
||||
----------------
|
||||
|
||||
.. option:: disk_access_mo_integrals_erf
|
||||
|
||||
Read/Write MO integrals with the long range interaction from/to disk [ Write | Read | None ]
|
||||
|
||||
Default: None
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
||||
|
||||
.. c:var:: core_energy_erf
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: core_energy_erf
|
||||
|
||||
File: :file:`core_quantities_erf.irp.f`
|
||||
|
||||
energy from the core : contains all core-core contributionswith the erf interaction
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: core_fock_operator_erf
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: core_fock_operator_erf (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`core_quantities_erf.irp.f`
|
||||
|
||||
this is the contribution to the Fock operator from the core electrons with the erf interaction
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: insert_into_mo_integrals_erf_map
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine insert_into_mo_integrals_erf_map(n_integrals, &
|
||||
buffer_i, buffer_values, thr)
|
||||
|
||||
File: :file:`map_integrals_erf.irp.f`
|
||||
|
||||
Create new entry into MO map, or accumulate in an existing entry
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: int_erf_3_index
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: int_erf_3_index (mo_tot_num,mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: int_erf_3_index_exc (mo_tot_num,mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`ints_erf_3_index.irp.f`
|
||||
|
||||
int_erf_3_index(i,j) = <ij|ij> = (ii|jj) with the erf interaction
|
||||
|
||||
int_erf_3_index_exc(i,j) = <ij|ji> = (ij|ij) with the erf interaction
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: int_erf_3_index_exc
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: int_erf_3_index (mo_tot_num,mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: int_erf_3_index_exc (mo_tot_num,mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`ints_erf_3_index.irp.f`
|
||||
|
||||
int_erf_3_index(i,j) = <ij|ij> = (ii|jj) with the erf interaction
|
||||
|
||||
int_erf_3_index_exc(i,j) = <ij|ji> = (ij|ij) with the erf interaction
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_bielec_integrals_erf_in_map
|
||||
|
||||
.. code:: text
|
||||
|
||||
logical :: mo_bielec_integrals_erf_in_map
|
||||
|
||||
File: :file:`mo_bi_integrals_erf.irp.f`
|
||||
|
||||
If True, the map of MO bielectronic integrals is provided
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_integrals_erf_cache
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_integrals_erf_cache (0:64*64*64*64)
|
||||
|
||||
File: :file:`map_integrals_erf.irp.f`
|
||||
|
||||
Cache of MO integrals for fast access
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_integrals_erf_cache_max
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: mo_integrals_erf_cache_min
|
||||
integer :: mo_integrals_erf_cache_max
|
||||
|
||||
File: :file:`map_integrals_erf.irp.f`
|
||||
|
||||
Min and max values of the MOs for which the integrals are in the cache
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_integrals_erf_cache_min
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: mo_integrals_erf_cache_min
|
||||
integer :: mo_integrals_erf_cache_max
|
||||
|
||||
File: :file:`map_integrals_erf.irp.f`
|
||||
|
||||
Min and max values of the MOs for which the integrals are in the cache
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_integrals_erf_map
|
||||
|
||||
.. code:: text
|
||||
|
||||
type(map_type) :: mo_integrals_erf_map
|
||||
|
||||
File: :file:`map_integrals_erf.irp.f`
|
||||
|
||||
MO integrals
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_two_e_int_erf_jj
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_two_e_int_erf_jj (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_two_e_int_erf_jj_exchange (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_two_e_int_erf_jj_anti (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`mo_bi_integrals_erf.irp.f`
|
||||
|
||||
mo_bielec_integral_jj(i,j) = J_ij mo_bielec_integral_jj_exchange(i,j) = K_ij mo_bielec_integral_jj_anti(i,j) = J_ij - K_ij
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_two_e_int_erf_jj_anti
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_two_e_int_erf_jj (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_two_e_int_erf_jj_exchange (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_two_e_int_erf_jj_anti (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`mo_bi_integrals_erf.irp.f`
|
||||
|
||||
mo_bielec_integral_jj(i,j) = J_ij mo_bielec_integral_jj_exchange(i,j) = K_ij mo_bielec_integral_jj_anti(i,j) = J_ij - K_ij
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_two_e_int_erf_jj_anti_from_ao
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_two_e_int_erf_jj_from_ao (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_two_e_int_erf_jj_exchange_from_ao (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_two_e_int_erf_jj_anti_from_ao (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`mo_bi_integrals_erf.irp.f`
|
||||
|
||||
mo_bielec_integral_jj_from_ao(i,j) = J_ij mo_bielec_integral_jj_exchange_from_ao(i,j) = J_ij mo_bielec_integral_jj_anti_from_ao(i,j) = J_ij - K_ij
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_two_e_int_erf_jj_exchange
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_two_e_int_erf_jj (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_two_e_int_erf_jj_exchange (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_two_e_int_erf_jj_anti (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`mo_bi_integrals_erf.irp.f`
|
||||
|
||||
mo_bielec_integral_jj(i,j) = J_ij mo_bielec_integral_jj_exchange(i,j) = K_ij mo_bielec_integral_jj_anti(i,j) = J_ij - K_ij
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_two_e_int_erf_jj_exchange_from_ao
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_two_e_int_erf_jj_from_ao (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_two_e_int_erf_jj_exchange_from_ao (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_two_e_int_erf_jj_anti_from_ao (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`mo_bi_integrals_erf.irp.f`
|
||||
|
||||
mo_bielec_integral_jj_from_ao(i,j) = J_ij mo_bielec_integral_jj_exchange_from_ao(i,j) = J_ij mo_bielec_integral_jj_anti_from_ao(i,j) = J_ij - K_ij
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_two_e_int_erf_jj_from_ao
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_two_e_int_erf_jj_from_ao (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_two_e_int_erf_jj_exchange_from_ao (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_two_e_int_erf_jj_anti_from_ao (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`mo_bi_integrals_erf.irp.f`
|
||||
|
||||
mo_bielec_integral_jj_from_ao(i,j) = J_ij mo_bielec_integral_jj_exchange_from_ao(i,j) = J_ij mo_bielec_integral_jj_anti_from_ao(i,j) = J_ij - K_ij
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: read_mo_integrals_erf
|
||||
|
||||
.. code:: text
|
||||
|
||||
logical :: read_mo_integrals_erf
|
||||
logical :: write_mo_integrals_erf
|
||||
|
||||
File: :file:`read_write_erf.irp.f`
|
||||
|
||||
Flag to read or write the |MO| erf integrals
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: write_mo_integrals_erf
|
||||
|
||||
.. code:: text
|
||||
|
||||
logical :: read_mo_integrals_erf
|
||||
logical :: write_mo_integrals_erf
|
||||
|
||||
File: :file:`read_write_erf.irp.f`
|
||||
|
||||
Flag to read or write the |MO| erf integrals
|
||||
|
||||
|
||||
|
||||
|
||||
Subroutines / functions
|
||||
-----------------------
|
||||
|
||||
|
||||
|
||||
.. c:function:: add_integrals_to_map_erf
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine add_integrals_to_map_erf(mask_ijkl)
|
||||
|
||||
File: :file:`mo_bi_integrals_erf.irp.f`
|
||||
|
||||
Adds integrals to tha MO map according to some bitmask
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: clear_mo_erf_map
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine clear_mo_erf_map
|
||||
|
||||
File: :file:`mo_bi_integrals_erf.irp.f`
|
||||
|
||||
Frees the memory of the MO map
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: get_mo_bielec_integral_erf
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision function get_mo_bielec_integral_erf(i,j,k,l,map)
|
||||
|
||||
File: :file:`map_integrals_erf.irp.f`
|
||||
|
||||
Returns one integral <ij|kl> in the MO basis
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: get_mo_bielec_integrals_erf
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine get_mo_bielec_integrals_erf(j,k,l,sze,out_val,map)
|
||||
|
||||
File: :file:`map_integrals_erf.irp.f`
|
||||
|
||||
Returns multiple integrals <ij|kl> in the MO basis, all i for j,k,l fixed.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: get_mo_bielec_integrals_erf_coulomb_ii
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine get_mo_bielec_integrals_erf_coulomb_ii(k,l,sze,out_val,map)
|
||||
|
||||
File: :file:`map_integrals_erf.irp.f`
|
||||
|
||||
Returns multiple integrals <ki|li> k(1)i(2) 1/r12 l(1)i(2) :: out_val(i1) for k,l fixed.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: get_mo_bielec_integrals_erf_exch_ii
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine get_mo_bielec_integrals_erf_exch_ii(k,l,sze,out_val,map)
|
||||
|
||||
File: :file:`map_integrals_erf.irp.f`
|
||||
|
||||
Returns multiple integrals <ki|il> k(1)i(2) 1/r12 i(1)l(2) :: out_val(i1) for k,l fixed.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: get_mo_bielec_integrals_erf_i1j1
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine get_mo_bielec_integrals_erf_i1j1(k,l,sze,out_array,map)
|
||||
|
||||
File: :file:`map_integrals_erf.irp.f`
|
||||
|
||||
Returns multiple integrals <ik|jl> in the MO basis, all i(1)j(1) erf(mu_erf * r12) /r12 k(2)l(2) i, j for k,l fixed.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: get_mo_bielec_integrals_erf_ij
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine get_mo_bielec_integrals_erf_ij(k,l,sze,out_array,map)
|
||||
|
||||
File: :file:`map_integrals_erf.irp.f`
|
||||
|
||||
Returns multiple integrals <ij|kl> in the MO basis, all i(1)j(2) 1/r12 k(1)l(2) i, j for k,l fixed.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: get_mo_erf_map_size
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer*8 function get_mo_erf_map_size()
|
||||
|
||||
File: :file:`map_integrals_erf.irp.f`
|
||||
|
||||
Return the number of elements in the MO map
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: load_mo_integrals_erf
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function load_mo_integrals_erf(filename)
|
||||
|
||||
File: :file:`map_integrals_erf.irp.f`
|
||||
|
||||
Read from disk the $ao integrals
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: mo_bielec_integral_erf
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision function mo_bielec_integral_erf(i,j,k,l)
|
||||
|
||||
File: :file:`map_integrals_erf.irp.f`
|
||||
|
||||
Returns one integral <ij|kl> in the MO basis
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: mo_bielec_integrals_erf_index
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine mo_bielec_integrals_erf_index(i,j,k,l,i1)
|
||||
|
||||
File: :file:`mo_bi_integrals_erf.irp.f`
|
||||
|
||||
Computes an unique index for i,j,k,l integrals
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: provide_all_mo_integrals_erf
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine provide_all_mo_integrals_erf
|
||||
|
||||
File: :file:`mo_bi_integrals_erf.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: save_erf_bi_elec_integrals_mo
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine save_erf_bi_elec_integrals_mo
|
||||
|
||||
File: :file:`routines_save_integrals_erf.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: save_erf_bielec_ints_mo_into_ints_mo
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine save_erf_bielec_ints_mo_into_ints_mo
|
||||
|
||||
File: :file:`routines_save_integrals_erf.irp.f`
|
||||
|
||||
|
||||
|
||||
|
@ -1,618 +0,0 @@
|
||||
.. _mo_two_e_integrals:
|
||||
|
||||
.. program:: mo_two_e_integrals
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
==================
|
||||
mo_two_e_integrals
|
||||
==================
|
||||
|
||||
Here, all two-electron integrals (:math:`1/r_{12}`) are computed.
|
||||
As they have 4 indices and many are zero, they are stored in a map, as defined
|
||||
in :file:`Utils/map_module.f90`.
|
||||
|
||||
To fetch an |AO| integral, use the
|
||||
`get_ao_bielec_integral(i,j,k,l,ao_integrals_map)` function, and
|
||||
to fetch an |MO| integral, use
|
||||
`get_mo_bielec_integral(i,j,k,l,mo_integrals_map)` or
|
||||
`mo_bielec_integral(i,j,k,l)`.
|
||||
|
||||
The conventions are:
|
||||
|
||||
* For |AO| integrals : (ik|jl) = (11|22)
|
||||
* For |MO| integrals : <ij|kl> = <12|12>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
EZFIO parameters
|
||||
----------------
|
||||
|
||||
.. option:: disk_access_mo_integrals
|
||||
|
||||
Read/Write |MO| integrals from/to disk [ Write | Read | None ]
|
||||
|
||||
Default: None
|
||||
|
||||
.. option:: mo_integrals_threshold
|
||||
|
||||
If | <ij|kl> | < `mo_integrals_threshold` then <ij|kl> is zero
|
||||
|
||||
Default: 1.e-15
|
||||
|
||||
.. option:: no_vvvv_integrals
|
||||
|
||||
If `True`, computes all integrals except for the integrals having 4 virtual indices
|
||||
|
||||
Default: False
|
||||
|
||||
.. option:: no_ivvv_integrals
|
||||
|
||||
Can be switched on only if `no_vvvv_integrals` is `True`, then does not compute the integrals with 3 virtual indices and 1 belonging to the core inactive active orbitals
|
||||
|
||||
Default: False
|
||||
|
||||
.. option:: no_vvv_integrals
|
||||
|
||||
Can be switched on only if `no_vvvv_integrals` is `True`, then does not compute the integrals with 3 virtual orbitals
|
||||
|
||||
Default: False
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
||||
|
||||
.. c:var:: big_array_coulomb_integrals
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: big_array_coulomb_integrals (mo_tot_num,mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: big_array_exchange_integrals (mo_tot_num,mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`integrals_3_index.irp.f`
|
||||
|
||||
big_array_coulomb_integrals(i,j) = <ij|ij> = (ii|jj)
|
||||
|
||||
big_array_exchange_integrals(i,j) = <ij|ji> = (ij|ij)
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: big_array_exchange_integrals
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: big_array_coulomb_integrals (mo_tot_num,mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: big_array_exchange_integrals (mo_tot_num,mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`integrals_3_index.irp.f`
|
||||
|
||||
big_array_coulomb_integrals(i,j) = <ij|ij> = (ii|jj)
|
||||
|
||||
big_array_exchange_integrals(i,j) = <ij|ji> = (ij|ij)
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: core_energy
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: core_energy
|
||||
|
||||
File: :file:`core_quantities.irp.f`
|
||||
|
||||
energy from the core : contains all core-core contributions
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: core_fock_operator
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: core_fock_operator (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`core_quantities.irp.f`
|
||||
|
||||
this is the contribution to the Fock operator from the core electrons
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: insert_into_mo_integrals_map
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine insert_into_mo_integrals_map(n_integrals, &
|
||||
buffer_i, buffer_values, thr)
|
||||
|
||||
File: :file:`map_integrals.irp.f`
|
||||
|
||||
Create new entry into MO map, or accumulate in an existing entry
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_bielec_integral_jj
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_bielec_integral_jj (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_bielec_integral_jj_exchange (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_bielec_integral_jj_anti (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`mo_bi_integrals.irp.f`
|
||||
|
||||
mo_bielec_integral_jj(i,j) = J_ij mo_bielec_integral_jj_exchange(i,j) = K_ij mo_bielec_integral_jj_anti(i,j) = J_ij - K_ij
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_bielec_integral_jj_anti
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_bielec_integral_jj (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_bielec_integral_jj_exchange (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_bielec_integral_jj_anti (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`mo_bi_integrals.irp.f`
|
||||
|
||||
mo_bielec_integral_jj(i,j) = J_ij mo_bielec_integral_jj_exchange(i,j) = K_ij mo_bielec_integral_jj_anti(i,j) = J_ij - K_ij
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_bielec_integral_jj_anti_from_ao
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_bielec_integral_jj_from_ao (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_bielec_integral_jj_exchange_from_ao (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_bielec_integral_jj_anti_from_ao (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`mo_bi_integrals.irp.f`
|
||||
|
||||
mo_bielec_integral_jj_from_ao(i,j) = J_ij mo_bielec_integral_jj_exchange_from_ao(i,j) = J_ij mo_bielec_integral_jj_anti_from_ao(i,j) = J_ij - K_ij
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_bielec_integral_jj_exchange
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_bielec_integral_jj (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_bielec_integral_jj_exchange (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_bielec_integral_jj_anti (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`mo_bi_integrals.irp.f`
|
||||
|
||||
mo_bielec_integral_jj(i,j) = J_ij mo_bielec_integral_jj_exchange(i,j) = K_ij mo_bielec_integral_jj_anti(i,j) = J_ij - K_ij
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_bielec_integral_jj_exchange_from_ao
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_bielec_integral_jj_from_ao (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_bielec_integral_jj_exchange_from_ao (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_bielec_integral_jj_anti_from_ao (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`mo_bi_integrals.irp.f`
|
||||
|
||||
mo_bielec_integral_jj_from_ao(i,j) = J_ij mo_bielec_integral_jj_exchange_from_ao(i,j) = J_ij mo_bielec_integral_jj_anti_from_ao(i,j) = J_ij - K_ij
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_bielec_integral_jj_from_ao
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_bielec_integral_jj_from_ao (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_bielec_integral_jj_exchange_from_ao (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_bielec_integral_jj_anti_from_ao (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`mo_bi_integrals.irp.f`
|
||||
|
||||
mo_bielec_integral_jj_from_ao(i,j) = J_ij mo_bielec_integral_jj_exchange_from_ao(i,j) = J_ij mo_bielec_integral_jj_anti_from_ao(i,j) = J_ij - K_ij
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_bielec_integral_vv_anti_from_ao
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_bielec_integral_vv_from_ao (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_bielec_integral_vv_exchange_from_ao (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_bielec_integral_vv_anti_from_ao (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`mo_bi_integrals.irp.f`
|
||||
|
||||
mo_bielec_integral_vv_from_ao(i,j) = J_ij mo_bielec_integral_vv_exchange_from_ao(i,j) = J_ij mo_bielec_integral_vv_anti_from_ao(i,j) = J_ij - K_ij but only for the virtual orbitals
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_bielec_integral_vv_exchange_from_ao
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_bielec_integral_vv_from_ao (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_bielec_integral_vv_exchange_from_ao (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_bielec_integral_vv_anti_from_ao (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`mo_bi_integrals.irp.f`
|
||||
|
||||
mo_bielec_integral_vv_from_ao(i,j) = J_ij mo_bielec_integral_vv_exchange_from_ao(i,j) = J_ij mo_bielec_integral_vv_anti_from_ao(i,j) = J_ij - K_ij but only for the virtual orbitals
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_bielec_integral_vv_from_ao
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_bielec_integral_vv_from_ao (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_bielec_integral_vv_exchange_from_ao (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: mo_bielec_integral_vv_anti_from_ao (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`mo_bi_integrals.irp.f`
|
||||
|
||||
mo_bielec_integral_vv_from_ao(i,j) = J_ij mo_bielec_integral_vv_exchange_from_ao(i,j) = J_ij mo_bielec_integral_vv_anti_from_ao(i,j) = J_ij - K_ij but only for the virtual orbitals
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_bielec_integrals_in_map
|
||||
|
||||
.. code:: text
|
||||
|
||||
logical :: mo_bielec_integrals_in_map
|
||||
|
||||
File: :file:`mo_bi_integrals.irp.f`
|
||||
|
||||
If True, the map of MO bielectronic integrals is provided
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_integrals_cache
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: mo_integrals_cache (0_8:128_8*128_8*128_8*128_8)
|
||||
|
||||
File: :file:`map_integrals.irp.f`
|
||||
|
||||
Cache of MO integrals for fast access
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_integrals_cache_max
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer*4 :: mo_integrals_cache_min
|
||||
integer*4 :: mo_integrals_cache_max
|
||||
integer*8 :: mo_integrals_cache_min_8
|
||||
integer*8 :: mo_integrals_cache_max_8
|
||||
|
||||
File: :file:`map_integrals.irp.f`
|
||||
|
||||
Min and max values of the MOs for which the integrals are in the cache
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_integrals_cache_max_8
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer*4 :: mo_integrals_cache_min
|
||||
integer*4 :: mo_integrals_cache_max
|
||||
integer*8 :: mo_integrals_cache_min_8
|
||||
integer*8 :: mo_integrals_cache_max_8
|
||||
|
||||
File: :file:`map_integrals.irp.f`
|
||||
|
||||
Min and max values of the MOs for which the integrals are in the cache
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_integrals_cache_min
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer*4 :: mo_integrals_cache_min
|
||||
integer*4 :: mo_integrals_cache_max
|
||||
integer*8 :: mo_integrals_cache_min_8
|
||||
integer*8 :: mo_integrals_cache_max_8
|
||||
|
||||
File: :file:`map_integrals.irp.f`
|
||||
|
||||
Min and max values of the MOs for which the integrals are in the cache
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_integrals_cache_min_8
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer*4 :: mo_integrals_cache_min
|
||||
integer*4 :: mo_integrals_cache_max
|
||||
integer*8 :: mo_integrals_cache_min_8
|
||||
integer*8 :: mo_integrals_cache_max_8
|
||||
|
||||
File: :file:`map_integrals.irp.f`
|
||||
|
||||
Min and max values of the MOs for which the integrals are in the cache
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mo_integrals_map
|
||||
|
||||
.. code:: text
|
||||
|
||||
type(map_type) :: mo_integrals_map
|
||||
|
||||
File: :file:`map_integrals.irp.f`
|
||||
|
||||
MO integrals
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: read_mo_integrals
|
||||
|
||||
.. code:: text
|
||||
|
||||
logical :: read_mo_integrals
|
||||
logical :: write_mo_integrals
|
||||
|
||||
File: :file:`read_write.irp.f`
|
||||
|
||||
Flag to read or write the |MO| integrals
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: write_mo_integrals
|
||||
|
||||
.. code:: text
|
||||
|
||||
logical :: read_mo_integrals
|
||||
logical :: write_mo_integrals
|
||||
|
||||
File: :file:`read_write.irp.f`
|
||||
|
||||
Flag to read or write the |MO| integrals
|
||||
|
||||
|
||||
|
||||
|
||||
Subroutines / functions
|
||||
-----------------------
|
||||
|
||||
|
||||
|
||||
.. c:function:: add_integrals_to_map
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine add_integrals_to_map(mask_ijkl)
|
||||
|
||||
File: :file:`mo_bi_integrals.irp.f`
|
||||
|
||||
Adds integrals to tha MO map according to some bitmask
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: add_integrals_to_map_no_exit_34
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine add_integrals_to_map_no_exit_34(mask_ijkl)
|
||||
|
||||
File: :file:`mo_bi_integrals.irp.f`
|
||||
|
||||
Adds integrals to tha MO map according to some bitmask
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: add_integrals_to_map_three_indices
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine add_integrals_to_map_three_indices(mask_ijk)
|
||||
|
||||
File: :file:`mo_bi_integrals.irp.f`
|
||||
|
||||
Adds integrals to tha MO map according to some bitmask
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: clear_mo_map
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine clear_mo_map
|
||||
|
||||
File: :file:`mo_bi_integrals.irp.f`
|
||||
|
||||
Frees the memory of the MO map
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: dump_mo_integrals
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine dump_mo_integrals(filename)
|
||||
|
||||
File: :file:`map_integrals.irp.f`
|
||||
|
||||
Save to disk the |MO| integrals
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: get_mo_bielec_integral
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision function get_mo_bielec_integral(i,j,k,l,map)
|
||||
|
||||
File: :file:`map_integrals.irp.f`
|
||||
|
||||
Returns one integral <ij|kl> in the MO basis
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: get_mo_bielec_integrals
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine get_mo_bielec_integrals(j,k,l,sze,out_val,map)
|
||||
|
||||
File: :file:`map_integrals.irp.f`
|
||||
|
||||
Returns multiple integrals <ij|kl> in the MO basis, all i for j,k,l fixed.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: get_mo_bielec_integrals_coulomb_ii
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine get_mo_bielec_integrals_coulomb_ii(k,l,sze,out_val,map)
|
||||
|
||||
File: :file:`map_integrals.irp.f`
|
||||
|
||||
Returns multiple integrals <ki|li> k(1)i(2) 1/r12 l(1)i(2) :: out_val(i1) for k,l fixed.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: get_mo_bielec_integrals_exch_ii
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine get_mo_bielec_integrals_exch_ii(k,l,sze,out_val,map)
|
||||
|
||||
File: :file:`map_integrals.irp.f`
|
||||
|
||||
Returns multiple integrals <ki|il> k(1)i(2) 1/r12 i(1)l(2) :: out_val(i1) for k,l fixed.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: get_mo_bielec_integrals_i1j1
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine get_mo_bielec_integrals_i1j1(k,l,sze,out_array,map)
|
||||
|
||||
File: :file:`map_integrals.irp.f`
|
||||
|
||||
Returns multiple integrals <ik|jl> in the MO basis, all i(1)j(1) 1/r12 k(2)l(2) i, j for k,l fixed.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: get_mo_bielec_integrals_ij
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine get_mo_bielec_integrals_ij(k,l,sze,out_array,map)
|
||||
|
||||
File: :file:`map_integrals.irp.f`
|
||||
|
||||
Returns multiple integrals <ij|kl> in the MO basis, all i(1)j(2) 1/r12 k(1)l(2) i, j for k,l fixed.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: get_mo_map_size
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer*8 function get_mo_map_size()
|
||||
|
||||
File: :file:`map_integrals.irp.f`
|
||||
|
||||
Return the number of elements in the MO map
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: load_mo_integrals
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function load_mo_integrals(filename)
|
||||
|
||||
File: :file:`map_integrals.irp.f`
|
||||
|
||||
Read from disk the |MO| integrals
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: mo_bielec_integral
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision function mo_bielec_integral(i,j,k,l)
|
||||
|
||||
File: :file:`map_integrals.irp.f`
|
||||
|
||||
Returns one integral <ij|kl> in the MO basis
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: mo_bielec_integrals_index
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine mo_bielec_integrals_index(i,j,k,l,i1)
|
||||
|
||||
File: :file:`mo_bi_integrals.irp.f`
|
||||
|
||||
Computes an unique index for i,j,k,l integrals
|
||||
|
||||
|
@ -1,130 +0,0 @@
|
||||
.. _mpi:
|
||||
|
||||
.. program:: mpi
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
===
|
||||
mpi
|
||||
===
|
||||
|
||||
Contains all the functions and providers for parallelization with |MPI|.
|
||||
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
||||
|
||||
.. c:var:: mpi_initialized
|
||||
|
||||
.. code:: text
|
||||
|
||||
logical :: mpi_initialized
|
||||
|
||||
File: :file:`mpi.irp.f`
|
||||
|
||||
Always true. Initialized MPI
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mpi_master
|
||||
|
||||
.. code:: text
|
||||
|
||||
logical :: mpi_master
|
||||
|
||||
File: :file:`mpi.irp.f`
|
||||
|
||||
If true, rank is zero
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mpi_rank
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: mpi_rank
|
||||
integer :: mpi_size
|
||||
|
||||
File: :file:`mpi.irp.f`
|
||||
|
||||
Rank of MPI process and number of MPI processes
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: mpi_size
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: mpi_rank
|
||||
integer :: mpi_size
|
||||
|
||||
File: :file:`mpi.irp.f`
|
||||
|
||||
Rank of MPI process and number of MPI processes
|
||||
|
||||
|
||||
|
||||
|
||||
Subroutines / functions
|
||||
-----------------------
|
||||
|
||||
|
||||
|
||||
.. c:function:: broadcast_chunks_double
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine broadcast_chunks_double(A, LDA)
|
||||
|
||||
File: :file:`mpi.irp.f_template_97`
|
||||
|
||||
Broadcast with chunks of ~2GB
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: broadcast_chunks_integer
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine broadcast_chunks_integer(A, LDA)
|
||||
|
||||
File: :file:`mpi.irp.f_template_97`
|
||||
|
||||
Broadcast with chunks of ~2GB
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: broadcast_chunks_integer8
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine broadcast_chunks_integer8(A, LDA)
|
||||
|
||||
File: :file:`mpi.irp.f_template_97`
|
||||
|
||||
Broadcast with chunks of ~2GB
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: mpi_print
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine mpi_print(string)
|
||||
|
||||
File: :file:`mpi.irp.f`
|
||||
|
||||
Print string to stdout if the MPI rank is zero.
|
||||
|
||||
|
@ -1,351 +0,0 @@
|
||||
.. _nuclei:
|
||||
|
||||
.. program:: nuclei
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
======
|
||||
nuclei
|
||||
======
|
||||
|
||||
This module contains data relative to the nuclei (coordinates, charge,
|
||||
nuclear repulsion energy, etc).
|
||||
The coordinates are expressed in atomic units.
|
||||
|
||||
|
||||
|
||||
|
||||
EZFIO parameters
|
||||
----------------
|
||||
|
||||
.. option:: nucl_num
|
||||
|
||||
Number of nuclei
|
||||
|
||||
|
||||
.. option:: nucl_label
|
||||
|
||||
Nuclear labels
|
||||
|
||||
|
||||
.. option:: nucl_charge
|
||||
|
||||
Nuclear charges
|
||||
|
||||
|
||||
.. option:: nucl_coord
|
||||
|
||||
Nuclear coordinates in the format (:, {x,y,z})
|
||||
|
||||
|
||||
.. option:: disk_access_nuclear_repulsion
|
||||
|
||||
Read/Write Nuclear Repulsion from/to disk [ Write | Read | None ]
|
||||
|
||||
Default: None
|
||||
|
||||
.. option:: nuclear_repulsion
|
||||
|
||||
Nuclear repulsion (Computed automaticaly or Read in the |EZFIO|)
|
||||
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
||||
|
||||
.. c:var:: center_of_mass
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: center_of_mass (3)
|
||||
|
||||
File: :file:`nuclei.irp.f`
|
||||
|
||||
Center of mass of the molecule
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: element_mass
|
||||
|
||||
.. code:: text
|
||||
|
||||
character*(4), allocatable :: element_name (0:127)
|
||||
double precision, allocatable :: element_mass (0:127)
|
||||
|
||||
File: :file:`nuclei.irp.f`
|
||||
|
||||
Array of the name of element, sorted by nuclear charge (integer)
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: element_name
|
||||
|
||||
.. code:: text
|
||||
|
||||
character*(4), allocatable :: element_name (0:127)
|
||||
double precision, allocatable :: element_mass (0:127)
|
||||
|
||||
File: :file:`nuclei.irp.f`
|
||||
|
||||
Array of the name of element, sorted by nuclear charge (integer)
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: inertia_tensor
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: inertia_tensor (3,3)
|
||||
|
||||
File: :file:`inertia.irp.f`
|
||||
|
||||
Inertia tensor
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: inertia_tensor_eigenvalues
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: inertia_tensor_eigenvectors (3,3)
|
||||
double precision, allocatable :: inertia_tensor_eigenvalues (3)
|
||||
|
||||
File: :file:`inertia.irp.f`
|
||||
|
||||
Eigenvectors/eigenvalues of the inertia_tensor. Used to find normal orientation.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: inertia_tensor_eigenvectors
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: inertia_tensor_eigenvectors (3,3)
|
||||
double precision, allocatable :: inertia_tensor_eigenvalues (3)
|
||||
|
||||
File: :file:`inertia.irp.f`
|
||||
|
||||
Eigenvectors/eigenvalues of the inertia_tensor. Used to find normal orientation.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: nucl_coord
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: nucl_coord (nucl_num,3)
|
||||
|
||||
File: :file:`nuclei.irp.f`
|
||||
|
||||
Nuclear coordinates in the format (:, {x,y,z})
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: nucl_coord_transp
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: nucl_coord_transp (3,nucl_num)
|
||||
|
||||
File: :file:`nuclei.irp.f`
|
||||
|
||||
Transposed array of nucl_coord
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: nucl_dist
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: nucl_dist_2 (nucl_num,nucl_num)
|
||||
double precision, allocatable :: nucl_dist_vec_x (nucl_num,nucl_num)
|
||||
double precision, allocatable :: nucl_dist_vec_y (nucl_num,nucl_num)
|
||||
double precision, allocatable :: nucl_dist_vec_z (nucl_num,nucl_num)
|
||||
double precision, allocatable :: nucl_dist (nucl_num,nucl_num)
|
||||
|
||||
File: :file:`nuclei.irp.f`
|
||||
|
||||
nucl_dist : Nucleus-nucleus distances nucl_dist_2 : Nucleus-nucleus distances squared nucl_dist_vec : Nucleus-nucleus distances vectors
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: nucl_dist_2
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: nucl_dist_2 (nucl_num,nucl_num)
|
||||
double precision, allocatable :: nucl_dist_vec_x (nucl_num,nucl_num)
|
||||
double precision, allocatable :: nucl_dist_vec_y (nucl_num,nucl_num)
|
||||
double precision, allocatable :: nucl_dist_vec_z (nucl_num,nucl_num)
|
||||
double precision, allocatable :: nucl_dist (nucl_num,nucl_num)
|
||||
|
||||
File: :file:`nuclei.irp.f`
|
||||
|
||||
nucl_dist : Nucleus-nucleus distances nucl_dist_2 : Nucleus-nucleus distances squared nucl_dist_vec : Nucleus-nucleus distances vectors
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: nucl_dist_inv
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: nucl_dist_inv (nucl_num,nucl_num)
|
||||
|
||||
File: :file:`nuclei.irp.f`
|
||||
|
||||
Inverse of the distance between nucleus I and nucleus J
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: nucl_dist_vec_x
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: nucl_dist_2 (nucl_num,nucl_num)
|
||||
double precision, allocatable :: nucl_dist_vec_x (nucl_num,nucl_num)
|
||||
double precision, allocatable :: nucl_dist_vec_y (nucl_num,nucl_num)
|
||||
double precision, allocatable :: nucl_dist_vec_z (nucl_num,nucl_num)
|
||||
double precision, allocatable :: nucl_dist (nucl_num,nucl_num)
|
||||
|
||||
File: :file:`nuclei.irp.f`
|
||||
|
||||
nucl_dist : Nucleus-nucleus distances nucl_dist_2 : Nucleus-nucleus distances squared nucl_dist_vec : Nucleus-nucleus distances vectors
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: nucl_dist_vec_y
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: nucl_dist_2 (nucl_num,nucl_num)
|
||||
double precision, allocatable :: nucl_dist_vec_x (nucl_num,nucl_num)
|
||||
double precision, allocatable :: nucl_dist_vec_y (nucl_num,nucl_num)
|
||||
double precision, allocatable :: nucl_dist_vec_z (nucl_num,nucl_num)
|
||||
double precision, allocatable :: nucl_dist (nucl_num,nucl_num)
|
||||
|
||||
File: :file:`nuclei.irp.f`
|
||||
|
||||
nucl_dist : Nucleus-nucleus distances nucl_dist_2 : Nucleus-nucleus distances squared nucl_dist_vec : Nucleus-nucleus distances vectors
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: nucl_dist_vec_z
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: nucl_dist_2 (nucl_num,nucl_num)
|
||||
double precision, allocatable :: nucl_dist_vec_x (nucl_num,nucl_num)
|
||||
double precision, allocatable :: nucl_dist_vec_y (nucl_num,nucl_num)
|
||||
double precision, allocatable :: nucl_dist_vec_z (nucl_num,nucl_num)
|
||||
double precision, allocatable :: nucl_dist (nucl_num,nucl_num)
|
||||
|
||||
File: :file:`nuclei.irp.f`
|
||||
|
||||
nucl_dist : Nucleus-nucleus distances nucl_dist_2 : Nucleus-nucleus distances squared nucl_dist_vec : Nucleus-nucleus distances vectors
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: nuclear_repulsion
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: nuclear_repulsion
|
||||
|
||||
File: :file:`nuclei.irp.f`
|
||||
|
||||
Nuclear repulsion energy
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: slater_bragg_radii
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: slater_bragg_radii (100)
|
||||
|
||||
File: :file:`atomic_radii.irp.f`
|
||||
|
||||
atomic radii in Angstrom defined in table I of JCP 41, 3199 (1964) Slater execpt for the Hydrogen atom where we took the value of Becke (1988, JCP)
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: slater_bragg_radii_per_atom
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: slater_bragg_radii_per_atom (nucl_num)
|
||||
|
||||
File: :file:`atomic_radii.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: slater_bragg_radii_per_atom_ua
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: slater_bragg_radii_per_atom_ua (nucl_num)
|
||||
|
||||
File: :file:`atomic_radii.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: slater_bragg_radii_ua
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: slater_bragg_radii_ua (100)
|
||||
|
||||
File: :file:`atomic_radii.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: slater_bragg_type_inter_distance
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: slater_bragg_type_inter_distance (nucl_num,nucl_num)
|
||||
|
||||
File: :file:`atomic_radii.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: slater_bragg_type_inter_distance_ua
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: slater_bragg_type_inter_distance_ua (nucl_num,nucl_num)
|
||||
|
||||
File: :file:`atomic_radii.irp.f`
|
||||
|
||||
|
||||
|
||||
|
@ -1,620 +0,0 @@
|
||||
.. _perturbation:
|
||||
|
||||
.. program:: perturbation
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
============
|
||||
perturbation
|
||||
============
|
||||
|
||||
|
||||
All subroutines in ``*.irp.f`` starting with `pt2_` in the current directory are
|
||||
perturbation computed using the routine `i_H_psi`. Other cases are not allowed.
|
||||
The arguments of the `pt2_` are always:
|
||||
|
||||
.. code-block:: fortran
|
||||
|
||||
subroutine pt2_...( &
|
||||
psi_ref, &
|
||||
psi_ref_coefs, &
|
||||
E_refs, &
|
||||
det_pert, &
|
||||
c_pert, &
|
||||
e_2_pert, &
|
||||
H_pert_diag, &
|
||||
Nint, &
|
||||
Ndet, &
|
||||
N_st )
|
||||
|
||||
|
||||
integer , intent(in) :: Nint,Ndet,N_st
|
||||
integer(bit_kind), intent(in) :: psi_ref(Nint,2,Ndet)
|
||||
double precision , intent(in) :: psi_ref_coefs(Ndet,N_st)
|
||||
double precision , intent(in) :: E_refs(N_st)
|
||||
integer(bit_kind), intent(in) :: det_pert(Nint,2)
|
||||
double precision , intent(out) :: c_pert(N_st),e_2_pert(N_st),H_pert_diag
|
||||
|
||||
|
||||
`psi_ref`
|
||||
bitstring of the determinants present in the various `N_st` states
|
||||
|
||||
`psi_ref_coefs`
|
||||
coefficients of the determinants on the various `N_st` states
|
||||
|
||||
`E_refs`
|
||||
Energy of the various `N_st` states
|
||||
|
||||
`det_pert`
|
||||
Perturber determinant
|
||||
|
||||
`c_pert`
|
||||
Perturbative coefficients for the various states
|
||||
|
||||
`e_2_pert`
|
||||
Perturbative energetic contribution for the various states
|
||||
|
||||
`H_pert_diag`
|
||||
Diagonal |H| matrix element of the perturber
|
||||
|
||||
`Nint`
|
||||
Should be equal to `N_int`
|
||||
|
||||
`Ndet`
|
||||
Number of determinants `i` in |Psi| on which we apply <det_pert | |H| | `i`>
|
||||
|
||||
`N_st`
|
||||
Number of states
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
EZFIO parameters
|
||||
----------------
|
||||
|
||||
.. option:: do_pt2
|
||||
|
||||
If `True`, compute the |PT2| contribution
|
||||
|
||||
Default: True
|
||||
|
||||
.. option:: pt2_max
|
||||
|
||||
The selection process stops when the largest |PT2| (for all the state) is lower
|
||||
|
||||
than `pt2_max` in absolute value
|
||||
|
||||
Default: 0.0001
|
||||
|
||||
.. option:: pt2_relative_error
|
||||
|
||||
Stop stochastic |PT2| when the relative error is smaller than `PT2_relative_error`
|
||||
|
||||
Default: 0.005
|
||||
|
||||
.. option:: correlation_energy_ratio_max
|
||||
|
||||
The selection process stops at a fixed correlation ratio (useful for getting same accuracy between molecules).
|
||||
|
||||
Defined as :math:`{E_{CI}-E_{HF}}/{E_{CI}+E_{PT2} - E_{HF}}`.
|
||||
|
||||
Default: 1.00
|
||||
|
||||
.. option:: h0_type
|
||||
|
||||
Type of zeroth-order Hamiltonian [ EN | Barycentric | Variance | SOP ]
|
||||
|
||||
Default: EN
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
||||
|
||||
.. c:var:: fill_h_apply_buffer_selection
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine fill_H_apply_buffer_selection(n_selected,det_buffer,e_2_pert_buffer,coef_pert_buffer, &
|
||||
N_st,Nint,iproc,select_max_out)
|
||||
|
||||
File: :file:`selection.irp.f`
|
||||
|
||||
Fill the H_apply buffer with determiants for the selection
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: max_exc_pert
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: max_exc_pert
|
||||
|
||||
File: :file:`exc_max.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: selection_criterion
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: selection_criterion
|
||||
double precision :: selection_criterion_min
|
||||
double precision :: selection_criterion_factor
|
||||
|
||||
File: :file:`selection.irp.f`
|
||||
|
||||
Threshold to select determinants. Set by selection routines.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: selection_criterion_factor
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: selection_criterion
|
||||
double precision :: selection_criterion_min
|
||||
double precision :: selection_criterion_factor
|
||||
|
||||
File: :file:`selection.irp.f`
|
||||
|
||||
Threshold to select determinants. Set by selection routines.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: selection_criterion_min
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: selection_criterion
|
||||
double precision :: selection_criterion_min
|
||||
double precision :: selection_criterion_factor
|
||||
|
||||
File: :file:`selection.irp.f`
|
||||
|
||||
Threshold to select determinants. Set by selection routines.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: var_pt2_ratio
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: var_pt2_ratio
|
||||
|
||||
File: :file:`var_pt2_ratio_provider.irp.f`
|
||||
|
||||
The selection process stops when the energy ratio variational/(variational+PT2) is equal to var_pt2_ratio
|
||||
|
||||
|
||||
|
||||
|
||||
Subroutines / functions
|
||||
-----------------------
|
||||
|
||||
|
||||
|
||||
.. c:function:: perturb_buffer_by_mono_dummy
|
||||
|
||||
.. code:: text
|
||||
|
||||
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)
|
||||
|
||||
File: :file:`perturbation.irp.f_shell_13`
|
||||
|
||||
Applly pertubration ``dummy`` to the buffer of determinants generated in the H_apply routine.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: perturb_buffer_by_mono_epstein_nesbet
|
||||
|
||||
.. code:: text
|
||||
|
||||
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)
|
||||
|
||||
File: :file:`perturbation.irp.f_shell_13`
|
||||
|
||||
Applly pertubration ``epstein_nesbet`` to the buffer of determinants generated in the H_apply routine.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: perturb_buffer_by_mono_epstein_nesbet_2x2
|
||||
|
||||
.. code:: text
|
||||
|
||||
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)
|
||||
|
||||
File: :file:`perturbation.irp.f_shell_13`
|
||||
|
||||
Applly pertubration ``epstein_nesbet_2x2`` to the buffer of determinants generated in the H_apply routine.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: perturb_buffer_by_mono_epstein_nesbet_2x2_no_ci_diag
|
||||
|
||||
.. code:: text
|
||||
|
||||
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)
|
||||
|
||||
File: :file:`perturbation.irp.f_shell_13`
|
||||
|
||||
Applly pertubration ``epstein_nesbet_2x2_no_ci_diag`` to the buffer of determinants generated in the H_apply routine.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: perturb_buffer_by_mono_h_core
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine perturb_buffer_by_mono_h_core(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)
|
||||
|
||||
File: :file:`perturbation.irp.f_shell_13`
|
||||
|
||||
Applly pertubration ``h_core`` to the buffer of determinants generated in the H_apply routine.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: perturb_buffer_by_mono_moller_plesset
|
||||
|
||||
.. code:: text
|
||||
|
||||
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)
|
||||
|
||||
File: :file:`perturbation.irp.f_shell_13`
|
||||
|
||||
Applly pertubration ``moller_plesset`` to the buffer of determinants generated in the H_apply routine.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: perturb_buffer_by_mono_moller_plesset_general
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine perturb_buffer_by_mono_moller_plesset_general(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)
|
||||
|
||||
File: :file:`perturbation.irp.f_shell_13`
|
||||
|
||||
Applly pertubration ``moller_plesset_general`` to the buffer of determinants generated in the H_apply routine.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: perturb_buffer_by_mono_qdpt
|
||||
|
||||
.. code:: text
|
||||
|
||||
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)
|
||||
|
||||
File: :file:`perturbation.irp.f_shell_13`
|
||||
|
||||
Applly pertubration ``qdpt`` to the buffer of determinants generated in the H_apply routine.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: perturb_buffer_dummy
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine perturb_buffer_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)
|
||||
|
||||
File: :file:`perturbation.irp.f_shell_13`
|
||||
|
||||
Applly pertubration ``dummy`` to the buffer of determinants generated in the H_apply routine.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: perturb_buffer_epstein_nesbet
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine perturb_buffer_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)
|
||||
|
||||
File: :file:`perturbation.irp.f_shell_13`
|
||||
|
||||
Applly pertubration ``epstein_nesbet`` to the buffer of determinants generated in the H_apply routine.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: perturb_buffer_epstein_nesbet_2x2
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine perturb_buffer_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)
|
||||
|
||||
File: :file:`perturbation.irp.f_shell_13`
|
||||
|
||||
Applly pertubration ``epstein_nesbet_2x2`` to the buffer of determinants generated in the H_apply routine.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: perturb_buffer_epstein_nesbet_2x2_no_ci_diag
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine perturb_buffer_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)
|
||||
|
||||
File: :file:`perturbation.irp.f_shell_13`
|
||||
|
||||
Applly pertubration ``epstein_nesbet_2x2_no_ci_diag`` to the buffer of determinants generated in the H_apply routine.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: perturb_buffer_h_core
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine perturb_buffer_h_core(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)
|
||||
|
||||
File: :file:`perturbation.irp.f_shell_13`
|
||||
|
||||
Applly pertubration ``h_core`` to the buffer of determinants generated in the H_apply routine.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: perturb_buffer_moller_plesset
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine perturb_buffer_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)
|
||||
|
||||
File: :file:`perturbation.irp.f_shell_13`
|
||||
|
||||
Applly pertubration ``moller_plesset`` to the buffer of determinants generated in the H_apply routine.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: perturb_buffer_moller_plesset_general
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine perturb_buffer_moller_plesset_general(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)
|
||||
|
||||
File: :file:`perturbation.irp.f_shell_13`
|
||||
|
||||
Applly pertubration ``moller_plesset_general`` to the buffer of determinants generated in the H_apply routine.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: perturb_buffer_qdpt
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine perturb_buffer_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)
|
||||
|
||||
File: :file:`perturbation.irp.f_shell_13`
|
||||
|
||||
Applly pertubration ``qdpt`` to the buffer of determinants generated in the H_apply routine.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: pt2_dummy
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine pt2_dummy (electronic_energy,det_ref,det_pert,fock_diag_tmp,c_pert,e_2_pert,H_pert_diag,Nint,ndet,N_st,minilist,idx_minilist,N_minilist)
|
||||
|
||||
File: :file:`pt2_equations.irp.f_template_365`
|
||||
|
||||
Dummy perturbation to add all connected determinants.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: pt2_epstein_nesbet
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine pt2_epstein_nesbet (electronic_energy,det_ref,det_pert,fock_diag_tmp,c_pert,e_2_pert,H_pert_diag,Nint,ndet,N_st,minilist,idx_minilist,N_minilist)
|
||||
|
||||
File: :file:`pt2_equations.irp.f_template_365`
|
||||
|
||||
compute the standard Epstein-Nesbet perturbative first order coefficient and second order energetic contribution
|
||||
|
||||
for the various N_st states.
|
||||
|
||||
c_pert(i) = <psi(i)|H|det_pert>/( E(i) - <det_pert|H|det_pert> )
|
||||
|
||||
e_2_pert(i) = <psi(i)|H|det_pert>^2/( E(i) - <det_pert|H|det_pert> )
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: pt2_epstein_nesbet_2x2
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine pt2_epstein_nesbet_2x2 (electronic_energy,det_ref,det_pert,fock_diag_tmp,c_pert,e_2_pert,H_pert_diag,Nint,ndet,N_st,minilist,idx_minilist,N_minilist)
|
||||
|
||||
File: :file:`pt2_equations.irp.f_template_365`
|
||||
|
||||
compute the Epstein-Nesbet 2x2 diagonalization coefficient and energetic contribution
|
||||
|
||||
for the various N_st states.
|
||||
|
||||
e_2_pert(i) = 0.5 * (( <det_pert|H|det_pert> - E(i) ) - sqrt( ( <det_pert|H|det_pert> - E(i)) ^2 + 4 <psi(i)|H|det_pert>^2 )
|
||||
|
||||
c_pert(i) = e_2_pert(i)/ <psi(i)|H|det_pert>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: pt2_epstein_nesbet_2x2_no_ci_diag
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine pt2_epstein_nesbet_2x2_no_ci_diag(electronic_energy,det_ref,det_pert,fock_diag_tmp,c_pert,e_2_pert,H_pert_diag,Nint,ndet,N_st,minilist,idx_minilist,N_minilist)
|
||||
|
||||
File: :file:`pt2_equations.irp.f_template_365`
|
||||
|
||||
compute the Epstein-Nesbet 2x2 diagonalization coefficient and energetic contribution
|
||||
|
||||
for the various N_st states.
|
||||
|
||||
e_2_pert(i) = 0.5 * (( <det_pert|H|det_pert> - E(i) ) - sqrt( ( <det_pert|H|det_pert> - E(i)) ^2 + 4 <psi(i)|H|det_pert>^2 )
|
||||
|
||||
c_pert(i) = e_2_pert(i)/ <psi(i)|H|det_pert>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: pt2_h_core
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine pt2_h_core(det_pert,c_pert,e_2_pert,H_pert_diag,Nint,ndet,N_st,minilist,idx_minilist,N_minilist)
|
||||
|
||||
File: :file:`pert_single.irp.f`
|
||||
|
||||
compute the standard Epstein-Nesbet perturbative first order coefficient and second order energetic contribution
|
||||
|
||||
for the various N_st states.
|
||||
|
||||
c_pert(i) = <psi(i)|H|det_pert>/( E(i) - <det_pert|H|det_pert> )
|
||||
|
||||
e_2_pert(i) = <psi(i)|H|det_pert>^2/( E(i) - <det_pert|H|det_pert> )
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: pt2_moller_plesset
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine pt2_moller_plesset (electronic_energy,det_ref,det_pert,fock_diag_tmp,c_pert,e_2_pert,H_pert_diag,Nint,ndet,N_st,minilist,idx_minilist,N_minilist)
|
||||
|
||||
File: :file:`pt2_equations.irp.f_template_365`
|
||||
|
||||
compute the standard Moller-Plesset perturbative first order coefficient and second order energetic contribution
|
||||
|
||||
for the various n_st states.
|
||||
|
||||
c_pert(i) = <psi(i)|H|det_pert>/(difference of orbital energies)
|
||||
|
||||
e_2_pert(i) = <psi(i)|H|det_pert>^2/(difference of orbital energies)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: pt2_moller_plesset_general
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine pt2_moller_plesset_general (electronic_energy,det_ref,det_pert,fock_diag_tmp,c_pert,e_2_pert,H_pert_diag,Nint,ndet,N_st,minilist,idx_minilist,N_minilist)
|
||||
|
||||
File: :file:`pt2_equations.irp.f_template_365`
|
||||
|
||||
compute the general Moller-Plesset perturbative first order coefficient and second order energetic contribution
|
||||
|
||||
for the various n_st states.
|
||||
|
||||
c_pert(i) = <psi(i)|H|det_pert>/(difference of orbital energies)
|
||||
|
||||
e_2_pert(i) = <psi(i)|H|det_pert>^2/(difference of orbital energies)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: pt2_qdpt
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine pt2_qdpt (electronic_energy,det_ref,det_pert,fock_diag_tmp,c_pert,e_2_pert,H_pert_diag,Nint,ndet,N_st,minilist,idx_minilist,N_minilist)
|
||||
|
||||
File: :file:`pt2_equations.irp.f_template_365`
|
||||
|
||||
compute the QDPT first order coefficient and second order energetic contribution
|
||||
|
||||
for the various N_st states.
|
||||
|
||||
c_pert(i) = <psi(i)|H|det_pert>/( <psi(i)|H|psi(i)> - <det_pert|H|det_pert> )
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: remove_small_contributions
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine remove_small_contributions
|
||||
|
||||
File: :file:`selection.irp.f`
|
||||
|
||||
Remove determinants with small contributions. N_states is assumed to be provided.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: repeat_all_e_corr
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision function repeat_all_e_corr(key_in)
|
||||
|
||||
File: :file:`pert_sc2.irp.f`
|
||||
|
||||
|
||||
|
||||
|
@ -1,94 +0,0 @@
|
||||
.. _pseudo:
|
||||
|
||||
.. program:: pseudo
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
======
|
||||
pseudo
|
||||
======
|
||||
|
||||
This module defines the |EZFIO| parameters of the effective core potentials.
|
||||
|
||||
|
||||
|
||||
EZFIO parameters
|
||||
----------------
|
||||
|
||||
.. option:: nucl_charge_remove
|
||||
|
||||
Nuclear charges removed per atom
|
||||
|
||||
|
||||
.. option:: pseudo_klocmax
|
||||
|
||||
Maximum value of k for the local component
|
||||
|
||||
|
||||
.. option:: pseudo_n_k
|
||||
|
||||
Number of gaussians in the local component
|
||||
|
||||
|
||||
.. option:: pseudo_v_k
|
||||
|
||||
Coefficients in the local component
|
||||
|
||||
|
||||
.. option:: pseudo_dz_k
|
||||
|
||||
Exponents in the local component
|
||||
|
||||
|
||||
.. option:: pseudo_lmax
|
||||
|
||||
Maximum angular momentum
|
||||
|
||||
|
||||
.. option:: pseudo_kmax
|
||||
|
||||
Maximum number of functions in the non-local component
|
||||
|
||||
|
||||
.. option:: pseudo_n_kl
|
||||
|
||||
Number of functions in the non-local component
|
||||
|
||||
|
||||
.. option:: pseudo_v_kl
|
||||
|
||||
Coefficients in the non-local component
|
||||
|
||||
|
||||
.. option:: pseudo_dz_kl
|
||||
|
||||
Exponents in the non-local component
|
||||
|
||||
|
||||
.. option:: do_pseudo
|
||||
|
||||
If `True`, pseudo-potentials are used.
|
||||
|
||||
Default: False
|
||||
|
||||
.. option:: pseudo_grid_size
|
||||
|
||||
Nb of points of the grid for the QMC interfaces
|
||||
|
||||
Default: 1000
|
||||
|
||||
.. option:: pseudo_grid_rmax
|
||||
|
||||
R_max of the QMC grid
|
||||
|
||||
Default: 10.0
|
||||
|
||||
.. option:: ao_pseudo_grid
|
||||
|
||||
Grid for the QMC interface
|
||||
|
||||
|
||||
.. option:: mo_pseudo_grid
|
||||
|
||||
Grid for the QMC interface
|
||||
|
@ -1,14 +0,0 @@
|
||||
.. _psiref_cas:
|
||||
|
||||
.. program:: psiref_cas
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
==========
|
||||
psiref_cas
|
||||
==========
|
||||
|
||||
Reference wave function is defined as a |CAS| wave function.
|
||||
This module is required for |CAS-SD|, |MRPT| or |MRCC|.
|
||||
|
||||
|
@ -1,16 +0,0 @@
|
||||
.. _psiref_utils:
|
||||
|
||||
.. program:: psiref_utils
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
============
|
||||
psiref_utils
|
||||
============
|
||||
|
||||
|
||||
Utilities related to the use of a reference wave function. This module
|
||||
needs to be loaded with any `psi_ref_*` module.
|
||||
|
||||
|
||||
|
@ -1,390 +0,0 @@
|
||||
.. _scf_utils:
|
||||
|
||||
.. program:: scf_utils
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
=========
|
||||
scf_utils
|
||||
=========
|
||||
|
||||
|
||||
|
||||
The scf_utils module is an abstract module which contains the basics to perform *Restricted* SCF calculations (the
|
||||
spatial part of the |MOs| is common for alpha and beta spinorbitals) based on a single-determinant wave function.
|
||||
|
||||
This module does not produce any executable *and must not do*, but instead it contains everything one needs to perform an orbital optimization based on an Fock matrix.
|
||||
The ``scf_utils`` module is meant to be included in the :file:`NEED` of the various single determinant SCF procedures, such as ``hartree_fock`` or ``kohn_sham``, where a specific definition of the Fock matrix is given (see :file:`hartree_fock fock_matrix_hf.irp.f` for an example).
|
||||
|
||||
All SCF programs perform the following actions:
|
||||
|
||||
|
||||
#. Compute/Read all the one- and two-electron integrals, and store them in memory
|
||||
|
||||
#. Check in the |EZFIO| database if there is a set of |MOs|. If there is, it
|
||||
will read them as initial guess. Otherwise, it will create a guess.
|
||||
#. Perform the |SCF| iterations based on the definition of the Fock matrix
|
||||
|
||||
|
||||
The main keywords/options are:
|
||||
|
||||
* :option:`scf_utils thresh_scf`
|
||||
* :option:`scf_utils level_shift`
|
||||
|
||||
At each iteration, the |MOs| are saved in the |EZFIO| database. Hence, if the calculation
|
||||
crashes for any unexpected reason, the calculation can be restarted by running again
|
||||
the |SCF| with the same |EZFIO| database.
|
||||
|
||||
The `DIIS`_ algorithm is implemented, as well as the `level-shifting`_ method.
|
||||
If the |SCF| does not converge, try again with a higher value of :option:`level_shift`.
|
||||
|
||||
To start a calculation from scratch, the simplest way is to remove the
|
||||
``mo_basis`` directory from the |EZFIO| database, and run the |SCF| again.
|
||||
|
||||
.. _DIIS: https://en.wikipedia.org/w/index.php?title=DIIS
|
||||
.. _level-shifting: https://doi.org/10.1002/qua.560070407
|
||||
|
||||
|
||||
|
||||
|
||||
EZFIO parameters
|
||||
----------------
|
||||
|
||||
.. option:: max_dim_diis
|
||||
|
||||
Maximum size of the DIIS extrapolation procedure
|
||||
|
||||
Default: 15
|
||||
|
||||
.. option:: threshold_diis
|
||||
|
||||
Threshold on the convergence of the DIIS error vector during a Hartree-Fock calculation. If 0. is chosen, the square root of thresh_scf will be used.
|
||||
|
||||
Default: 0.
|
||||
|
||||
.. option:: thresh_scf
|
||||
|
||||
Threshold on the convergence of the Hartree Fock energy.
|
||||
|
||||
Default: 1.e-10
|
||||
|
||||
.. option:: n_it_scf_max
|
||||
|
||||
Maximum number of SCF iterations
|
||||
|
||||
Default: 500
|
||||
|
||||
.. option:: level_shift
|
||||
|
||||
Energy shift on the virtual MOs to improve SCF convergence
|
||||
|
||||
Default: 0.
|
||||
|
||||
.. option:: scf_algorithm
|
||||
|
||||
Type of SCF algorithm used. Possible choices are [ Simple | DIIS]
|
||||
|
||||
Default: DIIS
|
||||
|
||||
.. option:: mo_guess_type
|
||||
|
||||
Initial MO guess. Can be [ Huckel | HCore ]
|
||||
|
||||
Default: Huckel
|
||||
|
||||
.. option:: energy
|
||||
|
||||
Calculated HF energy
|
||||
|
||||
|
||||
.. option:: no_oa_or_av_opt
|
||||
|
||||
If true, leave the active orbitals untouched in the SCF procedure
|
||||
|
||||
Default: False
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
||||
|
||||
.. c:var:: eigenvalues_fock_matrix_ao
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: eigenvalues_fock_matrix_ao (AO_num)
|
||||
double precision, allocatable :: eigenvectors_fock_matrix_ao (AO_num,AO_num)
|
||||
|
||||
File: :file:`diis.irp.f`
|
||||
|
||||
Eigenvalues and eigenvectors of the Fock matrix over the AO basis
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: eigenvectors_fock_matrix_ao
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: eigenvalues_fock_matrix_ao (AO_num)
|
||||
double precision, allocatable :: eigenvectors_fock_matrix_ao (AO_num,AO_num)
|
||||
|
||||
File: :file:`diis.irp.f`
|
||||
|
||||
Eigenvalues and eigenvectors of the Fock matrix over the AO basis
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: eigenvectors_fock_matrix_mo
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: eigenvectors_fock_matrix_mo (ao_num,mo_tot_num)
|
||||
|
||||
File: :file:`diagonalize_fock.irp.f`
|
||||
|
||||
Eigenvector of the Fock matrix in the MO basis obtained with level shift.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: extrapolate_fock_matrix
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine extrapolate_Fock_matrix( &
|
||||
error_matrix_DIIS,Fock_matrix_DIIS, &
|
||||
Fock_matrix_AO_,size_Fock_matrix_AO, &
|
||||
iteration_SCF,dim_DIIS &
|
||||
)
|
||||
|
||||
File: :file:`roothaan_hall_scf.irp.f`
|
||||
|
||||
Compute the extrapolated Fock matrix using the DIIS procedure
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: fock_matrix_ao
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: fock_matrix_ao (ao_num,ao_num)
|
||||
|
||||
File: :file:`fock_matrix.irp.f`
|
||||
|
||||
Fock matrix in AO basis set
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: fock_matrix_diag_mo
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: fock_matrix_mo (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: fock_matrix_diag_mo (mo_tot_num)
|
||||
|
||||
File: :file:`fock_matrix.irp.f`
|
||||
|
||||
Fock matrix on the MO basis. For open shells, the ROHF Fock Matrix is ::
|
||||
|
||||
| F-K | F + K/2 | F | |---------------------------------| | F + K/2 | F | F - K/2 | |---------------------------------| | F | F - K/2 | F + K |
|
||||
|
||||
|
||||
|
||||
F = 1/2 (Fa + Fb)
|
||||
|
||||
K = Fb - Fa
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: fock_matrix_mo
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: fock_matrix_mo (mo_tot_num,mo_tot_num)
|
||||
double precision, allocatable :: fock_matrix_diag_mo (mo_tot_num)
|
||||
|
||||
File: :file:`fock_matrix.irp.f`
|
||||
|
||||
Fock matrix on the MO basis. For open shells, the ROHF Fock Matrix is ::
|
||||
|
||||
| F-K | F + K/2 | F | |---------------------------------| | F + K/2 | F | F - K/2 | |---------------------------------| | F | F - K/2 | F + K |
|
||||
|
||||
|
||||
|
||||
F = 1/2 (Fa + Fb)
|
||||
|
||||
K = Fb - Fa
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: fock_matrix_mo_alpha
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: fock_matrix_mo_alpha (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`fock_matrix.irp.f`
|
||||
|
||||
Fock matrix on the MO basis
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: fock_matrix_mo_beta
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: fock_matrix_mo_beta (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`fock_matrix.irp.f`
|
||||
|
||||
Fock matrix on the MO basis
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: fps_spf_matrix_ao
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: fps_spf_matrix_ao (AO_num,AO_num)
|
||||
|
||||
File: :file:`diis.irp.f`
|
||||
|
||||
Commutator FPS - SPF
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: fps_spf_matrix_mo
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: fps_spf_matrix_mo (mo_tot_num,mo_tot_num)
|
||||
|
||||
File: :file:`diis.irp.f`
|
||||
|
||||
Commutator FPS - SPF in MO basis
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: scf_density_matrix_ao
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: scf_density_matrix_ao (ao_num,ao_num)
|
||||
|
||||
File: :file:`scf_density_matrix_ao.irp.f`
|
||||
|
||||
S^{-1}.P.S^{-1} where P = C.C^t
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: scf_density_matrix_ao_alpha
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: scf_density_matrix_ao_alpha (ao_num,ao_num)
|
||||
|
||||
File: :file:`scf_density_matrix_ao.irp.f`
|
||||
|
||||
S^{-1}.P_alpha.S^{-1}
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: scf_density_matrix_ao_beta
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: scf_density_matrix_ao_beta (ao_num,ao_num)
|
||||
|
||||
File: :file:`scf_density_matrix_ao.irp.f`
|
||||
|
||||
S^{-1}.P_beta.S^{-1}
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: scf_energy
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: scf_energy
|
||||
|
||||
File: :file:`fock_matrix.irp.f`
|
||||
|
||||
Hartree-Fock energy
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: threshold_diis_nonzero
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: threshold_diis_nonzero
|
||||
|
||||
File: :file:`diis.irp.f`
|
||||
|
||||
If threshold_DIIS is zero, choose sqrt(thresh_scf)
|
||||
|
||||
|
||||
|
||||
|
||||
Subroutines / functions
|
||||
-----------------------
|
||||
|
||||
|
||||
|
||||
.. c:function:: damping_scf
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine damping_SCF
|
||||
|
||||
File: :file:`damping_scf.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: huckel_guess
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine huckel_guess
|
||||
|
||||
File: :file:`huckel.irp.f`
|
||||
|
||||
Build the MOs using the extended Huckel model
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: roothaan_hall_scf
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine Roothaan_Hall_SCF
|
||||
|
||||
File: :file:`roothaan_hall_scf.irp.f`
|
||||
|
||||
Roothaan-Hall algorithm for SCF Hartree-Fock calculation
|
||||
|
||||
|
@ -1,13 +0,0 @@
|
||||
.. _selectors_cassd:
|
||||
|
||||
.. program:: selectors_cassd
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
===============
|
||||
selectors_cassd
|
||||
===============
|
||||
|
||||
Selectors for |CAS-SD| calculations. The selectors are defined as first the
|
||||
generators from :ref:`Generators_CAS`, and then the rest of the wave function.
|
||||
|
@ -1,72 +0,0 @@
|
||||
.. _selectors_full:
|
||||
|
||||
.. program:: selectors_full
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
==============
|
||||
selectors_full
|
||||
==============
|
||||
|
||||
All the determinants are possible selectors. Only the largest contributions are kept, where
|
||||
a threshold is applied to the squared norm of the wave function, with the :option:`determinants
|
||||
threshold_selectors` flag.
|
||||
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
||||
|
||||
.. c:var:: n_det_selectors
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: n_det_selectors
|
||||
|
||||
File: :file:`selectors.irp.f`
|
||||
|
||||
For Single reference wave functions, the number of selectors is 1 : the Hartree-Fock determinant
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: psi_selectors
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer(bit_kind), allocatable :: psi_selectors (N_int,2,psi_selectors_size)
|
||||
double precision, allocatable :: psi_selectors_coef (psi_selectors_size,N_states)
|
||||
|
||||
File: :file:`selectors.irp.f`
|
||||
|
||||
Determinants on which we apply <i|H|psi> for perturbation.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: psi_selectors_coef
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer(bit_kind), allocatable :: psi_selectors (N_int,2,psi_selectors_size)
|
||||
double precision, allocatable :: psi_selectors_coef (psi_selectors_size,N_states)
|
||||
|
||||
File: :file:`selectors.irp.f`
|
||||
|
||||
Determinants on which we apply <i|H|psi> for perturbation.
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: threshold_selectors
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: threshold_selectors
|
||||
|
||||
File: :file:`selectors.irp.f`
|
||||
|
||||
Thresholds on selectors (fraction of the square of the norm)
|
||||
|
||||
|
@ -1,381 +0,0 @@
|
||||
.. _selectors_utils:
|
||||
|
||||
.. program:: selectors_utils
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
===============
|
||||
selectors_utils
|
||||
===============
|
||||
|
||||
Helper functions for selectors.
|
||||
|
||||
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
||||
|
||||
.. c:var:: coef_hf_selector
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: coef_hf_selector
|
||||
double precision :: inv_selectors_coef_hf
|
||||
double precision :: inv_selectors_coef_hf_squared
|
||||
double precision, allocatable :: e_corr_per_selectors (N_det_selectors)
|
||||
double precision, allocatable :: i_h_hf_per_selectors (N_det_selectors)
|
||||
double precision, allocatable :: delta_e_per_selector (N_det_selectors)
|
||||
double precision :: e_corr_double_only
|
||||
double precision :: e_corr_second_order
|
||||
|
||||
File: :file:`e_corr_selectors.irp.f`
|
||||
|
||||
Correlation energy per determinant with respect to the Hartree-Fock determinant for the all the double excitations in the selectors determinants.
|
||||
|
||||
E_corr_per_selectors(i) = :math:`\langle D_i | H | \text{HF}\rangle c(D_i)/c(HF)` if :math:`| D_i \rangle` is a double excitation.
|
||||
|
||||
E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation
|
||||
|
||||
coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: delta_e_per_selector
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: coef_hf_selector
|
||||
double precision :: inv_selectors_coef_hf
|
||||
double precision :: inv_selectors_coef_hf_squared
|
||||
double precision, allocatable :: e_corr_per_selectors (N_det_selectors)
|
||||
double precision, allocatable :: i_h_hf_per_selectors (N_det_selectors)
|
||||
double precision, allocatable :: delta_e_per_selector (N_det_selectors)
|
||||
double precision :: e_corr_double_only
|
||||
double precision :: e_corr_second_order
|
||||
|
||||
File: :file:`e_corr_selectors.irp.f`
|
||||
|
||||
Correlation energy per determinant with respect to the Hartree-Fock determinant for the all the double excitations in the selectors determinants.
|
||||
|
||||
E_corr_per_selectors(i) = :math:`\langle D_i | H | \text{HF}\rangle c(D_i)/c(HF)` if :math:`| D_i \rangle` is a double excitation.
|
||||
|
||||
E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation
|
||||
|
||||
coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: double_index_selectors
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: exc_degree_per_selectors (N_det_selectors)
|
||||
integer, allocatable :: double_index_selectors (N_det_selectors)
|
||||
integer :: n_double_selectors
|
||||
|
||||
File: :file:`e_corr_selectors.irp.f`
|
||||
|
||||
Degree of excitation respect to Hartree Fock for the wave function for the all the selectors determinants.
|
||||
|
||||
double_index_selectors = list of the index of the double excitations
|
||||
|
||||
n_double_selectors = number of double excitations in the selectors determinants
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: e_corr_double_only
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: coef_hf_selector
|
||||
double precision :: inv_selectors_coef_hf
|
||||
double precision :: inv_selectors_coef_hf_squared
|
||||
double precision, allocatable :: e_corr_per_selectors (N_det_selectors)
|
||||
double precision, allocatable :: i_h_hf_per_selectors (N_det_selectors)
|
||||
double precision, allocatable :: delta_e_per_selector (N_det_selectors)
|
||||
double precision :: e_corr_double_only
|
||||
double precision :: e_corr_second_order
|
||||
|
||||
File: :file:`e_corr_selectors.irp.f`
|
||||
|
||||
Correlation energy per determinant with respect to the Hartree-Fock determinant for the all the double excitations in the selectors determinants.
|
||||
|
||||
E_corr_per_selectors(i) = :math:`\langle D_i | H | \text{HF}\rangle c(D_i)/c(HF)` if :math:`| D_i \rangle` is a double excitation.
|
||||
|
||||
E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation
|
||||
|
||||
coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: e_corr_per_selectors
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: coef_hf_selector
|
||||
double precision :: inv_selectors_coef_hf
|
||||
double precision :: inv_selectors_coef_hf_squared
|
||||
double precision, allocatable :: e_corr_per_selectors (N_det_selectors)
|
||||
double precision, allocatable :: i_h_hf_per_selectors (N_det_selectors)
|
||||
double precision, allocatable :: delta_e_per_selector (N_det_selectors)
|
||||
double precision :: e_corr_double_only
|
||||
double precision :: e_corr_second_order
|
||||
|
||||
File: :file:`e_corr_selectors.irp.f`
|
||||
|
||||
Correlation energy per determinant with respect to the Hartree-Fock determinant for the all the double excitations in the selectors determinants.
|
||||
|
||||
E_corr_per_selectors(i) = :math:`\langle D_i | H | \text{HF}\rangle c(D_i)/c(HF)` if :math:`| D_i \rangle` is a double excitation.
|
||||
|
||||
E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation
|
||||
|
||||
coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: e_corr_second_order
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: coef_hf_selector
|
||||
double precision :: inv_selectors_coef_hf
|
||||
double precision :: inv_selectors_coef_hf_squared
|
||||
double precision, allocatable :: e_corr_per_selectors (N_det_selectors)
|
||||
double precision, allocatable :: i_h_hf_per_selectors (N_det_selectors)
|
||||
double precision, allocatable :: delta_e_per_selector (N_det_selectors)
|
||||
double precision :: e_corr_double_only
|
||||
double precision :: e_corr_second_order
|
||||
|
||||
File: :file:`e_corr_selectors.irp.f`
|
||||
|
||||
Correlation energy per determinant with respect to the Hartree-Fock determinant for the all the double excitations in the selectors determinants.
|
||||
|
||||
E_corr_per_selectors(i) = :math:`\langle D_i | H | \text{HF}\rangle c(D_i)/c(HF)` if :math:`| D_i \rangle` is a double excitation.
|
||||
|
||||
E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation
|
||||
|
||||
coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: exc_degree_per_selectors
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: exc_degree_per_selectors (N_det_selectors)
|
||||
integer, allocatable :: double_index_selectors (N_det_selectors)
|
||||
integer :: n_double_selectors
|
||||
|
||||
File: :file:`e_corr_selectors.irp.f`
|
||||
|
||||
Degree of excitation respect to Hartree Fock for the wave function for the all the selectors determinants.
|
||||
|
||||
double_index_selectors = list of the index of the double excitations
|
||||
|
||||
n_double_selectors = number of double excitations in the selectors determinants
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: i_h_hf_per_selectors
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: coef_hf_selector
|
||||
double precision :: inv_selectors_coef_hf
|
||||
double precision :: inv_selectors_coef_hf_squared
|
||||
double precision, allocatable :: e_corr_per_selectors (N_det_selectors)
|
||||
double precision, allocatable :: i_h_hf_per_selectors (N_det_selectors)
|
||||
double precision, allocatable :: delta_e_per_selector (N_det_selectors)
|
||||
double precision :: e_corr_double_only
|
||||
double precision :: e_corr_second_order
|
||||
|
||||
File: :file:`e_corr_selectors.irp.f`
|
||||
|
||||
Correlation energy per determinant with respect to the Hartree-Fock determinant for the all the double excitations in the selectors determinants.
|
||||
|
||||
E_corr_per_selectors(i) = :math:`\langle D_i | H | \text{HF}\rangle c(D_i)/c(HF)` if :math:`| D_i \rangle` is a double excitation.
|
||||
|
||||
E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation
|
||||
|
||||
coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: inv_selectors_coef_hf
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: coef_hf_selector
|
||||
double precision :: inv_selectors_coef_hf
|
||||
double precision :: inv_selectors_coef_hf_squared
|
||||
double precision, allocatable :: e_corr_per_selectors (N_det_selectors)
|
||||
double precision, allocatable :: i_h_hf_per_selectors (N_det_selectors)
|
||||
double precision, allocatable :: delta_e_per_selector (N_det_selectors)
|
||||
double precision :: e_corr_double_only
|
||||
double precision :: e_corr_second_order
|
||||
|
||||
File: :file:`e_corr_selectors.irp.f`
|
||||
|
||||
Correlation energy per determinant with respect to the Hartree-Fock determinant for the all the double excitations in the selectors determinants.
|
||||
|
||||
E_corr_per_selectors(i) = :math:`\langle D_i | H | \text{HF}\rangle c(D_i)/c(HF)` if :math:`| D_i \rangle` is a double excitation.
|
||||
|
||||
E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation
|
||||
|
||||
coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: inv_selectors_coef_hf_squared
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision :: coef_hf_selector
|
||||
double precision :: inv_selectors_coef_hf
|
||||
double precision :: inv_selectors_coef_hf_squared
|
||||
double precision, allocatable :: e_corr_per_selectors (N_det_selectors)
|
||||
double precision, allocatable :: i_h_hf_per_selectors (N_det_selectors)
|
||||
double precision, allocatable :: delta_e_per_selector (N_det_selectors)
|
||||
double precision :: e_corr_double_only
|
||||
double precision :: e_corr_second_order
|
||||
|
||||
File: :file:`e_corr_selectors.irp.f`
|
||||
|
||||
Correlation energy per determinant with respect to the Hartree-Fock determinant for the all the double excitations in the selectors determinants.
|
||||
|
||||
E_corr_per_selectors(i) = :math:`\langle D_i | H | \text{HF}\rangle c(D_i)/c(HF)` if :math:`| D_i \rangle` is a double excitation.
|
||||
|
||||
E_corr_per_selectors(i) = -1000.d0 if it is not a double excitation
|
||||
|
||||
coef_hf_selector = coefficient of the Hartree Fock determinant in the selectors determinants
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: n_double_selectors
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer, allocatable :: exc_degree_per_selectors (N_det_selectors)
|
||||
integer, allocatable :: double_index_selectors (N_det_selectors)
|
||||
integer :: n_double_selectors
|
||||
|
||||
File: :file:`e_corr_selectors.irp.f`
|
||||
|
||||
Degree of excitation respect to Hartree Fock for the wave function for the all the selectors determinants.
|
||||
|
||||
double_index_selectors = list of the index of the double excitations
|
||||
|
||||
n_double_selectors = number of double excitations in the selectors determinants
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: psi_selectors_coef_transp
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: psi_selectors_coef_transp (N_states,psi_selectors_size)
|
||||
|
||||
File: :file:`selectors.irp.f`
|
||||
|
||||
Transposed psi_selectors
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: psi_selectors_diag_h_mat
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: psi_selectors_diag_h_mat (psi_selectors_size)
|
||||
|
||||
File: :file:`selectors.irp.f`
|
||||
|
||||
Diagonal elements of the H matrix for each selectors
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: psi_selectors_size
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: psi_selectors_size
|
||||
|
||||
File: :file:`selectors.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Subroutines / functions
|
||||
-----------------------
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_get_n_det_generators
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function zmq_get_N_det_generators(zmq_to_qp_run_socket, worker_id)
|
||||
|
||||
File: :file:`zmq.irp.f_template_102`
|
||||
|
||||
Get N_det_generators from the qp_run scheduler
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_get_n_det_selectors
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function zmq_get_N_det_selectors(zmq_to_qp_run_socket, worker_id)
|
||||
|
||||
File: :file:`zmq.irp.f_template_102`
|
||||
|
||||
Get N_det_selectors from the qp_run scheduler
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_put_n_det_generators
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function zmq_put_N_det_generators(zmq_to_qp_run_socket,worker_id)
|
||||
|
||||
File: :file:`zmq.irp.f_template_102`
|
||||
|
||||
Put N_det_generators on the qp_run scheduler
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_put_n_det_selectors
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function zmq_put_N_det_selectors(zmq_to_qp_run_socket,worker_id)
|
||||
|
||||
File: :file:`zmq.irp.f_template_102`
|
||||
|
||||
Put N_det_selectors on the qp_run scheduler
|
||||
|
||||
|
@ -1,85 +0,0 @@
|
||||
.. _single_ref_method:
|
||||
|
||||
.. program:: single_ref_method
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
=================
|
||||
single_ref_method
|
||||
=================
|
||||
|
||||
Include this module for single reference methods.
|
||||
Using this module, the only generator determinant is the Hartree-Fock determinant.
|
||||
|
||||
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
||||
|
||||
.. c:var:: n_det_generators
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: n_det_generators
|
||||
|
||||
File: :file:`generators.irp.f`
|
||||
|
||||
For Single reference wave functions, the number of generators is 1 : the Hartree-Fock determinant
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: psi_coef_generators
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer(bit_kind), allocatable :: psi_det_generators (N_int,2,psi_det_size)
|
||||
double precision, allocatable :: psi_coef_generators (psi_det_size,N_states)
|
||||
|
||||
File: :file:`generators.irp.f`
|
||||
|
||||
For Single reference wave functions, the generator is the Hartree-Fock determinant
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: psi_det_generators
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer(bit_kind), allocatable :: psi_det_generators (N_int,2,psi_det_size)
|
||||
double precision, allocatable :: psi_coef_generators (psi_det_size,N_states)
|
||||
|
||||
File: :file:`generators.irp.f`
|
||||
|
||||
For Single reference wave functions, the generator is the Hartree-Fock determinant
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: select_max
|
||||
|
||||
.. code:: text
|
||||
|
||||
double precision, allocatable :: select_max (1)
|
||||
|
||||
File: :file:`generators.irp.f`
|
||||
|
||||
Memo to skip useless selectors
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: size_select_max
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer :: size_select_max
|
||||
|
||||
File: :file:`generators.irp.f`
|
||||
|
||||
Size of select_max
|
||||
|
||||
|
@ -1,73 +0,0 @@
|
||||
.. _slave:
|
||||
|
||||
.. program:: slave
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
=====
|
||||
slave
|
||||
=====
|
||||
|
||||
Slave processes for distributed parallelism.
|
||||
|
||||
|
||||
|
||||
|
||||
Subroutines / functions
|
||||
-----------------------
|
||||
|
||||
|
||||
|
||||
.. c:function:: provide_everything
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine provide_everything
|
||||
|
||||
File: :file:`slave_cipsi.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: qp_ao_ints
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine qp_ao_ints
|
||||
|
||||
File: :file:`slave_eri.irp.f`
|
||||
|
||||
Slave for electron repulsion integrals
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: run_wf
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine run_wf
|
||||
|
||||
File: :file:`slave_cipsi.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: slave
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine slave
|
||||
|
||||
File: :file:`slave_cipsi.irp.f`
|
||||
|
||||
Helper program for distributed parallelism
|
||||
|
||||
|
@ -1,236 +0,0 @@
|
||||
.. _tools:
|
||||
|
||||
.. program:: tools
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
=====
|
||||
tools
|
||||
=====
|
||||
|
||||
Useful tools are grouped in this module.
|
||||
|
||||
|
||||
|
||||
Subroutines / functions
|
||||
-----------------------
|
||||
|
||||
|
||||
|
||||
.. c:function:: diagonalize_h
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine diagonalize_h
|
||||
|
||||
File: :file:`diagonalize_h.irp.f`
|
||||
|
||||
program that extracts the N_states lowest states of the Hamiltonian within the set of Slater determinants stored in the EZFIO folder
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: fcidump
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine fcidump
|
||||
|
||||
File: :file:`fcidump.irp.f`
|
||||
|
||||
Produce a FCIDUMP file
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: four_idx_transform
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine four_idx_transform
|
||||
|
||||
File: :file:`four_idx_transform.irp.f`
|
||||
|
||||
4-index transformation of two-electron integrals from AO to MO integrals
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: molden
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine molden
|
||||
|
||||
File: :file:`molden.irp.f`
|
||||
|
||||
Produce a Molden file
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: print_r2
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine print_r2
|
||||
|
||||
File: :file:`print_r2.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: print_wf
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine print_wf
|
||||
|
||||
File: :file:`print_wf.irp.f`
|
||||
|
||||
print the wave function stored in the EZFIO folder in the intermediate normalization
|
||||
|
||||
it also prints a lot of information regarding the excitation operators from the reference determinant
|
||||
|
||||
and a first-order perturbative analysis of the wave function.
|
||||
|
||||
If the wave function strongly deviates from the first-order analysis, something funny is going on :)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: routine
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine routine
|
||||
|
||||
File: :file:`write_integrals_erf.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: save_natorb
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine save_natorb
|
||||
|
||||
File: :file:`save_natorb.irp.f`
|
||||
|
||||
Save natural MOs into the EZFIO
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: save_one_body_dm
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine save_one_body_dm
|
||||
|
||||
File: :file:`save_one_body_dm.irp.f`
|
||||
|
||||
programs that computes the one body density on the mo basis for alpha and beta electrons from the wave function stored in the EZFIO folder, and then save it into the EZFIO folder aux_quantities.
|
||||
|
||||
Then, the global variable data_one_body_alpha_dm_mo and data_one_body_beta_dm_mo will automatically read the density in a further calculation.
|
||||
|
||||
This can be used to perform dampin on the density in RS-DFT calculation (see the density_for_dft module).
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: save_ortho_mos
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine save_ortho_mos
|
||||
|
||||
File: :file:`save_ortho_mos.irp.f`
|
||||
|
||||
Save orthonormalized MOs in the EZFIO.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: write_ao_basis
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine write_Ao_basis(i_unit_output)
|
||||
|
||||
File: :file:`molden.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: write_geometry
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine write_geometry(i_unit_output)
|
||||
|
||||
File: :file:`molden.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: write_integrals
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine write_integrals
|
||||
|
||||
File: :file:`write_integrals_erf.irp.f`
|
||||
|
||||
Saves the bielec erf integrals into the EZFIO
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: write_intro_gamess
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine write_intro_gamess(i_unit_output)
|
||||
|
||||
File: :file:`molden.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: write_mo_basis
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine write_Mo_basis(i_unit_output)
|
||||
|
||||
File: :file:`molden.irp.f`
|
||||
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,885 +0,0 @@
|
||||
.. _zmq:
|
||||
|
||||
.. program:: zmq
|
||||
|
||||
.. default-role:: option
|
||||
|
||||
===
|
||||
zmq
|
||||
===
|
||||
|
||||
Definition of |ZeroMQ| sockets and messages.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Providers
|
||||
---------
|
||||
|
||||
|
||||
.. c:var:: qp_run_address
|
||||
|
||||
.. code:: text
|
||||
|
||||
character*(128) :: qp_run_address
|
||||
integer :: zmq_port_start
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Address of the qp_run socket Example : tcp://130.120.229.139:12345
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: zmq_context
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer(ZMQ_PTR) :: zmq_context
|
||||
integer(omp_lock_kind) :: zmq_lock
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Context for the ZeroMQ library
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: zmq_lock
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer(ZMQ_PTR) :: zmq_context
|
||||
integer(omp_lock_kind) :: zmq_lock
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Context for the ZeroMQ library
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: zmq_port_start
|
||||
|
||||
.. code:: text
|
||||
|
||||
character*(128) :: qp_run_address
|
||||
integer :: zmq_port_start
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Address of the qp_run socket Example : tcp://130.120.229.139:12345
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: zmq_socket_pair_inproc_address
|
||||
|
||||
.. code:: text
|
||||
|
||||
character*(128) :: zmq_socket_pull_tcp_address
|
||||
character*(128) :: zmq_socket_pair_inproc_address
|
||||
character*(128) :: zmq_socket_push_tcp_address
|
||||
character*(128) :: zmq_socket_pull_inproc_address
|
||||
character*(128) :: zmq_socket_push_inproc_address
|
||||
character*(128) :: zmq_socket_sub_tcp_address
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Socket which pulls the results (2)
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: zmq_socket_pull_inproc_address
|
||||
|
||||
.. code:: text
|
||||
|
||||
character*(128) :: zmq_socket_pull_tcp_address
|
||||
character*(128) :: zmq_socket_pair_inproc_address
|
||||
character*(128) :: zmq_socket_push_tcp_address
|
||||
character*(128) :: zmq_socket_pull_inproc_address
|
||||
character*(128) :: zmq_socket_push_inproc_address
|
||||
character*(128) :: zmq_socket_sub_tcp_address
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Socket which pulls the results (2)
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: zmq_socket_pull_tcp_address
|
||||
|
||||
.. code:: text
|
||||
|
||||
character*(128) :: zmq_socket_pull_tcp_address
|
||||
character*(128) :: zmq_socket_pair_inproc_address
|
||||
character*(128) :: zmq_socket_push_tcp_address
|
||||
character*(128) :: zmq_socket_pull_inproc_address
|
||||
character*(128) :: zmq_socket_push_inproc_address
|
||||
character*(128) :: zmq_socket_sub_tcp_address
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Socket which pulls the results (2)
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: zmq_socket_push_inproc_address
|
||||
|
||||
.. code:: text
|
||||
|
||||
character*(128) :: zmq_socket_pull_tcp_address
|
||||
character*(128) :: zmq_socket_pair_inproc_address
|
||||
character*(128) :: zmq_socket_push_tcp_address
|
||||
character*(128) :: zmq_socket_pull_inproc_address
|
||||
character*(128) :: zmq_socket_push_inproc_address
|
||||
character*(128) :: zmq_socket_sub_tcp_address
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Socket which pulls the results (2)
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: zmq_socket_push_tcp_address
|
||||
|
||||
.. code:: text
|
||||
|
||||
character*(128) :: zmq_socket_pull_tcp_address
|
||||
character*(128) :: zmq_socket_pair_inproc_address
|
||||
character*(128) :: zmq_socket_push_tcp_address
|
||||
character*(128) :: zmq_socket_pull_inproc_address
|
||||
character*(128) :: zmq_socket_push_inproc_address
|
||||
character*(128) :: zmq_socket_sub_tcp_address
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Socket which pulls the results (2)
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: zmq_socket_sub_tcp_address
|
||||
|
||||
.. code:: text
|
||||
|
||||
character*(128) :: zmq_socket_pull_tcp_address
|
||||
character*(128) :: zmq_socket_pair_inproc_address
|
||||
character*(128) :: zmq_socket_push_tcp_address
|
||||
character*(128) :: zmq_socket_pull_inproc_address
|
||||
character*(128) :: zmq_socket_push_inproc_address
|
||||
character*(128) :: zmq_socket_sub_tcp_address
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Socket which pulls the results (2)
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:var:: zmq_state
|
||||
|
||||
.. code:: text
|
||||
|
||||
character*(128) :: zmq_state
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Threads executing work through the ZeroMQ interface
|
||||
|
||||
|
||||
|
||||
|
||||
Subroutines / functions
|
||||
-----------------------
|
||||
|
||||
|
||||
|
||||
.. c:function:: add_task_to_taskserver
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function add_task_to_taskserver(zmq_to_qp_run_socket,task)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Get a task from the task server
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: connect_to_taskserver
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function connect_to_taskserver(zmq_to_qp_run_socket,worker_id,thread)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Connect to the task server and obtain the worker ID
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: disconnect_from_taskserver
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function disconnect_from_taskserver(zmq_to_qp_run_socket, worker_id)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Disconnect from the task server
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: disconnect_from_taskserver_state
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function disconnect_from_taskserver_state(zmq_to_qp_run_socket, worker_id, state)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Disconnect from the task server
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: end_parallel_job
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine end_parallel_job(zmq_to_qp_run_socket,zmq_socket_pull,name_in)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
End a new parallel job with name 'name'. The slave tasks execute subroutine 'slave'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: end_zmq_pair_socket
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine end_zmq_pair_socket(zmq_socket_pair)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Terminate socket on which the results are sent.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: end_zmq_pull_socket
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine end_zmq_pull_socket(zmq_socket_pull)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Terminate socket on which the results are sent.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: end_zmq_push_socket
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine end_zmq_push_socket(zmq_socket_push,thread)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Terminate socket on which the results are sent.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: end_zmq_sub_socket
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine end_zmq_sub_socket(zmq_socket_sub)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Terminate socket on which the results are sent.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: end_zmq_to_qp_run_socket
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine end_zmq_to_qp_run_socket(zmq_to_qp_run_socket)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Terminate the socket from the application to qp_run
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: get_task_from_taskserver
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function get_task_from_taskserver(zmq_to_qp_run_socket,worker_id,task_id,task)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Get a task from the task server
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: get_tasks_from_taskserver
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function get_tasks_from_taskserver(zmq_to_qp_run_socket,worker_id,task_id,task,n_tasks)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Get multiple tasks from the task server
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: new_parallel_job
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine new_parallel_job(zmq_to_qp_run_socket,zmq_socket_pull,name_in)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Start a new parallel job with name 'name'. The slave tasks execute subroutine 'slave'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: new_zmq_pair_socket
|
||||
|
||||
.. code:: text
|
||||
|
||||
function new_zmq_pair_socket(bind)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Socket on which the collector and the main communicate
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: new_zmq_pull_socket
|
||||
|
||||
.. code:: text
|
||||
|
||||
function new_zmq_pull_socket()
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Socket on which the results are sent. If thread is 1, use inproc
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: new_zmq_push_socket
|
||||
|
||||
.. code:: text
|
||||
|
||||
function new_zmq_push_socket(thread)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Socket on which the results are sent. If thread is 1, use inproc
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: new_zmq_sub_socket
|
||||
|
||||
.. code:: text
|
||||
|
||||
function new_zmq_sub_socket()
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Socket to read the state published by the Task server
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: new_zmq_to_qp_run_socket
|
||||
|
||||
.. code:: text
|
||||
|
||||
function new_zmq_to_qp_run_socket()
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Socket on which the qp_run process replies
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: reset_zmq_addresses
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine reset_zmq_addresses
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Socket which pulls the results (2)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: switch_qp_run_to_master
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine switch_qp_run_to_master
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Address of the master qp_run socket Example : tcp://130.120.229.139:12345
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: task_done_to_taskserver
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function task_done_to_taskserver(zmq_to_qp_run_socket, worker_id, task_id)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Get a task from the task server
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: tasks_done_to_taskserver
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function tasks_done_to_taskserver(zmq_to_qp_run_socket, worker_id, task_id, n_tasks)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Get a task from the task server
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: wait_for_next_state
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine wait_for_next_state(state)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: wait_for_state
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine wait_for_state(state_wait,state)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Wait for the ZMQ state to be ready
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: wait_for_states
|
||||
|
||||
.. code:: text
|
||||
|
||||
subroutine wait_for_states(state_wait,state,n)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Wait for the ZMQ state to be ready
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_abort
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function zmq_abort(zmq_to_qp_run_socket)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Aborts a running parallel computation
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_delete_task
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function zmq_delete_task(zmq_to_qp_run_socket,zmq_socket_pull,task_id,more)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
When a task is done, it has to be removed from the list of tasks on the qp_run queue. This guarantees that the results have been received in the pull.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_delete_tasks
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function zmq_delete_tasks(zmq_to_qp_run_socket,zmq_socket_pull,task_id,n_tasks,more)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
When a task is done, it has to be removed from the list of tasks on the qp_run queue. This guarantees that the results have been received in the pull.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_delete_tasks_async_recv
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function zmq_delete_tasks_async_recv(zmq_to_qp_run_socket,zmq_socket_pull,task_id,n_tasks,more)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
When a task is done, it has to be removed from the list of tasks on the qp_run queue. This guarantees that the results have been received in the pull.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_delete_tasks_async_send
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function zmq_delete_tasks_async_send(zmq_to_qp_run_socket,zmq_socket_pull,task_id,n_tasks,more)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
When a task is done, it has to be removed from the list of tasks on the qp_run queue. This guarantees that the results have been received in the pull.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_get8_dvector
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function zmq_get8_dvector(zmq_to_qp_run_socket, worker_id, name, x, size_x)
|
||||
|
||||
File: :file:`put_get.irp.f`
|
||||
|
||||
Get a float vector from the qp_run scheduler
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_get8_ivector
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function zmq_get8_ivector(zmq_to_qp_run_socket, worker_id, name, x, size_x)
|
||||
|
||||
File: :file:`put_get.irp.f`
|
||||
|
||||
Get a vector of integers from the qp_run scheduler
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_get_dmatrix
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function zmq_get_dmatrix(zmq_to_qp_run_socket, worker_id, name, x, size_x1, size_x2, sze)
|
||||
|
||||
File: :file:`put_get.irp.f`
|
||||
|
||||
Get a float vector from the qp_run scheduler
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_get_dvector
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function zmq_get_dvector(zmq_to_qp_run_socket, worker_id, name, x, size_x)
|
||||
|
||||
File: :file:`put_get.irp.f`
|
||||
|
||||
Get a float vector from the qp_run scheduler
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_get_i8matrix
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function zmq_get_i8matrix(zmq_to_qp_run_socket, worker_id, name, x, size_x1, size_x2, sze)
|
||||
|
||||
File: :file:`put_get.irp.f`
|
||||
|
||||
Get a float vector from the qp_run scheduler
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_get_imatrix
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function zmq_get_imatrix(zmq_to_qp_run_socket, worker_id, name, x, size_x1, size_x2, sze)
|
||||
|
||||
File: :file:`put_get.irp.f`
|
||||
|
||||
Get a float vector from the qp_run scheduler
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_get_int
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function zmq_get_int(zmq_to_qp_run_socket, worker_id, name, x)
|
||||
|
||||
File: :file:`put_get.irp.f`
|
||||
|
||||
Get a vector of integers from the qp_run scheduler
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_get_int_nompi
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function zmq_get_int_nompi(zmq_to_qp_run_socket, worker_id, name, x)
|
||||
|
||||
File: :file:`put_get.irp.f`
|
||||
|
||||
Get a vector of integers from the qp_run scheduler
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_get_ivector
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function zmq_get_ivector(zmq_to_qp_run_socket, worker_id, name, x, size_x)
|
||||
|
||||
File: :file:`put_get.irp.f`
|
||||
|
||||
Get a vector of integers from the qp_run scheduler
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_port
|
||||
|
||||
.. code:: text
|
||||
|
||||
function zmq_port(ishift)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Return the value of the ZMQ port from the corresponding integer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_put8_dvector
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function zmq_put8_dvector(zmq_to_qp_run_socket, worker_id, name, x, size_x)
|
||||
|
||||
File: :file:`put_get.irp.f`
|
||||
|
||||
Put a float vector on the qp_run scheduler
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_put8_ivector
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function zmq_put8_ivector(zmq_to_qp_run_socket, worker_id, name, x, size_x)
|
||||
|
||||
File: :file:`put_get.irp.f`
|
||||
|
||||
Put a vector of integers on the qp_run scheduler
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_put_dmatrix
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function zmq_put_dmatrix(zmq_to_qp_run_socket, worker_id, name, x, size_x1, size_x2, sze)
|
||||
|
||||
File: :file:`put_get.irp.f`
|
||||
|
||||
Put a float vector on the qp_run scheduler
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_put_dvector
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function zmq_put_dvector(zmq_to_qp_run_socket, worker_id, name, x, size_x)
|
||||
|
||||
File: :file:`put_get.irp.f`
|
||||
|
||||
Put a float vector on the qp_run scheduler
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_put_i8matrix
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function zmq_put_i8matrix(zmq_to_qp_run_socket, worker_id, name, x, size_x1, size_x2, sze)
|
||||
|
||||
File: :file:`put_get.irp.f`
|
||||
|
||||
Put a float vector on the qp_run scheduler
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_put_imatrix
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function zmq_put_imatrix(zmq_to_qp_run_socket, worker_id, name, x, size_x1, size_x2, sze)
|
||||
|
||||
File: :file:`put_get.irp.f`
|
||||
|
||||
Put a float vector on the qp_run scheduler
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_put_int
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function zmq_put_int(zmq_to_qp_run_socket, worker_id, name, x)
|
||||
|
||||
File: :file:`put_get.irp.f`
|
||||
|
||||
Put a vector of integers on the qp_run scheduler
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_put_ivector
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function zmq_put_ivector(zmq_to_qp_run_socket, worker_id, name, x, size_x)
|
||||
|
||||
File: :file:`put_get.irp.f`
|
||||
|
||||
Put a vector of integers on the qp_run scheduler
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. c:function:: zmq_set_running
|
||||
|
||||
.. code:: text
|
||||
|
||||
integer function zmq_set_running(zmq_to_qp_run_socket)
|
||||
|
||||
File: :file:`utils.irp.f`
|
||||
|
||||
Set the job to Running in QP-run
|
||||
|
||||
|
@ -248,6 +248,11 @@ Index of Providers
|
||||
* :c:data:`generators_bitmask_restart`
|
||||
* :c:data:`gga_sr_type_functionals`
|
||||
* :c:data:`gga_type_functionals`
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
* :c:data:`give_polynom_mult_center_mono_elec_erf`
|
||||
* :c:data:`give_polynom_mult_center_mono_elec_erf_opt`
|
||||
>>>>>>> c297dbef83fb10c92ec048d3f0ecd9f6a93624c8
|
||||
* :c:data:`grad_aos_dsr_vc_alpha_pbe_w`
|
||||
* :c:data:`grad_aos_dsr_vc_beta_pbe_w`
|
||||
* :c:data:`grad_aos_dsr_vx_alpha_pbe_w`
|
||||
@ -305,7 +310,6 @@ Index of Providers
|
||||
* :c:data:`iradix_sort_big`
|
||||
* :c:data:`kinetic_ref_bitmask_energy`
|
||||
* :c:data:`ks_energy`
|
||||
* :c:data:`l3_weight`
|
||||
* :c:data:`l_to_charater`
|
||||
* :c:data:`level_shift`
|
||||
* :c:data:`list_act`
|
||||
@ -628,6 +632,7 @@ Index of Providers
|
||||
* :c:data:`reunion_of_core_inact_bitmask`
|
||||
* :c:data:`rs_ks_energy`
|
||||
* :c:data:`s2_eig`
|
||||
* :c:data:`s2_matrix_all_dets`
|
||||
* :c:data:`s2_values`
|
||||
* :c:data:`s_half`
|
||||
* :c:data:`s_half_inv`
|
||||
@ -966,8 +971,6 @@ Index of Subroutines/Functions
|
||||
* :c:func:`give_explicit_poly_and_gaussian_double`
|
||||
* :c:func:`give_explicit_poly_and_gaussian_x`
|
||||
* :c:func:`give_polynom_mult_center_mono_elec`
|
||||
* :c:func:`give_polynom_mult_center_mono_elec_erf`
|
||||
* :c:func:`give_polynom_mult_center_mono_elec_erf_opt`
|
||||
* :c:func:`give_polynom_mult_center_x`
|
||||
* :c:func:`gpw`
|
||||
* :c:func:`grad_rho_ab_to_grad_rho_oc`
|
||||
@ -1057,7 +1060,6 @@ Index of Subroutines/Functions
|
||||
* :c:func:`is_a_two_holes_two_particles`
|
||||
* :c:func:`is_connected_to`
|
||||
* :c:func:`is_connected_to_by_mono`
|
||||
* :c:func:`is_generable_cassd`
|
||||
* :c:func:`is_i_in_virtual`
|
||||
* :c:func:`is_in_wavefunction`
|
||||
* :c:func:`is_spin_flip_possible`
|
||||
@ -1134,7 +1136,6 @@ Index of Subroutines/Functions
|
||||
* :c:func:`perturb_buffer_by_mono_dummy`
|
||||
* :c:func:`perturb_buffer_by_mono_epstein_nesbet`
|
||||
* :c:func:`perturb_buffer_by_mono_epstein_nesbet_2x2`
|
||||
* :c:func:`perturb_buffer_by_mono_epstein_nesbet_2x2_no_ci_diag`
|
||||
* :c:func:`perturb_buffer_by_mono_h_core`
|
||||
* :c:func:`perturb_buffer_by_mono_moller_plesset`
|
||||
* :c:func:`perturb_buffer_by_mono_moller_plesset_general`
|
||||
@ -1142,7 +1143,6 @@ Index of Subroutines/Functions
|
||||
* :c:func:`perturb_buffer_dummy`
|
||||
* :c:func:`perturb_buffer_epstein_nesbet`
|
||||
* :c:func:`perturb_buffer_epstein_nesbet_2x2`
|
||||
* :c:func:`perturb_buffer_epstein_nesbet_2x2_no_ci_diag`
|
||||
* :c:func:`perturb_buffer_h_core`
|
||||
* :c:func:`perturb_buffer_moller_plesset`
|
||||
* :c:func:`perturb_buffer_moller_plesset_general`
|
||||
@ -1166,7 +1166,6 @@ Index of Subroutines/Functions
|
||||
* :c:func:`pt2_dummy`
|
||||
* :c:func:`pt2_epstein_nesbet`
|
||||
* :c:func:`pt2_epstein_nesbet_2x2`
|
||||
* :c:func:`pt2_epstein_nesbet_2x2_no_ci_diag`
|
||||
* :c:func:`pt2_find_sample`
|
||||
* :c:func:`pt2_find_sample_lr`
|
||||
* :c:func:`pt2_h_core`
|
||||
|
@ -4,14 +4,17 @@
|
||||
qp_test
|
||||
=======
|
||||
|
||||
This command runs the consistency test of |qp|. The tests are run with the |Bats| shell testing environment.
|
||||
This command runs the consistency test of |qp|.
|
||||
The tests are run with the |Bats| shell testing environment.
|
||||
If the name of a test of its number is specified on the command line, only this
|
||||
test will be run.
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
.. code:: bash
|
||||
|
||||
qp_test [FLAGS]
|
||||
qp_test [FLAGS] [TEST]
|
||||
Flags :
|
||||
[-a] Run all the tests
|
||||
[-v] Verbose mode: shows the output of the runs
|
||||
|
@ -66,6 +66,7 @@ let run slave exe ezfio_file =
|
||||
Printf.printf "Git Commit: %s\n" Git.message;
|
||||
Printf.printf "Git Date : %s\n" Git.date;
|
||||
Printf.printf "Git SHA1 : %s\n" Git.sha1;
|
||||
Printf.printf "EZFIO Dir : %s\n" ezfio_file;
|
||||
Printf.printf "\n\n%!";
|
||||
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
Runs all the possible tests using bats.
|
||||
|
||||
Usage:
|
||||
qp_test [-av]
|
||||
qp_test [-av] [TEST]
|
||||
|
||||
Options:
|
||||
-v verbose output
|
||||
@ -34,6 +34,9 @@ def main(arguments):
|
||||
number, _ = f.split('.',1)
|
||||
l_bats.append( (int(number), os.path.join(dirname,f)) )
|
||||
|
||||
if arguments["TEST"]:
|
||||
os.environ["TEST"] = arguments["TEST"]
|
||||
|
||||
if arguments["-a"]:
|
||||
for (dirname, _, filenames) in os.walk(QP_SRC, followlinks=False) :
|
||||
if "IRPF90_temp" not in dirname:
|
||||
@ -55,12 +58,12 @@ def main(arguments):
|
||||
print ""
|
||||
if arguments["-v"]:
|
||||
p1 = subprocess.Popen(["python2", "bats_to_sh.py", bats_file], \
|
||||
stdout=subprocess.PIPE)
|
||||
p2 = subprocess.Popen(["bash"], stdin=p1.stdout)
|
||||
stdout=subprocess.PIPE, env=os.environ)
|
||||
p2 = subprocess.Popen(["bash"], stdin=p1.stdout, env=os.environ)
|
||||
_, _ = os.waitpid(p2.pid,0)
|
||||
_, _ = os.waitpid(p1.pid,0)
|
||||
else:
|
||||
subprocess.check_call(["bats", bats_file])
|
||||
subprocess.check_call(["bats", bats_file], env=os.environ)
|
||||
|
||||
|
||||
|
||||
|
@ -1,368 +1,371 @@
|
||||
subroutine give_all_erf_kl_ao(integrals_ao,mu_in,C_center)
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! subroutine that returs all integrals over r of type erf(mu_in * | r-C_center | )/| r-C_center |
|
||||
END_DOC
|
||||
double precision, intent(in) :: mu_in,C_center(3)
|
||||
double precision, intent(out) :: integrals_ao(ao_num,ao_num)
|
||||
double precision :: NAI_pol_mult_erf_ao
|
||||
integer :: i,j,l,k,m
|
||||
do k = 1, ao_num
|
||||
do m = 1, ao_num
|
||||
integrals_ao(m,k) = NAI_pol_mult_erf_ao(m,k,mu_in,C_center)
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Subroutine that returns all integrals over $r$ of type
|
||||
! $\frac{ \erf(\mu * |r-R_C|) }{ |r-R_C| }$
|
||||
END_DOC
|
||||
double precision, intent(in) :: mu_in,C_center(3)
|
||||
double precision, intent(out) :: integrals_ao(ao_num,ao_num)
|
||||
double precision :: NAI_pol_mult_erf_ao
|
||||
integer :: i,j,l,k,m
|
||||
do k = 1, ao_num
|
||||
do m = 1, ao_num
|
||||
integrals_ao(m,k) = NAI_pol_mult_erf_ao(m,k,mu_in,C_center)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
end
|
||||
|
||||
|
||||
double precision function NAI_pol_mult_erf_ao(i_ao,j_ao,mu_in,C_center)
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! computes the following integral :
|
||||
! int[-infty;+infty] dr AO_i_ao (r) AO_j_ao(r) erf(mu_in * | r-C_center | )/| r-C_center |
|
||||
END_DOC
|
||||
integer, intent(in) :: i_ao,j_ao
|
||||
double precision, intent(in) :: mu_in, C_center(3)
|
||||
integer :: i,j,num_A,num_B, power_A(3), power_B(3), n_pt_in
|
||||
double precision :: A_center(3), B_center(3),integral, alpha,beta, NAI_pol_mult_erf
|
||||
num_A = ao_nucl(i_ao)
|
||||
power_A(1:3)= ao_power(i_ao,1:3)
|
||||
A_center(1:3) = nucl_coord(num_A,1:3)
|
||||
num_B = ao_nucl(j_ao)
|
||||
power_B(1:3)= ao_power(j_ao,1:3)
|
||||
B_center(1:3) = nucl_coord(num_B,1:3)
|
||||
n_pt_in = n_pt_max_integrals
|
||||
NAI_pol_mult_erf_ao = 0.d0
|
||||
do i = 1, ao_prim_num(i_ao)
|
||||
alpha = ao_expo_ordered_transp(i,i_ao)
|
||||
do j = 1, ao_prim_num(j_ao)
|
||||
beta = ao_expo_ordered_transp(j,j_ao)
|
||||
integral = NAI_pol_mult_erf(A_center,B_center,power_A,power_B,alpha,beta,C_center,n_pt_in,mu_in)
|
||||
NAI_pol_mult_erf_ao += integral * ao_coef_normalized_ordered_transp(j,j_ao)*ao_coef_normalized_ordered_transp(i,i_ao)
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Computes the following integral :
|
||||
! $\int_{-\infty}^{infty} dr \chi_i(r) \chi_j(r) \frac{\erf(\mu |r-R_C|)}{|r-R_C|}$.
|
||||
END_DOC
|
||||
integer, intent(in) :: i_ao,j_ao
|
||||
double precision, intent(in) :: mu_in, C_center(3)
|
||||
integer :: i,j,num_A,num_B, power_A(3), power_B(3), n_pt_in
|
||||
double precision :: A_center(3), B_center(3),integral, alpha,beta
|
||||
double precision :: NAI_pol_mult_erf
|
||||
num_A = ao_nucl(i_ao)
|
||||
power_A(1:3)= ao_power(i_ao,1:3)
|
||||
A_center(1:3) = nucl_coord(num_A,1:3)
|
||||
num_B = ao_nucl(j_ao)
|
||||
power_B(1:3)= ao_power(j_ao,1:3)
|
||||
B_center(1:3) = nucl_coord(num_B,1:3)
|
||||
n_pt_in = n_pt_max_integrals
|
||||
NAI_pol_mult_erf_ao = 0.d0
|
||||
do i = 1, ao_prim_num(i_ao)
|
||||
alpha = ao_expo_ordered_transp(i,i_ao)
|
||||
do j = 1, ao_prim_num(j_ao)
|
||||
beta = ao_expo_ordered_transp(j,j_ao)
|
||||
integral = NAI_pol_mult_erf(A_center,B_center,power_A,power_B,alpha,beta,C_center,n_pt_in,mu_in)
|
||||
NAI_pol_mult_erf_ao += integral * ao_coef_normalized_ordered_transp(j,j_ao)*ao_coef_normalized_ordered_transp(i,i_ao)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
double precision function NAI_pol_mult_erf(A_center,B_center,power_A,power_B,alpha,beta,C_center,n_pt_in,mu_in)
|
||||
! function that computes the folowing integral :
|
||||
! int{dr} of (x-A_x)^ax (x-B_X)^bx exp(-alpha (x-A_x)^2 - beta (x-B_x)^2 ) erf(mu_in*(r-R_c))/(r-R_c)
|
||||
|
||||
implicit none
|
||||
integer, intent(in) :: n_pt_in
|
||||
double precision,intent(in) :: C_center(3),A_center(3),B_center(3),alpha,beta,mu_in
|
||||
integer, intent(in) :: power_A(3),power_B(3)
|
||||
integer :: i,j,k,l,n_pt
|
||||
double precision :: P_center(3)
|
||||
|
||||
double precision :: d(0:n_pt_in),pouet,coeff,dist,const,pouet_2,factor
|
||||
double precision :: I_n_special_exact,integrate_bourrin,I_n_bibi
|
||||
double precision :: V_e_n,const_factor,dist_integral,tmp
|
||||
double precision :: accu,rint,p_inv,p,rho,p_inv_2
|
||||
integer :: n_pt_out,lmax
|
||||
include 'utils/constants.include.F'
|
||||
BEGIN_DOC
|
||||
! 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|}$.
|
||||
END_DOC
|
||||
|
||||
implicit none
|
||||
integer, intent(in) :: n_pt_in
|
||||
double precision,intent(in) :: C_center(3),A_center(3),B_center(3),alpha,beta,mu_in
|
||||
integer, intent(in) :: power_A(3),power_B(3)
|
||||
integer :: i,j,k,l,n_pt
|
||||
double precision :: P_center(3)
|
||||
|
||||
double precision :: d(0:n_pt_in),pouet,coeff,dist,const,pouet_2,factor
|
||||
double precision :: I_n_special_exact,integrate_bourrin,I_n_bibi
|
||||
double precision :: V_e_n,const_factor,dist_integral,tmp
|
||||
double precision :: accu,rint,p_inv,p,rho,p_inv_2
|
||||
integer :: n_pt_out,lmax
|
||||
include 'utils/constants.include.F'
|
||||
p = alpha + beta
|
||||
p_inv = 1.d0/p
|
||||
p_inv_2 = 0.5d0 * p_inv
|
||||
p_inv_2 = 0.5d0 * p_inv
|
||||
rho = alpha * beta * p_inv
|
||||
|
||||
|
||||
dist = 0.d0
|
||||
dist_integral = 0.d0
|
||||
do i = 1, 3
|
||||
P_center(i) = (alpha * A_center(i) + beta * B_center(i)) * p_inv
|
||||
dist += (A_center(i) - B_center(i))*(A_center(i) - B_center(i))
|
||||
dist_integral += (P_center(i) - C_center(i))*(P_center(i) - C_center(i))
|
||||
P_center(i) = (alpha * A_center(i) + beta * B_center(i)) * p_inv
|
||||
dist += (A_center(i) - B_center(i))*(A_center(i) - B_center(i))
|
||||
dist_integral += (P_center(i) - C_center(i))*(P_center(i) - C_center(i))
|
||||
enddo
|
||||
const_factor = dist*rho
|
||||
const_factor = dist*rho
|
||||
if(const_factor > 80.d0)then
|
||||
NAI_pol_mult_erf = 0.d0
|
||||
return
|
||||
NAI_pol_mult_erf = 0.d0
|
||||
return
|
||||
endif
|
||||
double precision :: p_new
|
||||
double precision :: p_new
|
||||
p_new = mu_in/dsqrt(p+ mu_in * mu_in)
|
||||
factor = dexp(-const_factor)
|
||||
coeff = dtwo_pi * factor * p_inv * p_new
|
||||
coeff = dtwo_pi * factor * p_inv * p_new
|
||||
lmax = 20
|
||||
|
||||
! print*, "b"
|
||||
! print*, "b"
|
||||
do i = 0, n_pt_in
|
||||
d(i) = 0.d0
|
||||
enddo
|
||||
n_pt = 2 * ( (power_A(1) + power_B(1)) +(power_A(2) + power_B(2)) +(power_A(3) + power_B(3)) )
|
||||
const = p * dist_integral * p_new * p_new
|
||||
const = p * dist_integral * p_new * p_new
|
||||
if (n_pt == 0) then
|
||||
pouet = rint(0,const)
|
||||
NAI_pol_mult_erf = coeff * pouet
|
||||
return
|
||||
pouet = rint(0,const)
|
||||
NAI_pol_mult_erf = coeff * pouet
|
||||
return
|
||||
endif
|
||||
|
||||
! call give_polynom_mult_center_mono_elec_erf(A_center,B_center,alpha,beta,power_A,power_B,C_center,n_pt_in,d,n_pt_out,mu_in)
|
||||
p_new = p_new * p_new
|
||||
|
||||
! call give_polynom_mult_center_mono_elec_erf(A_center,B_center,alpha,beta,power_A,power_B,C_center,n_pt_in,d,n_pt_out,mu_in)
|
||||
p_new = p_new * p_new
|
||||
call give_polynom_mult_center_mono_elec_erf_opt(A_center,B_center,alpha,beta,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)
|
||||
|
||||
|
||||
|
||||
if(n_pt_out<0)then
|
||||
NAI_pol_mult_erf = 0.d0
|
||||
return
|
||||
NAI_pol_mult_erf = 0.d0
|
||||
return
|
||||
endif
|
||||
accu = 0.d0
|
||||
|
||||
! sum of integrals of type : int {t,[0,1]} exp-(rho.(P-Q)^2 * t^2) * t^i
|
||||
|
||||
! sum of integrals of type : int {t,[0,1]} exp-(rho.(P-Q)^2 * t^2) * t^i
|
||||
do i =0 ,n_pt_out,2
|
||||
accu += d(i) * rint(i/2,const)
|
||||
accu += d(i) * rint(i/2,const)
|
||||
enddo
|
||||
NAI_pol_mult_erf = accu * coeff
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
subroutine give_polynom_mult_center_mono_elec_erf_opt(A_center,B_center,alpha,beta,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)
|
||||
!!!! 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)
|
||||
!!!! it is for the nuclear electron atraction
|
||||
implicit none
|
||||
integer, intent(in) :: n_pt_in
|
||||
integer,intent(out) :: n_pt_out
|
||||
double precision, intent(in) :: A_center(3), B_center(3),C_center(3),p,p_inv,p_inv_2,p_new,P_center(3)
|
||||
double precision, intent(in) :: alpha,beta,mu_in
|
||||
integer, intent(in) :: power_A(3), power_B(3)
|
||||
integer :: a_x,b_x,a_y,b_y,a_z,b_z
|
||||
double precision :: d(0:n_pt_in)
|
||||
double precision :: d1(0:n_pt_in)
|
||||
double precision :: d2(0:n_pt_in)
|
||||
double precision :: d3(0:n_pt_in)
|
||||
double precision :: accu
|
||||
accu = 0.d0
|
||||
!COMPTEUR irp_rdtsc1 = irp_rdtsc()
|
||||
ASSERT (n_pt_in > 1)
|
||||
|
||||
double precision :: R1x(0:2), B01(0:2), R1xp(0:2),R2x(0:2)
|
||||
R1x(0) = (P_center(1) - A_center(1))
|
||||
R1x(1) = 0.d0
|
||||
R1x(2) = -(P_center(1) - C_center(1))* p_new
|
||||
! R1x = (P_x - A_x) - (P_x - C_x) ( t * mu/sqrt(p+mu^2) )^2
|
||||
R1xp(0) = (P_center(1) - B_center(1))
|
||||
R1xp(1) = 0.d0
|
||||
R1xp(2) =-(P_center(1) - C_center(1))* p_new
|
||||
!R1xp = (P_x - B_x) - (P_x - C_x) ( t * mu/sqrt(p+mu^2) )^2
|
||||
R2x(0) = p_inv_2
|
||||
R2x(1) = 0.d0
|
||||
R2x(2) = -p_inv_2* p_new
|
||||
!R2x = 0.5 / p - 0.5/p ( t * mu/sqrt(p+mu^2) )^2
|
||||
do i = 0,n_pt_in
|
||||
d(i) = 0.d0
|
||||
enddo
|
||||
do i = 0,n_pt_in
|
||||
d1(i) = 0.d0
|
||||
enddo
|
||||
do i = 0,n_pt_in
|
||||
d2(i) = 0.d0
|
||||
enddo
|
||||
do i = 0,n_pt_in
|
||||
d3(i) = 0.d0
|
||||
enddo
|
||||
integer :: n_pt1,n_pt2,n_pt3,dim,i
|
||||
n_pt1 = n_pt_in
|
||||
n_pt2 = n_pt_in
|
||||
n_pt3 = n_pt_in
|
||||
a_x = power_A(1)
|
||||
b_x = power_B(1)
|
||||
call I_x1_pol_mult_mono_elec(a_x,b_x,R1x,R1xp,R2x,d1,n_pt1,n_pt_in)
|
||||
! print*,'passed the first I_x1'
|
||||
subroutine give_polynom_mult_center_mono_elec_erf_opt(A_center,B_center,alpha,beta,&
|
||||
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)
|
||||
BEGIN_DOC
|
||||
! 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)$.
|
||||
END_DOC
|
||||
implicit none
|
||||
integer, intent(in) :: n_pt_in
|
||||
integer,intent(out) :: n_pt_out
|
||||
double precision, intent(in) :: A_center(3), B_center(3),C_center(3),p,p_inv,p_inv_2,p_new,P_center(3)
|
||||
double precision, intent(in) :: alpha,beta,mu_in
|
||||
integer, intent(in) :: power_A(3), power_B(3)
|
||||
integer :: a_x,b_x,a_y,b_y,a_z,b_z
|
||||
double precision :: d(0:n_pt_in)
|
||||
double precision :: d1(0:n_pt_in)
|
||||
double precision :: d2(0:n_pt_in)
|
||||
double precision :: d3(0:n_pt_in)
|
||||
double precision :: accu
|
||||
accu = 0.d0
|
||||
ASSERT (n_pt_in > 1)
|
||||
|
||||
double precision :: R1x(0:2), B01(0:2), R1xp(0:2),R2x(0:2)
|
||||
R1x(0) = (P_center(1) - A_center(1))
|
||||
R1x(1) = 0.d0
|
||||
R1x(2) = -(P_center(1) - C_center(1))* p_new
|
||||
! R1x = (P_x - A_x) - (P_x - C_x) ( t * mu/sqrt(p+mu^2) )^2
|
||||
R1xp(0) = (P_center(1) - B_center(1))
|
||||
R1xp(1) = 0.d0
|
||||
R1xp(2) =-(P_center(1) - C_center(1))* p_new
|
||||
!R1xp = (P_x - B_x) - (P_x - C_x) ( t * mu/sqrt(p+mu^2) )^2
|
||||
R2x(0) = p_inv_2
|
||||
R2x(1) = 0.d0
|
||||
R2x(2) = -p_inv_2* p_new
|
||||
!R2x = 0.5 / p - 0.5/p ( t * mu/sqrt(p+mu^2) )^2
|
||||
do i = 0,n_pt_in
|
||||
d(i) = 0.d0
|
||||
enddo
|
||||
do i = 0,n_pt_in
|
||||
d1(i) = 0.d0
|
||||
enddo
|
||||
do i = 0,n_pt_in
|
||||
d2(i) = 0.d0
|
||||
enddo
|
||||
do i = 0,n_pt_in
|
||||
d3(i) = 0.d0
|
||||
enddo
|
||||
integer :: n_pt1,n_pt2,n_pt3,dim,i
|
||||
n_pt1 = n_pt_in
|
||||
n_pt2 = n_pt_in
|
||||
n_pt3 = n_pt_in
|
||||
a_x = power_A(1)
|
||||
b_x = power_B(1)
|
||||
call I_x1_pol_mult_mono_elec(a_x,b_x,R1x,R1xp,R2x,d1,n_pt1,n_pt_in)
|
||||
if(n_pt1<0)then
|
||||
n_pt_out = -1
|
||||
do i = 0,n_pt_in
|
||||
d(i) = 0.d0
|
||||
enddo
|
||||
return
|
||||
n_pt_out = -1
|
||||
do i = 0,n_pt_in
|
||||
d(i) = 0.d0
|
||||
enddo
|
||||
return
|
||||
endif
|
||||
|
||||
R1x(0) = (P_center(2) - A_center(2))
|
||||
R1x(1) = 0.d0
|
||||
R1x(2) = -(P_center(2) - C_center(2))* p_new
|
||||
! R1x = (P_x - A_x) - (P_x - C_x) ( t * mu/sqrt(p+mu^2) )^2
|
||||
R1xp(0) = (P_center(2) - B_center(2))
|
||||
R1xp(1) = 0.d0
|
||||
R1xp(2) =-(P_center(2) - C_center(2))* p_new
|
||||
!R1xp = (P_x - B_x) - (P_x - C_x) ( t * mu/sqrt(p+mu^2) )^2
|
||||
a_y = power_A(2)
|
||||
b_y = power_B(2)
|
||||
call I_x1_pol_mult_mono_elec(a_y,b_y,R1x,R1xp,R2x,d2,n_pt2,n_pt_in)
|
||||
! print*,'passed the second I_x1'
|
||||
|
||||
R1x(0) = (P_center(2) - A_center(2))
|
||||
R1x(1) = 0.d0
|
||||
R1x(2) = -(P_center(2) - C_center(2))* p_new
|
||||
! R1x = (P_x - A_x) - (P_x - C_x) ( t * mu/sqrt(p+mu^2) )^2
|
||||
R1xp(0) = (P_center(2) - B_center(2))
|
||||
R1xp(1) = 0.d0
|
||||
R1xp(2) =-(P_center(2) - C_center(2))* p_new
|
||||
!R1xp = (P_x - B_x) - (P_x - C_x) ( t * mu/sqrt(p+mu^2) )^2
|
||||
a_y = power_A(2)
|
||||
b_y = power_B(2)
|
||||
call I_x1_pol_mult_mono_elec(a_y,b_y,R1x,R1xp,R2x,d2,n_pt2,n_pt_in)
|
||||
if(n_pt2<0)then
|
||||
n_pt_out = -1
|
||||
do i = 0,n_pt_in
|
||||
d(i) = 0.d0
|
||||
enddo
|
||||
return
|
||||
n_pt_out = -1
|
||||
do i = 0,n_pt_in
|
||||
d(i) = 0.d0
|
||||
enddo
|
||||
return
|
||||
endif
|
||||
|
||||
|
||||
R1x(0) = (P_center(3) - A_center(3))
|
||||
R1x(1) = 0.d0
|
||||
R1x(2) = -(P_center(3) - C_center(3))* p_new
|
||||
! R1x = (P_x - A_x) - (P_x - C_x) ( t * mu/sqrt(p+mu^2) )^2
|
||||
R1xp(0) = (P_center(3) - B_center(3))
|
||||
R1xp(1) = 0.d0
|
||||
R1xp(2) =-(P_center(3) - C_center(3))* p_new
|
||||
!R2x = 0.5 / p - 0.5/p ( t * mu/sqrt(p+mu^2) )^2
|
||||
a_z = power_A(3)
|
||||
b_z = power_B(3)
|
||||
|
||||
! print*,'a_z = ',a_z
|
||||
! print*,'b_z = ',b_z
|
||||
call I_x1_pol_mult_mono_elec(a_z,b_z,R1x,R1xp,R2x,d3,n_pt3,n_pt_in)
|
||||
! print*,'passed the third I_x1'
|
||||
|
||||
|
||||
R1x(0) = (P_center(3) - A_center(3))
|
||||
R1x(1) = 0.d0
|
||||
R1x(2) = -(P_center(3) - C_center(3))* p_new
|
||||
! R1x = (P_x - A_x) - (P_x - C_x) ( t * mu/sqrt(p+mu^2) )^2
|
||||
R1xp(0) = (P_center(3) - B_center(3))
|
||||
R1xp(1) = 0.d0
|
||||
R1xp(2) =-(P_center(3) - C_center(3))* p_new
|
||||
!R2x = 0.5 / p - 0.5/p ( t * mu/sqrt(p+mu^2) )^2
|
||||
a_z = power_A(3)
|
||||
b_z = power_B(3)
|
||||
|
||||
call I_x1_pol_mult_mono_elec(a_z,b_z,R1x,R1xp,R2x,d3,n_pt3,n_pt_in)
|
||||
if(n_pt3<0)then
|
||||
n_pt_out = -1
|
||||
do i = 0,n_pt_in
|
||||
d(i) = 0.d0
|
||||
enddo
|
||||
return
|
||||
n_pt_out = -1
|
||||
do i = 0,n_pt_in
|
||||
d(i) = 0.d0
|
||||
enddo
|
||||
return
|
||||
endif
|
||||
integer :: n_pt_tmp
|
||||
n_pt_tmp = 0
|
||||
call multiply_poly(d1,n_pt1,d2,n_pt2,d,n_pt_tmp)
|
||||
do i = 0,n_pt_tmp
|
||||
d1(i) = 0.d0
|
||||
enddo
|
||||
n_pt_out = 0
|
||||
call multiply_poly(d ,n_pt_tmp ,d3,n_pt3,d1,n_pt_out)
|
||||
do i = 0, n_pt_out
|
||||
d(i) = d1(i)
|
||||
enddo
|
||||
|
||||
integer :: n_pt_tmp
|
||||
n_pt_tmp = 0
|
||||
call multiply_poly(d1,n_pt1,d2,n_pt2,d,n_pt_tmp)
|
||||
do i = 0,n_pt_tmp
|
||||
d1(i) = 0.d0
|
||||
enddo
|
||||
n_pt_out = 0
|
||||
call multiply_poly(d ,n_pt_tmp ,d3,n_pt3,d1,n_pt_out)
|
||||
do i = 0, n_pt_out
|
||||
d(i) = d1(i)
|
||||
enddo
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
subroutine give_polynom_mult_center_mono_elec_erf(A_center,B_center,alpha,beta,power_A,power_B,C_center,n_pt_in,d,n_pt_out,mu_in)
|
||||
!!!! 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)
|
||||
!!!! it is for the nuclear electron atraction
|
||||
implicit none
|
||||
integer, intent(in) :: n_pt_in
|
||||
integer,intent(out) :: n_pt_out
|
||||
double precision, intent(in) :: A_center(3), B_center(3),C_center(3)
|
||||
double precision, intent(in) :: alpha,beta,mu_in
|
||||
integer, intent(in) :: power_A(3), power_B(3)
|
||||
integer :: a_x,b_x,a_y,b_y,a_z,b_z
|
||||
double precision :: d(0:n_pt_in)
|
||||
double precision :: d1(0:n_pt_in)
|
||||
double precision :: d2(0:n_pt_in)
|
||||
double precision :: d3(0:n_pt_in)
|
||||
double precision :: accu, pq_inv, p10_1, p10_2, p01_1, p01_2
|
||||
double precision :: p,P_center(3),rho,p_inv,p_inv_2
|
||||
accu = 0.d0
|
||||
!COMPTEUR irp_rdtsc1 = irp_rdtsc()
|
||||
ASSERT (n_pt_in > 1)
|
||||
p = alpha+beta
|
||||
p_inv = 1.d0/p
|
||||
p_inv_2 = 0.5d0/p
|
||||
do i =1, 3
|
||||
P_center(i) = (alpha * A_center(i) + beta * B_center(i)) * p_inv
|
||||
enddo
|
||||
|
||||
double precision :: R1x(0:2), B01(0:2), R1xp(0:2),R2x(0:2)
|
||||
R1x(0) = (P_center(1) - A_center(1))
|
||||
R1x(1) = 0.d0
|
||||
R1x(2) = -(P_center(1) - C_center(1))* mu_in**2 / (p+mu_in*mu_in)
|
||||
! R1x = (P_x - A_x) - (P_x - C_x) ( t * mu/sqrt(p+mu^2) )^2
|
||||
R1xp(0) = (P_center(1) - B_center(1))
|
||||
R1xp(1) = 0.d0
|
||||
R1xp(2) =-(P_center(1) - C_center(1))* mu_in**2 / (p+mu_in*mu_in)
|
||||
!R1xp = (P_x - B_x) - (P_x - C_x) ( t * mu/sqrt(p+mu^2) )^2
|
||||
R2x(0) = p_inv_2
|
||||
R2x(1) = 0.d0
|
||||
R2x(2) = -p_inv_2* mu_in**2 / (p+mu_in*mu_in)
|
||||
!R2x = 0.5 / p - 0.5/p ( t * mu/sqrt(p+mu^2) )^2
|
||||
do i = 0,n_pt_in
|
||||
d(i) = 0.d0
|
||||
enddo
|
||||
do i = 0,n_pt_in
|
||||
d1(i) = 0.d0
|
||||
enddo
|
||||
do i = 0,n_pt_in
|
||||
d2(i) = 0.d0
|
||||
enddo
|
||||
do i = 0,n_pt_in
|
||||
d3(i) = 0.d0
|
||||
enddo
|
||||
integer :: n_pt1,n_pt2,n_pt3,dim,i
|
||||
n_pt1 = n_pt_in
|
||||
n_pt2 = n_pt_in
|
||||
n_pt3 = n_pt_in
|
||||
a_x = power_A(1)
|
||||
b_x = power_B(1)
|
||||
call I_x1_pol_mult_mono_elec(a_x,b_x,R1x,R1xp,R2x,d1,n_pt1,n_pt_in)
|
||||
! print*,'passed the first I_x1'
|
||||
subroutine give_polynom_mult_center_mono_elec_erf(A_center,B_center,alpha,beta,&
|
||||
power_A,power_B,C_center,n_pt_in,d,n_pt_out,mu_in)
|
||||
BEGIN_DOC
|
||||
! 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)$.
|
||||
END_DOC
|
||||
implicit none
|
||||
integer, intent(in) :: n_pt_in
|
||||
integer,intent(out) :: n_pt_out
|
||||
double precision, intent(in) :: A_center(3), B_center(3),C_center(3)
|
||||
double precision, intent(in) :: alpha,beta,mu_in
|
||||
integer, intent(in) :: power_A(3), power_B(3)
|
||||
integer :: a_x,b_x,a_y,b_y,a_z,b_z
|
||||
double precision :: d(0:n_pt_in)
|
||||
double precision :: d1(0:n_pt_in)
|
||||
double precision :: d2(0:n_pt_in)
|
||||
double precision :: d3(0:n_pt_in)
|
||||
double precision :: accu, pq_inv, p10_1, p10_2, p01_1, p01_2
|
||||
double precision :: p,P_center(3),rho,p_inv,p_inv_2
|
||||
accu = 0.d0
|
||||
!COMPTEUR irp_rdtsc1 = irp_rdtsc()
|
||||
ASSERT (n_pt_in > 1)
|
||||
p = alpha+beta
|
||||
p_inv = 1.d0/p
|
||||
p_inv_2 = 0.5d0/p
|
||||
do i =1, 3
|
||||
P_center(i) = (alpha * A_center(i) + beta * B_center(i)) * p_inv
|
||||
enddo
|
||||
|
||||
double precision :: R1x(0:2), B01(0:2), R1xp(0:2),R2x(0:2)
|
||||
R1x(0) = (P_center(1) - A_center(1))
|
||||
R1x(1) = 0.d0
|
||||
R1x(2) = -(P_center(1) - C_center(1))* mu_in**2 / (p+mu_in*mu_in)
|
||||
! R1x = (P_x - A_x) - (P_x - C_x) ( t * mu/sqrt(p+mu^2) )^2
|
||||
R1xp(0) = (P_center(1) - B_center(1))
|
||||
R1xp(1) = 0.d0
|
||||
R1xp(2) =-(P_center(1) - C_center(1))* mu_in**2 / (p+mu_in*mu_in)
|
||||
!R1xp = (P_x - B_x) - (P_x - C_x) ( t * mu/sqrt(p+mu^2) )^2
|
||||
R2x(0) = p_inv_2
|
||||
R2x(1) = 0.d0
|
||||
R2x(2) = -p_inv_2* mu_in**2 / (p+mu_in*mu_in)
|
||||
!R2x = 0.5 / p - 0.5/p ( t * mu/sqrt(p+mu^2) )^2
|
||||
do i = 0,n_pt_in
|
||||
d(i) = 0.d0
|
||||
enddo
|
||||
do i = 0,n_pt_in
|
||||
d1(i) = 0.d0
|
||||
enddo
|
||||
do i = 0,n_pt_in
|
||||
d2(i) = 0.d0
|
||||
enddo
|
||||
do i = 0,n_pt_in
|
||||
d3(i) = 0.d0
|
||||
enddo
|
||||
integer :: n_pt1,n_pt2,n_pt3,dim,i
|
||||
n_pt1 = n_pt_in
|
||||
n_pt2 = n_pt_in
|
||||
n_pt3 = n_pt_in
|
||||
a_x = power_A(1)
|
||||
b_x = power_B(1)
|
||||
call I_x1_pol_mult_mono_elec(a_x,b_x,R1x,R1xp,R2x,d1,n_pt1,n_pt_in)
|
||||
! print*,'passed the first I_x1'
|
||||
if(n_pt1<0)then
|
||||
n_pt_out = -1
|
||||
do i = 0,n_pt_in
|
||||
d(i) = 0.d0
|
||||
enddo
|
||||
return
|
||||
n_pt_out = -1
|
||||
do i = 0,n_pt_in
|
||||
d(i) = 0.d0
|
||||
enddo
|
||||
return
|
||||
endif
|
||||
|
||||
R1x(0) = (P_center(2) - A_center(2))
|
||||
R1x(1) = 0.d0
|
||||
R1x(2) = -(P_center(2) - C_center(2))* mu_in**2 / (p+mu_in*mu_in)
|
||||
! R1x = (P_x - A_x) - (P_x - C_x) ( t * mu/sqrt(p+mu^2) )^2
|
||||
R1xp(0) = (P_center(2) - B_center(2))
|
||||
R1xp(1) = 0.d0
|
||||
R1xp(2) =-(P_center(2) - C_center(2))* mu_in**2 / (p+mu_in*mu_in)
|
||||
!R1xp = (P_x - B_x) - (P_x - C_x) ( t * mu/sqrt(p+mu^2) )^2
|
||||
a_y = power_A(2)
|
||||
b_y = power_B(2)
|
||||
call I_x1_pol_mult_mono_elec(a_y,b_y,R1x,R1xp,R2x,d2,n_pt2,n_pt_in)
|
||||
! print*,'passed the second I_x1'
|
||||
|
||||
R1x(0) = (P_center(2) - A_center(2))
|
||||
R1x(1) = 0.d0
|
||||
R1x(2) = -(P_center(2) - C_center(2))* mu_in**2 / (p+mu_in*mu_in)
|
||||
! R1x = (P_x - A_x) - (P_x - C_x) ( t * mu/sqrt(p+mu^2) )^2
|
||||
R1xp(0) = (P_center(2) - B_center(2))
|
||||
R1xp(1) = 0.d0
|
||||
R1xp(2) =-(P_center(2) - C_center(2))* mu_in**2 / (p+mu_in*mu_in)
|
||||
!R1xp = (P_x - B_x) - (P_x - C_x) ( t * mu/sqrt(p+mu^2) )^2
|
||||
a_y = power_A(2)
|
||||
b_y = power_B(2)
|
||||
call I_x1_pol_mult_mono_elec(a_y,b_y,R1x,R1xp,R2x,d2,n_pt2,n_pt_in)
|
||||
! print*,'passed the second I_x1'
|
||||
if(n_pt2<0)then
|
||||
n_pt_out = -1
|
||||
do i = 0,n_pt_in
|
||||
d(i) = 0.d0
|
||||
enddo
|
||||
return
|
||||
n_pt_out = -1
|
||||
do i = 0,n_pt_in
|
||||
d(i) = 0.d0
|
||||
enddo
|
||||
return
|
||||
endif
|
||||
|
||||
|
||||
R1x(0) = (P_center(3) - A_center(3))
|
||||
R1x(1) = 0.d0
|
||||
R1x(2) = -(P_center(3) - C_center(3))* mu_in**2 / (p+mu_in*mu_in)
|
||||
! R1x = (P_x - A_x) - (P_x - C_x) ( t * mu/sqrt(p+mu^2) )^2
|
||||
R1xp(0) = (P_center(3) - B_center(3))
|
||||
R1xp(1) = 0.d0
|
||||
R1xp(2) =-(P_center(3) - C_center(3))* mu_in**2 / (p+mu_in*mu_in)
|
||||
!R2x = 0.5 / p - 0.5/p ( t * mu/sqrt(p+mu^2) )^2
|
||||
a_z = power_A(3)
|
||||
b_z = power_B(3)
|
||||
|
||||
! print*,'a_z = ',a_z
|
||||
! print*,'b_z = ',b_z
|
||||
call I_x1_pol_mult_mono_elec(a_z,b_z,R1x,R1xp,R2x,d3,n_pt3,n_pt_in)
|
||||
! print*,'passed the third I_x1'
|
||||
|
||||
|
||||
R1x(0) = (P_center(3) - A_center(3))
|
||||
R1x(1) = 0.d0
|
||||
R1x(2) = -(P_center(3) - C_center(3))* mu_in**2 / (p+mu_in*mu_in)
|
||||
! R1x = (P_x - A_x) - (P_x - C_x) ( t * mu/sqrt(p+mu^2) )^2
|
||||
R1xp(0) = (P_center(3) - B_center(3))
|
||||
R1xp(1) = 0.d0
|
||||
R1xp(2) =-(P_center(3) - C_center(3))* mu_in**2 / (p+mu_in*mu_in)
|
||||
!R2x = 0.5 / p - 0.5/p ( t * mu/sqrt(p+mu^2) )^2
|
||||
a_z = power_A(3)
|
||||
b_z = power_B(3)
|
||||
|
||||
! print*,'a_z = ',a_z
|
||||
! print*,'b_z = ',b_z
|
||||
call I_x1_pol_mult_mono_elec(a_z,b_z,R1x,R1xp,R2x,d3,n_pt3,n_pt_in)
|
||||
! print*,'passed the third I_x1'
|
||||
if(n_pt3<0)then
|
||||
n_pt_out = -1
|
||||
do i = 0,n_pt_in
|
||||
d(i) = 0.d0
|
||||
enddo
|
||||
return
|
||||
n_pt_out = -1
|
||||
do i = 0,n_pt_in
|
||||
d(i) = 0.d0
|
||||
enddo
|
||||
return
|
||||
endif
|
||||
integer :: n_pt_tmp
|
||||
n_pt_tmp = 0
|
||||
call multiply_poly(d1,n_pt1,d2,n_pt2,d,n_pt_tmp)
|
||||
do i = 0,n_pt_tmp
|
||||
d1(i) = 0.d0
|
||||
enddo
|
||||
n_pt_out = 0
|
||||
call multiply_poly(d ,n_pt_tmp ,d3,n_pt3,d1,n_pt_out)
|
||||
do i = 0, n_pt_out
|
||||
d(i) = d1(i)
|
||||
enddo
|
||||
|
||||
integer :: n_pt_tmp
|
||||
n_pt_tmp = 0
|
||||
call multiply_poly(d1,n_pt1,d2,n_pt2,d,n_pt_tmp)
|
||||
do i = 0,n_pt_tmp
|
||||
d1(i) = 0.d0
|
||||
enddo
|
||||
n_pt_out = 0
|
||||
call multiply_poly(d ,n_pt_tmp ,d3,n_pt3,d1,n_pt_out)
|
||||
do i = 0, n_pt_out
|
||||
d(i) = d1(i)
|
||||
enddo
|
||||
|
||||
end
|
||||
|
||||
|
@ -237,9 +237,9 @@ end
|
||||
subroutine give_polynom_mult_center_mono_elec(A_center,B_center,alpha,beta,power_A,power_B,C_center,n_pt_in,d,n_pt_out)
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Returns the explicit polynomial in terms of the "t" variable of the following
|
||||
!
|
||||
! :math:`I_x1(a_x, d_x,p,q) * I_x1(a_y, d_y,p,q) * I_x1(a_z, d_z,p,q)`
|
||||
! Returns the explicit polynomial in terms of the "t" variable of the following
|
||||
!
|
||||
! $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)$.
|
||||
END_DOC
|
||||
integer, intent(in) :: n_pt_in
|
||||
integer,intent(out) :: n_pt_out
|
||||
@ -481,9 +481,9 @@ double precision function V_e_n(a_x,a_y,a_z,b_x,b_y,b_z,alpha,beta)
|
||||
BEGIN_DOC
|
||||
! Primitve nuclear attraction between the two primitves centered on the same atom.
|
||||
!
|
||||
! primitive_1 = x**(a_x) y**(a_y) z**(a_z) exp(-alpha * r**2)
|
||||
! $p_1 = x^{a_x} y^{a_y} z^{a_z} \exp(-\alpha r^2)$
|
||||
!
|
||||
! primitive_2 = x**(b_x) y**(b_y) z**(b_z) exp(- beta * r**2)
|
||||
! $p_2 = x^{b_x} y^{b_y} z^{b_z} \exp(-\beta r^2)$
|
||||
END_DOC
|
||||
integer :: a_x,a_y,a_z,b_x,b_y,b_z
|
||||
double precision :: alpha,beta
|
||||
@ -504,7 +504,7 @@ double precision function int_gaus_pol(alpha,n)
|
||||
BEGIN_DOC
|
||||
! Computes the integral:
|
||||
!
|
||||
! :math:`\int_{-\infty}^{\infty} x^n \exp(-\alpha x^2) dx`
|
||||
! $\int_{-\infty}^{\infty} x^n \exp(-\alpha x^2) dx$.
|
||||
END_DOC
|
||||
double precision :: alpha
|
||||
integer :: n
|
||||
@ -530,7 +530,7 @@ double precision function V_r(n,alpha)
|
||||
BEGIN_DOC
|
||||
! Computes the radial part of the nuclear attraction integral:
|
||||
!
|
||||
! :math:`\int_{0}^{\infty} r^n \exp(-\alpha r^2) dr`
|
||||
! $\int_{0}^{\infty} r^n \exp(-\alpha r^2) dr$
|
||||
!
|
||||
END_DOC
|
||||
double precision :: alpha, fact
|
||||
@ -547,9 +547,9 @@ end
|
||||
double precision function V_phi(n,m)
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Computes the angular "phi" part of the nuclear attraction integral:
|
||||
! Computes the angular $\phi$ part of the nuclear attraction integral:
|
||||
!
|
||||
! :math:`\int_{0}^{2 \pi} \cos(\phi)^n \sin(\phi)^m d\phi`
|
||||
! $\int_{0}^{2 \pi} \cos(\phi)^n \sin(\phi)^m d\phi$.
|
||||
END_DOC
|
||||
integer :: n,m, i
|
||||
double precision :: prod, Wallis
|
||||
@ -564,9 +564,9 @@ end
|
||||
double precision function V_theta(n,m)
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Computes the angular "theta" part of the nuclear attraction integral:
|
||||
! Computes the angular $\theta$ part of the nuclear attraction integral:
|
||||
!
|
||||
! :math:`\int_{0}^{\pi} \cos(\theta)^n \sin(\theta)^m d\theta`
|
||||
! $\int_{0}^{\pi} \cos(\theta)^n \sin(\theta)^m d\theta$
|
||||
END_DOC
|
||||
integer :: n,m,i
|
||||
double precision :: Wallis, prod
|
||||
@ -585,7 +585,7 @@ double precision function Wallis(n)
|
||||
BEGIN_DOC
|
||||
! Wallis integral:
|
||||
!
|
||||
! :math:`\int_{0}^{\pi} \cos(\theta)^n d\theta`
|
||||
! $\int_{0}^{\pi} \cos(\theta)^n d\theta$.
|
||||
END_DOC
|
||||
double precision :: fact
|
||||
integer :: n,p
|
||||
|
@ -104,13 +104,6 @@ BEGIN_PROVIDER [ double precision, ao_pseudo_integral_local, (ao_num,ao_num)]
|
||||
pseudo_dz_k_transp(1,k), &
|
||||
A_center,power_A,alpha,B_center,power_B,beta,C_center)
|
||||
|
||||
!if ((k==nucl_num).and.(num_A == nucl_num).and.(num_B == nucl_num)) then
|
||||
!print *, pseudo_klocmax,pseudo_v_k_transp (1,k),pseudo_n_k_transp (1,k),pseudo_dz_k_transp(1,k)
|
||||
!print *, A_center(1:3), power_A
|
||||
!print *, B_center(1:3), power_B
|
||||
!print *, C_center(1:3)
|
||||
!print *, c
|
||||
!endif
|
||||
enddo
|
||||
ao_pseudo_integral_local(i,j) = ao_pseudo_integral_local(i,j) +&
|
||||
ao_coef_normalized_ordered_transp(l,j)*ao_coef_normalized_ordered_transp(m,i)*c
|
||||
|
@ -6,7 +6,7 @@ use map_module
|
||||
BEGIN_PROVIDER [ type(map_type), ao_integrals_erf_map ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! AO integrals
|
||||
! |AO| integrals
|
||||
END_DOC
|
||||
integer(key_kind) :: key_max
|
||||
integer(map_size_kind) :: sze
|
||||
@ -31,7 +31,7 @@ BEGIN_PROVIDER [ double precision, ao_integrals_erf_cache, (0:64*64*64*64) ]
|
||||
use map_module
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Cache of AO integrals for fast access
|
||||
! Cache of |AO| integrals for fast access
|
||||
END_DOC
|
||||
PROVIDE ao_bielec_integrals_erf_in_map
|
||||
integer :: i,j,k,l,ii
|
||||
@ -64,7 +64,7 @@ subroutine insert_into_ao_integrals_erf_map(n_integrals,buffer_i, buffer_values)
|
||||
use map_module
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Create new entry into AO map
|
||||
! Create new entry into |AO| map
|
||||
END_DOC
|
||||
|
||||
integer, intent(in) :: n_integrals
|
||||
@ -78,7 +78,7 @@ double precision function get_ao_bielec_integral_erf(i,j,k,l,map) result(result)
|
||||
use map_module
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Gets one AO bi-electronic integral from the AO map
|
||||
! Gets one |AO| two-electron integral from the |AO| map
|
||||
END_DOC
|
||||
integer, intent(in) :: i,j,k,l
|
||||
integer(key_kind) :: idx
|
||||
@ -117,7 +117,7 @@ end
|
||||
subroutine get_ao_bielec_integrals_erf(j,k,l,sze,out_val)
|
||||
use map_module
|
||||
BEGIN_DOC
|
||||
! Gets multiple AO bi-electronic integral from the AO map .
|
||||
! Gets multiple |AO| two-electron integral from the |AO| map .
|
||||
! All i are retrieved for j,k,l fixed.
|
||||
END_DOC
|
||||
implicit none
|
||||
@ -146,7 +146,7 @@ subroutine get_ao_bielec_integrals_erf_non_zero(j,k,l,sze,out_val,out_val_index,
|
||||
use map_module
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Gets multiple AO bi-electronic integral from the AO map .
|
||||
! Gets multiple |AO| two-electron integrals from the |AO| map .
|
||||
! All non-zero i are retrieved for j,k,l fixed.
|
||||
END_DOC
|
||||
integer, intent(in) :: j,k,l, sze
|
||||
@ -188,7 +188,7 @@ function get_ao_erf_map_size()
|
||||
implicit none
|
||||
integer (map_size_kind) :: get_ao_erf_map_size
|
||||
BEGIN_DOC
|
||||
! Returns the number of elements in the AO map
|
||||
! Returns the number of elements in the |AO| map
|
||||
END_DOC
|
||||
get_ao_erf_map_size = ao_integrals_erf_map % n_elements
|
||||
end
|
||||
@ -196,7 +196,7 @@ end
|
||||
subroutine clear_ao_erf_map
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Frees the memory of the AO map
|
||||
! Frees the memory of the |AO| map
|
||||
END_DOC
|
||||
call map_deinit(ao_integrals_erf_map)
|
||||
FREE ao_integrals_erf_map
|
||||
@ -208,7 +208,7 @@ subroutine dump_ao_integrals_erf(filename)
|
||||
use map_module
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Save to disk the $ao integrals
|
||||
! Save to disk the |AO| erf integrals
|
||||
END_DOC
|
||||
character*(*), intent(in) :: filename
|
||||
integer(cache_key_kind), pointer :: key(:)
|
||||
@ -238,7 +238,7 @@ end
|
||||
integer function load_ao_integrals_erf(filename)
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Read from disk the $ao integrals
|
||||
! Read from disk the |AO| erf integrals
|
||||
END_DOC
|
||||
character*(*), intent(in) :: filename
|
||||
integer*8 :: i
|
||||
|
@ -3,17 +3,11 @@
|
||||
source $QP_ROOT/tests/bats/common.bats.sh
|
||||
|
||||
function run() {
|
||||
if [[ -z $5 ]] ; then
|
||||
S2=1
|
||||
else
|
||||
S2=0
|
||||
fi
|
||||
thresh=1.e-6
|
||||
test_exe cis || skip
|
||||
qp_edit -c $1
|
||||
ezfio set_file $1
|
||||
ezfio set determinants n_states 3
|
||||
ezfio set determinants s2_eig $S2
|
||||
ezfio set davidson threshold_davidson 1.e-12
|
||||
echo "Write" > $1/mo_two_e_integrals/disk_access_mo_integrals
|
||||
qp_set_frozen_core $1
|
||||
@ -29,7 +23,7 @@ function run() {
|
||||
|
||||
|
||||
@test "HBO" {
|
||||
run hbo.ezfio -100.018582307658 -99.77695116779833 -99.74105601962573 x
|
||||
run hbo.ezfio -100.018582259097 -99.7127500068768 -99.6982683641297
|
||||
}
|
||||
|
||||
@test "H2O" {
|
||||
@ -41,7 +35,7 @@ function run() {
|
||||
}
|
||||
|
||||
@test "C2H2" {
|
||||
run c2h2.ezfio -12.1214401949631 -11.95227840126497 -11.91537223579299 x
|
||||
run c2h2.ezfio -12.1214401949634 -11.8824874421211 -11.8682310791620
|
||||
}
|
||||
|
||||
@test "ClO" {
|
||||
@ -57,15 +51,15 @@ function run() {
|
||||
}
|
||||
|
||||
@test "HCN" {
|
||||
run hcn.ezfio -92.88717500038086 -92.69765690338815 -92.66095614790936 x
|
||||
run hcn.ezfio -92.8871750003811 -92.6250263755063 -92.6089719143274
|
||||
}
|
||||
|
||||
@test "N2" {
|
||||
run n2.ezfio -108.9834897853052 -108.7538426008862 -108.7142633124650 x
|
||||
run n2.ezfio -108.983489785305 -108.670192549322 -108.649653940027
|
||||
}
|
||||
|
||||
@test "SiH2_3B1" {
|
||||
run sih2_3b1.ezfio -289.952916622430 -289.901707301173 -289.715063453770
|
||||
run sih2_3b1.ezfio -289.969297318489 -289.766898643192 -289.737521023380
|
||||
}
|
||||
|
||||
@test "SO" {
|
||||
@ -77,7 +71,7 @@ function run() {
|
||||
}
|
||||
|
||||
@test "CO2" {
|
||||
run co2.ezfio -187.6507108861505 -187.3564970712329 -187.3277981565893 x
|
||||
run co2.ezfio -187.650710886151 -187.300746249524 -187.291641359067
|
||||
}
|
||||
|
||||
@test "F2" {
|
@ -1,7 +1,7 @@
|
||||
program cis
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Configuration Interaction with Single excitations.
|
||||
! Configuration Interaction with Single excitations.
|
||||
END_DOC
|
||||
read_wf = .False.
|
||||
SOFT_TOUCH read_wf
|
||||
@ -10,23 +10,26 @@ end
|
||||
|
||||
subroutine run
|
||||
implicit none
|
||||
integer :: i
|
||||
|
||||
integer :: i
|
||||
|
||||
call H_apply_cis
|
||||
print *, 'N_det = ', N_det
|
||||
print*,'******************************'
|
||||
print *, 'Energies of the states:'
|
||||
do i = 1,N_states
|
||||
print *, i, CI_energy(i)
|
||||
print *, i, CI_energy(i)
|
||||
enddo
|
||||
print*,'******************************'
|
||||
print*,'Excitation energy '
|
||||
do i = 2, N_states
|
||||
print*, i ,CI_energy(i) - CI_energy(1)
|
||||
enddo
|
||||
|
||||
if (N_states > 1) then
|
||||
print*,'******************************'
|
||||
print*,'Excitation energies '
|
||||
do i = 2, N_states
|
||||
print*, i ,CI_energy(i) - CI_energy(1)
|
||||
enddo
|
||||
endif
|
||||
|
||||
call ezfio_set_cis_energy(CI_energy)
|
||||
psi_coef = ci_eigenvectors
|
||||
SOFT_TOUCH psi_coef
|
||||
call save_wavefunction
|
||||
|
||||
|
||||
end
|
||||
|
125
src/cisd/30.cisd.bats
Normal file
125
src/cisd/30.cisd.bats
Normal file
@ -0,0 +1,125 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
source $QP_ROOT/tests/bats/common.bats.sh
|
||||
|
||||
function run() {
|
||||
thresh=1.e-6
|
||||
test_exe cisd || skip
|
||||
qp_edit -c $1
|
||||
ezfio set_file $1
|
||||
ezfio set determinants n_states 2
|
||||
ezfio set davidson threshold_davidson 1.e-12
|
||||
ezfio set davidson n_states_diag 24
|
||||
qp_run cisd $1
|
||||
energy1="$(ezfio get cisd energy | tr '[]' ' ' | cut -d ',' -f 1)"
|
||||
energy2="$(ezfio get cisd energy | tr '[]' ' ' | cut -d ',' -f 2)"
|
||||
eq $energy1 $2 $thresh
|
||||
eq $energy2 $3 $thresh
|
||||
}
|
||||
|
||||
|
||||
|
||||
@test "HBO" {
|
||||
run hbo.ezfio -100.2019254455993 -99.79484127741013
|
||||
}
|
||||
|
||||
@test "H2O" {
|
||||
run h2o.ezfio -76.22975602077072 -75.80609108747208
|
||||
}
|
||||
|
||||
@test "[Cu(NH3)4]2+" {
|
||||
qp_set_mo_class cu_nh3_4_2plus.ezfio -core "[1-24]" -act "[25-45]" -del "[46-87]"
|
||||
run cu_nh3_4_2plus.ezfio -1862.98685486633 -1862.68819645070
|
||||
}
|
||||
|
||||
@test "C2H2" {
|
||||
qp_set_mo_class c2h2.ezfio -act "[1-30]" -del "[31-36]"
|
||||
run c2h2.ezfio -12.3566731164213 -11.9495394759914
|
||||
}
|
||||
|
||||
@test "ClO" {
|
||||
run clo.ezfio -534.5404021326773 -534.3818725793897
|
||||
}
|
||||
|
||||
@test "DHNO" {
|
||||
qp_set_mo_class dhno.ezfio -core "[1-7]" -act "[8-64]"
|
||||
run dhno.ezfio -130.458814562403 -130.356308303681
|
||||
}
|
||||
|
||||
@test "H3COH" {
|
||||
run h3coh.ezfio -115.204958752377 -114.755913828245
|
||||
}
|
||||
|
||||
@test "HCN" {
|
||||
qp_set_mo_class hcn.ezfio -core "[1,2]" -act "[3-40]" -del "[41-55]"
|
||||
run hcn.ezfio -93.0776334511721 -92.6684633795506
|
||||
}
|
||||
|
||||
@test "N2" {
|
||||
qp_set_mo_class n2.ezfio -core "[1,2]" -act "[3-40]" -del "[41-60]"
|
||||
run n2.ezfio -109.275693633982 -108.757794570948
|
||||
}
|
||||
|
||||
@test "SiH2_3B1" {
|
||||
run sih2_3b1.ezfio -290.015949171697 -289.805036176618
|
||||
}
|
||||
|
||||
@test "SO" {
|
||||
run so.ezfio -26.0131812819785 -25.7053111980226
|
||||
}
|
||||
|
||||
@test "CH4" {
|
||||
qp_set_mo_class ch4.ezfio -core "[1]" -act "[2-30]" -del "[31-59]"
|
||||
run ch4.ezfio -40.2403916878857 -39.8433229646061
|
||||
}
|
||||
|
||||
@test "CO2" {
|
||||
qp_set_mo_class co2.ezfio -core "[1,2]" -act "[3-30]" -del "[31-42]"
|
||||
run co2.ezfio -187.959378390998 -187.432502050556
|
||||
}
|
||||
|
||||
@test "F2" {
|
||||
qp_set_mo_class f2.ezfio -core "[1,2]" -act "[3-30]" -del "[31-62]"
|
||||
run f2.ezfio -199.056829527539 -198.731828008346
|
||||
}
|
||||
|
||||
@test "HCO" {
|
||||
run hco.ezfio -113.288687359997 -113.122945162967
|
||||
}
|
||||
|
||||
@test "NH3" {
|
||||
qp_set_mo_class nh3.ezfio -core "[1-4]" -act "[5-72]"
|
||||
run nh3.ezfio -56.2447484835843 -55.9521689975716
|
||||
}
|
||||
|
||||
@test "SiH3" {
|
||||
run sih3.ezfio -5.57096611856522 -5.30950347928823
|
||||
}
|
||||
|
||||
@test "ClF" {
|
||||
run clf.ezfio -559.162476603880 -558.792395927088
|
||||
}
|
||||
|
||||
@test "H2O2" {
|
||||
qp_set_mo_class h2o2.ezfio -core "[1-2]" -act "[3-24]" -del "[25-38]"
|
||||
run h2o2.ezfio -151.003775695363 -150.650247854914
|
||||
}
|
||||
|
||||
@test "H2S" {
|
||||
run h2s.ezfio -398.853701416768 -398.519020035337
|
||||
}
|
||||
|
||||
@test "N2H4" {
|
||||
qp_set_mo_class n2h4.ezfio -core "[1-2]" -act "[3-24]" -del "[25-48]"
|
||||
run n2h4.ezfio -111.366247464687 -110.990795989548
|
||||
}
|
||||
|
||||
@test "OH" {
|
||||
run oh.ezfio -75.6087472926588 -75.5370393736601
|
||||
}
|
||||
|
||||
@test "SO2" {
|
||||
qp_set_mo_class so2.ezfio -core "[1-8]" -act "[9-87]"
|
||||
run so2.ezfio -41.5746738710350 -41.3800467740750
|
||||
}
|
||||
|
@ -14,13 +14,21 @@ subroutine run
|
||||
|
||||
call H_apply_cisd
|
||||
print *, 'N_det = ', N_det
|
||||
print*,'******************************'
|
||||
print *, 'Energies of the states:'
|
||||
do i = 1,N_states
|
||||
print *, 'energy = ',CI_energy(i), &
|
||||
'E_corr = ',CI_electronic_energy(i) - ref_bitmask_energy
|
||||
print *, i, CI_energy(i)
|
||||
enddo
|
||||
if (N_states > 1) then
|
||||
print*,'******************************'
|
||||
print*,'Excitation energies '
|
||||
do i = 2, N_states
|
||||
print*, i ,CI_energy(i) - CI_energy(1)
|
||||
enddo
|
||||
endif
|
||||
psi_coef = ci_eigenvectors
|
||||
SOFT_TOUCH psi_coef
|
||||
call save_wavefunction_truncated(1.d-12)
|
||||
call save_wavefunction
|
||||
call ezfio_set_cisd_energy(CI_energy)
|
||||
|
||||
end
|
||||
|
@ -21,6 +21,9 @@ end
|
||||
subroutine davidson_run_slave(thread,iproc)
|
||||
use f77_zmq
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Slave routine for Davidson's diagonalization.
|
||||
END_DOC
|
||||
|
||||
integer, intent(in) :: thread, iproc
|
||||
|
||||
@ -154,6 +157,9 @@ end subroutine
|
||||
subroutine davidson_push_results(zmq_socket_push, v_t, s_t, imin, imax, task_id)
|
||||
use f77_zmq
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Push the results of $H|U \rangle$ from a worker to the master.
|
||||
END_DOC
|
||||
|
||||
integer(ZMQ_PTR) ,intent(in) :: zmq_socket_push
|
||||
integer ,intent(in) :: task_id, imin, imax
|
||||
@ -197,6 +203,9 @@ end subroutine
|
||||
subroutine davidson_pull_results(zmq_socket_pull, v_t, s_t, imin, imax, task_id)
|
||||
use f77_zmq
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Pull the results of $H|U \rangle$ on the master.
|
||||
END_DOC
|
||||
|
||||
integer(ZMQ_PTR) ,intent(in) :: zmq_socket_pull
|
||||
integer ,intent(out) :: task_id, imin, imax
|
||||
@ -240,6 +249,9 @@ end subroutine
|
||||
subroutine davidson_collector(zmq_to_qp_run_socket, zmq_socket_pull, v0, s0, sze, N_st)
|
||||
use f77_zmq
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Routine collecting the results of the workers in Davidson's algorithm.
|
||||
END_DOC
|
||||
|
||||
integer(ZMQ_PTR), intent(in) :: zmq_socket_pull
|
||||
integer, intent(in) :: sze, N_st
|
||||
@ -283,13 +295,13 @@ subroutine H_S2_u_0_nstates_zmq(v_0,s_0,u_0,N_st,sze)
|
||||
use f77_zmq
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Computes v_0 = H|u_0> and s_0 = S^2 |u_0>
|
||||
! Computes $v_0 = H|u_0\rangle$ and $s_0 = S^2 |u_0\rangle$
|
||||
!
|
||||
! n : number of determinants
|
||||
!
|
||||
! H_jj : array of <j|H|j>
|
||||
! H_jj : array of $\langle j|H|j \rangle$
|
||||
!
|
||||
! S2_jj : array of <j|S^2|j>
|
||||
! S2_jj : array of $\langle j|S^2|j \rangle$
|
||||
END_DOC
|
||||
integer, intent(in) :: N_st, sze
|
||||
double precision, intent(out) :: v_0(sze,N_st), s_0(sze,N_st)
|
||||
@ -436,7 +448,7 @@ end
|
||||
BEGIN_PROVIDER [ integer, nthreads_davidson ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Number of threads for Davdison
|
||||
! Number of threads for Davidson
|
||||
END_DOC
|
||||
nthreads_davidson = nproc
|
||||
character*(32) :: env
|
||||
|
@ -122,7 +122,7 @@ subroutine davidson_diag_hjj_sjj(dets_in,u_in,H_jj,s2_out,energies,dim_in,sze,N_
|
||||
double precision :: to_print(3,N_st)
|
||||
double precision :: cpu, wall
|
||||
integer :: shift, shift2, itermax, istate
|
||||
double precision :: r1, r2
|
||||
double precision :: r1, r2, alpha
|
||||
logical :: state_ok(N_st_diag*davidson_sze_max)
|
||||
integer :: nproc_target
|
||||
include 'constants.include.F'
|
||||
@ -318,58 +318,33 @@ subroutine davidson_diag_hjj_sjj(dets_in,u_in,H_jj,s2_out,energies,dim_in,sze,N_
|
||||
endif
|
||||
endif
|
||||
|
||||
! Compute h_kl = <u_k | W_l> = <u_k| H |u_l>
|
||||
! Compute s_kl = <u_k | W_l> = <u_k| S2 |u_l>
|
||||
! -------------------------------------------
|
||||
|
||||
call dgemm('T','N', shift2, shift2, sze, &
|
||||
1.d0, U, size(U,1), W, size(W,1), &
|
||||
0.d0, h, size(h,1))
|
||||
|
||||
call dgemm('T','N', shift2, shift2, sze, &
|
||||
1.d0, U, size(U,1), S, size(S,1), &
|
||||
0.d0, s_, size(s_,1))
|
||||
|
||||
! Compute h_kl = <u_k | W_l> = <u_k| H |u_l>
|
||||
! -------------------------------------------
|
||||
|
||||
! ! Diagonalize S^2
|
||||
! ! ---------------
|
||||
!
|
||||
! call lapack_diag(s2,y,s_,size(s_,1),shift2)
|
||||
!
|
||||
!
|
||||
! ! Rotate H in the basis of eigenfunctions of s2
|
||||
! ! ---------------------------------------------
|
||||
!
|
||||
! call dgemm('N','N',shift2,shift2,shift2, &
|
||||
! 1.d0, h, size(h,1), y, size(y,1), &
|
||||
! 0.d0, s_tmp, size(s_tmp,1))
|
||||
!
|
||||
! call dgemm('T','N',shift2,shift2,shift2, &
|
||||
! 1.d0, y, size(y,1), s_tmp, size(s_tmp,1), &
|
||||
! 0.d0, h, size(h,1))
|
||||
!
|
||||
! ! Damp interaction between different spin states
|
||||
! ! ------------------------------------------------
|
||||
!
|
||||
! do k=1,shift2
|
||||
! do l=1,shift2
|
||||
! if (dabs(s2(k) - s2(l)) > 1.d0) then
|
||||
! h(k,l) = h(k,l)*(max(0.d0,1.d0 - dabs(s2(k) - s2(l))))
|
||||
! endif
|
||||
! enddo
|
||||
! enddo
|
||||
!
|
||||
! ! Rotate back H
|
||||
! ! -------------
|
||||
!
|
||||
! call dgemm('N','T',shift2,shift2,shift2, &
|
||||
! 1.d0, h, size(h,1), y, size(y,1), &
|
||||
! 0.d0, s_tmp, size(s_tmp,1))
|
||||
!
|
||||
! call dgemm('N','N',shift2,shift2,shift2, &
|
||||
! 1.d0, y, size(y,1), s_tmp, size(s_tmp,1), &
|
||||
! 0.d0, h, size(h,1))
|
||||
! Penalty method
|
||||
! --------------
|
||||
|
||||
if (s2_eig) then
|
||||
h = s_
|
||||
do k=1,shift2
|
||||
h(k,k) = h(k,k) + S_z2_Sz - expected_s2
|
||||
enddo
|
||||
alpha = 0.1d0
|
||||
else
|
||||
alpha = 0.d0
|
||||
endif
|
||||
|
||||
call dgemm('T','N', shift2, shift2, sze, &
|
||||
1.d0, U, size(U,1), W, size(W,1), &
|
||||
alpha , h, size(h,1))
|
||||
|
||||
|
||||
! Diagonalize h
|
||||
! -------------
|
||||
|
||||
@ -389,7 +364,7 @@ subroutine davidson_diag_hjj_sjj(dets_in,u_in,H_jj,s2_out,energies,dim_in,sze,N_
|
||||
|
||||
|
||||
do k=1,shift2
|
||||
s2(k) = s_(k,k) + S_z2_Sz
|
||||
s2(k) = s_(k,k) + S_z2_Sz
|
||||
enddo
|
||||
|
||||
if (only_expected_s2) then
|
||||
@ -475,42 +450,21 @@ subroutine davidson_diag_hjj_sjj(dets_in,u_in,H_jj,s2_out,energies,dim_in,sze,N_
|
||||
! Compute residual vector and davidson step
|
||||
! -----------------------------------------
|
||||
|
||||
if (only_expected_s2) then
|
||||
|
||||
do k=1,N_st_diag
|
||||
do i=1,sze
|
||||
U(i,shift2+k) = &
|
||||
(lambda(k) * U(i,shift2+k) - W(i,shift2+k) ) &
|
||||
* (1.d0 + expected_s2 * U(i,shift2+k) - (S(i,shift2+k) + S_z2_Sz) &
|
||||
)/max(H_jj(i) - lambda (k),1.d-2)
|
||||
enddo
|
||||
|
||||
if (k <= N_st) then
|
||||
residual_norm(k) = u_dot_u(U(1,shift2+k),sze)
|
||||
to_print(1,k) = lambda(k) + nuclear_repulsion
|
||||
to_print(2,k) = s2(k)
|
||||
to_print(3,k) = residual_norm(k)
|
||||
endif
|
||||
enddo
|
||||
|
||||
else
|
||||
|
||||
do k=1,N_st_diag
|
||||
do i=1,sze
|
||||
U(i,shift2+k) = &
|
||||
(lambda(k) * U(i,shift2+k) - W(i,shift2+k) ) &
|
||||
/max(H_jj(i) - lambda (k),1.d-2)
|
||||
enddo
|
||||
|
||||
if (k <= N_st) then
|
||||
residual_norm(k) = u_dot_u(U(1,shift2+k),sze)
|
||||
to_print(1,k) = lambda(k) + nuclear_repulsion
|
||||
to_print(2,k) = s2(k)
|
||||
to_print(3,k) = residual_norm(k)
|
||||
endif
|
||||
do k=1,N_st_diag
|
||||
do i=1,sze
|
||||
U(i,shift2+k) = &
|
||||
(lambda(k) * U(i,shift2+k) - W(i,shift2+k) ) &
|
||||
/max(H_jj(i) - lambda (k),1.d-2)
|
||||
enddo
|
||||
|
||||
endif
|
||||
if (k <= N_st) then
|
||||
residual_norm(k) = u_dot_u(U(1,shift2+k),sze)
|
||||
to_print(1,k) = lambda(k) + nuclear_repulsion
|
||||
to_print(2,k) = s2(k)
|
||||
to_print(3,k) = residual_norm(k)
|
||||
endif
|
||||
enddo
|
||||
|
||||
|
||||
write(6,'(1X,I3,1X,100(1X,F16.10,1X,F11.6,1X,E11.3))') iter, to_print(1:3,1:N_st)
|
||||
call davidson_converged(lambda,residual_norm,wall,iter,cpu,N_st,converged)
|
||||
|
@ -2,7 +2,7 @@
|
||||
BEGIN_PROVIDER [ double precision, CI_energy, (N_states_diag) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! N_states lowest eigenvalues of the CI matrix
|
||||
! :c:data:`n_states` lowest eigenvalues of the |CI| matrix
|
||||
END_DOC
|
||||
|
||||
integer :: j
|
||||
@ -23,7 +23,7 @@ END_PROVIDER
|
||||
&BEGIN_PROVIDER [ double precision, CI_eigenvectors, (N_det,N_states_diag) ]
|
||||
&BEGIN_PROVIDER [ double precision, CI_eigenvectors_s2, (N_states_diag) ]
|
||||
BEGIN_DOC
|
||||
! Eigenvectors/values of the CI matrix
|
||||
! Eigenvectors/values of the |CI| matrix
|
||||
END_DOC
|
||||
implicit none
|
||||
double precision :: ovrlp,u_dot_v
|
||||
@ -32,7 +32,7 @@ END_PROVIDER
|
||||
logical, allocatable :: good_state_array(:)
|
||||
double precision, allocatable :: s2_values_tmp(:)
|
||||
integer :: i_other_state
|
||||
double precision, allocatable :: eigenvectors(:,:), eigenvalues(:)
|
||||
double precision, allocatable :: eigenvectors(:,:), eigenvalues(:), H_prime(:,:)
|
||||
integer :: i_state
|
||||
double precision :: e_0
|
||||
integer :: i,j,k
|
||||
@ -42,7 +42,7 @@ END_PROVIDER
|
||||
logical :: converged
|
||||
|
||||
PROVIDE threshold_davidson nthreads_davidson
|
||||
! Guess values for the "N_states" states of the CI_eigenvectors
|
||||
! Guess values for the "N_states" states of the |CI| eigenvectors
|
||||
do j=1,min(N_states,N_det)
|
||||
do i=1,N_det
|
||||
CI_eigenvectors(i,j) = psi_coef(i,j)
|
||||
@ -98,12 +98,19 @@ END_PROVIDER
|
||||
|
||||
else if (diag_algorithm == "Lapack") then
|
||||
|
||||
print *, 'Diagonalization of H using Lapack'
|
||||
allocate (eigenvectors(size(H_matrix_all_dets,1),N_det))
|
||||
allocate (eigenvalues(N_det))
|
||||
call lapack_diag(eigenvalues,eigenvectors, &
|
||||
H_matrix_all_dets,size(H_matrix_all_dets,1),N_det)
|
||||
CI_electronic_energy(:) = 0.d0
|
||||
if (s2_eig) then
|
||||
double precision, parameter :: alpha = 0.1d0
|
||||
allocate (H_prime(N_det,N_det) )
|
||||
H_prime(1:N_det,1:N_det) = H_matrix_all_dets(1:N_det,1:N_det) + &
|
||||
alpha * S2_matrix_all_dets(1:N_det,1:N_det)
|
||||
do j=1,N_det
|
||||
H_prime(j,j) = H_prime(j,j) + alpha*(S_z2_Sz - expected_s2)
|
||||
enddo
|
||||
call lapack_diag(eigenvalues,eigenvectors,H_prime,size(H_prime,1),N_det)
|
||||
CI_electronic_energy(:) = 0.d0
|
||||
i_state = 0
|
||||
allocate (s2_eigvalues(N_det))
|
||||
allocate(index_good_state_array(N_det),good_state_array(N_det))
|
||||
@ -165,6 +172,9 @@ END_PROVIDER
|
||||
deallocate(index_good_state_array,good_state_array)
|
||||
deallocate(s2_eigvalues)
|
||||
else
|
||||
call lapack_diag(eigenvalues,eigenvectors, &
|
||||
H_matrix_all_dets,size(H_matrix_all_dets,1),N_det)
|
||||
CI_electronic_energy(:) = 0.d0
|
||||
call u_0_S2_u_0(CI_eigenvectors_s2,eigenvectors,N_det,psi_det,N_int,&
|
||||
min(N_det,N_states_diag),size(eigenvectors,1))
|
||||
! Select the "N_states_diag" states of lowest energy
|
||||
@ -183,8 +193,8 @@ END_PROVIDER
|
||||
subroutine diagonalize_CI
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Replace the coefficients of the CI states by the coefficients of the
|
||||
! eigenstates of the CI matrix
|
||||
! Replace the coefficients of the |CI| states by the coefficients of the
|
||||
! eigenstates of the |CI| matrix.
|
||||
END_DOC
|
||||
integer :: i,j
|
||||
do j=1,N_states
|
||||
|
@ -25,7 +25,7 @@ subroutine H_S2_u_0_nstates_openmp(v_0,s_0,u_0,N_st,sze)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Computes v_0 = H|u_0> and s_0 = S^2 |u_0>
|
||||
! Computes $v_0 = H|u_0\rangle$ and $s_0 = S^2 |u_0\rangle$.
|
||||
!
|
||||
! Assumes that the determinants are in psi_det
|
||||
!
|
||||
@ -80,7 +80,7 @@ subroutine H_S2_u_0_nstates_openmp_work(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Computes v_t = H|u_t> and s_t = S^2 |u_t>
|
||||
! Computes $v_t = H|u_t\rangle$ and $s_t = S^2 |u_t\rangle$
|
||||
!
|
||||
! Default should be 1,N_det,0,1
|
||||
END_DOC
|
||||
@ -110,7 +110,7 @@ subroutine H_S2_u_0_nstates_openmp_work_$N_int(v_t,s_t,u_t,N_st,sze,istart,iend,
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Computes v_t = H|u_t> and s_t = S^2 |u_t>
|
||||
! Computes $v_t = H|u_t\rangle$ and $s_t = S^2 |u_t\rangle$
|
||||
!
|
||||
! Default should be 1,N_det,0,1
|
||||
END_DOC
|
||||
@ -472,7 +472,7 @@ subroutine u_0_H_u_0(e_0,u_0,n,keys_tmp,Nint,N_st,sze)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Computes e_0 = <u_0|H|u_0>/<u_0|u_0>
|
||||
! Computes $E_0 = \frac{\langle u_0|H|u_0 \rangle}{\langle u_0|u_0 \rangle}$
|
||||
!
|
||||
! n : number of determinants
|
||||
!
|
||||
|
@ -15,7 +15,7 @@ subroutine H_S2_u_0_bielec_nstates_openmp(v_0,s_0,u_0,N_st,sze)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Computes v_0 = H|u_0> and s_0 = S^2 |u_0>
|
||||
! Computes $v_0 = H|u_0\rangle$ and $s_0 = S^2 |u_0\rangle$
|
||||
!
|
||||
! Assumes that the determinants are in psi_det
|
||||
!
|
||||
@ -69,7 +69,7 @@ subroutine H_S2_u_0_bielec_nstates_openmp_work(v_t,s_t,u_t,N_st,sze,istart,iend,
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Computes v_t = H|u_t> and s_t = S^2 |u_t>
|
||||
! Computes $v_t = H|u_t\rangle$ and $s_t = S^2 |u_t\rangle$
|
||||
!
|
||||
! Default should be 1,N_det,0,1
|
||||
END_DOC
|
||||
@ -99,7 +99,7 @@ subroutine H_S2_u_0_bielec_nstates_openmp_work_$N_int(v_t,s_t,u_t,N_st,sze,istar
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Computes v_t = H|u_t> and s_t = S^2 |u_t>
|
||||
! Computes $v_t = H|u_t\rangle$ and $s_t = S^2 |u_t\rangle$
|
||||
!
|
||||
! Default should be 1,N_det,0,1
|
||||
END_DOC
|
||||
@ -461,7 +461,7 @@ subroutine u_0_H_u_0_bielec(e_0,u_0,n,keys_tmp,Nint,N_st,sze)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Computes e_0 = <u_0|H|u_0>/<u_0|u_0>
|
||||
! Computes $E_0 = \frac{ \langle u_0|H|u_0\rangle}{\langle u_0|u_0 \rangle}$.
|
||||
!
|
||||
! n : number of determinants
|
||||
!
|
||||
|
@ -31,7 +31,7 @@ logical function is_in_wavefunction(key,Nint)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! True if the determinant ``det`` is in the wave function
|
||||
! |true| if the determinant ``det`` is in the wave function
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint
|
||||
integer(bit_kind), intent(in) :: key(Nint,2)
|
||||
@ -151,13 +151,15 @@ end
|
||||
logical function is_connected_to(key,keys,Nint,Ndet)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Returns |true| if determinant ``key`` is connected to ``keys``
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint, Ndet
|
||||
integer(bit_kind), intent(in) :: keys(Nint,2,Ndet)
|
||||
integer(bit_kind), intent(in) :: key(Nint,2)
|
||||
|
||||
integer :: i, l
|
||||
integer :: degree_x2
|
||||
logical, external :: is_generable_cassd
|
||||
|
||||
ASSERT (Nint > 0)
|
||||
ASSERT (Nint == N_int)
|
||||
@ -174,7 +176,6 @@ logical function is_connected_to(key,keys,Nint,Ndet)
|
||||
if (degree_x2 > 4) then
|
||||
cycle
|
||||
else
|
||||
! if(.not. is_generable_cassd(keys(1,1,i), key(1,1), Nint)) cycle !!!Nint==1 !!!!!
|
||||
is_connected_to = .true.
|
||||
return
|
||||
endif
|
||||
@ -182,30 +183,14 @@ logical function is_connected_to(key,keys,Nint,Ndet)
|
||||
end
|
||||
|
||||
|
||||
logical function is_generable_cassd(det1, det2, Nint) !!! TEST Cl HARD !!!!!
|
||||
use bitmasks
|
||||
implicit none
|
||||
integer, intent(in) :: Nint
|
||||
integer(bit_kind) :: det1(Nint, 2), det2(Nint, 2)
|
||||
integer :: degree, f, exc(0:2, 2, 2), h1, h2, p1, p2, s1, s2, t
|
||||
double precision :: phase
|
||||
|
||||
is_generable_cassd = .false.
|
||||
call get_excitation(det1, det2, exc, degree, phase, Nint)
|
||||
if(degree == -1) return
|
||||
if(degree == 0) then
|
||||
is_generable_cassd = .true.
|
||||
return
|
||||
end if
|
||||
call decode_exc(exc,degree,h1,p1,h2,p2,s1,s2)
|
||||
if(degree == 1 .and. h1 <= 11) is_generable_cassd = .true.
|
||||
if(degree == 2 .and. h1 <= 11 .and. h2 <= 11) is_generable_cassd = .true.
|
||||
end function
|
||||
|
||||
|
||||
logical function is_connected_to_by_mono(key,keys,Nint,Ndet)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Returns |true| is ``key`` is connected to ``keys`` by a single excitation.
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint, Ndet
|
||||
integer(bit_kind), intent(in) :: keys(Nint,2,Ndet)
|
||||
integer(bit_kind), intent(in) :: key(Nint,2)
|
||||
@ -351,6 +336,9 @@ end
|
||||
integer function connected_to_ref_by_mono(key,keys,Nint,N_past_in,Ndet)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Returns |true| is ``key`` is connected to the reference by a single excitation.
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint, N_past_in, Ndet
|
||||
integer(bit_kind), intent(in) :: keys(Nint,2,Ndet)
|
||||
integer(bit_kind), intent(in) :: key(Nint,2)
|
||||
|
@ -1,7 +1,7 @@
|
||||
subroutine do_mono_excitation(key_in,i_hole,i_particle,ispin,i_ok)
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Apply the mono excitation operator : a^{dager}_(i_particle) a_(i_hole) of spin = ispin
|
||||
! Apply the single excitation operator : a^{dager}_(i_particle) a_(i_hole) of spin = ispin
|
||||
! on key_in
|
||||
! ispin = 1 == alpha
|
||||
! ispin = 2 == beta
|
||||
@ -41,7 +41,7 @@ end
|
||||
logical function is_spin_flip_possible(key_in,i_flip,ispin)
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! returns .True. if the spin-flip of spin ispin in the orbital i_flip is possible
|
||||
! returns |true| if the spin-flip of spin ispin in the orbital i_flip is possible
|
||||
! on key_in
|
||||
END_DOC
|
||||
integer, intent(in) :: i_flip,ispin
|
||||
|
@ -2,143 +2,135 @@
|
||||
&BEGIN_PROVIDER [ double precision, one_body_dm_mo_beta_average, (mo_tot_num,mo_tot_num) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Alpha and beta one-body density matrix for each state
|
||||
! $\alpha$ and $\beta$ one-body density matrix for each state
|
||||
END_DOC
|
||||
|
||||
integer :: i
|
||||
|
||||
one_body_dm_mo_alpha_average = 0.d0
|
||||
one_body_dm_mo_beta_average = 0.d0
|
||||
do i = 1,N_states
|
||||
one_body_dm_mo_alpha_average(:,:) += one_body_dm_mo_alpha(:,:,i) * state_average_weight(i)
|
||||
one_body_dm_mo_beta_average(:,:) += one_body_dm_mo_beta(:,:,i) * state_average_weight(i)
|
||||
one_body_dm_mo_alpha_average(:,:) += one_body_dm_mo_alpha(:,:,i) * state_average_weight(i)
|
||||
one_body_dm_mo_beta_average(:,:) += one_body_dm_mo_beta(:,:,i) * state_average_weight(i)
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ double precision, one_body_dm_mo_diff, (mo_tot_num,mo_tot_num,2:N_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Difference of the one-body density matrix with respect to the ground state
|
||||
END_DOC
|
||||
integer :: i,j, istate
|
||||
|
||||
do istate=2,N_states
|
||||
do j=1,mo_tot_num
|
||||
do i=1,mo_tot_num
|
||||
one_body_dm_mo_diff(i,j,istate) = &
|
||||
one_body_dm_mo_alpha(i,j,istate) - one_body_dm_mo_alpha(i,j,1) + &
|
||||
one_body_dm_mo_beta (i,j,istate) - one_body_dm_mo_beta (i,j,1)
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Difference of the one-body density matrix with respect to the ground state
|
||||
END_DOC
|
||||
integer :: i,j, istate
|
||||
|
||||
do istate=2,N_states
|
||||
do j=1,mo_tot_num
|
||||
do i=1,mo_tot_num
|
||||
one_body_dm_mo_diff(i,j,istate) = &
|
||||
one_body_dm_mo_alpha(i,j,istate) - one_body_dm_mo_alpha(i,j,1) +&
|
||||
one_body_dm_mo_beta (i,j,istate) - one_body_dm_mo_beta (i,j,1)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
double precision :: trace
|
||||
trace = 0.d0
|
||||
do i=1,mo_tot_num
|
||||
trace += one_body_dm_mo_diff(i,i,istate)
|
||||
enddo
|
||||
print *, irp_here, trace
|
||||
enddo
|
||||
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ double precision, one_body_dm_mo_spin_index, (mo_tot_num,mo_tot_num,N_states,2) ]
|
||||
implicit none
|
||||
integer :: i,j,ispin,istate
|
||||
ispin = 1
|
||||
BEGIN_PROVIDER [ double precision, one_body_dm_mo_spin_index, (mo_tot_num,mo_tot_num,N_states,2) ]
|
||||
implicit none
|
||||
integer :: i,j,ispin,istate
|
||||
ispin = 1
|
||||
do istate = 1, N_states
|
||||
do j = 1, mo_tot_num
|
||||
do i = 1, mo_tot_num
|
||||
one_body_dm_mo_spin_index(i,j,istate,ispin) = one_body_dm_mo_alpha(i,j,istate)
|
||||
do j = 1, mo_tot_num
|
||||
do i = 1, mo_tot_num
|
||||
one_body_dm_mo_spin_index(i,j,istate,ispin) = one_body_dm_mo_alpha(i,j,istate)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
ispin = 2
|
||||
|
||||
ispin = 2
|
||||
do istate = 1, N_states
|
||||
do j = 1, mo_tot_num
|
||||
do i = 1, mo_tot_num
|
||||
one_body_dm_mo_spin_index(i,j,istate,ispin) = one_body_dm_mo_beta(i,j,istate)
|
||||
do j = 1, mo_tot_num
|
||||
do i = 1, mo_tot_num
|
||||
one_body_dm_mo_spin_index(i,j,istate,ispin) = one_body_dm_mo_beta(i,j,istate)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ double precision, one_body_dm_dagger_mo_spin_index, (mo_tot_num,mo_tot_num,N_states,2) ]
|
||||
implicit none
|
||||
integer :: i,j,ispin,istate
|
||||
ispin = 1
|
||||
do istate = 1, N_states
|
||||
do j = 1, mo_tot_num
|
||||
one_body_dm_dagger_mo_spin_index(j,j,istate,ispin) = 1 - one_body_dm_mo_alpha(j,j,istate)
|
||||
do i = j+1, mo_tot_num
|
||||
one_body_dm_dagger_mo_spin_index(i,j,istate,ispin) = -one_body_dm_mo_alpha(i,j,istate)
|
||||
one_body_dm_dagger_mo_spin_index(j,i,istate,ispin) = -one_body_dm_mo_alpha(i,j,istate)
|
||||
enddo
|
||||
BEGIN_PROVIDER [ double precision, one_body_dm_dagger_mo_spin_index, (mo_tot_num,mo_tot_num,N_states,2) ]
|
||||
implicit none
|
||||
integer :: i,j,ispin,istate
|
||||
ispin = 1
|
||||
do istate = 1, N_states
|
||||
do j = 1, mo_tot_num
|
||||
one_body_dm_dagger_mo_spin_index(j,j,istate,ispin) = 1 - one_body_dm_mo_alpha(j,j,istate)
|
||||
do i = j+1, mo_tot_num
|
||||
one_body_dm_dagger_mo_spin_index(i,j,istate,ispin) = -one_body_dm_mo_alpha(i,j,istate)
|
||||
one_body_dm_dagger_mo_spin_index(j,i,istate,ispin) = -one_body_dm_mo_alpha(i,j,istate)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
ispin = 2
|
||||
do istate = 1, N_states
|
||||
do j = 1, mo_tot_num
|
||||
one_body_dm_dagger_mo_spin_index(j,j,istate,ispin) = 1 - one_body_dm_mo_beta(j,j,istate)
|
||||
do i = j+1, mo_tot_num
|
||||
one_body_dm_dagger_mo_spin_index(i,j,istate,ispin) = -one_body_dm_mo_beta(i,j,istate)
|
||||
one_body_dm_dagger_mo_spin_index(j,i,istate,ispin) = -one_body_dm_mo_beta(i,j,istate)
|
||||
enddo
|
||||
|
||||
ispin = 2
|
||||
do istate = 1, N_states
|
||||
do j = 1, mo_tot_num
|
||||
one_body_dm_dagger_mo_spin_index(j,j,istate,ispin) = 1 - one_body_dm_mo_beta(j,j,istate)
|
||||
do i = j+1, mo_tot_num
|
||||
one_body_dm_dagger_mo_spin_index(i,j,istate,ispin) = -one_body_dm_mo_beta(i,j,istate)
|
||||
one_body_dm_dagger_mo_spin_index(j,i,istate,ispin) = -one_body_dm_mo_beta(i,j,istate)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ double precision, one_body_dm_mo_alpha, (mo_tot_num,mo_tot_num,N_states) ]
|
||||
&BEGIN_PROVIDER [ double precision, one_body_dm_mo_beta, (mo_tot_num,mo_tot_num,N_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Alpha and beta one-body density matrix for each state
|
||||
END_DOC
|
||||
|
||||
integer :: j,k,l,m,k_a,k_b
|
||||
integer :: occ(N_int*bit_kind_size,2)
|
||||
double precision :: ck, cl, ckl
|
||||
double precision :: phase
|
||||
integer :: h1,h2,p1,p2,s1,s2, degree
|
||||
integer(bit_kind) :: tmp_det(N_int,2), tmp_det2(N_int)
|
||||
integer :: exc(0:2,2),n_occ(2)
|
||||
double precision, allocatable :: tmp_a(:,:,:), tmp_b(:,:,:)
|
||||
integer :: krow, kcol, lrow, lcol
|
||||
|
||||
PROVIDE psi_det
|
||||
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! $\alpha$ and $\beta$ one-body density matrix for each state
|
||||
END_DOC
|
||||
|
||||
integer :: j,k,l,m,k_a,k_b
|
||||
integer :: occ(N_int*bit_kind_size,2)
|
||||
double precision :: ck, cl, ckl
|
||||
double precision :: phase
|
||||
integer :: h1,h2,p1,p2,s1,s2, degree
|
||||
integer(bit_kind) :: tmp_det(N_int,2), tmp_det2(N_int)
|
||||
integer :: exc(0:2,2),n_occ(2)
|
||||
double precision, allocatable :: tmp_a(:,:,:), tmp_b(:,:,:)
|
||||
integer :: krow, kcol, lrow, lcol
|
||||
|
||||
PROVIDE psi_det
|
||||
|
||||
one_body_dm_mo_alpha = 0.d0
|
||||
one_body_dm_mo_beta = 0.d0
|
||||
!$OMP PARALLEL DEFAULT(NONE) &
|
||||
!$OMP PRIVATE(j,k,k_a,k_b,l,m,occ,ck, cl, ckl,phase,h1,h2,p1,p2,s1,s2, degree,exc, &
|
||||
!$OMP tmp_a, tmp_b, n_occ, krow, kcol, lrow, lcol, tmp_det, tmp_det2)&
|
||||
!$OMP SHARED(psi_det,psi_coef,N_int,N_states,elec_alpha_num,&
|
||||
!$OMP elec_beta_num,one_body_dm_mo_alpha,one_body_dm_mo_beta,N_det,&
|
||||
!$OMP mo_tot_num,psi_bilinear_matrix_rows,psi_bilinear_matrix_columns, &
|
||||
!$OMP psi_bilinear_matrix_transp_rows, psi_bilinear_matrix_transp_columns, &
|
||||
!$OMP psi_bilinear_matrix_order_reverse, psi_det_alpha_unique, psi_det_beta_unique, &
|
||||
!$OMP psi_bilinear_matrix_values, psi_bilinear_matrix_transp_values, &
|
||||
!$OMP N_det_alpha_unique,N_det_beta_unique,irp_here)
|
||||
!$OMP PARALLEL DEFAULT(NONE) &
|
||||
!$OMP PRIVATE(j,k,k_a,k_b,l,m,occ,ck, cl, ckl,phase,h1,h2,p1,p2,s1,s2, degree,exc,&
|
||||
!$OMP tmp_a, tmp_b, n_occ, krow, kcol, lrow, lcol, tmp_det, tmp_det2)&
|
||||
!$OMP SHARED(psi_det,psi_coef,N_int,N_states,elec_alpha_num, &
|
||||
!$OMP elec_beta_num,one_body_dm_mo_alpha,one_body_dm_mo_beta,N_det,&
|
||||
!$OMP mo_tot_num,psi_bilinear_matrix_rows,psi_bilinear_matrix_columns,&
|
||||
!$OMP psi_bilinear_matrix_transp_rows, psi_bilinear_matrix_transp_columns,&
|
||||
!$OMP psi_bilinear_matrix_order_reverse, psi_det_alpha_unique, psi_det_beta_unique,&
|
||||
!$OMP psi_bilinear_matrix_values, psi_bilinear_matrix_transp_values,&
|
||||
!$OMP N_det_alpha_unique,N_det_beta_unique,irp_here)
|
||||
allocate(tmp_a(mo_tot_num,mo_tot_num,N_states), tmp_b(mo_tot_num,mo_tot_num,N_states) )
|
||||
tmp_a = 0.d0
|
||||
!$OMP DO SCHEDULE(dynamic,64)
|
||||
do k_a=1,N_det
|
||||
krow = psi_bilinear_matrix_rows(k_a)
|
||||
krow = psi_bilinear_matrix_rows(k_a)
|
||||
ASSERT (krow <= N_det_alpha_unique)
|
||||
|
||||
kcol = psi_bilinear_matrix_columns(k_a)
|
||||
|
||||
kcol = psi_bilinear_matrix_columns(k_a)
|
||||
ASSERT (kcol <= N_det_beta_unique)
|
||||
|
||||
|
||||
tmp_det(1:N_int,1) = psi_det_alpha_unique(1:N_int,krow)
|
||||
tmp_det(1:N_int,2) = psi_det_beta_unique (1:N_int,kcol)
|
||||
|
||||
|
||||
! Diagonal part
|
||||
! -------------
|
||||
|
||||
|
||||
call bitstring_to_list_ab(tmp_det, occ, n_occ, N_int)
|
||||
do m=1,N_states
|
||||
ck = psi_bilinear_matrix_values(k_a,m)*psi_bilinear_matrix_values(k_a,m)
|
||||
@ -147,11 +139,11 @@ END_PROVIDER
|
||||
tmp_a(j,j,m) += ck
|
||||
enddo
|
||||
enddo
|
||||
|
||||
|
||||
if (k_a == N_det) cycle
|
||||
l = k_a+1
|
||||
lrow = psi_bilinear_matrix_rows(l)
|
||||
lcol = psi_bilinear_matrix_columns(l)
|
||||
lrow = psi_bilinear_matrix_rows(l)
|
||||
lcol = psi_bilinear_matrix_columns(l)
|
||||
! Fix beta determinant, loop over alphas
|
||||
do while ( lcol == kcol )
|
||||
tmp_det2(:) = psi_det_alpha_unique(:, lrow)
|
||||
@ -168,33 +160,33 @@ END_PROVIDER
|
||||
endif
|
||||
l = l+1
|
||||
if (l>N_det) exit
|
||||
lrow = psi_bilinear_matrix_rows(l)
|
||||
lcol = psi_bilinear_matrix_columns(l)
|
||||
lrow = psi_bilinear_matrix_rows(l)
|
||||
lcol = psi_bilinear_matrix_columns(l)
|
||||
enddo
|
||||
|
||||
|
||||
enddo
|
||||
!$OMP END DO NOWAIT
|
||||
|
||||
|
||||
!$OMP CRITICAL
|
||||
one_body_dm_mo_alpha(:,:,:) = one_body_dm_mo_alpha(:,:,:) + tmp_a(:,:,:)
|
||||
!$OMP END CRITICAL
|
||||
deallocate(tmp_a)
|
||||
|
||||
|
||||
tmp_b = 0.d0
|
||||
!$OMP DO SCHEDULE(dynamic,64)
|
||||
do k_b=1,N_det
|
||||
krow = psi_bilinear_matrix_transp_rows(k_b)
|
||||
krow = psi_bilinear_matrix_transp_rows(k_b)
|
||||
ASSERT (krow <= N_det_alpha_unique)
|
||||
|
||||
kcol = psi_bilinear_matrix_transp_columns(k_b)
|
||||
|
||||
kcol = psi_bilinear_matrix_transp_columns(k_b)
|
||||
ASSERT (kcol <= N_det_beta_unique)
|
||||
|
||||
|
||||
tmp_det(1:N_int,1) = psi_det_alpha_unique(1:N_int,krow)
|
||||
tmp_det(1:N_int,2) = psi_det_beta_unique (1:N_int,kcol)
|
||||
|
||||
|
||||
! Diagonal part
|
||||
! -------------
|
||||
|
||||
|
||||
call bitstring_to_list_ab(tmp_det, occ, n_occ, N_int)
|
||||
do m=1,N_states
|
||||
ck = psi_bilinear_matrix_transp_values(k_b,m)*psi_bilinear_matrix_transp_values(k_b,m)
|
||||
@ -203,11 +195,11 @@ END_PROVIDER
|
||||
tmp_b(j,j,m) += ck
|
||||
enddo
|
||||
enddo
|
||||
|
||||
|
||||
if (k_b == N_det) cycle
|
||||
l = k_b+1
|
||||
lrow = psi_bilinear_matrix_transp_rows(l)
|
||||
lcol = psi_bilinear_matrix_transp_columns(l)
|
||||
lrow = psi_bilinear_matrix_transp_rows(l)
|
||||
lcol = psi_bilinear_matrix_transp_columns(l)
|
||||
! Fix beta determinant, loop over alphas
|
||||
do while ( lrow == krow )
|
||||
tmp_det2(:) = psi_det_beta_unique(:, lcol)
|
||||
@ -224,28 +216,28 @@ END_PROVIDER
|
||||
endif
|
||||
l = l+1
|
||||
if (l>N_det) exit
|
||||
lrow = psi_bilinear_matrix_transp_rows(l)
|
||||
lcol = psi_bilinear_matrix_transp_columns(l)
|
||||
lrow = psi_bilinear_matrix_transp_rows(l)
|
||||
lcol = psi_bilinear_matrix_transp_columns(l)
|
||||
enddo
|
||||
|
||||
|
||||
enddo
|
||||
!$OMP END DO NOWAIT
|
||||
!$OMP CRITICAL
|
||||
one_body_dm_mo_beta(:,:,:) = one_body_dm_mo_beta(:,:,:) + tmp_b(:,:,:)
|
||||
!$OMP END CRITICAL
|
||||
|
||||
|
||||
deallocate(tmp_b)
|
||||
!$OMP END PARALLEL
|
||||
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ double precision, one_body_single_double_dm_mo_alpha, (mo_tot_num,mo_tot_num) ]
|
||||
&BEGIN_PROVIDER [ double precision, one_body_single_double_dm_mo_beta, (mo_tot_num,mo_tot_num) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Alpha and beta one-body density matrix for each state
|
||||
! $\alpha$ and $\beta$ one-body density matrix for each state
|
||||
END_DOC
|
||||
|
||||
|
||||
integer :: j,k,l,m
|
||||
integer :: occ(N_int*bit_kind_size,2)
|
||||
double precision :: ck, cl, ckl
|
||||
@ -253,19 +245,19 @@ END_PROVIDER
|
||||
integer :: h1,h2,p1,p2,s1,s2, degree
|
||||
integer :: exc(0:2,2,2),n_occ_alpha
|
||||
double precision, allocatable :: tmp_a(:,:), tmp_b(:,:)
|
||||
integer :: degree_respect_to_HF_k
|
||||
integer :: degree_respect_to_HF_l
|
||||
|
||||
integer :: degree_respect_to_HF_k
|
||||
integer :: degree_respect_to_HF_l
|
||||
|
||||
PROVIDE elec_alpha_num elec_beta_num
|
||||
|
||||
|
||||
one_body_single_double_dm_mo_alpha = 0.d0
|
||||
one_body_single_double_dm_mo_beta = 0.d0
|
||||
!$OMP PARALLEL DEFAULT(NONE) &
|
||||
!$OMP PRIVATE(j,k,l,m,occ,ck, cl, ckl,phase,h1,h2,p1,p2,s1,s2, degree,exc, &
|
||||
!$OMP tmp_a, tmp_b, n_occ_alpha,degree_respect_to_HF_k,degree_respect_to_HF_l)&
|
||||
!$OMP SHARED(ref_bitmask,psi_det,psi_coef,N_int,N_states,state_average_weight,elec_alpha_num,&
|
||||
!$OMP elec_beta_num,one_body_single_double_dm_mo_alpha,one_body_single_double_dm_mo_beta,N_det,&
|
||||
!$OMP mo_tot_num)
|
||||
!$OMP PARALLEL DEFAULT(NONE) &
|
||||
!$OMP PRIVATE(j,k,l,m,occ,ck, cl, ckl,phase,h1,h2,p1,p2,s1,s2, degree,exc,&
|
||||
!$OMP tmp_a, tmp_b, n_occ_alpha,degree_respect_to_HF_k,degree_respect_to_HF_l)&
|
||||
!$OMP SHARED(ref_bitmask,psi_det,psi_coef,N_int,N_states,state_average_weight,elec_alpha_num,&
|
||||
!$OMP elec_beta_num,one_body_single_double_dm_mo_alpha,one_body_single_double_dm_mo_beta,N_det,&
|
||||
!$OMP mo_tot_num)
|
||||
allocate(tmp_a(mo_tot_num,mo_tot_num), tmp_b(mo_tot_num,mo_tot_num) )
|
||||
tmp_a = 0.d0
|
||||
tmp_b = 0.d0
|
||||
@ -309,8 +301,8 @@ END_PROVIDER
|
||||
tmp_b(p1,h1) += ckl
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
!$OMP END DO NOWAIT
|
||||
!$OMP CRITICAL
|
||||
one_body_single_double_dm_mo_alpha = one_body_single_double_dm_mo_alpha + tmp_a
|
||||
@ -321,171 +313,145 @@ END_PROVIDER
|
||||
deallocate(tmp_a,tmp_b)
|
||||
!$OMP END PARALLEL
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ double precision, one_body_dm_mo, (mo_tot_num,mo_tot_num) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! One-body density matrix
|
||||
END_DOC
|
||||
one_body_dm_mo = one_body_dm_mo_alpha_average + one_body_dm_mo_beta_average
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! One-body density matrix
|
||||
END_DOC
|
||||
one_body_dm_mo = one_body_dm_mo_alpha_average + one_body_dm_mo_beta_average
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ double precision, one_body_spin_density_mo, (mo_tot_num,mo_tot_num) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! rho(alpha) - rho(beta)
|
||||
END_DOC
|
||||
one_body_spin_density_mo = one_body_dm_mo_alpha_average - one_body_dm_mo_beta_average
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! $\rho(\alpha) - \rho(\beta)$
|
||||
END_DOC
|
||||
one_body_spin_density_mo = one_body_dm_mo_alpha_average - one_body_dm_mo_beta_average
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
subroutine set_natural_mos
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Set natural orbitals, obtained by diagonalization of the one-body density matrix in the MO basis
|
||||
END_DOC
|
||||
character*(64) :: label
|
||||
double precision, allocatable :: tmp(:,:)
|
||||
|
||||
label = "Natural"
|
||||
call mo_as_svd_vectors_of_mo_matrix_eig(one_body_dm_mo,size(one_body_dm_mo,1),mo_tot_num,mo_tot_num,mo_occ,label)
|
||||
soft_touch mo_occ
|
||||
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Set natural orbitals, obtained by diagonalization of the one-body density matrix
|
||||
! in the |MO| basis
|
||||
END_DOC
|
||||
character*(64) :: label
|
||||
double precision, allocatable :: tmp(:,:)
|
||||
|
||||
label = "Natural"
|
||||
call mo_as_svd_vectors_of_mo_matrix_eig(one_body_dm_mo,size(one_body_dm_mo,1),mo_tot_num,mo_tot_num,mo_occ,label)
|
||||
soft_touch mo_occ
|
||||
|
||||
end
|
||||
subroutine save_natural_mos
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Save natural orbitals, obtained by diagonalization of the one-body density matrix in the MO basis
|
||||
END_DOC
|
||||
call set_natural_mos
|
||||
call save_mos
|
||||
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Save natural orbitals, obtained by diagonalization of the one-body density matrix in
|
||||
! the |MO| basis
|
||||
END_DOC
|
||||
call set_natural_mos
|
||||
call save_mos
|
||||
|
||||
end
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ double precision, l3_weight, (N_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Weight of the states in the selection : 1/(sum_i |c_i|^3)
|
||||
END_DOC
|
||||
integer :: i,k
|
||||
double precision :: c
|
||||
do i=1,N_states
|
||||
l3_weight(i) = 1.d-31
|
||||
do k=1,N_det
|
||||
c = psi_coef(k,i)*psi_coef(k,i)
|
||||
l3_weight(i) = l3_weight(i) + c*abs(psi_coef(k,i))
|
||||
enddo
|
||||
l3_weight(i) = min(1.d0/l3_weight(i), 100.d0)
|
||||
enddo
|
||||
if (mpi_master) then
|
||||
print *, ''
|
||||
print *, 'L3 weights'
|
||||
print *, '----------'
|
||||
print *, ''
|
||||
print *, l3_weight(1:N_states)
|
||||
print *, ''
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ double precision, c0_weight, (N_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Weight of the states in the selection : 1/c_0^2
|
||||
END_DOC
|
||||
if (N_states > 1) then
|
||||
integer :: i
|
||||
double precision :: c
|
||||
do i=1,N_states
|
||||
c0_weight(i) = 1.d-31
|
||||
c = maxval(psi_coef(:,i) * psi_coef(:,i))
|
||||
c0_weight(i) = 1.d0/(c+1.d-20)
|
||||
enddo
|
||||
c = 1.d0/minval(c0_weight(:))
|
||||
do i=1,N_states
|
||||
c0_weight(i) = c0_weight(i) * c
|
||||
enddo
|
||||
else
|
||||
c0_weight = 1.d0
|
||||
endif
|
||||
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Weight of the states in the selection : $\frac{1}{c_0^2}$.
|
||||
END_DOC
|
||||
if (N_states > 1) then
|
||||
integer :: i
|
||||
double precision :: c
|
||||
do i=1,N_states
|
||||
c0_weight(i) = 1.d-31
|
||||
c = maxval(psi_coef(:,i) * psi_coef(:,i))
|
||||
c0_weight(i) = 1.d0/(c+1.d-20)
|
||||
enddo
|
||||
c = 1.d0/minval(c0_weight(:))
|
||||
do i=1,N_states
|
||||
c0_weight(i) = c0_weight(i) * c
|
||||
enddo
|
||||
else
|
||||
c0_weight = 1.d0
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ double precision, state_average_weight, (N_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Weights in the state-average calculation of the density matrix
|
||||
END_DOC
|
||||
logical :: exists
|
||||
|
||||
state_average_weight(:) = 1.d0
|
||||
if (used_weight == 0) then
|
||||
state_average_weight(:) = c0_weight(:)
|
||||
else if (used_weight == 1) then
|
||||
state_average_weight(:) = 1./N_states
|
||||
else if (used_weight == 3) then
|
||||
state_average_weight(:) = l3_weight
|
||||
else
|
||||
call ezfio_has_determinants_state_average_weight(exists)
|
||||
if (exists) then
|
||||
call ezfio_get_determinants_state_average_weight(state_average_weight)
|
||||
endif
|
||||
endif
|
||||
state_average_weight(:) = state_average_weight(:)+1.d-31
|
||||
state_average_weight(:) = state_average_weight(:)/(sum(state_average_weight(:)))
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Weights in the state-average calculation of the density matrix
|
||||
END_DOC
|
||||
logical :: exists
|
||||
|
||||
state_average_weight(:) = 1.d0
|
||||
if (used_weight == 0) then
|
||||
state_average_weight(:) = c0_weight(:)
|
||||
else if (used_weight == 1) then
|
||||
state_average_weight(:) = 1./N_states
|
||||
else
|
||||
call ezfio_has_determinants_state_average_weight(exists)
|
||||
if (exists) then
|
||||
call ezfio_get_determinants_state_average_weight(state_average_weight)
|
||||
endif
|
||||
endif
|
||||
state_average_weight(:) = state_average_weight(:)+1.d-31
|
||||
state_average_weight(:) = state_average_weight(:)/(sum(state_average_weight(:)))
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ double precision, one_body_spin_density_ao, (ao_num,ao_num) ]
|
||||
BEGIN_DOC
|
||||
! one body spin density matrix on the AO basis : rho_AO(alpha) - rho_AO(beta)
|
||||
END_DOC
|
||||
implicit none
|
||||
integer :: i,j,k,l
|
||||
double precision :: dm_mo
|
||||
|
||||
one_body_spin_density_ao = 0.d0
|
||||
do k = 1, ao_num
|
||||
do l = 1, ao_num
|
||||
do i = 1, mo_tot_num
|
||||
do j = 1, mo_tot_num
|
||||
dm_mo = one_body_spin_density_mo(j,i)
|
||||
! if(dabs(dm_mo).le.1.d-10)cycle
|
||||
one_body_spin_density_ao(l,k) += mo_coef(k,i) * mo_coef(l,j) * dm_mo
|
||||
|
||||
enddo
|
||||
BEGIN_DOC
|
||||
! One body spin density matrix on the |AO| basis : $\rho_{AO}(\alpha) - \rho_{AO}(\beta)$
|
||||
END_DOC
|
||||
implicit none
|
||||
integer :: i,j,k,l
|
||||
double precision :: dm_mo
|
||||
|
||||
one_body_spin_density_ao = 0.d0
|
||||
do k = 1, ao_num
|
||||
do l = 1, ao_num
|
||||
do i = 1, mo_tot_num
|
||||
do j = 1, mo_tot_num
|
||||
dm_mo = one_body_spin_density_mo(j,i)
|
||||
! if(dabs(dm_mo).le.1.d-10)cycle
|
||||
one_body_spin_density_ao(l,k) += mo_coef(k,i) * mo_coef(l,j) * dm_mo
|
||||
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ double precision, one_body_dm_ao_alpha, (ao_num,ao_num) ]
|
||||
&BEGIN_PROVIDER [ double precision, one_body_dm_ao_beta, (ao_num,ao_num) ]
|
||||
BEGIN_DOC
|
||||
! one body density matrix on the AO basis : rho_AO(alpha) , rho_AO(beta)
|
||||
END_DOC
|
||||
implicit none
|
||||
integer :: i,j,k,l
|
||||
double precision :: mo_alpha,mo_beta
|
||||
|
||||
one_body_dm_ao_alpha = 0.d0
|
||||
one_body_dm_ao_beta = 0.d0
|
||||
do k = 1, ao_num
|
||||
do l = 1, ao_num
|
||||
do i = 1, mo_tot_num
|
||||
do j = 1, mo_tot_num
|
||||
mo_alpha = one_body_dm_mo_alpha_average(j,i)
|
||||
mo_beta = one_body_dm_mo_beta_average(j,i)
|
||||
! if(dabs(dm_mo).le.1.d-10)cycle
|
||||
one_body_dm_ao_alpha(l,k) += mo_coef(k,i) * mo_coef(l,j) * mo_alpha
|
||||
one_body_dm_ao_beta(l,k) += mo_coef(k,i) * mo_coef(l,j) * mo_beta
|
||||
enddo
|
||||
BEGIN_DOC
|
||||
! One body density matrix on the |AO| basis : $\rho_{AO}(\alpha), \rho_{AO}(\beta)$.
|
||||
END_DOC
|
||||
implicit none
|
||||
integer :: i,j,k,l
|
||||
double precision :: mo_alpha,mo_beta
|
||||
|
||||
one_body_dm_ao_alpha = 0.d0
|
||||
one_body_dm_ao_beta = 0.d0
|
||||
do k = 1, ao_num
|
||||
do l = 1, ao_num
|
||||
do i = 1, mo_tot_num
|
||||
do j = 1, mo_tot_num
|
||||
mo_alpha = one_body_dm_mo_alpha_average(j,i)
|
||||
mo_beta = one_body_dm_mo_beta_average(j,i)
|
||||
! if(dabs(dm_mo).le.1.d-10)cycle
|
||||
one_body_dm_ao_alpha(l,k) += mo_coef(k,i) * mo_coef(l,j) * mo_alpha
|
||||
one_body_dm_ao_beta(l,k) += mo_coef(k,i) * mo_coef(l,j) * mo_beta
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -66,7 +66,8 @@ BEGIN_PROVIDER [integer, max_degree_exc]
|
||||
integer :: i,degree
|
||||
max_degree_exc = 0
|
||||
BEGIN_DOC
|
||||
! Maximum degree of excitation in the wf
|
||||
! Maximum degree of excitation in the wave function with respect to the Hartree-Fock
|
||||
! determinant.
|
||||
END_DOC
|
||||
do i = 1, N_det
|
||||
call get_excitation_degree(HF_bitmask,psi_det(1,1,i),degree,N_int)
|
||||
@ -79,7 +80,7 @@ END_PROVIDER
|
||||
BEGIN_PROVIDER [ integer, psi_det_size ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Size of the psi_det/psi_coef arrays
|
||||
! Size of the psi_det and psi_coef arrays
|
||||
END_DOC
|
||||
PROVIDE ezfio_filename
|
||||
logical :: exists
|
||||
@ -112,8 +113,8 @@ END_PROVIDER
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_det, (N_int,2,psi_det_size) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! The wave function determinants. Initialized with Hartree-Fock if the EZFIO file
|
||||
! is empty
|
||||
! The determinants of the wave function. Initialized with Hartree-Fock if the |EZFIO| file
|
||||
! is empty.
|
||||
END_DOC
|
||||
integer :: i
|
||||
logical :: exists
|
||||
@ -183,8 +184,8 @@ END_PROVIDER
|
||||
BEGIN_PROVIDER [ double precision, psi_coef, (psi_det_size,N_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! The wave function coefficients. Initialized with Hartree-Fock if the EZFIO file
|
||||
! is empty
|
||||
! The wave function coefficients. Initialized with Hartree-Fock if the |EZFIO| file
|
||||
! is empty.
|
||||
END_DOC
|
||||
|
||||
integer :: i,k, N_int2
|
||||
@ -244,7 +245,7 @@ END_PROVIDER
|
||||
BEGIN_PROVIDER [ double precision, psi_average_norm_contrib, (psi_det_size) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Contribution of determinants to the state-averaged density
|
||||
! Contribution of determinants to the state-averaged density.
|
||||
END_DOC
|
||||
integer :: i,j,k
|
||||
double precision :: f
|
||||
@ -312,7 +313,7 @@ END_PROVIDER
|
||||
&BEGIN_PROVIDER [ double precision, psi_coef_sorted_bit, (psi_det_size,N_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Determinants on which we apply <i|H|psi> for perturbation.
|
||||
! Determinants on which we apply $\langle i|H|psi \rangle$ for perturbation.
|
||||
! They are sorted by determinants interpreted as integers. Useful
|
||||
! to accelerate the search of a random determinant in the wave
|
||||
! function.
|
||||
@ -332,7 +333,7 @@ subroutine sort_dets_by_det_search_key(Ndet, det_in, coef_in, sze, det_out, coef
|
||||
integer(bit_kind), intent(out) :: det_out (N_int,2,sze)
|
||||
double precision , intent(out) :: coef_out(sze,N_st)
|
||||
BEGIN_DOC
|
||||
! Determinants are sorted are sorted according to their det_search_key.
|
||||
! Determinants are sorted according to their :c:func:`det_search_key`.
|
||||
! Useful to accelerate the search of a random determinant in the wave
|
||||
! function.
|
||||
!
|
||||
@ -402,7 +403,7 @@ subroutine read_dets(det,Nint,Ndet)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Reads the determinants from the EZFIO file
|
||||
! Reads the determinants from the |EZFIO| file
|
||||
END_DOC
|
||||
|
||||
integer, intent(in) :: Nint,Ndet
|
||||
@ -458,7 +459,7 @@ subroutine save_wavefunction_truncated(thr)
|
||||
double precision, intent(in) :: thr
|
||||
use bitmasks
|
||||
BEGIN_DOC
|
||||
! Save the wave function into the EZFIO file
|
||||
! Save the wave function into the |EZFIO| file
|
||||
END_DOC
|
||||
integer :: N_det_save,i
|
||||
N_det_save = N_det
|
||||
@ -477,7 +478,7 @@ subroutine save_wavefunction
|
||||
implicit none
|
||||
use bitmasks
|
||||
BEGIN_DOC
|
||||
! Save the wave function into the EZFIO file
|
||||
! Save the wave function into the |EZFIO| file
|
||||
END_DOC
|
||||
|
||||
! Trick to avoid re-reading the wave function every time N_det changes
|
||||
@ -496,7 +497,7 @@ subroutine save_wavefunction_unsorted
|
||||
implicit none
|
||||
use bitmasks
|
||||
BEGIN_DOC
|
||||
! Save the wave function into the EZFIO file
|
||||
! Save the wave function into the |EZFIO| file
|
||||
END_DOC
|
||||
if (mpi_master) then
|
||||
call save_wavefunction_general(N_det,min(N_states,N_det),psi_det,size(psi_coef,1),psi_coef)
|
||||
@ -506,7 +507,7 @@ end
|
||||
subroutine save_wavefunction_general(ndet,nstates,psidet,dim_psicoef,psicoef)
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Save the wave function into the EZFIO file
|
||||
! Save the wave function into the |EZFIO| file
|
||||
END_DOC
|
||||
use bitmasks
|
||||
include 'constants.include.F'
|
||||
@ -556,7 +557,7 @@ end
|
||||
subroutine save_wavefunction_specified(ndet,nstates,psidet,psicoef,ndetsave,index_det_save)
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Save the wave function into the EZFIO file
|
||||
! Save the wave function into the |EZFIO| file
|
||||
END_DOC
|
||||
use bitmasks
|
||||
integer, intent(in) :: ndet,nstates
|
||||
@ -868,7 +869,7 @@ end subroutine
|
||||
BEGIN_PROVIDER [ double precision, psi_det_Hii, (N_det) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! <i|h|i> for all determinants.
|
||||
! $\langle i|h|i \rangle$ for all determinants.
|
||||
END_DOC
|
||||
integer :: i,j
|
||||
double precision, external :: diag_H_mat_elem
|
||||
|
@ -18,13 +18,14 @@ BEGIN_PROVIDER [ integer(bit_kind), single_exc_bitmask, (N_int, 2, N_single_exc_
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! single_exc_bitmask(:,1,i) is the bitmask for holes
|
||||
!
|
||||
! single_exc_bitmask(:,2,i) is the bitmask for particles
|
||||
!
|
||||
! for a given couple of hole/particle excitations i.
|
||||
END_DOC
|
||||
|
||||
single_exc_bitmask(:,hole_,1) = HF_bitmask(:,1)
|
||||
single_exc_bitmask(:,particle_,1) = not(HF_bitmask(:,2))
|
||||
!TODO : Read from input!
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
@ -34,16 +35,19 @@ BEGIN_PROVIDER [ integer, N_double_exc_bitmasks ]
|
||||
! Number of double excitation bitmasks
|
||||
END_DOC
|
||||
N_double_exc_bitmasks = 1
|
||||
!TODO : Read from input!
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), double_exc_bitmask, (N_int, 4, N_double_exc_bitmasks) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! double_exc_bitmask(:,1,i) is the bitmask for holes of excitation 1
|
||||
!
|
||||
! double_exc_bitmask(:,2,i) is the bitmask for particles of excitation 1
|
||||
!
|
||||
! double_exc_bitmask(:,3,i) is the bitmask for holes of excitation 2
|
||||
!
|
||||
! double_exc_bitmask(:,4,i) is the bitmask for particles of excitation 2
|
||||
!
|
||||
! for a given couple of hole/particle excitations i.
|
||||
END_DOC
|
||||
|
||||
@ -52,6 +56,5 @@ BEGIN_PROVIDER [ integer(bit_kind), double_exc_bitmask, (N_int, 4, N_double_exc_
|
||||
double_exc_bitmask(:,hole2_,1) = HF_bitmask(:,1)
|
||||
double_exc_bitmask(:,particle2_,1) = not(HF_bitmask(:,2))
|
||||
|
||||
!TODO : Read from input!
|
||||
END_PROVIDER
|
||||
|
||||
|
@ -15,7 +15,7 @@ END_PROVIDER
|
||||
BEGIN_PROVIDER [ double precision, barycentric_electronic_energy, (N_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! TODO : ASCII Elephant
|
||||
! $E_n = \sum_i {c_i^{(n)}}^2 H_{ii}$
|
||||
END_DOC
|
||||
integer :: istate,i
|
||||
|
||||
|
@ -1,162 +1,162 @@
|
||||
subroutine example_determinants
|
||||
use bitmasks ! you need to include the bitmasks_module.f90 features
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! subroutine that illustrates the main features available in determinants
|
||||
END_DOC
|
||||
print*,'a determinant is stored as a binary representation of the occupancy of the spatial orbitals'
|
||||
print*,'see the bitmask module for more information about that '
|
||||
print*,'a spin determinant is an array of (N_int) integers of type bit_kind (see bitmask for more information)'
|
||||
print*,'A determinant containing alpha and beta electrons is an array of dimension (2,N_int)'
|
||||
integer(bit_kind), allocatable :: det_i(:,:)
|
||||
allocate(det_i(N_int,2))
|
||||
print*,'det_i(1,:) alpha spins '
|
||||
print*,'det_i(2,:) beta spins '
|
||||
integer :: i,j
|
||||
print*,'initialize det_i to an electron occupation corresponding RHF or ROHF: ref_bitmask '
|
||||
do i = 1, N_int
|
||||
det_i(i,1) = ref_bitmask(i,1)
|
||||
det_i(i,2) = ref_bitmask(i,2)
|
||||
enddo
|
||||
print*,''
|
||||
print*,'print a human readable representation of the determinant '
|
||||
call print_det(det_i,N_int)
|
||||
print*,'doing a single excitation on top of det_i'
|
||||
integer :: h1,p1,s1,i_ok
|
||||
h1 = 1
|
||||
p1 = elec_alpha_num + 1
|
||||
s1 = 1
|
||||
print*,'h1 --> p1 of spin s1'
|
||||
print*,'i_ok == +1 : excitation is possible '
|
||||
print*,'i_ok == -1 : excitation is NOT possible '
|
||||
call do_mono_excitation(det_i,h1,p1,s1,i_ok)
|
||||
print*,'h1,p1,s1,i_ok'
|
||||
print*, h1,p1,s1,i_ok
|
||||
if(i_ok == -1)then
|
||||
print*,'excitation was not possible '
|
||||
stop
|
||||
endif
|
||||
call debug_det(det_i,N_int)
|
||||
print*,'computing the interaction between ref_determinant and det_i '
|
||||
double precision :: h0i,hii,h00
|
||||
call i_H_j(det_i,det_i,N_int,h0i)
|
||||
print*,' < ref | H | det_i > = ',h0i
|
||||
print*,'computing the diagonal Hamiltonian matrix element of det_i '
|
||||
call i_H_j(ref_bitmask,det_i,N_int,hii)
|
||||
print*,'< det_i | H | det_i > = ',hii
|
||||
print*,'computing the first-order coefficient of det_i with H0=EN '
|
||||
double precision :: c_i
|
||||
call i_H_j(ref_bitmask,ref_bitmask,N_int,h00)
|
||||
c_i = h0i/(h00 - hii)
|
||||
print*,'c_i^{(1)} = ',c_i
|
||||
print*,''
|
||||
print*,'doing another single excitation on top of det_i'
|
||||
h1 = elec_alpha_num
|
||||
p1 = elec_alpha_num + 1
|
||||
s1 = 2
|
||||
call do_mono_excitation(det_i,h1,p1,s1,i_ok)
|
||||
print*,'h1,p1,s1,i_ok'
|
||||
print*, h1,p1,s1,i_ok
|
||||
call i_H_j(det_i,det_i,N_int,h0i)
|
||||
print*,' < ref | H | det_i > = ',h0i
|
||||
print*,'computing the diagonal Hamiltonian matrix element of det_i '
|
||||
call i_H_j(ref_bitmask,ref_bitmask,N_int,h00)
|
||||
c_i = h0i/(h00 - hii)
|
||||
print*,'c_i^{(1)} = ',c_i
|
||||
print*,''
|
||||
print*,'Finding the excitation degree between two arbitrary determinants '
|
||||
integer :: exc(0:2,2,2)
|
||||
double precision :: phase
|
||||
integer :: h2,p2,s2,degree
|
||||
call get_excitation_degree(ref_bitmask,det_i,degree,N_int)
|
||||
print*,'degree = ',degree
|
||||
print*,'Finding the differences in terms of holes and particles, together with the fermionic phase '
|
||||
call get_excitation(ref_bitmask,det_i,exc,degree,phase,N_int)
|
||||
print*,'Fermionic phase for the excitation from ref_bitmask to det_i'
|
||||
print*,phase
|
||||
print*,'put the excitation information in a human readable format'
|
||||
call decode_exc(exc,degree,h1,p1,h2,p2,s1,s2)
|
||||
print*,'s1',s1
|
||||
print*,'h1,p1 = ',h1,p1
|
||||
print*,'s2',s2
|
||||
print*,'h2,p2 = ',h2,p2
|
||||
print*,''
|
||||
print*,'Finding the occupancy of det_i'
|
||||
integer, allocatable :: occ(:,:)
|
||||
integer :: n_occ_ab(2)
|
||||
allocate(occ(N_int*bit_kind_size,2))
|
||||
call bitstring_to_list_ab(det_i, occ, n_occ_ab, N_int)
|
||||
print*,'alpha electrons orbital occupancy'
|
||||
do i = 1, n_occ_ab(1) ! browsing the alpha electrons
|
||||
print*,occ(i,1)
|
||||
enddo
|
||||
print*,'beta electrons orbital occupancy'
|
||||
do i = 1, n_occ_ab(2) ! browsing the beta electrons
|
||||
print*,occ(i,2)
|
||||
enddo
|
||||
use bitmasks ! you need to include the bitmasks_module.f90 features
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! subroutine that illustrates the main features available in determinants
|
||||
END_DOC
|
||||
print*,'a determinant is stored as a binary representation of the occupancy of the spatial orbitals'
|
||||
print*,'see the bitmask module for more information about that '
|
||||
print*,'a spin determinant is an array of (N_int) integers of type bit_kind (see bitmask for more information)'
|
||||
print*,'A determinant containing alpha and beta electrons is an array of dimension (2,N_int)'
|
||||
integer(bit_kind), allocatable :: det_i(:,:)
|
||||
allocate(det_i(N_int,2))
|
||||
print*,'det_i(1,:) alpha spins '
|
||||
print*,'det_i(2,:) beta spins '
|
||||
integer :: i,j
|
||||
print*,'initialize det_i to an electron occupation corresponding RHF or ROHF: ref_bitmask '
|
||||
do i = 1, N_int
|
||||
det_i(i,1) = ref_bitmask(i,1)
|
||||
det_i(i,2) = ref_bitmask(i,2)
|
||||
enddo
|
||||
print*,''
|
||||
print*,'print a human readable representation of the determinant '
|
||||
call print_det(det_i,N_int)
|
||||
print*,'doing a single excitation on top of det_i'
|
||||
integer :: h1,p1,s1,i_ok
|
||||
h1 = 1
|
||||
p1 = elec_alpha_num + 1
|
||||
s1 = 1
|
||||
print*,'h1 --> p1 of spin s1'
|
||||
print*,'i_ok == +1 : excitation is possible '
|
||||
print*,'i_ok == -1 : excitation is NOT possible '
|
||||
call do_mono_excitation(det_i,h1,p1,s1,i_ok)
|
||||
print*,'h1,p1,s1,i_ok'
|
||||
print*, h1,p1,s1,i_ok
|
||||
if(i_ok == -1)then
|
||||
print*,'excitation was not possible '
|
||||
stop
|
||||
endif
|
||||
call debug_det(det_i,N_int)
|
||||
print*,'computing the interaction between ref_determinant and det_i '
|
||||
double precision :: h0i,hii,h00
|
||||
call i_H_j(det_i,det_i,N_int,h0i)
|
||||
print*,' < ref | H | det_i > = ',h0i
|
||||
print*,'computing the diagonal Hamiltonian matrix element of det_i '
|
||||
call i_H_j(ref_bitmask,det_i,N_int,hii)
|
||||
print*,'< det_i | H | det_i > = ',hii
|
||||
print*,'computing the first-order coefficient of det_i with H0=EN '
|
||||
double precision :: c_i
|
||||
call i_H_j(ref_bitmask,ref_bitmask,N_int,h00)
|
||||
c_i = h0i/(h00 - hii)
|
||||
print*,'c_i^{(1)} = ',c_i
|
||||
print*,''
|
||||
print*,'doing another single excitation on top of det_i'
|
||||
h1 = elec_alpha_num
|
||||
p1 = elec_alpha_num + 1
|
||||
s1 = 2
|
||||
call do_mono_excitation(det_i,h1,p1,s1,i_ok)
|
||||
print*,'h1,p1,s1,i_ok'
|
||||
print*, h1,p1,s1,i_ok
|
||||
call i_H_j(det_i,det_i,N_int,h0i)
|
||||
print*,' < ref | H | det_i > = ',h0i
|
||||
print*,'computing the diagonal Hamiltonian matrix element of det_i '
|
||||
call i_H_j(ref_bitmask,ref_bitmask,N_int,h00)
|
||||
c_i = h0i/(h00 - hii)
|
||||
print*,'c_i^{(1)} = ',c_i
|
||||
print*,''
|
||||
print*,'Finding the excitation degree between two arbitrary determinants '
|
||||
integer :: exc(0:2,2,2)
|
||||
double precision :: phase
|
||||
integer :: h2,p2,s2,degree
|
||||
call get_excitation_degree(ref_bitmask,det_i,degree,N_int)
|
||||
print*,'degree = ',degree
|
||||
print*,'Finding the differences in terms of holes and particles, together with the fermionic phase '
|
||||
call get_excitation(ref_bitmask,det_i,exc,degree,phase,N_int)
|
||||
print*,'Fermionic phase for the excitation from ref_bitmask to det_i'
|
||||
print*,phase
|
||||
print*,'put the excitation information in a human readable format'
|
||||
call decode_exc(exc,degree,h1,p1,h2,p2,s1,s2)
|
||||
print*,'s1',s1
|
||||
print*,'h1,p1 = ',h1,p1
|
||||
print*,'s2',s2
|
||||
print*,'h2,p2 = ',h2,p2
|
||||
print*,''
|
||||
print*,'Finding the occupancy of det_i'
|
||||
integer, allocatable :: occ(:,:)
|
||||
integer :: n_occ_ab(2)
|
||||
allocate(occ(N_int*bit_kind_size,2))
|
||||
call bitstring_to_list_ab(det_i, occ, n_occ_ab, N_int)
|
||||
print*,'alpha electrons orbital occupancy'
|
||||
do i = 1, n_occ_ab(1) ! browsing the alpha electrons
|
||||
print*,occ(i,1)
|
||||
enddo
|
||||
print*,'beta electrons orbital occupancy'
|
||||
do i = 1, n_occ_ab(2) ! browsing the beta electrons
|
||||
print*,occ(i,2)
|
||||
enddo
|
||||
end
|
||||
|
||||
|
||||
subroutine example_determinants_psi_det
|
||||
use bitmasks ! you need to include the bitmasks_module.f90 features
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! subroutine that illustrates the main features available in determinants using the psi_det/psi_coef
|
||||
END_DOC
|
||||
read_wf = .True.
|
||||
touch read_wf
|
||||
! you force the wave function to be set to the one in the EZFIO folder
|
||||
call routine_example_psi_det
|
||||
use bitmasks ! you need to include the bitmasks_module.f90 features
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! subroutine that illustrates the main features available in determinants using the psi_det/psi_coef
|
||||
END_DOC
|
||||
read_wf = .True.
|
||||
touch read_wf
|
||||
! you force the wave function to be set to the one in the EZFIO folder
|
||||
call routine_example_psi_det
|
||||
end
|
||||
|
||||
subroutine routine_example_psi_det
|
||||
use bitmasks ! you need to include the bitmasks_module.f90 features
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! subroutine that illustrates the main features available in determinants using many determinants
|
||||
END_DOC
|
||||
integer :: i,j
|
||||
integer, allocatable :: degree_list(:)
|
||||
integer, allocatable :: idx(:)
|
||||
allocate(degree_list(N_det),idx(0:N_det))
|
||||
|
||||
print*,'Number of determinants in the wave function'
|
||||
print*,'N_det = ',N_det
|
||||
print*,''
|
||||
print*,'Printing in a human readable format all Slater determinants '
|
||||
do i = 1, N_det
|
||||
call debug_det(psi_det(1,1,i),N_int)
|
||||
enddo
|
||||
print*,''
|
||||
print*,'Number of states computed '
|
||||
print*,'N_states = ',N_states
|
||||
print*,'Printing the coefficients for all states for all Slater determinants '
|
||||
do j = 1, N_states
|
||||
print*,'State = ',j
|
||||
use bitmasks ! you need to include the bitmasks_module.f90 features
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! subroutine that illustrates the main features available in determinants using many determinants
|
||||
END_DOC
|
||||
integer :: i,j
|
||||
integer, allocatable :: degree_list(:)
|
||||
integer, allocatable :: idx(:)
|
||||
allocate(degree_list(N_det),idx(0:N_det))
|
||||
|
||||
print*,'Number of determinants in the wave function'
|
||||
print*,'N_det = ',N_det
|
||||
print*,''
|
||||
print*,'Printing in a human readable format all Slater determinants '
|
||||
do i = 1, N_det
|
||||
write(*,'(I9,X,F16.10)')i,psi_coef(i,j)
|
||||
call debug_det(psi_det(1,1,i),N_int)
|
||||
enddo
|
||||
enddo
|
||||
print*,''
|
||||
print*,'Finding the connection through a bielectronic operator in the wave function'
|
||||
print*,'You want to know the connections of the first determinant '
|
||||
! wave function determinant exc degree list
|
||||
call get_excitation_degree_vector( psi_det , psi_det(1,1,1),degree_list,N_int,N_det,idx)
|
||||
double precision :: hij
|
||||
double precision, allocatable :: i_H_psi(:)
|
||||
allocate(i_H_psi(N_states))
|
||||
i_H_psi = 0.d0
|
||||
print*,'Computing <psi_det(1) | H | psi_det > = \sum_I c_I <psi_det(1)| H | psi_det(I)>'
|
||||
do i = 1, idx(0) ! number of Slater determinants connected to the first one
|
||||
print*,'Determinant connected'
|
||||
call debug_det(psi_det(1,1,idx(i)),N_int)
|
||||
print*,'excitation degree = ',degree_list(i)
|
||||
call i_H_j(psi_det(1,1,1) , psi_det(1,1,idx(i)),hij,N_int)
|
||||
print*,''
|
||||
print*,'Number of states computed '
|
||||
print*,'N_states = ',N_states
|
||||
print*,'Printing the coefficients for all states for all Slater determinants '
|
||||
do j = 1, N_states
|
||||
i_H_psi(j) += hij * psi_coef(idx(i),j)
|
||||
print*,'State = ',j
|
||||
do i = 1, N_det
|
||||
write(*,'(I9,X,F16.10)')i,psi_coef(i,j)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
print*,'i_H_psi = ',i_H_psi
|
||||
print*,''
|
||||
print*,'Finding the connection through a bielectronic operator in the wave function'
|
||||
print*,'You want to know the connections of the first determinant '
|
||||
! wave function determinant exc degree list
|
||||
call get_excitation_degree_vector( psi_det , psi_det(1,1,1),degree_list,N_int,N_det,idx)
|
||||
double precision :: hij
|
||||
double precision, allocatable :: i_H_psi(:)
|
||||
allocate(i_H_psi(N_states))
|
||||
i_H_psi = 0.d0
|
||||
print*,'Computing <psi_det(1) | H | psi_det > = \sum_I c_I <psi_det(1)| H | psi_det(I)>'
|
||||
do i = 1, idx(0) ! number of Slater determinants connected to the first one
|
||||
print*,'Determinant connected'
|
||||
call debug_det(psi_det(1,1,idx(i)),N_int)
|
||||
print*,'excitation degree = ',degree_list(i)
|
||||
call i_H_j(psi_det(1,1,1) , psi_det(1,1,idx(i)),hij,N_int)
|
||||
do j = 1, N_states
|
||||
i_H_psi(j) += hij * psi_coef(idx(i),j)
|
||||
enddo
|
||||
enddo
|
||||
print*,'i_H_psi = ',i_H_psi
|
||||
end
|
||||
|
||||
|
||||
|
@ -335,7 +335,7 @@ end subroutine
|
||||
subroutine filter_connected_i_H_psi0(key1,key2,Nint,sze,idx)
|
||||
use bitmasks
|
||||
BEGIN_DOC
|
||||
! returns the array idx which contains the index of the
|
||||
! Returns the array idx which contains the index of the
|
||||
!
|
||||
! determinants in the array key1 that interact
|
||||
!
|
||||
|
@ -3,7 +3,7 @@ subroutine build_fock_tmp(fock_diag_tmp,det_ref,Nint)
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Build the diagonal of the Fock matrix corresponding to a generator
|
||||
! determinant. F_00 is <i|H|i> = E0.
|
||||
! determinant. $F_{00}$ is $\langle i|H|i \rangle = E_0$.
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint
|
||||
integer(bit_kind), intent(in) :: det_ref(Nint,2)
|
||||
@ -22,18 +22,11 @@ subroutine build_fock_tmp(fock_diag_tmp,det_ref,Nint)
|
||||
if (Ne(1) /= elec_alpha_num) then
|
||||
print *, 'Error in build_fock_tmp (alpha)', Ne(1), Ne(2)
|
||||
call debug_det(det_ref,N_int)
|
||||
! print *, occ(:,1)
|
||||
! print *, occ(:,2)
|
||||
! do i=1,10000
|
||||
! occ(i,1) = fock_diag_tmp(1,mo_tot_num+i) !traceback
|
||||
! enddo
|
||||
stop -1
|
||||
endif
|
||||
if (Ne(2) /= elec_beta_num) then
|
||||
! print *, 'Error in build_fock_tmp (beta)', Ne(1), Ne(2)
|
||||
! do i=1,10000
|
||||
! occ(i,1) = fock_diag_tmp(1,mo_tot_num+i) !traceback
|
||||
! enddo
|
||||
print *, 'Error in build_fock_tmp (beta)', Ne(1), Ne(2)
|
||||
call debug_det(det_ref,N_int)
|
||||
stop -1
|
||||
endif
|
||||
|
||||
|
@ -291,7 +291,7 @@ subroutine fill_H_apply_buffer_no_selection(n_selected,det_buffer,Nint,iproc)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Fill the H_apply buffer with determiants for CISD
|
||||
! Fill the H_apply buffer with determiants for |CISD|
|
||||
END_DOC
|
||||
|
||||
integer, intent(in) :: n_selected, Nint, iproc
|
||||
@ -333,7 +333,7 @@ subroutine push_pt2(zmq_socket_push,pt2,norm_pert,H_pert_diag,i_generator,N_st,t
|
||||
use f77_zmq
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Push PT2 calculation to the collector
|
||||
! Push |PT2| calculation to the collector
|
||||
END_DOC
|
||||
integer(ZMQ_PTR), intent(in) :: zmq_socket_push
|
||||
integer, intent(in) :: N_st, i_generator
|
||||
@ -394,7 +394,7 @@ subroutine pull_pt2(zmq_socket_pull,pt2,norm_pert,H_pert_diag,i_generator,N_st,n
|
||||
use f77_zmq
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Pull PT2 calculation in the collector
|
||||
! Pull |PT2| calculation in the collector
|
||||
END_DOC
|
||||
integer(ZMQ_PTR), intent(in) :: zmq_socket_pull
|
||||
integer, intent(in) :: N_st
|
||||
|
@ -3,7 +3,7 @@ subroutine $subroutine($params_main)
|
||||
use omp_lib
|
||||
use bitmasks
|
||||
BEGIN_DOC
|
||||
! Calls H_apply on the HF determinant and selects all connected single and double
|
||||
! Calls H_apply on the |HF| determinant and selects all connected single and double
|
||||
! excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
END_DOC
|
||||
|
||||
|
@ -4,8 +4,8 @@ subroutine $subroutine($params_main)
|
||||
use bitmasks
|
||||
use f77_zmq
|
||||
BEGIN_DOC
|
||||
! Calls H_apply on the HF determinant and selects all connected single and double
|
||||
! excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
! Calls H_apply on the |HF| determinant and selects all connected single and double
|
||||
! excitations (of the same symmetry). Auto-generated by the :file:`generate_h_apply` script.
|
||||
END_DOC
|
||||
|
||||
$decls_main
|
||||
@ -117,7 +117,7 @@ subroutine $subroutine_slave(thread, iproc)
|
||||
integer, intent(in) :: thread
|
||||
BEGIN_DOC
|
||||
! Calls H_apply on the HF determinant and selects all connected single and double
|
||||
! excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
|
||||
! excitations (of the same symmetry). Auto-generated by the :file:`generate_h_apply` script.
|
||||
END_DOC
|
||||
|
||||
integer, intent(in) :: iproc
|
||||
|
@ -113,7 +113,8 @@ subroutine diag_H_mat_elem_au0_h_au0(det_in,Nint,hii)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Computes <i|H|i> for any determinant i. Used for wave functions with an additional electron.
|
||||
! Computes $\langle i|H|i \rangle$ for any determinant $|i\rangle$.
|
||||
! Used for wave functions with an additional electron.
|
||||
END_DOC
|
||||
integer,intent(in) :: Nint
|
||||
integer(bit_kind),intent(in) :: det_in(Nint,2)
|
||||
|
@ -178,10 +178,13 @@ end
|
||||
&BEGIN_PROVIDER [ integer, N_occ_pattern ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! array of the occ_pattern present in the wf
|
||||
! psi_occ_pattern(:,1,j) = jth occ_pattern of the wave function : represent all the single occupations
|
||||
! psi_occ_pattern(:,2,j) = jth occ_pattern of the wave function : represent all the double occupations
|
||||
! The occ patterns are sorted by occ_pattern_search_key
|
||||
! Array of the occ_patterns present in the wave function.
|
||||
!
|
||||
! psi_occ_pattern(:,1,j) = j-th occ_pattern of the wave function : represents all the single occupations
|
||||
!
|
||||
! psi_occ_pattern(:,2,j) = j-th occ_pattern of the wave function : represents all the double occupations
|
||||
!
|
||||
! The occ patterns are sorted by :c:func:`occ_pattern_search_key`
|
||||
END_DOC
|
||||
integer :: i,j,k
|
||||
|
||||
@ -366,8 +369,9 @@ END_PROVIDER
|
||||
BEGIN_PROVIDER [ double precision, psi_occ_pattern_Hii, (N_occ_pattern) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! <I|h|I> where |I> is an occupation pattern. This is the minimum Hii of
|
||||
! all <i|h|i>, where the |i> are the determinants if oI>
|
||||
! $\langle I|H|I \rangle$ where $|I\rangle$ is an occupation pattern.
|
||||
! This is the minimum $H_{ii}$, where the $|i\rangle$ are the
|
||||
! determinants of $|I\rangle$.
|
||||
END_DOC
|
||||
integer :: j, i
|
||||
|
||||
|
@ -6,8 +6,8 @@ use bitmasks
|
||||
&BEGIN_PROVIDER [ integer, N_det_cas ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! CAS wave function, defined from the application of the CAS bitmask on the
|
||||
! determinants. idx_cas gives the indice of the CAS determinant in psi_det.
|
||||
! |CAS| wave function, defined from the application of the |CAS| bitmask on the
|
||||
! determinants. idx_cas gives the indice of the |CAS| determinant in psi_det.
|
||||
END_DOC
|
||||
integer :: i, k, l
|
||||
logical :: good
|
||||
@ -50,7 +50,7 @@ END_PROVIDER
|
||||
&BEGIN_PROVIDER [ double precision, psi_cas_coef_sorted_bit, (psi_det_size,N_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! CAS determinants sorted to accelerate the search of a random determinant in the wave
|
||||
! |CAS| determinants sorted to accelerate the search of a random determinant in the wave
|
||||
! function.
|
||||
END_DOC
|
||||
call sort_dets_by_det_search_key(N_det_cas, psi_cas, psi_cas_coef, size(psi_cas_coef,1), &
|
||||
@ -66,8 +66,8 @@ END_PROVIDER
|
||||
&BEGIN_PROVIDER [ integer, N_det_non_cas ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Set of determinants which are not part of the CAS, defined from the application
|
||||
! of the CAS bitmask on the determinants.
|
||||
! Set of determinants which are not part of the |CAS|, defined from the application
|
||||
! of the |CAS| bitmask on the determinants.
|
||||
! idx_non_cas gives the indice of the determinant in psi_det.
|
||||
END_DOC
|
||||
integer :: i_non_cas,j,k
|
||||
@ -103,7 +103,7 @@ END_PROVIDER
|
||||
&BEGIN_PROVIDER [ double precision, psi_non_cas_coef_sorted_bit, (psi_det_size,N_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! CAS determinants sorted to accelerate the search of a random determinant in the wave
|
||||
! |CAS| determinants sorted to accelerate the search of a random determinant in the wave
|
||||
! function.
|
||||
END_DOC
|
||||
call sort_dets_by_det_search_key(N_det_cas, psi_non_cas, psi_non_cas_coef, size(psi_non_cas_coef,1), &
|
||||
@ -145,6 +145,9 @@ END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [double precision, psi_cas_energy, (N_states)]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Variational energy of $\Psi_{CAS}$, where $\Psi_{CAS} = \sum_{I \in CAS} \I \rangle \langle I | \Psi \rangle$.
|
||||
END_DOC
|
||||
integer :: i,j,k
|
||||
double precision :: hij,norm,u_dot_v
|
||||
psi_cas_energy = 0.d0
|
||||
|
@ -4,8 +4,8 @@
|
||||
integer :: j,k
|
||||
double precision :: tmp(mo_tot_num,mo_tot_num),mono_ints(mo_tot_num,mo_tot_num)
|
||||
BEGIN_DOC
|
||||
! psi_energy_h_core = <Psi| h_{core} |Psi>
|
||||
! computed using the one_body_dm_mo_alpha+one_body_dm_mo_beta and mo_mono_elec_integral
|
||||
! psi_energy_h_core = $\langle \Psi | h_{core} |\Psi \rangle$
|
||||
! computed using the `one_body_dm_mo_alpha` + `one_body_dm_mo_beta` and `mo_mono_elec_integral`
|
||||
END_DOC
|
||||
psi_energy_h_core = 0.d0
|
||||
do i = 1, N_states
|
||||
|
@ -62,7 +62,7 @@ subroutine get_s2(key_i,key_j,Nint,s2)
|
||||
end select
|
||||
end
|
||||
|
||||
BEGIN_PROVIDER [ double precision, S_z ]
|
||||
BEGIN_PROVIDER [ double precision, S_z ]
|
||||
&BEGIN_PROVIDER [ double precision, S_z2_Sz ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
@ -77,7 +77,7 @@ END_PROVIDER
|
||||
BEGIN_PROVIDER [ double precision, expected_s2]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Expected value of S2 : S*(S+1)
|
||||
! Expected value of |S^2| : S*(S+1)
|
||||
END_DOC
|
||||
logical :: has_expected_s2
|
||||
|
||||
@ -344,10 +344,10 @@ subroutine i_S2_psi_minilist(key,keys,idx_key,N_minilist,coef,Nint,Ndet,Ndet_max
|
||||
double precision :: s2ij
|
||||
integer :: idx(0:Ndet)
|
||||
BEGIN_DOC
|
||||
! Computes <i|S2|Psi> = \sum_J c_J <i|S2|J>.
|
||||
! Computes $\langle i|S^2|\Psi \rangle = \sum_J c_J \langle i|S^2|J \rangle$.
|
||||
!
|
||||
! Uses filter_connected_i_H_psi0 to get all the |J> to which |i>
|
||||
! is connected. The |J> are searched in short pre-computed lists.
|
||||
! Uses filter_connected_i_H_psi0 to get all the $|J\rangle$ to which $|i\rangle$
|
||||
! is connected. The $|J\rangle$ are searched in short pre-computed lists.
|
||||
END_DOC
|
||||
|
||||
ASSERT (Nint > 0)
|
||||
|
@ -3,7 +3,7 @@ subroutine get_excitation_degree(key1,key2,degree,Nint)
|
||||
include 'utils/constants.include.F'
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Returns the excitation degree between two determinants
|
||||
! Returns the excitation degree between two determinants.
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint
|
||||
integer(bit_kind), intent(in) :: key1(Nint*2)
|
||||
@ -60,7 +60,7 @@ subroutine get_excitation(det1,det2,exc,degree,phase,Nint)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Returns the excitation operators between two determinants and the phase
|
||||
! Returns the excitation operators between two determinants and the phase.
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint
|
||||
integer(bit_kind), intent(in) :: det1(Nint,2)
|
||||
@ -171,7 +171,7 @@ subroutine get_double_excitation(det1,det2,exc,phase,Nint)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Returns the two excitation operators between two doubly excited determinants and the phase
|
||||
! Returns the two excitation operators between two doubly excited determinants and the phase.
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint
|
||||
integer(bit_kind), intent(in) :: det1(Nint,2)
|
||||
@ -340,7 +340,7 @@ subroutine get_mono_excitation(det1,det2,exc,phase,Nint)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Returns the excitation operator between two singly excited determinants and the phase
|
||||
! Returns the excitation operator between two singly excited determinants and the phase.
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint
|
||||
integer(bit_kind), intent(in) :: det1(Nint,2)
|
||||
@ -429,7 +429,7 @@ subroutine bitstring_to_list_ab( string, list, n_elements, Nint)
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Gives the inidices(+1) of the bits set to 1 in the bit string
|
||||
! For alpha/beta determinants
|
||||
! For alpha/beta determinants.
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint
|
||||
integer(bit_kind), intent(in) :: string(Nint,2)
|
||||
@ -467,7 +467,8 @@ subroutine i_H_j_s2(key_i,key_j,Nint,hij,s2)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Returns <i|H|j> where i and j are determinants
|
||||
! Returns $\langle i|H|j \rangle$ and $\langle i|S^2|j \rangle$
|
||||
! where $i$ and $j$ are determinants.
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint
|
||||
integer(bit_kind), intent(in) :: key_i(Nint,2), key_j(Nint,2)
|
||||
@ -569,7 +570,7 @@ subroutine i_H_j(key_i,key_j,Nint,hij)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Returns <i|H|j> where i and j are determinants
|
||||
! Returns $\langle i|H|j \rangle$ where $i$ and $j$ are determinants.
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint
|
||||
integer(bit_kind), intent(in) :: key_i(Nint,2), key_j(Nint,2)
|
||||
@ -668,7 +669,7 @@ subroutine i_H_j_verbose(key_i,key_j,Nint,hij,hmono,hdouble,phase)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Returns <i|H|j> where i and j are determinants with
|
||||
! Returns $\langle i|H|j \rangle$ where $i$ and $j$ are determinants.
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint
|
||||
integer(bit_kind), intent(in) :: key_i(Nint,2), key_j(Nint,2)
|
||||
@ -945,12 +946,12 @@ subroutine i_H_psi(key,keys,coef,Nint,Ndet,Ndet_max,Nstate,i_H_psi_array)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Computes <i|H|Psi> = :math:`\sum_J c_J \langle i | H | J \rangle`.
|
||||
! Computes $\langle i|H|Psi \rangle = \sum_J c_J \langle i | H | J \rangle$.
|
||||
!
|
||||
! Uses filter_connected_i_H_psi0 to get all the |J> to which |i>
|
||||
! Uses filter_connected_i_H_psi0 to get all the $|J \rangle$ to which $|i \rangle$
|
||||
! is connected.
|
||||
! The i_H_psi_minilist is much faster but requires to build the
|
||||
! minilists
|
||||
! minilists.
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint, Ndet,Ndet_max,Nstate
|
||||
integer(bit_kind), intent(in) :: keys(Nint,2,Ndet)
|
||||
@ -1014,10 +1015,10 @@ subroutine i_H_psi_minilist(key,keys,idx_key,N_minilist,coef,Nint,Ndet,Ndet_max,
|
||||
double precision :: hij
|
||||
integer, allocatable :: idx(:)
|
||||
BEGIN_DOC
|
||||
! Computes <i|H|Psi> = \sum_J c_J <i|H|J>.
|
||||
! Computes $\langle i|H|\Psi \rangle = \sum_J c_J \langle i|H|J\rangle$.
|
||||
!
|
||||
! Uses filter_connected_i_H_psi0 to get all the |J> to which |i>
|
||||
! is connected. The |J> are searched in short pre-computed lists.
|
||||
! Uses filter_connected_i_H_psi0 to get all the $|J \rangle$ to which $|i \rangle$
|
||||
! is connected. The $|J\rangle$ are searched in short pre-computed lists.
|
||||
END_DOC
|
||||
|
||||
ASSERT (Nint > 0)
|
||||
@ -1063,7 +1064,8 @@ subroutine get_excitation_degree_vector_mono(key1,key2,degree,Nint,sze,idx)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Applies get_excitation_degree to an array of determinants and return only the mono excitations
|
||||
! Applies get_excitation_degree to an array of determinants and returns only
|
||||
! the single excitations.
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint, sze
|
||||
integer(bit_kind), intent(in) :: key1(Nint,2,sze)
|
||||
@ -1156,8 +1158,8 @@ subroutine get_excitation_degree_vector_mono_or_exchange(key1,key2,degree,Nint,s
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Applies get_excitation_degree to an array of determinants and return only the mono excitations
|
||||
! and the connections through exchange integrals
|
||||
! Applies get_excitation_degree to an array of determinants and return only the
|
||||
! single excitations and the connections through exchange integrals.
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint, sze
|
||||
integer(bit_kind), intent(in) :: key1(Nint,2,sze)
|
||||
@ -1214,8 +1216,8 @@ subroutine get_excitation_degree_vector_double_alpha_beta(key1,key2,degree,Nint,
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Applies get_excitation_degree to an array of determinants and return only the mono excitations
|
||||
! and the connections through exchange integrals
|
||||
! Applies get_excitation_degree to an array of determinants and return only the
|
||||
! single excitations and the connections through exchange integrals.
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint, sze
|
||||
integer(bit_kind), intent(in) :: key1(Nint,2,sze)
|
||||
@ -1324,8 +1326,8 @@ subroutine get_excitation_degree_vector_mono_or_exchange_verbose(key1,key2,degre
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Applies get_excitation_degree to an array of determinants and return only the mono excitations
|
||||
! and the connections through exchange integrals
|
||||
! Applies get_excitation_degree to an array of determinants and return only the single
|
||||
! excitations and the connections through exchange integrals.
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint, sze
|
||||
integer(bit_kind), intent(in) :: key1(Nint,2,sze)
|
||||
@ -1479,7 +1481,6 @@ subroutine get_excitation_degree_vector_mono_or_exchange_verbose(key1,key2,degre
|
||||
else
|
||||
cycle
|
||||
endif
|
||||
! pause
|
||||
else
|
||||
degree(l) = shiftr(d,1)
|
||||
idx(l) = i
|
||||
@ -1496,7 +1497,7 @@ subroutine get_excitation_degree_vector(key1,key2,degree,Nint,sze,idx)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Applies get_excitation_degree to an array of determinants
|
||||
! Applies get_excitation_degree to an array of determinants.
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint, sze
|
||||
integer(bit_kind), intent(in) :: key1(Nint,2,sze)
|
||||
@ -1586,7 +1587,7 @@ double precision function diag_H_mat_elem_fock(det_ref,det_pert,fock_diag_tmp,Ni
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Computes <i|H|i> when i is at most a double excitation from
|
||||
! Computes $\langle i|H|i \rangle$ when $i$ is at most a double excitation from
|
||||
! a reference.
|
||||
END_DOC
|
||||
integer,intent(in) :: Nint
|
||||
@ -1654,7 +1655,7 @@ end
|
||||
double precision function diag_H_mat_elem(det_in,Nint)
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Computes <i|H|i>
|
||||
! Computes $\langle i|H|i \rangle$.
|
||||
END_DOC
|
||||
integer,intent(in) :: Nint
|
||||
integer(bit_kind),intent(in) :: det_in(Nint,2)
|
||||
@ -1717,7 +1718,7 @@ subroutine a_operator(iorb,ispin,key,hjj,Nint,na,nb)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Needed for diag_H_mat_elem
|
||||
! Needed for :c:func:`diag_H_mat_elem`.
|
||||
END_DOC
|
||||
integer, intent(in) :: iorb, ispin, Nint
|
||||
integer, intent(inout) :: na, nb
|
||||
@ -1763,7 +1764,7 @@ subroutine ac_operator(iorb,ispin,key,hjj,Nint,na,nb)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Needed for diag_H_mat_elem
|
||||
! Needed for :c:func:`diag_H_mat_elem`.
|
||||
END_DOC
|
||||
integer, intent(in) :: iorb, ispin, Nint
|
||||
integer, intent(inout) :: na, nb
|
||||
@ -1819,7 +1820,7 @@ subroutine get_phase(key1,key2,phase,Nint)
|
||||
integer(bit_kind), intent(in) :: key1(Nint,2), key2(Nint,2)
|
||||
double precision, intent(out) :: phase
|
||||
BEGIN_DOC
|
||||
! Returns the phase between key1 and key2
|
||||
! Returns the phase between key1 and key2.
|
||||
END_DOC
|
||||
integer :: exc(0:2, 2, 2), degree
|
||||
|
||||
@ -1837,7 +1838,7 @@ subroutine get_excitation_degree_spin(key1,key2,degree,Nint)
|
||||
include 'utils/constants.include.F'
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Returns the excitation degree between two determinants
|
||||
! Returns the excitation degree between two determinants.
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint
|
||||
integer(bit_kind), intent(in) :: key1(Nint)
|
||||
@ -1890,7 +1891,7 @@ subroutine get_excitation_spin(det1,det2,exc,degree,phase,Nint)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Returns the excitation operators between two determinants and the phase
|
||||
! Returns the excitation operators between two determinants and the phase.
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint
|
||||
integer(bit_kind), intent(in) :: det1(Nint)
|
||||
@ -1934,7 +1935,9 @@ subroutine decode_exc_spin(exc,h1,p1,h2,p2)
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Decodes the exc arrays returned by get_excitation.
|
||||
!
|
||||
! h1,h2 : Holes
|
||||
!
|
||||
! p1,p2 : Particles
|
||||
END_DOC
|
||||
integer, intent(in) :: exc(0:2,2)
|
||||
@ -1965,7 +1968,7 @@ subroutine get_double_excitation_spin(det1,det2,exc,phase,Nint)
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Returns the two excitation operators between two doubly excited spin-determinants
|
||||
! and the phase
|
||||
! and the phase.
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint
|
||||
integer(bit_kind), intent(in) :: det1(Nint)
|
||||
@ -2094,7 +2097,7 @@ subroutine get_mono_excitation_spin(det1,det2,exc,phase,Nint)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Returns the excitation operator between two singly excited determinants and the phase
|
||||
! Returns the excitation operator between two singly excited determinants and the phase.
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint
|
||||
integer(bit_kind), intent(in) :: det1(Nint)
|
||||
@ -2170,7 +2173,8 @@ subroutine i_H_j_mono_spin(key_i,key_j,Nint,spin,hij)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Returns <i|H|j> where i and j are determinants differing by a single excitation
|
||||
! Returns $\langle i|H|j \rangle$ where $i$ and $j$ are determinants differing by
|
||||
! a single excitation.
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint, spin
|
||||
integer(bit_kind), intent(in) :: key_i(Nint,2), key_j(Nint,2)
|
||||
@ -2189,7 +2193,8 @@ subroutine i_H_j_double_spin(key_i,key_j,Nint,hij)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Returns <i|H|j> where i and j are determinants differing by a same-spin double excitation
|
||||
! Returns $\langle i|H|j \rangle$ where $i$ and $j$ are determinants differing by
|
||||
! a same-spin double excitation.
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint
|
||||
integer(bit_kind), intent(in) :: key_i(Nint), key_j(Nint)
|
||||
@ -2217,7 +2222,8 @@ subroutine i_H_j_double_alpha_beta(key_i,key_j,Nint,hij)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Returns <i|H|j> where i and j are determinants differing by an opposite-spin double excitation
|
||||
! Returns $\langle i|H|j \rangle$ where $i$ and $j$ are determinants differing by
|
||||
! an opposite-spin double excitation.
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint
|
||||
integer(bit_kind), intent(in) :: key_i(Nint,2), key_j(Nint,2)
|
||||
|
@ -3,7 +3,8 @@ subroutine i_Wee_j_mono(key_i,key_j,Nint,spin,hij)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Returns <i|H|j> where i and j are determinants differing by a single excitation
|
||||
! Returns $\langle i|H|j \rangle$ where $i$ and $j$ are determinants differing by a
|
||||
! single excitation.
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint, spin
|
||||
integer(bit_kind), intent(in) :: key_i(Nint,2), key_j(Nint,2)
|
||||
@ -22,7 +23,7 @@ end
|
||||
double precision function diag_wee_mat_elem(det_in,Nint)
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Computes <i|H|i>
|
||||
! Computes $\langle i|H|i \rangle$.
|
||||
END_DOC
|
||||
integer,intent(in) :: Nint
|
||||
integer(bit_kind),intent(in) :: det_in(Nint,2)
|
||||
@ -86,7 +87,7 @@ subroutine a_operator_bielec(iorb,ispin,key,hjj,Nint,na,nb)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Needed for diag_H_mat_elem
|
||||
! Needed for :c:func:`diag_Wee_mat_elem`.
|
||||
END_DOC
|
||||
integer, intent(in) :: iorb, ispin, Nint
|
||||
integer, intent(inout) :: na, nb
|
||||
@ -130,7 +131,7 @@ subroutine ac_operator_bielec(iorb,ispin,key,hjj,Nint,na,nb)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Needed for diag_H_mat_elem
|
||||
! Needed for :c:func:`diag_Wee_mat_elem`.
|
||||
END_DOC
|
||||
integer, intent(in) :: iorb, ispin, Nint
|
||||
integer, intent(inout) :: na, nb
|
||||
@ -177,7 +178,8 @@ subroutine i_H_j_mono_spin_monoelec(key_i,key_j,Nint,spin,hij)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Returns <i|H|j> where i and j are determinants differing by a single excitation
|
||||
! Returns $\langle i|H|j \rangle$ where $i$ and $j$ are determinants differing by
|
||||
! a single excitation.
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint, spin
|
||||
integer(bit_kind), intent(in) :: key_i(Nint,2), key_j(Nint,2)
|
||||
@ -198,7 +200,7 @@ double precision function diag_H_mat_elem_monoelec(det_in,Nint)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Computes <i|H|i>
|
||||
! Computes $\langle i|H|i \rangle$.
|
||||
END_DOC
|
||||
integer,intent(in) :: Nint
|
||||
integer(bit_kind),intent(in) :: det_in(Nint,2)
|
||||
@ -233,7 +235,7 @@ subroutine i_H_j_monoelec(key_i,key_j,Nint,hij)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Returns <i|H|j> where i and j are determinants
|
||||
! Returns $\langle i|H|j \rangle$ where $i$ and $j$ are determinants.
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint
|
||||
integer(bit_kind), intent(in) :: key_i(Nint,2), key_j(Nint,2)
|
||||
@ -269,7 +271,7 @@ subroutine i_H_j_bielec(key_i,key_j,Nint,hij)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Returns <i|H|j> where i and j are determinants
|
||||
! Returns $\langle i|H|j \rangle$ where $i$ and $j$ are determinants.
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint
|
||||
integer(bit_kind), intent(in) :: key_i(Nint,2), key_j(Nint,2)
|
||||
|
@ -2,7 +2,7 @@ logical function det_inf(key1, key2, Nint)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Ordering function for determinants
|
||||
! Ordering function for determinants.
|
||||
END_DOC
|
||||
integer,intent(in) :: Nint
|
||||
integer(bit_kind),intent(in) :: key1(Nint, 2), key2(Nint, 2)
|
||||
@ -26,9 +26,6 @@ end function
|
||||
subroutine tamiser(key, idx, no, n, Nint, N_key)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Uncodumented : TODO
|
||||
END_DOC
|
||||
integer,intent(in) :: no, n, Nint, N_key
|
||||
integer(bit_kind),intent(inout) :: key(Nint, 2, N_key)
|
||||
integer,intent(inout) :: idx(N_key)
|
||||
@ -70,7 +67,7 @@ subroutine sort_dets_ba_v(key_in, key_out, idx, shortcut, version, N_key, Nint)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Uncodumented : TODO
|
||||
! Deprecated routine
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint, N_key
|
||||
integer(bit_kind),intent(in) :: key_in(Nint,2,N_key)
|
||||
@ -98,9 +95,8 @@ end subroutine
|
||||
subroutine sort_dets_ab_v(key_in, key_out, idx, shortcut, version, N_key, Nint)
|
||||
use bitmasks
|
||||
implicit none
|
||||
|
||||
BEGIN_DOC
|
||||
! Uncodumented : TODO
|
||||
! Deprecated routine
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint, N_key
|
||||
integer(bit_kind),intent(in) :: key_in(Nint,2,N_key)
|
||||
@ -168,10 +164,8 @@ end subroutine
|
||||
subroutine sort_dets_ab(key, idx, shortcut, N_key, Nint)
|
||||
use bitmasks
|
||||
implicit none
|
||||
|
||||
|
||||
BEGIN_DOC
|
||||
! Uncodumented : TODO
|
||||
! Deprecated routine
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint, N_key
|
||||
integer(bit_kind),intent(inout) :: key(Nint,2,N_key)
|
||||
|
@ -27,7 +27,7 @@ end
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_det_alpha, (N_int,psi_det_size) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! List of alpha determinants of psi_det
|
||||
! List of $\alpha$ determinants of psi_det
|
||||
END_DOC
|
||||
integer :: i,k
|
||||
|
||||
@ -42,7 +42,7 @@ END_PROVIDER
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_det_beta, (N_int,psi_det_size) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! List of beta determinants of psi_det
|
||||
! List of $\beta$ determinants of psi_det
|
||||
END_DOC
|
||||
integer :: i,k
|
||||
|
||||
@ -60,7 +60,7 @@ BEGIN_TEMPLATE
|
||||
&BEGIN_PROVIDER [ integer, N_det_$alpha_unique ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Unique $alpha determinants
|
||||
! Unique $\\$alpha$ determinants
|
||||
END_DOC
|
||||
|
||||
integer :: i,j,k
|
||||
@ -357,7 +357,7 @@ end
|
||||
&BEGIN_PROVIDER [ double precision, det_beta_norm, (N_det_beta_unique) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Norm of the alpha and beta spin determinants in the wave function:
|
||||
! Norm of the $\alpha$ and $\beta$ spin determinants in the wave function:
|
||||
!
|
||||
! ||Da||_i \sum_j C_{ij}**2
|
||||
END_DOC
|
||||
@ -399,7 +399,7 @@ BEGIN_PROVIDER [ double precision, psi_bilinear_matrix_values, (N_det,N_states)
|
||||
! Sparse coefficient matrix if the wave function is expressed in a bilinear form :
|
||||
! D_a^t C D_b
|
||||
!
|
||||
! Rows are alpha determinants and columns are beta.
|
||||
! Rows are $\alpha$ determinants and columns are $\beta.$
|
||||
!
|
||||
! Order refers to psi_det
|
||||
END_DOC
|
||||
@ -481,9 +481,10 @@ BEGIN_PROVIDER [ integer, psi_bilinear_matrix_columns_loc, (N_det_beta_unique+1)
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Sparse coefficient matrix if the wave function is expressed in a bilinear form :
|
||||
! D_a^t C D_b
|
||||
!
|
||||
! Rows are alpha determinants and columns are beta.
|
||||
! $D_\alpha^\dagger.C.D_\beta$
|
||||
!
|
||||
! Rows are $\alpha$ determinants and columns are $\beta.$
|
||||
!
|
||||
! Order refers to psi_det
|
||||
END_DOC
|
||||
@ -518,9 +519,10 @@ BEGIN_PROVIDER [ double precision, psi_bilinear_matrix_transp_values, (N_det,N_
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Transpose of psi_bilinear_matrix
|
||||
! D_b^t C^t D_a
|
||||
!
|
||||
! Rows are Alpha determinants and columns are beta, but the matrix is stored in row major
|
||||
! $D_\beta^\dagger.C^\dagger.D_\alpha$
|
||||
!
|
||||
! Rows are $\alpha$ determinants and columns are $\beta$, but the matrix is stored in row major
|
||||
! format
|
||||
END_DOC
|
||||
integer :: i,j,k,l
|
||||
@ -621,7 +623,8 @@ BEGIN_PROVIDER [ double precision, psi_bilinear_matrix, (N_det_alpha_unique,N_de
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Coefficient matrix if the wave function is expressed in a bilinear form :
|
||||
! D_a^t C D_b
|
||||
!
|
||||
! $D_\alpha^\dagger.C.D_\beta$
|
||||
END_DOC
|
||||
integer :: i,j,k,istate
|
||||
psi_bilinear_matrix = 0.d0
|
||||
@ -639,7 +642,7 @@ subroutine create_wf_of_psi_bilinear_matrix(truncate)
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Generate a wave function containing all possible products
|
||||
! of alpha and beta determinants
|
||||
! of $\alpha$ and $\beta$ determinants
|
||||
END_DOC
|
||||
logical, intent(in) :: truncate
|
||||
integer :: i,j,k
|
||||
@ -708,7 +711,7 @@ end
|
||||
subroutine generate_all_alpha_beta_det_products
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Create a wave function from all possible alpha x beta determinants
|
||||
! Create a wave function from all possible $\alpha \times \beta$ determinants
|
||||
END_DOC
|
||||
integer :: i,j,k,l
|
||||
integer :: iproc
|
||||
@ -753,7 +756,7 @@ subroutine get_all_spin_singles_and_doubles(buffer, idx, spindet, Nint, size_buf
|
||||
BEGIN_DOC
|
||||
!
|
||||
! Returns the indices of all the single and double excitations in the list of
|
||||
! unique alpha determinants.
|
||||
! unique $\alpha$ determinants.
|
||||
!
|
||||
! /!\ : The buffer is transposed !
|
||||
!
|
||||
@ -788,7 +791,7 @@ subroutine get_all_spin_singles(buffer, idx, spindet, Nint, size_buffer, singles
|
||||
BEGIN_DOC
|
||||
!
|
||||
! Returns the indices of all the single excitations in the list of
|
||||
! unique alpha determinants.
|
||||
! unique $\alpha$ determinants.
|
||||
!
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint, size_buffer, idx(size_buffer)
|
||||
@ -820,7 +823,7 @@ subroutine get_all_spin_doubles(buffer, idx, spindet, Nint, size_buffer, doubles
|
||||
BEGIN_DOC
|
||||
!
|
||||
! Returns the indices of all the double excitations in the list of
|
||||
! unique alpha determinants.
|
||||
! unique $\alpha$ determinants.
|
||||
!
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint, size_buffer, idx(size_buffer)
|
||||
@ -947,7 +950,7 @@ subroutine get_all_spin_singles_and_doubles_1(buffer, idx, spindet, size_buffer,
|
||||
BEGIN_DOC
|
||||
!
|
||||
! Returns the indices of all the single and double excitations in the list of
|
||||
! unique alpha determinants.
|
||||
! unique $\alpha$ determinants.
|
||||
!
|
||||
! /!\ : The buffer is transposed !
|
||||
!
|
||||
@ -990,7 +993,7 @@ subroutine get_all_spin_singles_1(buffer, idx, spindet, size_buffer, singles, n_
|
||||
BEGIN_DOC
|
||||
!
|
||||
! Returns the indices of all the single excitations in the list of
|
||||
! unique alpha determinants.
|
||||
! unique $\alpha$ determinants.
|
||||
!
|
||||
END_DOC
|
||||
integer, intent(in) :: size_buffer, idx(size_buffer)
|
||||
@ -1021,7 +1024,7 @@ subroutine get_all_spin_doubles_1(buffer, idx, spindet, size_buffer, doubles, n_
|
||||
BEGIN_DOC
|
||||
!
|
||||
! Returns the indices of all the double excitations in the list of
|
||||
! unique alpha determinants.
|
||||
! unique $\alpha$ determinants.
|
||||
!
|
||||
END_DOC
|
||||
integer, intent(in) :: size_buffer, idx(size_buffer)
|
||||
@ -1055,7 +1058,7 @@ subroutine get_all_spin_singles_and_doubles_$N_int(buffer, idx, spindet, size_bu
|
||||
BEGIN_DOC
|
||||
!
|
||||
! Returns the indices of all the single and double excitations in the list of
|
||||
! unique alpha determinants.
|
||||
! unique $\alpha$ determinants.
|
||||
!
|
||||
! /!\ : The buffer is transposed !
|
||||
!
|
||||
@ -1113,7 +1116,7 @@ subroutine get_all_spin_singles_$N_int(buffer, idx, spindet, size_buffer, single
|
||||
BEGIN_DOC
|
||||
!
|
||||
! Returns the indices of all the single excitations in the list of
|
||||
! unique alpha determinants.
|
||||
! unique $\alpha$ determinants.
|
||||
!
|
||||
END_DOC
|
||||
integer, intent(in) :: size_buffer, idx(size_buffer)
|
||||
@ -1163,7 +1166,7 @@ subroutine get_all_spin_doubles_$N_int(buffer, idx, spindet, size_buffer, double
|
||||
BEGIN_DOC
|
||||
!
|
||||
! Returns the indices of all the double excitations in the list of
|
||||
! unique alpha determinants.
|
||||
! unique $\alpha$ determinants.
|
||||
!
|
||||
END_DOC
|
||||
integer, intent(in) :: size_buffer, idx(size_buffer)
|
||||
@ -1220,7 +1223,7 @@ subroutine wf_of_psi_bilinear_matrix(truncate)
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Generate a wave function containing all possible products
|
||||
! of alpha and beta determinants
|
||||
! of $\alpha$ and $\beta$ determinants
|
||||
END_DOC
|
||||
logical, intent(in) :: truncate
|
||||
integer :: i,j,k
|
||||
|
@ -2,7 +2,7 @@ BEGIN_PROVIDER [ double precision, H_matrix_all_dets,(N_det,N_det) ]
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! H matrix on the basis of the slater determinants defined by psi_det
|
||||
! |H| matrix on the basis of the Slater determinants defined by psi_det
|
||||
END_DOC
|
||||
integer :: i,j,k
|
||||
double precision :: hij
|
||||
@ -12,9 +12,32 @@ BEGIN_PROVIDER [ double precision, H_matrix_all_dets,(N_det,N_det) ]
|
||||
!$OMP SHARED (N_det, psi_det, N_int,H_matrix_all_dets)
|
||||
do i =1,N_det
|
||||
do j = i, N_det
|
||||
call i_H_j(psi_det(1,1,i),psi_det(1,1,j),N_int,hij)
|
||||
H_matrix_all_dets(i,j) = hij
|
||||
H_matrix_all_dets(j,i) = hij
|
||||
call i_H_j(psi_det(1,1,i),psi_det(1,1,j),N_int,hij)
|
||||
H_matrix_all_dets(i,j) = hij
|
||||
H_matrix_all_dets(j,i) = hij
|
||||
enddo
|
||||
enddo
|
||||
!$OMP END PARALLEL DO
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ double precision, S2_matrix_all_dets,(N_det,N_det) ]
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! |S^2| matrix on the basis of the Slater determinants defined by psi_det
|
||||
END_DOC
|
||||
integer :: i,j,k
|
||||
double precision :: sij
|
||||
integer :: degree(N_det),idx(0:N_det)
|
||||
call get_s2(psi_det(1,1,1),psi_det(1,1,1),N_int,sij)
|
||||
!$OMP PARALLEL DO SCHEDULE(GUIDED) DEFAULT(NONE) PRIVATE(i,j,sij,degree,idx,k) &
|
||||
!$OMP SHARED (N_det, psi_det, N_int,S2_matrix_all_dets)
|
||||
do i =1,N_det
|
||||
do j = i, N_det
|
||||
call get_s2(psi_det(1,1,i),psi_det(1,1,j),N_int,sij)
|
||||
S2_matrix_all_dets(i,j) = sij
|
||||
S2_matrix_all_dets(j,i) = sij
|
||||
enddo
|
||||
enddo
|
||||
!$OMP END PARALLEL DO
|
||||
|
@ -2,9 +2,11 @@
|
||||
&BEGIN_PROVIDER [double precision, short_range_Hartree, (N_states)]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! short_range_Hartree_operator(i,j) = \int dr i(r)j(r) \int r' \rho(r') W_{ee}^{sr}
|
||||
! short_range_Hartree = 0.5 * \sum_{i,j} \rho_{ij} short_range_Hartree_operator(i,j)
|
||||
! = 0.5 * \int dr \int r' \rho(r) \rho(r') W_{ee}^{sr}
|
||||
! short_range_Hartree_operator(i,j) = $\int dr i(r)j(r) \int r' \rho(r') W_{ee}^{sr}$
|
||||
!
|
||||
! short_range_Hartree = $1/2 \sum_{i,j} \rho_{ij} \mathtt{short_range_Hartree_operator}(i,j)$
|
||||
!
|
||||
! = $1/2 \int dr \int r' \rho(r) \rho(r') W_{ee}^{sr}$
|
||||
END_DOC
|
||||
integer :: i,j,k,l,m,n,istate
|
||||
double precision :: get_mo_bielec_integral,get_mo_bielec_integral_erf
|
||||
@ -40,11 +42,14 @@ END_PROVIDER
|
||||
implicit none
|
||||
integer :: i,j,istate
|
||||
effective_one_e_potential = 0.d0
|
||||
BEGIN_DOC
|
||||
! effective_one_e_potential(i,j) = <i| v_{H}^{sr} |j> + <i| h_{core} |j> + <i|v_{xc} |j>
|
||||
! Taking the expectation value does not provide any energy
|
||||
! but effective_one_e_potential(i,j) is the potential coupling DFT and WFT part to be used in any WFT calculation
|
||||
! shifted_effective_one_e_potential_without_kin = effective_one_e_potential_without_kin + shifting_constant on the diagonal
|
||||
BEGIN_DOC
|
||||
! Effective_one_e_potential(i,j) = $\rangle i| v_{H}^{sr} |j\rangle + \rangle i| h_{core} |j\rangle + \rangle i|v_{xc} |j\rangle$
|
||||
!
|
||||
! Taking the expectation value does not provide any energy, but
|
||||
! effective_one_e_potential(i,j) is the potential coupling DFT and WFT part to
|
||||
! be used in any WFT calculation.
|
||||
!
|
||||
! shifted_effective_one_e_potential_without_kin = effective_one_e_potential_without_kin + shifting_constant on the diagonal
|
||||
END_DOC
|
||||
do istate = 1, N_states
|
||||
do i = 1, mo_tot_num
|
||||
|
@ -17,6 +17,8 @@ function run {
|
||||
qp_create_ezfio_from_xyz \
|
||||
$INPUT -b "$BASIS" -m $MULT -c $CHARGE $PSEUDO -o $EZ
|
||||
qp_edit -c $EZ
|
||||
ezfio set_file $EZ
|
||||
ezfio set scf_utils thresh_scf 1.e-12
|
||||
echo "Write" > ${EZ}/ao_two_e_integrals/disk_access_ao_integrals
|
||||
}
|
||||
|
||||
@ -46,7 +48,7 @@ function run {
|
||||
}
|
||||
|
||||
@test "SiH2_3B1" {
|
||||
run sih2_3b1.xyz 1 0 6-31g
|
||||
run sih2_3b1.xyz 3 0 6-31g
|
||||
}
|
||||
|
||||
@test "SO" {
|
||||
|
@ -8,6 +8,8 @@ function run {
|
||||
cp ${QP_ROOT}/tests/input/$INPUT .
|
||||
qp_convert_output_to_ezfio $INPUT -o $EZ
|
||||
qp_edit -c $EZ
|
||||
ezfio set_file $EZ
|
||||
ezfio set scf_utils thresh_scf 1.e-12
|
||||
echo "Write" > ${EZ}/ao_two_e_integrals/disk_access_ao_integrals
|
||||
}
|
||||
|
||||
@ -21,4 +23,5 @@ function run {
|
||||
|
||||
@test "[Cu(NH3)4]2+ GAMESS" {
|
||||
run cu_nh3_4_2plus.gms.out cu_nh3_4_2plus.ezfio
|
||||
ezfio set scf_utils thresh_scf 1.e-10
|
||||
}
|
||||
|
@ -8,7 +8,6 @@ function run() {
|
||||
test_exe scf || skip
|
||||
qp_edit -c $1
|
||||
ezfio set_file $1
|
||||
ezfio set scf_utils thresh_scf 1.e-12
|
||||
qp_run scf $1
|
||||
qp_set_frozen_core $1
|
||||
energy="$(ezfio get hartree_fock energy)"
|
||||
@ -56,7 +55,7 @@ function run() {
|
||||
}
|
||||
|
||||
@test "SiH2_3B1" {
|
||||
run sih2_3b1.ezfio -289.9529166224221
|
||||
run sih2_3b1.ezfio -289.9654718650881
|
||||
}
|
||||
|
||||
@test "SO" {
|
@ -1,65 +0,0 @@
|
||||
program scf
|
||||
BEGIN_DOC
|
||||
! Produce `Hartree_Fock` MO orbital
|
||||
! output: mo_basis.mo_tot_num mo_basis.mo_label mo_basis.ao_md5 mo_basis.mo_coef mo_basis.mo_occ
|
||||
! output: hartree_fock.energy
|
||||
! optional: mo_basis.mo_coef
|
||||
END_DOC
|
||||
disk_access_mo_one_integrals = "None"
|
||||
touch disk_access_mo_one_integrals
|
||||
disk_access_ao_one_integrals = "None"
|
||||
touch disk_access_ao_one_integrals
|
||||
|
||||
call create_guess
|
||||
call orthonormalize_mos
|
||||
call run
|
||||
end
|
||||
|
||||
subroutine create_guess
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Create a MO guess if no MOs are present in the EZFIO directory
|
||||
END_DOC
|
||||
logical :: exists
|
||||
PROVIDE ezfio_filename
|
||||
call ezfio_has_mo_basis_mo_coef(exists)
|
||||
if (.not.exists) then
|
||||
if (mo_guess_type == "HCore") then
|
||||
mo_coef = ao_ortho_lowdin_coef
|
||||
TOUCH mo_coef
|
||||
mo_label = 'Guess'
|
||||
call mo_as_eigvectors_of_mo_matrix(mo_mono_elec_integral,size(mo_mono_elec_integral,1),size(mo_mono_elec_integral,2),mo_label)
|
||||
SOFT_TOUCH mo_coef mo_label
|
||||
else if (mo_guess_type == "Huckel") then
|
||||
call huckel_guess
|
||||
else
|
||||
print *, 'Unrecognized MO guess type : '//mo_guess_type
|
||||
stop 1
|
||||
endif
|
||||
endif
|
||||
end
|
||||
|
||||
subroutine run
|
||||
|
||||
BEGIN_DOC
|
||||
! Run SCF calculation
|
||||
END_DOC
|
||||
|
||||
use bitmasks
|
||||
implicit none
|
||||
|
||||
double precision :: SCF_energy_before,SCF_energy_after,diag_H_mat_elem
|
||||
double precision :: EHF
|
||||
integer :: i_it, i, j, k
|
||||
|
||||
EHF = SCF_energy
|
||||
|
||||
mo_label = "Canonical"
|
||||
|
||||
! Choose SCF algorithm
|
||||
|
||||
call damping_SCF
|
||||
|
||||
end
|
||||
|
||||
|
@ -61,8 +61,10 @@ END_PROVIDER
|
||||
BEGIN_PROVIDER [ double precision, mo_coef, (ao_num,mo_tot_num) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Molecular orbital coefficients on AO basis set
|
||||
! mo_coef(i,j) = coefficient of the ith ao on the jth mo
|
||||
! Molecular orbital coefficients on |AO| basis set
|
||||
!
|
||||
! mo_coef(i,j) = coefficient of the i-th |AO| on the jth mo
|
||||
!
|
||||
! mo_label : Label characterizing the MOS (local, canonical, natural, etc)
|
||||
END_DOC
|
||||
integer :: i, j
|
||||
@ -113,9 +115,9 @@ END_PROVIDER
|
||||
BEGIN_PROVIDER [ double precision, mo_coef_in_ao_ortho_basis, (ao_num, mo_tot_num) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! MO coefficients in orthogonalized AO basis
|
||||
! |MO| coefficients in orthogonalized |AO| basis
|
||||
!
|
||||
! C^(-1).C_mo
|
||||
! $C^{-1}.C_{mo}$
|
||||
END_DOC
|
||||
call dgemm('N','N',ao_num,mo_tot_num,ao_num,1.d0, &
|
||||
ao_ortho_canonical_coef_inv, size(ao_ortho_canonical_coef_inv,1),&
|
||||
@ -127,9 +129,11 @@ END_PROVIDER
|
||||
BEGIN_PROVIDER [ character*(64), mo_label ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Molecular orbital coefficients on AO basis set
|
||||
! mo_coef(i,j) = coefficient of the ith ao on the jth mo
|
||||
! mo_label : Label characterizing the MOS (local, canonical, natural, etc)
|
||||
! |MO| coefficients on |AO| basis set
|
||||
!
|
||||
! mo_coef(i,j) = coefficient of the i-th |AO| on the j-th |MO|
|
||||
!
|
||||
! mo_label : Label characterizing the |MOs| (local, canonical, natural, etc)
|
||||
END_DOC
|
||||
|
||||
logical :: exists
|
||||
@ -162,7 +166,7 @@ END_PROVIDER
|
||||
BEGIN_PROVIDER [ double precision, mo_coef_transp, (mo_tot_num,ao_num) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Molecular orbital coefficients on AO basis set
|
||||
! |MO| coefficients on |AO| basis set
|
||||
END_DOC
|
||||
integer :: i, j
|
||||
|
||||
@ -178,7 +182,7 @@ END_PROVIDER
|
||||
BEGIN_PROVIDER [ double precision, mo_occ, (mo_tot_num) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! MO occupation numbers
|
||||
! |MO| occupation numbers
|
||||
END_DOC
|
||||
PROVIDE ezfio_filename elec_beta_num elec_alpha_num
|
||||
if (mpi_master) then
|
||||
@ -217,9 +221,9 @@ END_PROVIDER
|
||||
subroutine ao_to_mo(A_ao,LDA_ao,A_mo,LDA_mo)
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Transform A from the AO basis to the MO basis
|
||||
! Transform A from the |AO| basis to the |MO| basis
|
||||
!
|
||||
! Ct.A_ao.C
|
||||
! $C^\dagger.A_{ao}.C$
|
||||
END_DOC
|
||||
integer, intent(in) :: LDA_ao,LDA_mo
|
||||
double precision, intent(in) :: A_ao(LDA_ao,ao_num)
|
||||
@ -248,15 +252,14 @@ subroutine mix_mo_jk(j,k)
|
||||
integer, intent(in) :: j,k
|
||||
integer :: i,i_plus,i_minus
|
||||
BEGIN_DOC
|
||||
! Rotates the jth MO with the kth MO
|
||||
! to give two new MO's that are
|
||||
! Rotates the j-th |MO| with the k-th |MO| to give two new |MOs| that are
|
||||
!
|
||||
! '+' = 1/sqrt(2) (|j> + |k>)
|
||||
! * $+ = \frac{1}{\sqrt{2}} (|j\rangle + |k\rangle)$
|
||||
!
|
||||
! '-' = 1/sqrt(2) (|j> - |k>)
|
||||
! * $- = \frac{1}{\sqrt{2}} (|j\rangle - |k\rangle)$
|
||||
!
|
||||
! by convention, the '+' MO is in the lower index (min(j,k))
|
||||
! by convention, the '-' MO is in the larger index (max(j,k))
|
||||
! by convention, the '+' |MO| is in the lowest index (min(j,k))
|
||||
! by convention, the '-' |MO| is in the highest index (max(j,k))
|
||||
END_DOC
|
||||
double precision :: array_tmp(ao_num,2),dsqrt_2
|
||||
if(j==k)then
|
||||
@ -283,9 +286,9 @@ end
|
||||
subroutine ao_ortho_cano_to_ao(A_ao,LDA_ao,A,LDA)
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Transform A from the AO basis to the orthogonal AO basis
|
||||
! Transform A from the |AO| basis to the orthogonal |AO| basis
|
||||
!
|
||||
! C^(-1).A_ao.Ct^(-1)
|
||||
! $C^{-1}.A_{ao}.C^\dagger^{-1}$
|
||||
END_DOC
|
||||
integer, intent(in) :: LDA_ao,LDA
|
||||
double precision, intent(in) :: A_ao(LDA_ao,*)
|
||||
|
@ -1,7 +1,7 @@
|
||||
BEGIN_PROVIDER [double precision, mo_nucl_elec_integral, (mo_tot_num,mo_tot_num)]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! interaction nuclear electron on the MO basis
|
||||
! Nucleus-electron interaction on the |MO| basis
|
||||
END_DOC
|
||||
|
||||
if (read_mo_one_integrals) then
|
||||
@ -26,8 +26,9 @@ END_PROVIDER
|
||||
BEGIN_PROVIDER [double precision, mo_nucl_elec_integral_per_atom, (mo_tot_num,mo_tot_num,nucl_num)]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! mo_nucl_elec_integral_per_atom(i,j,k) = -<MO(i)|1/|r-Rk|MO(j)>
|
||||
! where Rk is the geometry of the kth atom
|
||||
! mo_nucl_elec_integral_per_atom(i,j,k) =
|
||||
! $\langle \phi_i| -\frac{1}{|r-R_k|} | \phi_j \rangle$.
|
||||
! where R_k is the coordinate of the k-th nucleus.
|
||||
END_DOC
|
||||
|
||||
integer :: k
|
||||
|
@ -4,7 +4,7 @@ use map_module
|
||||
integer function load_mo_integrals_erf(filename)
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Read from disk the $ao integrals
|
||||
! Read from disk the |MO| erf integrals
|
||||
END_DOC
|
||||
character*(*), intent(in) :: filename
|
||||
integer*8 :: i
|
||||
@ -52,14 +52,14 @@ end
|
||||
BEGIN_PROVIDER [ type(map_type), mo_integrals_erf_map ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! MO integrals
|
||||
! |MO| integrals
|
||||
END_DOC
|
||||
integer(key_kind) :: key_max
|
||||
integer(map_size_kind) :: sze
|
||||
call bielec_integrals_index(mo_tot_num,mo_tot_num,mo_tot_num,mo_tot_num,key_max)
|
||||
sze = key_max
|
||||
call map_init(mo_integrals_erf_map,sze)
|
||||
print*, 'MO ERF map initialized'
|
||||
print*, 'MO erf map initialized'
|
||||
END_PROVIDER
|
||||
|
||||
subroutine insert_into_mo_integrals_erf_map(n_integrals, &
|
||||
@ -68,7 +68,7 @@ subroutine insert_into_mo_integrals_erf_map(n_integrals, &
|
||||
implicit none
|
||||
|
||||
BEGIN_DOC
|
||||
! Create new entry into MO map, or accumulate in an existing entry
|
||||
! Create new entry into |MO| map, or accumulate in an existing entry
|
||||
END_DOC
|
||||
|
||||
integer, intent(in) :: n_integrals
|
||||
@ -92,7 +92,7 @@ END_PROVIDER
|
||||
BEGIN_PROVIDER [ double precision, mo_integrals_erf_cache, (0:64*64*64*64) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Cache of MO integrals for fast access
|
||||
! Cache of |MO| integrals for fast access
|
||||
END_DOC
|
||||
PROVIDE mo_bielec_integrals_erf_in_map
|
||||
integer :: i,j,k,l
|
||||
@ -127,7 +127,7 @@ double precision function get_mo_bielec_integral_erf(i,j,k,l,map)
|
||||
use map_module
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Returns one integral <ij|kl> in the MO basis
|
||||
! Returns one integral $\langle ij|kl \rangle$ in the |MO| basis
|
||||
END_DOC
|
||||
integer, intent(in) :: i,j,k,l
|
||||
integer(key_kind) :: idx
|
||||
@ -158,7 +158,7 @@ end
|
||||
double precision function mo_bielec_integral_erf(i,j,k,l)
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Returns one integral <ij|kl> in the MO basis
|
||||
! Returns one integral $\langle ij|kl \rangle$ in the |MO| basis
|
||||
END_DOC
|
||||
integer, intent(in) :: i,j,k,l
|
||||
double precision :: get_mo_bielec_integral_erf
|
||||
@ -173,7 +173,7 @@ subroutine get_mo_bielec_integrals_erf(j,k,l,sze,out_val,map)
|
||||
use map_module
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Returns multiple integrals <ij|kl> in the MO basis, all
|
||||
! Returns multiple integrals $\langle ij|kl \rangle$ in the |MO| basis, all
|
||||
! i for j,k,l fixed.
|
||||
END_DOC
|
||||
integer, intent(in) :: j,k,l, sze
|
||||
@ -204,8 +204,8 @@ subroutine get_mo_bielec_integrals_erf_ij(k,l,sze,out_array,map)
|
||||
use map_module
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Returns multiple integrals <ij|kl> in the MO basis, all
|
||||
! i(1)j(2) 1/r12 k(1)l(2)
|
||||
! Returns multiple integrals $\langle ij|kl \rangle$ in the |MO| basis, all
|
||||
! $\int i(1)j(2) \frac{1}{r_{12}} k(1)l(2)$
|
||||
! i, j for k,l fixed.
|
||||
END_DOC
|
||||
integer, intent(in) :: k,l, sze
|
||||
@ -259,8 +259,8 @@ subroutine get_mo_bielec_integrals_erf_i1j1(k,l,sze,out_array,map)
|
||||
use map_module
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Returns multiple integrals <ik|jl> in the MO basis, all
|
||||
! i(1)j(1) erf(mu_erf * r12) /r12 k(2)l(2)
|
||||
! Returns multiple integrals $\langle ik|jl \rangle$ in the |MO| basis, all
|
||||
! $\int i(1)j(1) \frac{\erf(\mu * r_{12})}{r_{12}} k(2)l(2)$
|
||||
! i, j for k,l fixed.
|
||||
END_DOC
|
||||
integer, intent(in) :: k,l, sze
|
||||
@ -314,7 +314,8 @@ subroutine get_mo_bielec_integrals_erf_coulomb_ii(k,l,sze,out_val,map)
|
||||
use map_module
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Returns multiple integrals <ki|li>
|
||||
! Returns multiple integrals $\langle ki|li \rangle$
|
||||
!
|
||||
! k(1)i(2) 1/r12 l(1)i(2) :: out_val(i1)
|
||||
! for k,l fixed.
|
||||
END_DOC
|
||||
@ -347,8 +348,9 @@ subroutine get_mo_bielec_integrals_erf_exch_ii(k,l,sze,out_val,map)
|
||||
use map_module
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Returns multiple integrals <ki|il>
|
||||
! k(1)i(2) 1/r12 i(1)l(2) :: out_val(i1)
|
||||
! Returns multiple integrals $\langle ki|il \rangle$
|
||||
!
|
||||
! $\int k(1)i(2) \frac{1}{r_{12}} i(1)l(2)$ :: out_val(i1)
|
||||
! for k,l fixed.
|
||||
END_DOC
|
||||
integer, intent(in) :: k,l, sze
|
||||
@ -380,7 +382,7 @@ end
|
||||
integer*8 function get_mo_erf_map_size()
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Return the number of elements in the MO map
|
||||
! Returns the number of elements in the |MO| map
|
||||
END_DOC
|
||||
get_mo_erf_map_size = mo_integrals_erf_map % n_elements
|
||||
end
|
||||
|
@ -6,13 +6,12 @@ subroutine pt2_epstein_nesbet ($arguments)
|
||||
$declarations
|
||||
|
||||
BEGIN_DOC
|
||||
! compute the standard Epstein-Nesbet perturbative first order coefficient and second order energetic contribution
|
||||
! Compute the standard Epstein-Nesbet perturbative first order coefficient and
|
||||
! second order energetic contribution for the various N_st states.
|
||||
!
|
||||
! for the various N_st states.
|
||||
! `c_pert(i)` = $\\frac{\langle i|H|\\alpha \\rangle}{ E_n - \\langle \\alpha|H|\\alpha \\rangle }$.
|
||||
!
|
||||
! c_pert(i) = <psi(i)|H|det_pert>/( E(i) - <det_pert|H|det_pert> )
|
||||
!
|
||||
! e_2_pert(i) = <psi(i)|H|det_pert>^2/( E(i) - <det_pert|H|det_pert> )
|
||||
! `e_2_pert(i)` = $\\frac{\\langle i|H|\\alpha \\rangle^2}{ E_n - \\langle \\alpha|H|\\alpha \\rangle }$.
|
||||
!
|
||||
END_DOC
|
||||
|
||||
@ -51,11 +50,10 @@ subroutine pt2_qdpt ($arguments)
|
||||
$declarations
|
||||
|
||||
BEGIN_DOC
|
||||
! compute the QDPT first order coefficient and second order energetic contribution
|
||||
!
|
||||
! Computes the QDPT first order coefficient and second order energetic contribution
|
||||
! for the various N_st states.
|
||||
!
|
||||
! c_pert(i) = <psi(i)|H|det_pert>/( <psi(i)|H|psi(i)> - <det_pert|H|det_pert> )
|
||||
! `c_pert(i)` = $\\frac{\\langle i|H|\\alpha \\rangle}{\\langle i|H|i \\rangle - \\langle \\alpha|H|\\alpha \\rangle}$.
|
||||
!
|
||||
END_DOC
|
||||
|
||||
@ -104,13 +102,12 @@ subroutine pt2_epstein_nesbet_2x2 ($arguments)
|
||||
$declarations
|
||||
|
||||
BEGIN_DOC
|
||||
! compute the Epstein-Nesbet 2x2 diagonalization coefficient and energetic contribution
|
||||
!
|
||||
! Computes the Epstein-Nesbet 2x2 diagonalization coefficient and energetic contribution
|
||||
! for the various N_st states.
|
||||
!
|
||||
! e_2_pert(i) = 0.5 * (( <det_pert|H|det_pert> - E(i) ) - sqrt( ( <det_pert|H|det_pert> - E(i)) ^2 + 4 <psi(i)|H|det_pert>^2 )
|
||||
! `e_2_pert(i)` = $\\frac{1}{2} ( \\langle \\alpha|H|\\alpha \\rangle - E_n) - \\sqrt{ (\\langle \\alpha|H|\\alpha \\rangle - E_n)^2 + 4 \\langle i|H|\\alpha \\rangle^2 }$.
|
||||
!
|
||||
! c_pert(i) = e_2_pert(i)/ <psi(i)|H|det_pert>
|
||||
! `c_pert(i)` = `e_2_pert(i)` $\\times \\frac{1}{ \\langle i|H|\\alpha \\rangle}$.
|
||||
!
|
||||
END_DOC
|
||||
|
||||
@ -206,13 +203,12 @@ subroutine pt2_moller_plesset ($arguments)
|
||||
$declarations
|
||||
|
||||
BEGIN_DOC
|
||||
! compute the standard Moller-Plesset perturbative first order coefficient and second order energetic contribution
|
||||
! Computes the standard Moller-Plesset perturbative first order coefficient and second
|
||||
! order energetic contribution for the various N_st states.
|
||||
!
|
||||
! for the various n_st states.
|
||||
! `c_pert(i)` = $\\frac{\\langle i|H|\\alpha \\rangle}{\\text{difference of orbital energies}}$.
|
||||
!
|
||||
! c_pert(i) = <psi(i)|H|det_pert>/(difference of orbital energies)
|
||||
!
|
||||
! e_2_pert(i) = <psi(i)|H|det_pert>^2/(difference of orbital energies)
|
||||
! `e_2_pert(i)` = $\\frac{\\langle i|H|\\alpha \\rangle^2}{\\text{difference of orbital energies}}$.
|
||||
!
|
||||
END_DOC
|
||||
|
||||
@ -259,13 +255,12 @@ subroutine pt2_moller_plesset_general ($arguments)
|
||||
$declarations
|
||||
|
||||
BEGIN_DOC
|
||||
! compute the general Moller-Plesset perturbative first order coefficient and second order energetic contribution
|
||||
! Computes the standard Moller-Plesset perturbative first order coefficient and second
|
||||
! order energetic contribution for the various N_st states.
|
||||
!
|
||||
! for the various n_st states.
|
||||
! `c_pert(i)` = $\\frac{\\langle i|H|\\alpha \\rangle}{\\text{difference of orbital energies}}$.
|
||||
!
|
||||
! c_pert(i) = <psi(i)|H|det_pert>/(difference of orbital energies)
|
||||
!
|
||||
! e_2_pert(i) = <psi(i)|H|det_pert>^2/(difference of orbital energies)
|
||||
! `e_2_pert(i)` = $\\frac{\\langle i|H|\\alpha \\rangle^2}{\\text{difference of orbital energies}}$.
|
||||
!
|
||||
END_DOC
|
||||
|
||||
|
@ -44,3 +44,14 @@ function test_exe() {
|
||||
fi
|
||||
}
|
||||
|
||||
run_only_test() {
|
||||
if [[ "$BATS_TEST_DESCRIPTION" != "$1" ]] && [[ "$BATS_TEST_NUMBER" -ne "$1" ]]; then
|
||||
skip
|
||||
fi
|
||||
}
|
||||
|
||||
setup() {
|
||||
if [[ -n $TEST ]] ; then
|
||||
run_only_test $TEST
|
||||
fi
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ for i in raw_data:
|
||||
if i == "@":
|
||||
inside = True
|
||||
elif i == "{" and inside and level == 0:
|
||||
new_i = ""
|
||||
new_i = "\nsetup\n"
|
||||
elif i == "}" and inside and level == 1:
|
||||
inside = False
|
||||
new_i = ""
|
||||
|
Loading…
Reference in New Issue
Block a user