9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-10-16 04:31:32 +02:00

Included documentation

This commit is contained in:
Anthony Scemama 2019-01-25 14:54:22 +01:00
parent 24d9745056
commit f830999041
83 changed files with 2983 additions and 1455 deletions

9
TODO
View File

@ -1,10 +1,5 @@
# qpsh
* reconnaitre les executables en vert en mode qpsh
* qp set_file ls: cannot access '*/': No such file or directory
Problem with EMSL
* Faire que le slave de Hartree-fock est le calcul des integrales AO en parallele
# Web/doc
@ -60,6 +55,6 @@ Parler dans le papier de rPT2
# Toto
Re-design de qp command
S^2 en simple precision dans davidson?
Doc: plugins et qp_plugins
Ajouter les symetries dans devel

View File

@ -19,5 +19,8 @@ auto:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
clone:
git clone git@github.com:QuantumPackage/qp2.git --branch=documentation build

View File

@ -1,3 +1,7 @@
ifndef QP_ROOT
$(error "QP_ROOT is not defined. Source quantum_package.rc")
endif
default:
./auto_generate.py
make -C ../ html

View File

@ -59,7 +59,8 @@ def generate_modules(abs_module, entities):
try:
b = subroutines[b]
except KeyError:
print("Error: The program %s in %s does not have the same name as the file"%
print("Error: The program %s in %s does not have the same name as the file, \
or you did not run ninja at the root."%
(b, abs_module))
sys.exit(1)
rst += [" * :ref:`%s`"%(b["name"])]

View File

@ -20,7 +20,7 @@
# -- Project information -----------------------------------------------------
project = 'Quantum Package'
copyright = '2018, A. Scemama, E. Giner'
copyright = '2019, A. Scemama, E. Giner'
author = 'A. Scemama, E. Giner'
# The short X.Y version
@ -86,7 +86,10 @@ pygments_style = None
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
#import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
#html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
#html_baseurl = 'doc/'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the

View File

@ -462,6 +462,11 @@ Subroutines / functions
File : :file:`ao_two_e_erf_ints/map_integrals_erf.irp.f`
.. code:: fortran
subroutine clear_ao_erf_map
Frees the memory of the |AO| map
Needs:
@ -833,6 +838,11 @@ Subroutines / functions
File : :file:`ao_two_e_erf_ints/routines_save_integrals_erf.irp.f`
.. code:: fortran
subroutine save_erf_two_e_integrals_ao
Needs:
@ -865,6 +875,11 @@ Subroutines / functions
File : :file:`ao_two_e_erf_ints/routines_save_integrals_erf.irp.f`
.. code:: fortran
subroutine save_erf_two_e_ints_ao_into_ints_ao
Needs:

View File

@ -727,6 +727,11 @@ Subroutines / functions
File : :file:`ao_two_e_ints/map_integrals.irp.f`
.. code:: fortran
subroutine clear_ao_map
Frees the memory of the AO map
Needs:

View File

@ -259,6 +259,7 @@ Providers
:columns: 3
* :c:data:`final_grid_points`
* :c:data:`n_points_final_grid`
.. c:var:: final_weight_at_r_vector
@ -346,7 +347,6 @@ Providers
:columns: 3
* :c:data:`final_grid_points`
* :c:data:`n_points_final_grid`
* :c:data:`one_e_dm_alpha_in_r`
* :c:data:`weight_at_r`
@ -524,7 +524,7 @@ Providers
.. hlist::
:columns: 3
* :c:data:`grid_points_per_atom`
* :c:data:`final_weight_at_r`
* :c:data:`n_points_radial_grid`
* :c:data:`nucl_num`
@ -772,6 +772,11 @@ Subroutines / functions
File : :file:`becke_numerical_grid/example.irp.f`
.. code:: fortran
subroutine example_becke_numerical_grid
subroutine that illustrates the main features available in becke_numerical_grid
Needs:

File diff suppressed because it is too large Load Diff

View File

@ -158,6 +158,28 @@ Providers
* :c:data:`pt2_e0_denominator`
.. c:var:: nthreads_pt2
File : :file:`cipsi/environment.irp.f`
.. code:: fortran
integer :: nthreads_pt2
Number of threads for Davidson
Needs:
.. hlist::
:columns: 3
* :c:data:`mpi_master`
* :c:data:`nproc`
.. c:function:: pt2_collector:
@ -285,8 +307,8 @@ Providers
.. hlist::
:columns: 3
* :c:data:`core_bitmask`
* :c:data:`elec_num`
* :c:data:`n_core_orb`
* :c:data:`n_det_generators`
* :c:data:`n_det_selectors`
* :c:data:`n_states`
@ -429,8 +451,8 @@ Providers
.. hlist::
:columns: 3
* :c:data:`core_bitmask`
* :c:data:`elec_num`
* :c:data:`n_core_orb`
* :c:data:`n_det_generators`
* :c:data:`n_det_selectors`
* :c:data:`n_states`
@ -811,6 +833,7 @@ Subroutines / functions
* :c:data:`n_states`
* :c:data:`n_int`
* :c:data:`psi_det_hii`
* :c:data:`do_only_1h1p`
* :c:data:`h0_type`
* :c:data:`psi_det_generators`
@ -1097,6 +1120,11 @@ Subroutines / functions
File : :file:`cipsi/slave_cipsi.irp.f`
.. code:: fortran
subroutine provide_everything
Needs:
@ -1354,6 +1382,11 @@ Subroutines / functions
File : :file:`cipsi/cipsi.irp.f`
.. code:: fortran
subroutine run_cipsi
Selected Full Configuration Interaction with deterministic selection and
stochastic PT2.
@ -1413,10 +1446,10 @@ Subroutines / functions
.. hlist::
:columns: 3
* :c:data:`ci_electronic_energy`
* :c:data:`ci_electronic_energy`
* :c:data:`ci_electronic_energy`
* :c:data:`ci_energy`
* :c:data:`ci_electronic_energy`
* :c:data:`n_det`
* :c:data:`psi_occ_pattern`
* :c:data:`c0_weight`
@ -1425,7 +1458,6 @@ Subroutines / functions
* :c:data:`psi_det`
* :c:data:`psi_det_size`
* :c:data:`psi_det_sorted_bit`
* :c:data:`psi_energy`
* :c:data:`psi_occ_pattern`
* :c:data:`pt2_stoch_istate`
* :c:data:`state_average_weight`
@ -1539,6 +1571,11 @@ Subroutines / functions
File : :file:`cipsi/slave_cipsi.irp.f`
.. code:: fortran
subroutine run_slave_cipsi
Helper program for distributed parallelism
Needs:
@ -1573,8 +1610,7 @@ Subroutines / functions
:columns: 3
* :c:data:`distributed_davidson`
* :c:data:`psi_energy`
* :c:data:`psi_energy`
* :c:data:`pt2_e0_denominator`
* :c:data:`pt2_stoch_istate`
* :c:data:`read_wf`
* :c:data:`state_average_weight`
@ -1586,6 +1622,11 @@ Subroutines / functions
File : :file:`cipsi/slave_cipsi.irp.f`
.. code:: fortran
subroutine run_slave_main
Needs:
@ -1600,15 +1641,13 @@ Subroutines / functions
* :c:data:`pt2_stoch_istate`
* :c:data:`n_states`
* :c:data:`n_det`
* :c:data:`threshold_generators`
* :c:data:`pt2_e0_denominator`
* :c:data:`n_det_selectors`
* :c:data:`n_det_generators`
* :c:data:`psi_energy`
* :c:data:`psi_det`
* :c:data:`n_states_diag`
* :c:data:`zmq_context`
* :c:data:`psi_energy`
* :c:data:`threshold_generators`
Called by:
@ -1637,8 +1676,7 @@ Subroutines / functions
.. hlist::
:columns: 3
* :c:data:`psi_energy`
* :c:data:`psi_energy`
* :c:data:`pt2_e0_denominator`
* :c:data:`pt2_stoch_istate`
* :c:data:`state_average_weight`
* :c:data:`threshold_generators`
@ -1649,6 +1687,11 @@ Subroutines / functions
File : :file:`cipsi/stochastic_cipsi.irp.f`
.. code:: fortran
subroutine run_stochastic_cipsi
Selected Full Configuration Interaction with Stochastic selection and PT2.
Needs:
@ -1706,10 +1749,10 @@ Subroutines / functions
.. hlist::
:columns: 3
* :c:data:`ci_electronic_energy`
* :c:data:`ci_electronic_energy`
* :c:data:`ci_electronic_energy`
* :c:data:`ci_energy`
* :c:data:`ci_electronic_energy`
* :c:data:`n_det`
* :c:data:`psi_occ_pattern`
* :c:data:`c0_weight`
@ -1718,7 +1761,6 @@ Subroutines / functions
* :c:data:`psi_det`
* :c:data:`psi_det_size`
* :c:data:`psi_det_sorted_bit`
* :c:data:`psi_energy`
* :c:data:`psi_occ_pattern`
* :c:data:`pt2_stoch_istate`
* :c:data:`state_average_weight`
@ -1790,12 +1832,13 @@ Subroutines / functions
* :c:data:`n_states`
* :c:data:`n_det`
* :c:data:`psi_bilinear_matrix_transp_values`
* :c:data:`psi_bilinear_matrix_values`
* :c:data:`elec_alpha_num`
* :c:data:`n_det_selectors`
* :c:data:`psi_bilinear_matrix_transp_values`
* :c:data:`psi_bilinear_matrix_values`
* :c:data:`n_int`
* :c:data:`psi_det_generators`
* :c:data:`psi_bilinear_matrix_values`
* :c:data:`psi_det_alpha_unique`
* :c:data:`psi_det_sorted`
* :c:data:`psi_det_sorted`
@ -2061,11 +2104,11 @@ Subroutines / functions
* :c:data:`psi_selectors`
* :c:data:`psi_bilinear_matrix_values`
* :c:data:`psi_det_alpha_unique`
* :c:data:`pt2_e0_denominator`
* :c:data:`pt2_n_teeth`
* :c:data:`psi_selectors_coef_transp`
* :c:data:`n_det`
* :c:data:`s2_eig`
* :c:data:`n_det_selectors`
* :c:data:`pt2_j`
* :c:data:`mo_two_e_integrals_in_map`
* :c:data:`psi_bilinear_matrix_transp_values`
@ -2074,7 +2117,7 @@ Subroutines / functions
* :c:data:`nthreads_pt2`
* :c:data:`psi_bilinear_matrix_values`
* :c:data:`mo_one_e_integrals`
* :c:data:`pt2_e0_denominator`
* :c:data:`elec_alpha_num`
* :c:data:`nproc`
* :c:data:`psi_bilinear_matrix_columns_loc`
* :c:data:`threshold_generators`

View File

@ -50,9 +50,9 @@ EZFIO parameters
.. option:: disk_based_davidson
If |true|, disk space is used to store the vectors
If |true|, a memory-mapped file may be used to store the W and S2 vectors if not enough RAM is available
Default: False
Default: True
.. option:: distributed_davidson
@ -79,51 +79,7 @@ Providers
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)
Eigenvectors/values of the |CI| matrix
Needs:
.. hlist::
:columns: 3
* :c:data:`diag_algorithm`
* :c:data:`dressing_column_h`
* :c:data:`expected_s2`
* :c:data:`h_matrix_all_dets`
* :c:data:`mo_two_e_integrals_in_map`
* :c:data:`n_det`
* :c:data:`n_int`
* :c:data:`n_states`
* :c:data:`n_states_diag`
* :c:data:`nthreads_davidson`
* :c:data:`psi_coef`
* :c:data:`psi_det`
* :c:data:`s2_eig`
* :c:data:`s2_matrix_all_dets`
* :c:data:`s_z`
* :c:data:`threshold_davidson`
Needed by:
.. hlist::
:columns: 3
* :c:data:`ci_energy`
.. c:var:: ci_eigenvectors_s2
File : :file:`davidson/diagonalize_ci.irp.f`
.. code:: fortran
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)
double precision, allocatable :: ci_s2 (N_states_diag)
Eigenvectors/values of the |CI| matrix
@ -167,7 +123,7 @@ Providers
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)
double precision, allocatable :: ci_s2 (N_states_diag)
Eigenvectors/values of the |CI| matrix
@ -229,6 +185,50 @@ Providers
.. c:var:: ci_s2
File : :file:`davidson/diagonalize_ci.irp.f`
.. code:: fortran
double precision, allocatable :: ci_electronic_energy (N_states_diag)
double precision, allocatable :: ci_eigenvectors (N_det,N_states_diag)
double precision, allocatable :: ci_s2 (N_states_diag)
Eigenvectors/values of the |CI| matrix
Needs:
.. hlist::
:columns: 3
* :c:data:`diag_algorithm`
* :c:data:`dressing_column_h`
* :c:data:`expected_s2`
* :c:data:`h_matrix_all_dets`
* :c:data:`mo_two_e_integrals_in_map`
* :c:data:`n_det`
* :c:data:`n_int`
* :c:data:`n_states`
* :c:data:`n_states_diag`
* :c:data:`nthreads_davidson`
* :c:data:`psi_coef`
* :c:data:`psi_det`
* :c:data:`s2_eig`
* :c:data:`s2_matrix_all_dets`
* :c:data:`s_z`
* :c:data:`threshold_davidson`
Needed by:
.. hlist::
:columns: 3
* :c:data:`ci_energy`
.. c:var:: davidson_criterion
@ -535,7 +535,7 @@ Subroutines / functions
.. code:: fortran
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)
subroutine davidson_diag_hjj_sjj(dets_in,u_in,H_jj,s2_out,energies,dim_in,sze,N_st,N_st_diag_in,Nint,dressing_state,converged)
Davidson diagonalization with specific diagonal elements of the H matrix
@ -555,7 +555,7 @@ Subroutines / functions
N_st : Number of eigenstates
N_st_diag : Number of states in which H is diagonalized. Assumed > sze
N_st_diag_in : Number of states in which H is diagonalized. Assumed > sze
Initial guess vectors are not necessarily orthonormal
@ -564,26 +564,29 @@ Subroutines / functions
.. hlist::
:columns: 3
* :c:data:`davidson_sze_max`
* :c:data:`psi_bilinear_matrix_order_reverse`
* :c:data:`psi_bilinear_matrix_values`
* :c:data:`nthreads_davidson`
* :c:data:`psi_coef`
* :c:data:`dressed_column_idx`
* :c:data:`expected_s2`
* :c:data:`distributed_davidson`
* :c:data:`s_z`
* :c:data:`psi_det_beta_unique`
* :c:data:`qp_max_mem`
* :c:data:`psi_bilinear_matrix_order_reverse`
* :c:data:`nuclear_repulsion`
* :c:data:`n_det`
* :c:data:`nthreads_davidson`
* :c:data:`dressing_column_h`
* :c:data:`only_expected_s2`
* :c:data:`psi_bilinear_matrix_values`
* :c:data:`n_int`
* :c:data:`nproc`
* :c:data:`ezfio_work_dir`
* :c:data:`davidson_sze_max`
* :c:data:`state_following`
* :c:data:`psi_det_alpha_unique`
* :c:data:`psi_coef`
* :c:data:`nuclear_repulsion`
* :c:data:`nproc`
* :c:data:`qp_max_mem`
* :c:data:`disk_based_davidson`
* :c:data:`s2_eig`
* :c:data:`psi_det_beta_unique`
* :c:data:`only_expected_s2`
* :c:data:`distributed_davidson`
* :c:data:`n_states`
* :c:data:`n_int`
Called by:
@ -597,6 +600,7 @@ Subroutines / functions
.. hlist::
:columns: 3
* :c:func:`c_f_pointer`
* :c:func:`check_mem`
* :c:func:`cpu_time`
* :c:func:`davidson_converged`
@ -605,10 +609,13 @@ Subroutines / functions
* :c:func:`h_s2_u_0_nstates_openmp`
* :c:func:`h_s2_u_0_nstates_zmq`
* :c:func:`lapack_diag`
* :c:func:`mmap`
* :c:func:`munmap`
* :c:func:`normalize`
* :c:func:`ortho_qr`
* :c:func:`random_number`
* :c:func:`resident_memory`
* :c:func:`sgemm`
* :c:func:`wall_time`
* :c:func:`write_double`
* :c:func:`write_int`
@ -619,6 +626,7 @@ Subroutines / functions
.. hlist::
:columns: 3
* :c:data:`n_states_diag`
* :c:data:`nthreads_davidson`
@ -674,6 +682,7 @@ Subroutines / functions
.. hlist::
:columns: 3
* :c:data:`n_states_diag`
* :c:data:`nthreads_davidson`
@ -769,6 +778,7 @@ Subroutines / functions
* :c:func:`davidson_slave_work`
* :c:func:`end_zmq_push_socket`
* :c:func:`end_zmq_to_qp_run_socket`
* :c:func:`sleep`
.. c:function:: davidson_slave_inproc:
@ -872,6 +882,11 @@ Subroutines / functions
File : :file:`davidson/diagonalize_ci.irp.f`
.. code:: fortran
subroutine diagonalize_CI
Replace the coefficients of the |CI| states by the coefficients of the
eigenstates of the |CI| matrix.
@ -885,7 +900,6 @@ Subroutines / functions
* :c:data:`n_states`
* :c:data:`n_det`
* :c:data:`ci_electronic_energy`
* :c:data:`psi_energy`
* :c:data:`ci_energy`
* :c:data:`ci_electronic_energy`
@ -903,12 +917,11 @@ Subroutines / functions
.. hlist::
:columns: 3
* :c:data:`ci_electronic_energy`
* :c:data:`ci_electronic_energy`
* :c:data:`ci_electronic_energy`
* :c:data:`ci_energy`
* :c:data:`ci_electronic_energy`
* :c:data:`psi_coef`
* :c:data:`psi_energy`
.. c:function:: h_s2_u_0_nstates_openmp:
@ -1314,6 +1327,13 @@ Subroutines / functions
* :c:func:`new_parallel_job`
* :c:func:`omp_set_nested`
Touches:
.. hlist::
:columns: 3
* :c:data:`n_states_diag`
.. c:function:: h_s2_u_0_two_e_nstates_openmp:
@ -1690,6 +1710,13 @@ Subroutines / functions
* :c:func:`h_s2_u_0_nstates_openmp`
* :c:func:`h_s2_u_0_nstates_zmq`
Touches:
.. hlist::
:columns: 3
* :c:data:`n_states_diag`
.. c:function:: u_0_h_u_0_two_e:

View File

@ -726,33 +726,6 @@ Providers
.. c:var:: mo_energy_expval
File : :file:`determinants/mo_energy_expval.irp.f`
.. code:: fortran
double precision, allocatable :: mo_energy_expval (N_states,mo_num,2,2)
Third index is spin.
Fourth index is 1:creation, 2:annihilation
Needs:
.. hlist::
:columns: 3
* :c:data:`mo_num`
* :c:data:`n_det`
* :c:data:`n_int`
* :c:data:`n_states`
* :c:data:`psi_coef`
* :c:data:`psi_det`
.. c:var:: n_det
@ -794,7 +767,6 @@ Providers
* :c:data:`h_apply_buffer_allocated`
* :c:data:`h_matrix_all_dets`
* :c:data:`max_degree_exc`
* :c:data:`mo_energy_expval`
* :c:data:`n_det_generators`
* :c:data:`n_det_selectors`
* :c:data:`one_e_dm_mo_alpha`
@ -2180,7 +2152,6 @@ Providers
* :c:data:`c0_weight`
* :c:data:`ci_electronic_energy`
* :c:data:`dressed_column_idx`
* :c:data:`mo_energy_expval`
* :c:data:`psi_average_norm_contrib`
* :c:data:`psi_bilinear_matrix_values`
* :c:data:`psi_cas`
@ -2386,7 +2357,6 @@ Providers
* :c:data:`diagonal_h_matrix_on_psi_det`
* :c:data:`h_matrix_all_dets`
* :c:data:`max_degree_exc`
* :c:data:`mo_energy_expval`
* :c:data:`one_e_dm_mo_alpha`
* :c:data:`psi_bilinear_matrix_values`
* :c:data:`psi_cas`
@ -3802,41 +3772,6 @@ Subroutines / functions
* :c:func:`get_d1`
.. c:function:: au0_h_au0:
File : :file:`determinants/mo_energy_expval.irp.f`
.. code:: fortran
subroutine au0_h_au0(energies,psi_in,psi_in_coef,ndet,dim_psi_coef)
Needs:
.. hlist::
:columns: 3
* :c:data:`n_states`
* :c:data:`n_int`
Called by:
.. hlist::
:columns: 3
* :c:data:`mo_energy_expval`
Calls:
.. hlist::
:columns: 3
* :c:func:`diag_h_mat_elem_au0_h_au0`
* :c:func:`i_h_j`
.. c:function:: bitstring_to_list_ab:
@ -3867,6 +3802,7 @@ Subroutines / functions
* :c:data:`fock_operator_closed_shell_ref_bitmask`
* :c:data:`fock_wee_closed_shell`
* :c:func:`get_mono_excitation_from_fock`
* :c:func:`get_occupation_from_dets`
* :c:func:`i_h_j`
* :c:func:`i_h_j_s2`
* :c:func:`i_h_j_two_e`
@ -3974,6 +3910,11 @@ Subroutines / functions
File : :file:`determinants/h_apply.irp.f`
.. code:: fortran
subroutine copy_H_apply_buffer_to_wf
Copies the H_apply buffer to psi_coef.
After calling this subroutine, N_det, psi_det and psi_coef need to be touched
@ -4074,9 +4015,7 @@ Subroutines / functions
* :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`
* :c:func:`perturb_buffer_qdpt`
Calls:
@ -4107,17 +4046,13 @@ Subroutines / functions
* :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`
* :c:func:`perturb_buffer_by_mono_qdpt`
* :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`
* :c:func:`perturb_buffer_qdpt`
@ -4141,17 +4076,13 @@ Subroutines / functions
* :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`
* :c:func:`perturb_buffer_by_mono_qdpt`
* :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`
* :c:func:`perturb_buffer_qdpt`
@ -4228,9 +4159,7 @@ Subroutines / functions
* :c:func:`diag_h_mat_elem_fock`
* :c:func:`example_determinants`
* :c:func:`pt2_h_core`
* :c:func:`pt2_moller_plesset`
* :c:func:`pt2_moller_plesset_general`
.. c:function:: decode_exc_spin:
@ -4345,42 +4274,6 @@ Subroutines / functions
* :c:func:`bitstring_to_list_ab`
.. c:function:: diag_h_mat_elem_au0_h_au0:
File : :file:`determinants/mo_energy_expval.irp.f`
.. code:: fortran
subroutine diag_H_mat_elem_au0_h_au0(det_in,Nint,hii)
Computes $\langle i|H|i \rangle$ for any determinant $|i\rangle$.
Used for wave functions with an additional electron.
Needs:
.. hlist::
:columns: 3
* :c:data:`mo_two_e_integrals_jj`
* :c:data:`mo_one_e_integrals`
Called by:
.. hlist::
:columns: 3
* :c:func:`au0_h_au0`
Calls:
.. hlist::
:columns: 3
* :c:func:`bitstring_to_list`
.. c:function:: diag_h_mat_elem_fock:
@ -4522,6 +4415,11 @@ Subroutines / functions
File : :file:`determinants/example.irp.f`
.. code:: fortran
subroutine example_determinants
subroutine that illustrates the main features available in determinants
Needs:
@ -4553,6 +4451,11 @@ Subroutines / functions
File : :file:`determinants/example.irp.f`
.. code:: fortran
subroutine example_determinants_psi_det
subroutine that illustrates the main features available in determinants using the psi_det/psi_coef
Needs:
@ -4699,6 +4602,11 @@ Subroutines / functions
File : :file:`determinants/spindeterminants.irp.f`
.. code:: fortran
subroutine generate_all_alpha_beta_det_products
Creates a wave function from all possible $\alpha \times \beta$ determinants
Needs:
@ -5313,9 +5221,7 @@ Subroutines / functions
* :c:func:`example_determinants`
* :c:func:`get_phase`
* :c:func:`pt2_h_core`
* :c:func:`pt2_moller_plesset`
* :c:func:`pt2_moller_plesset_general`
Calls:
@ -5358,7 +5264,6 @@ Subroutines / functions
* :c:data:`max_degree_exc`
* :c:data:`psi_non_cas`
* :c:func:`pt2_qdpt`
* :c:func:`repeat_all_e_corr`
.. c:function:: get_excitation_degree_spin:
@ -5645,6 +5550,37 @@ Subroutines / functions
* :c:data:`one_e_dm_mo_alpha`
.. c:function:: get_occupation_from_dets:
File : :file:`determinants/density_matrix.irp.f`
.. code:: fortran
subroutine get_occupation_from_dets(istate,occupation)
Returns the average occupation of the MOs
Needs:
.. hlist::
:columns: 3
* :c:data:`psi_coef`
* :c:data:`psi_det`
* :c:data:`n_int`
* :c:data:`n_det`
* :c:data:`mo_num`
Calls:
.. hlist::
:columns: 3
* :c:func:`bitstring_to_list_ab`
.. c:function:: get_phase:
@ -5774,9 +5710,7 @@ Subroutines / functions
* :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`
* :c:func:`perturb_buffer_qdpt`
Calls:
@ -5814,7 +5748,6 @@ Subroutines / functions
.. hlist::
:columns: 3
* :c:func:`au0_h_au0`
* :c:data:`coef_hf_selector`
* :c:func:`example_determinants`
* :c:func:`get_d0`
@ -6191,7 +6124,6 @@ Subroutines / functions
* :c:func:`pt2_dummy`
* :c:func:`pt2_epstein_nesbet`
* :c:func:`pt2_moller_plesset`
* :c:func:`pt2_moller_plesset_general`
* :c:func:`pt2_qdpt`
Calls:
@ -6333,6 +6265,11 @@ Subroutines / functions
File : :file:`determinants/occ_pattern.irp.f`
.. code:: fortran
subroutine make_s2_eigenfunction
Needs:
@ -6652,6 +6589,11 @@ Subroutines / functions
File : :file:`determinants/example.irp.f`
.. code:: fortran
subroutine routine_example_psi_det
subroutine that illustrates the main features available in determinants using many determinants
Needs:
@ -6750,6 +6692,11 @@ Subroutines / functions
File : :file:`determinants/density_matrix.irp.f`
.. code:: fortran
subroutine save_natural_mos
Save natural orbitals, obtained by diagonalization of the one-body density matrix in
the |MO| basis
@ -6781,6 +6728,11 @@ Subroutines / functions
File : :file:`determinants/determinants.irp.f`
.. code:: fortran
subroutine save_ref_determinant
Needs:
@ -6810,6 +6762,11 @@ Subroutines / functions
File : :file:`determinants/determinants.irp.f`
.. code:: fortran
subroutine save_wavefunction
Save the wave function into the |EZFIO| file
Needs:
@ -6957,6 +6914,11 @@ Subroutines / functions
File : :file:`determinants/determinants.irp.f`
.. code:: fortran
subroutine save_wavefunction_unsorted
Save the wave function into the |EZFIO| file
Needs:
@ -6983,6 +6945,11 @@ Subroutines / functions
File : :file:`determinants/density_matrix.irp.f`
.. code:: fortran
subroutine set_natural_mos
Set natural orbitals, obtained by diagonalization of the one-body density matrix
in the |MO| basis
@ -7247,6 +7214,11 @@ Subroutines / functions
File : :file:`determinants/spindeterminants.irp.f`
.. code:: fortran
subroutine write_spindeterminants
Needs:

View File

@ -138,6 +138,7 @@ Providers
* :c:data:`pt2_iterations`
* :c:data:`pt2_max`
* :c:data:`pt2_relative_error`
* :c:data:`qp_stop_filename`
* :c:data:`read_wf`
* :c:data:`s2_eig`
* :c:data:`scf_algorithm`
@ -171,6 +172,20 @@ Providers
.. c:var:: file_lock
File : :file:`ezfio_files/lock.irp.f`
.. code:: fortran
integer(omp_lock_kind) :: file_lock
OpenMP Lock for I/O
.. c:var:: output_cpu_time_0
@ -389,6 +404,75 @@ Providers
* :c:data:`used_weight`
.. c:var:: qp_kill_filename
File : :file:`ezfio_files/qp_stop.irp.f`
.. code:: fortran
character*(128) :: qp_stop_filename
character*(128) :: qp_kill_filename
integer :: qp_stop_variable
Name of the file to check for qp stop
Needs:
.. hlist::
:columns: 3
* :c:data:`ezfio_filename`
.. c:var:: qp_stop_filename
File : :file:`ezfio_files/qp_stop.irp.f`
.. code:: fortran
character*(128) :: qp_stop_filename
character*(128) :: qp_kill_filename
integer :: qp_stop_variable
Name of the file to check for qp stop
Needs:
.. hlist::
:columns: 3
* :c:data:`ezfio_filename`
.. c:var:: qp_stop_variable
File : :file:`ezfio_files/qp_stop.irp.f`
.. code:: fortran
character*(128) :: qp_stop_filename
character*(128) :: qp_kill_filename
integer :: qp_stop_variable
Name of the file to check for qp stop
Needs:
.. hlist::
:columns: 3
* :c:data:`ezfio_filename`
Subroutines / functions
-----------------------
@ -416,6 +500,26 @@ Subroutines / functions
.. c:function:: qp_stop:
File : :file:`ezfio_files/qp_stop.irp.f`
.. code:: fortran
logical function qp_stop()
Checks if the qp_stop command was invoked for the clean termination of the program
Needs:
.. hlist::
:columns: 3
* :c:data:`qp_stop_filename`
.. c:function:: write_bool:
@ -498,13 +602,11 @@ Subroutines / functions
.. hlist::
:columns: 3
* :c:data:`core_bitmask`
* :c:func:`davidson_diag_hjj_sjj`
* :c:data:`inact_bitmask`
* :c:func:`make_s2_eigenfunction`
* :c:data:`mo_num`
* :c:data:`n_act_orb`
* :c:data:`n_cas_bitmask`
* :c:data:`n_core_orb`
* :c:data:`n_det`
* :c:data:`n_det_generators`
* :c:data:`n_det_selectors`

View File

@ -80,25 +80,33 @@ Programs
Providers
---------
.. c:var:: nthreads_pt2
.. c:var:: do_ddci
File : :file:`fci/environment.irp.f`
File : :file:`fci/class.irp.f`
.. code:: fortran
integer :: nthreads_pt2
logical :: do_only_1h1p
logical :: do_ddci
Number of threads for Davidson
In the FCI case, all those are always false
Needs:
.. hlist::
:columns: 3
.. c:var:: do_only_1h1p
* :c:data:`mpi_master`
* :c:data:`nproc`
File : :file:`fci/class.irp.f`
.. code:: fortran
logical :: do_only_1h1p
logical :: do_ddci
In the FCI case, all those are always false

View File

@ -9,41 +9,14 @@ 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 :ref:`scf` program 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:
The Hartree-Fock algorithm is a |SCF| and therefore is based on the
:ref:`module_scf_utils`` module.
#. 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
The Fock matrix is defined in :file:`hartree_fock fock_matrix_hf.irp.f`.
@ -338,6 +311,11 @@ Subroutines / functions
File : :file:`hartree_fock/scf.irp.f`
.. code:: fortran
subroutine create_guess
Create a MO guess if no MOs are present in the EZFIO directory
Needs:
@ -384,6 +362,11 @@ Subroutines / functions
File : :file:`hartree_fock/scf.irp.f`
.. code:: fortran
subroutine run
Run SCF calculation
Needs:

View File

@ -105,6 +105,11 @@ Subroutines / functions