14
configure
vendored
@ -71,7 +71,7 @@ from collections import namedtuple
|
||||
|
||||
Info = namedtuple("Info", ["url", "description", "default_path"])
|
||||
|
||||
path_github = {"head": "http://github.com/", "tail": "archive/master.tar.gz"}
|
||||
path_github = {"head": "http://github.com", "tail": "archive/master.tar.gz"}
|
||||
|
||||
ocaml = Info(
|
||||
url='http://raw.github.com/ocaml/opam/master/shell/opam_installer.sh',
|
||||
@ -180,6 +180,8 @@ def check_output(*popenargs, **kwargs):
|
||||
cmd = popenargs[0]
|
||||
error = subprocess.CalledProcessError(retcode, cmd)
|
||||
error.output = output
|
||||
# print output
|
||||
# print unused_err
|
||||
raise error
|
||||
return output
|
||||
|
||||
@ -224,7 +226,7 @@ def checking(d_dependency):
|
||||
|
||||
return a
|
||||
|
||||
except subprocess.CalledProcessError:
|
||||
except (OSError,subprocess.CalledProcessError):
|
||||
default_path = d_info[binary].default_path
|
||||
if os.path.exists(default_path):
|
||||
return default_path
|
||||
@ -341,9 +343,9 @@ _|_ | | _> |_ (_| | | (_| |_ | (_) | |
|
||||
extension = splitext(url)[1]
|
||||
path_archive = "Downloads/{0}{1}".format("ninja", extension)
|
||||
|
||||
l_cmd = ["cd install &&",
|
||||
"wget {0} -O {1} -o /dev/null &&".format(url, path_archive),
|
||||
"./scripts/install_ninja.sh 2> /dev/null &&", "cd -"]
|
||||
l_cmd = ["set -x ;", "cd install &&",
|
||||
"wget {0} -O {1} &&".format(url, path_archive),
|
||||
"./scripts/install_ninja.sh &&", "cd -"]
|
||||
|
||||
try:
|
||||
check_output(" ".join(l_cmd), shell=True)
|
||||
@ -497,7 +499,7 @@ def recommendation():
|
||||
print "Now :"
|
||||
print " source {0}".format(path)
|
||||
print " ninja"
|
||||
print " cd ocaml; make "
|
||||
print " make -C ocaml"
|
||||
print ""
|
||||
print "PS : For more info on compiling the code, read the COMPILE_RUN.md file."
|
||||
|
||||
|
@ -17,7 +17,7 @@ Documentation
|
||||
Undocumented
|
||||
|
||||
|
||||
`h_apply_cas_sd <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L408>`_
|
||||
`h_apply_cas_sd <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L414>`_
|
||||
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.
|
||||
|
||||
@ -28,58 +28,58 @@ Documentation
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cas_sd_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L264>`_
|
||||
`h_apply_cas_sd_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L269>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cas_sd_pt2 <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L2586>`_
|
||||
`h_apply_cas_sd_pt2 <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L2610>`_
|
||||
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.
|
||||
|
||||
|
||||
`h_apply_cas_sd_pt2_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L2100>`_
|
||||
`h_apply_cas_sd_pt2_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L2118>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cas_sd_pt2_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L2404>`_
|
||||
`h_apply_cas_sd_pt2_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L2427>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cas_sd_selected <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L1854>`_
|
||||
`h_apply_cas_sd_selected <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L1872>`_
|
||||
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.
|
||||
|
||||
|
||||
`h_apply_cas_sd_selected_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L1334>`_
|
||||
`h_apply_cas_sd_selected_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L1346>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cas_sd_selected_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L1658>`_
|
||||
`h_apply_cas_sd_selected_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L1675>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cas_sd_selected_no_skip <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L1116>`_
|
||||
`h_apply_cas_sd_selected_no_skip <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L1128>`_
|
||||
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.
|
||||
|
||||
|
||||
`h_apply_cas_sd_selected_no_skip_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L596>`_
|
||||
`h_apply_cas_sd_selected_no_skip_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L602>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cas_sd_selected_no_skip_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L920>`_
|
||||
`h_apply_cas_sd_selected_no_skip_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L931>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
@ -17,7 +17,7 @@ Documentation
|
||||
Undocumented
|
||||
|
||||
|
||||
`h_apply_cis <http://github.com/LCPQ/quantum_package/tree/master/src/CIS/H_apply.irp.f_shell_8#L408>`_
|
||||
`h_apply_cis <http://github.com/LCPQ/quantum_package/tree/master/src/CIS/H_apply.irp.f_shell_8#L414>`_
|
||||
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.
|
||||
|
||||
@ -28,7 +28,7 @@ Documentation
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cis_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CIS/H_apply.irp.f_shell_8#L264>`_
|
||||
`h_apply_cis_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CIS/H_apply.irp.f_shell_8#L269>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
@ -2,8 +2,8 @@ program cis
|
||||
implicit none
|
||||
integer :: i
|
||||
|
||||
print *, 'HF = ', HF_energy
|
||||
print *, 'N_states = ', N_states
|
||||
! print *, 'HF = ', HF_energy
|
||||
! print *, 'N_states = ', N_states
|
||||
call H_apply_cis
|
||||
print *, 'N_det = ', N_det
|
||||
do i = 1,N_states
|
||||
|
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 84 KiB |
@ -26,7 +26,7 @@ Documentation
|
||||
.. Do not edit this section. It was auto-generated from the
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
`h_apply_cisd <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_8#L408>`_
|
||||
`h_apply_cisd <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_8#L414>`_
|
||||
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.
|
||||
|
||||
@ -37,164 +37,7 @@ Documentation
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_8#L264>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f#L13>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
`h_apply_cisd_selection_delta_rho_one_point <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_10#L1287>`_
|
||||
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.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_delta_rho_one_point_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_10#L767>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_delta_rho_one_point_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_10#L1091>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_dipole_moment_z <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_10#L6649>`_
|
||||
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.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_dipole_moment_z_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_10#L6129>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_dipole_moment_z_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_10#L6453>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_10#L5117>`_
|
||||
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.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_2x2 <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_10#L5883>`_
|
||||
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.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_2x2_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_10#L5363>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_2x2_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_10#L5687>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_10#L4597>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_10#L4921>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2 <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_10#L4351>`_
|
||||
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.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_10#L3831>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_10#L4155>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_10#L3585>`_
|
||||
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.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_10#L3065>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_10#L3389>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_projected <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_10#L2819>`_
|
||||
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.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_projected_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_10#L2299>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_projected_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_10#L2623>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_h_core <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_10#L2053>`_
|
||||
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.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_h_core_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_10#L1533>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_h_core_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_10#L1857>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_moller_plesset <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_10#L521>`_
|
||||
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.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_moller_plesset_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_10#L1>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_moller_plesset_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_10#L325>`_
|
||||
`h_apply_cisd_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD/H_apply.irp.f_shell_8#L269>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 84 KiB |
@ -8,158 +8,162 @@ Documentation
|
||||
.. Do not edit this section. It was auto-generated from the
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
`cisd <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/cisd_selection.irp.f#L1>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
`h_apply_cisd_selection <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f#L13>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
`h_apply_cisd_selection_delta_rho_one_point <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L1287>`_
|
||||
`h_apply_cisd_selection_delta_rho_one_point <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L5931>`_
|
||||
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.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_delta_rho_one_point_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L767>`_
|
||||
`h_apply_cisd_selection_delta_rho_one_point_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L5405>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_delta_rho_one_point_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L1091>`_
|
||||
`h_apply_cisd_selection_delta_rho_one_point_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L5734>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_dipole_moment_z <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L6649>`_
|
||||
`h_apply_cisd_selection_dipole_moment_z <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L5159>`_
|
||||
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.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_dipole_moment_z_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L6129>`_
|
||||
`h_apply_cisd_selection_dipole_moment_z_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L4633>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_dipole_moment_z_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L6453>`_
|
||||
`h_apply_cisd_selection_dipole_moment_z_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L4962>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L5117>`_
|
||||
`h_apply_cisd_selection_epstein_nesbet <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L3615>`_
|
||||
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.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_2x2 <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L5883>`_
|
||||
`h_apply_cisd_selection_epstein_nesbet_2x2 <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L4387>`_
|
||||
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.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_2x2_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L5363>`_
|
||||
`h_apply_cisd_selection_epstein_nesbet_2x2_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L3861>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_2x2_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L5687>`_
|
||||
`h_apply_cisd_selection_epstein_nesbet_2x2_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L4190>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L4597>`_
|
||||
`h_apply_cisd_selection_epstein_nesbet_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L3089>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L4921>`_
|
||||
`h_apply_cisd_selection_epstein_nesbet_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L3418>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2 <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L4351>`_
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2 <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L2843>`_
|
||||
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.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L3831>`_
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L2317>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L4155>`_
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L2646>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L3585>`_
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L2071>`_
|
||||
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.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L3065>`_
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L1545>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L3389>`_
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L1874>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_projected <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L2819>`_
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_projected <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L1299>`_
|
||||
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.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_projected_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L2299>`_
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_projected_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L773>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_projected_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L2623>`_
|
||||
`h_apply_cisd_selection_epstein_nesbet_sc2_projected_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L1102>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_h_core <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L2053>`_
|
||||
`h_apply_cisd_selection_h_core <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L527>`_
|
||||
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.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_h_core_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L1533>`_
|
||||
`h_apply_cisd_selection_h_core_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L1>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_h_core_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L1857>`_
|
||||
`h_apply_cisd_selection_h_core_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L330>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_moller_plesset <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L521>`_
|
||||
`h_apply_cisd_selection_moller_plesset <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L6703>`_
|
||||
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.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_moller_plesset_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L1>`_
|
||||
`h_apply_cisd_selection_moller_plesset_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L6177>`_
|
||||
Generate all double excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_cisd_selection_moller_plesset_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L325>`_
|
||||
`h_apply_cisd_selection_moller_plesset_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L6506>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 102 KiB |
@ -21,19 +21,19 @@ Documentation
|
||||
.. Do not edit this section. It was auto-generated from the
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
`ci_eigenvectors_dressed <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L76>`_
|
||||
`ci_eigenvectors_dressed <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L166>`_
|
||||
Eigenvectors/values of the CI matrix
|
||||
|
||||
|
||||
`ci_eigenvectors_s2_dressed <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L77>`_
|
||||
`ci_eigenvectors_s2_dressed <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L167>`_
|
||||
Eigenvectors/values of the CI matrix
|
||||
|
||||
|
||||
`ci_electronic_energy_dressed <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L75>`_
|
||||
`ci_electronic_energy_dressed <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L165>`_
|
||||
Eigenvectors/values of the CI matrix
|
||||
|
||||
|
||||
`ci_energy_dressed <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L142>`_
|
||||
`ci_energy_dressed <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L232>`_
|
||||
N_states lowest eigenvalues of the dressed CI matrix
|
||||
|
||||
|
||||
@ -77,15 +77,15 @@ Documentation
|
||||
Initial guess vectors are not necessarily orthonormal
|
||||
|
||||
|
||||
`delta_ii <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L39>`_
|
||||
`delta_ii <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L104>`_
|
||||
Dressing matrix in N_det basis
|
||||
|
||||
|
||||
`delta_ij <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L38>`_
|
||||
`delta_ij <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L103>`_
|
||||
Dressing matrix in N_det basis
|
||||
|
||||
|
||||
`diagonalize_ci_dressed <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L157>`_
|
||||
`diagonalize_ci_dressed <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L247>`_
|
||||
Replace the coefficients of the CI states by the coefficients of the
|
||||
eigenstates of the CI matrix
|
||||
|
||||
@ -94,7 +94,7 @@ Documentation
|
||||
Undocumented
|
||||
|
||||
|
||||
`h_apply_mrcc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/H_apply.irp.f_shell_27#L416>`_
|
||||
`h_apply_mrcc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/H_apply.irp.f_shell_27#L422>`_
|
||||
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.
|
||||
|
||||
@ -105,13 +105,13 @@ Documentation
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_apply_mrcc_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/H_apply.irp.f_shell_27#L268>`_
|
||||
`h_apply_mrcc_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/H_apply.irp.f_shell_27#L273>`_
|
||||
Generate all single excitations of key_in using the bit masks of holes and
|
||||
particles.
|
||||
Assume N_int is already provided.
|
||||
|
||||
|
||||
`h_matrix_dressed <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L50>`_
|
||||
`h_matrix_dressed <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L140>`_
|
||||
Dressed H with Delta_ij
|
||||
|
||||
|
||||
@ -123,11 +123,15 @@ Documentation
|
||||
H_jj : array of <j|H|j>
|
||||
|
||||
|
||||
`lambda_mrcc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L1>`_
|
||||
`lambda_mrcc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L5>`_
|
||||
cm/<Psi_0|H|D_m> or perturbative 1/Delta_E(m)
|
||||
|
||||
|
||||
`lambda_pert <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L2>`_
|
||||
`lambda_mrcc_tmp <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L81>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
`lambda_pert <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L6>`_
|
||||
cm/<Psi_0|H|D_m> or perturbative 1/Delta_E(m)
|
||||
|
||||
|
||||
@ -139,6 +143,18 @@ Documentation
|
||||
Undocumented
|
||||
|
||||
|
||||
`mrcc_iterations <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_general.irp.f#L7>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
`oscillations <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L86>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
`pert_determinants <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L1>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
`psi_ref_lock <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_dress.irp.f#L3>`_
|
||||
Locks on ref determinants to fill delta_ij
|
||||
|
||||
@ -146,3 +162,7 @@ Documentation
|
||||
`run_mrcc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_general.irp.f#L1>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
`set_generators_bitmasks_as_holes_and_particles <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_general.irp.f#L69>`_
|
||||
Undocumented
|
||||
|
||||
|
@ -1,13 +1,23 @@
|
||||
subroutine run_mrcc
|
||||
implicit none
|
||||
call set_generators_bitmasks_as_holes_and_particles
|
||||
call mrcc_iterations
|
||||
end
|
||||
|
||||
subroutine mrcc_iterations
|
||||
implicit none
|
||||
|
||||
integer :: i,j
|
||||
|
||||
double precision :: E_new, E_old, delta_e
|
||||
integer :: iteration
|
||||
integer :: iteration,i_oscillations
|
||||
double precision :: E_past(4)
|
||||
E_new = 0.d0
|
||||
delta_E = 1.d0
|
||||
iteration = 0
|
||||
do while (delta_E > 1.d-10)
|
||||
j = 1
|
||||
i_oscillations = 0
|
||||
do while (delta_E > 1.d-7)
|
||||
iteration += 1
|
||||
print *, '==========================='
|
||||
print *, 'MRCC Iteration', iteration
|
||||
@ -18,12 +28,70 @@ subroutine run_mrcc
|
||||
call diagonalize_ci_dressed
|
||||
E_new = sum(ci_energy_dressed)
|
||||
delta_E = dabs(E_new - E_old)
|
||||
if (iteration > 20) then
|
||||
|
||||
E_past(j) = E_new
|
||||
j +=1
|
||||
if(j>4)then
|
||||
j=1
|
||||
endif
|
||||
if(iteration > 4) then
|
||||
if(delta_E > 1.d-10)then
|
||||
if(dabs(E_past(1) - E_past(3)) .le. delta_E .and. dabs(E_past(2) - E_past(4)).le. delta_E)then
|
||||
print*,'OSCILLATIONS !!!'
|
||||
oscillations = .True.
|
||||
i_oscillations +=1
|
||||
lambda_mrcc_tmp = lambda_mrcc
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
call save_wavefunction
|
||||
! if (i_oscillations > 5) then
|
||||
! exit
|
||||
! endif
|
||||
if (iteration > 200) then
|
||||
exit
|
||||
endif
|
||||
print*,'------------'
|
||||
print*,'VECTOR'
|
||||
do i = 1, N_det_ref
|
||||
print*,''
|
||||
print*,'psi_ref_coef(i,1) = ',psi_ref_coef(i,1)
|
||||
print*,'delta_ii(i,1) = ',delta_ii(i,1)
|
||||
enddo
|
||||
print*,'------------'
|
||||
enddo
|
||||
call write_double(6,ci_energy_dressed(1),"Final MRCC energy")
|
||||
call ezfio_set_mrcc_energy(ci_energy_dressed(1))
|
||||
call ezfio_set_mrcc_cassd_energy(ci_energy_dressed(1))
|
||||
call save_wavefunction
|
||||
|
||||
end
|
||||
|
||||
subroutine set_generators_bitmasks_as_holes_and_particles
|
||||
implicit none
|
||||
integer :: i,k
|
||||
do k = 1, N_generators_bitmask
|
||||
do i = 1, N_int
|
||||
! Pure single part
|
||||
generators_bitmask(i,1,1,k) = holes_operators(i,1) ! holes for pure single exc alpha
|
||||
generators_bitmask(i,1,2,k) = particles_operators(i,1) ! particles for pure single exc alpha
|
||||
generators_bitmask(i,2,1,k) = holes_operators(i,2) ! holes for pure single exc beta
|
||||
generators_bitmask(i,2,2,k) = particles_operators(i,2) ! particles for pure single exc beta
|
||||
|
||||
! Double excitation
|
||||
generators_bitmask(i,1,3,k) = holes_operators(i,1) ! holes for first single exc alpha
|
||||
generators_bitmask(i,1,4,k) = particles_operators(i,1) ! particles for first single exc alpha
|
||||
generators_bitmask(i,2,3,k) = holes_operators(i,2) ! holes for first single exc beta
|
||||
generators_bitmask(i,2,4,k) = particles_operators(i,2) ! particles for first single exc beta
|
||||
|
||||
generators_bitmask(i,1,5,k) = holes_operators(i,1) ! holes for second single exc alpha
|
||||
generators_bitmask(i,1,6,k) = particles_operators(i,1) ! particles for second single exc alpha
|
||||
generators_bitmask(i,2,5,k) = holes_operators(i,2) ! holes for second single exc beta
|
||||
generators_bitmask(i,2,6,k) = particles_operators(i,2) ! particles for second single exc beta
|
||||
|
||||
enddo
|
||||
enddo
|
||||
touch generators_bitmask
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
@ -1,26 +1,91 @@
|
||||
BEGIN_PROVIDER [integer, pert_determinants, (N_states, psi_det_size) ]
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ double precision, lambda_mrcc, (N_states,psi_det_size) ]
|
||||
&BEGIN_PROVIDER [ double precision, lambda_pert, (N_states,psi_det_size) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! cm/<Psi_0|H|D_m> or perturbative 1/Delta_E(m)
|
||||
END_DOC
|
||||
integer :: i,k
|
||||
double precision :: ihpsi(N_states), hii
|
||||
integer :: i,k,j
|
||||
double precision :: ihpsi(N_states), hii,delta_e_eff,ihpsi_current(N_states),hij
|
||||
integer :: i_ok,i_pert,i_pert_count
|
||||
i_ok = 0
|
||||
|
||||
double precision :: phase_restart(N_states),tmp
|
||||
do k = 1, N_states
|
||||
phase_restart(k) = dsign(1.d0,psi_ref_coef_restart(1,k)/psi_ref_coef(1,k))
|
||||
enddo
|
||||
i_pert_count = 0
|
||||
|
||||
do i=1,N_det_non_ref
|
||||
call i_h_psi(psi_non_ref(1,1,i), psi_ref, psi_ref_coef, N_int, N_det_ref,&
|
||||
size(psi_ref_coef,1), n_states, ihpsi)
|
||||
call i_h_j(psi_non_ref(1,1,i),psi_non_ref(1,1,i),N_int,hii)
|
||||
call i_h_psi(psi_non_ref(1,1,i), psi_ref_restart, psi_ref_coef_restart, N_int, N_det_ref,&
|
||||
size(psi_ref_coef_restart,1), n_states, ihpsi)
|
||||
call i_H_j(psi_non_ref(1,1,i),psi_non_ref(1,1,i),N_int,hii)
|
||||
do k=1,N_states
|
||||
lambda_pert(k,i) = 1.d0 / (psi_ref_energy_diagonalized(k)-hii)
|
||||
if (dabs(ihpsi(k)).le.1.d-3) then
|
||||
call i_h_psi(psi_non_ref(1,1,i), psi_ref, psi_ref_coef, N_int, N_det_ref,size(psi_ref_coef,1), n_states, ihpsi_current)
|
||||
tmp = psi_non_ref_coef(i,k)/ihpsi_current(k)
|
||||
i_pert = 1
|
||||
if((ihpsi(k) * lambda_pert(k,i))/psi_non_ref_coef_restart(i,k) .ge. 0.5d0 &
|
||||
.and. (ihpsi(k) * lambda_pert(k,i))/psi_non_ref_coef_restart(i,k) > 0.d0 )then ! test on the first order coefficient
|
||||
i_pert = 0
|
||||
endif
|
||||
do j = 1, N_det_ref
|
||||
call i_H_j(psi_non_ref(1,1,i),psi_ref(1,1,j),N_int,hij)
|
||||
if(dabs(hij * tmp).ge.0.5d0)then
|
||||
i_pert_count +=1
|
||||
i_pert = 1
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
if( i_pert == 1)then
|
||||
pert_determinants(k,i) = i_pert
|
||||
endif
|
||||
if(pert_determinants(k,i) == 1)then
|
||||
i_ok +=1
|
||||
lambda_mrcc(k,i) = lambda_pert(k,i)
|
||||
else
|
||||
lambda_mrcc(k,i) = psi_non_ref_coef(i,k)/ihpsi(k)
|
||||
lambda_mrcc(k,i) = psi_non_ref_coef(i,k)/ihpsi_current(k)
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
!if(oscillations)then
|
||||
! print*,'AVERAGING the lambda_mrcc with those of the previous iterations'
|
||||
! do i = 1, N_det_non_ref
|
||||
! do k = 1, N_states
|
||||
|
||||
! double precision :: tmp
|
||||
! tmp = lambda_mrcc(k,i)
|
||||
! lambda_mrcc(k,i) += lambda_mrcc_tmp(k,i)
|
||||
! lambda_mrcc(k,i) = lambda_mrcc(k,i) * 0.5d0
|
||||
! if(dabs(tmp - lambda_mrcc(k,i)).ge.1.d-9)then
|
||||
! print*,''
|
||||
! print*,'i = ',i
|
||||
! print*,'psi_non_ref_coef(i,k) = ',psi_non_ref_coef(i,k)
|
||||
! print*,'lambda_mrcc(k,i) = ',lambda_mrcc(k,i)
|
||||
! print*,' tmp = ',tmp
|
||||
! endif
|
||||
! enddo
|
||||
! enddo
|
||||
!endif
|
||||
print*,'N_det_non_ref = ',N_det_non_ref
|
||||
print*,'Number of Perturbatively treated determinants = ',i_ok
|
||||
print*,'i_pert_count = ',i_pert_count
|
||||
print*,'psi_coef_ref_ratio = ',psi_ref_coef(2,1)/psi_ref_coef(1,1)
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ double precision, lambda_mrcc_tmp, (N_states,psi_det_size) ]
|
||||
implicit none
|
||||
lambda_mrcc_tmp = 0.d0
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ logical, oscillations ]
|
||||
implicit none
|
||||
oscillations = .False.
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
@ -45,6 +110,31 @@ END_PROVIDER
|
||||
delta_ij = 0.d0
|
||||
delta_ii = 0.d0
|
||||
call H_apply_mrcc(delta_ij,delta_ii,N_det_ref,N_det_non_ref)
|
||||
double precision :: max_delta
|
||||
double precision :: accu
|
||||
integer :: imax,jmax
|
||||
max_delta = 0.d0
|
||||
accu = 0.d0
|
||||
do i = 1, N_det_ref
|
||||
do j = 1, N_det_non_ref
|
||||
accu += psi_non_ref_coef(j,1) * psi_ref_coef(i,1) * delta_ij(i,j,1)
|
||||
if(dabs(delta_ij(i,j,1)).gt.max_delta)then
|
||||
max_delta = dabs(delta_ij(i,j,1))
|
||||
imax = i
|
||||
jmax = j
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
print*,''
|
||||
print*,''
|
||||
print*,'<psi| Delta H |psi> = ',accu
|
||||
print*,'MAX VAL OF DRESING = ',delta_ij(imax,jmax,1)
|
||||
print*,'imax,jmax = ',imax,jmax
|
||||
print*,'psi_ref_coef(imax,1) = ',psi_ref_coef(imax,1)
|
||||
print*,'psi_non_ref_coef(jmax,1) = ',psi_non_ref_coef(jmax,1)
|
||||
do i = 1, N_det_ref
|
||||
print*,'delta_ii(i,1) = ',delta_ii(i,1)
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ double precision, h_matrix_dressed, (N_det,N_det,N_states) ]
|
||||
@ -63,7 +153,7 @@ BEGIN_PROVIDER [ double precision, h_matrix_dressed, (N_det,N_det,N_states) ]
|
||||
i =idx_ref(ii)
|
||||
h_matrix_dressed(i,i,istate) += delta_ii(ii,istate)
|
||||
do jj = 1, N_det_non_ref
|
||||
j =idx_ref(jj)
|
||||
j =idx_non_ref(jj)
|
||||
h_matrix_dressed(i,j,istate) += delta_ij(ii,jj,istate)
|
||||
h_matrix_dressed(j,i,istate) += delta_ij(ii,jj,istate)
|
||||
enddo
|
||||
|
4
plugins/MRCC_Utils_new/EZFIO.cfg
Normal file
@ -0,0 +1,4 @@
|
||||
[energy]
|
||||
type: double precision
|
||||
doc: Calculated MRCC energy
|
||||
interface: ezfio
|
1
plugins/MRCC_Utils_new/NEEDED_CHILDREN_MODULES
Normal file
@ -0,0 +1 @@
|
||||
Perturbation Selectors_full Generators_full Psiref_Utils
|
168
plugins/MRCC_Utils_new/README.rst
Normal file
@ -0,0 +1,168 @@
|
||||
===========
|
||||
MRCC Module
|
||||
===========
|
||||
|
||||
Multi-Reference Coupled Cluster.
|
||||
|
||||
Needed Modules
|
||||
==============
|
||||
|
||||
.. Do not edit this section. It was auto-generated from the
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
.. image:: tree_dependency.png
|
||||
|
||||
* `Perturbation <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation>`_
|
||||
* `Selectors_full <http://github.com/LCPQ/quantum_package/tree/master/src/Selectors_full>`_
|
||||
* `Generators_full <http://github.com/LCPQ/quantum_package/tree/master/src/Generators_full>`_
|
||||
* `Psiref_Utils <http://github.com/LCPQ/quantum_package/tree/master/src/Psiref_Utils>`_
|
||||
|
||||
Documentation
|
||||
=============
|
||||
|
||||
.. Do not edit this section. It was auto-generated from the
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
`apply_excitation_operator <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils_new/mrcc_dress.irp.f#L132>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
`ci_eigenvectors_dressed <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils_new/mrcc_utils.irp.f#L84>`_
|
||||
Eigenvectors/values of the CI matrix
|
||||
|
||||
|
||||
`ci_eigenvectors_s2_dressed <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils_new/mrcc_utils.irp.f#L85>`_
|
||||
Eigenvectors/values of the CI matrix
|
||||
|
||||
|
||||
`ci_electronic_energy_dressed <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils_new/mrcc_utils.irp.f#L83>`_
|
||||
Eigenvectors/values of the CI matrix
|
||||
|
||||
|
||||
`ci_energy_dressed <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils_new/mrcc_utils.irp.f#L150>`_
|
||||
N_states lowest eigenvalues of the dressed CI matrix
|
||||
|
||||
|
||||
`davidson_diag_hjj_mrcc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils_new/davidson.irp.f#L56>`_
|
||||
Davidson diagonalization with specific diagonal elements of the H matrix
|
||||
.br
|
||||
H_jj : specific diagonal H matrix elements to diagonalize de Davidson
|
||||
.br
|
||||
dets_in : bitmasks corresponding to determinants
|
||||
.br
|
||||
u_in : guess coefficients on the various states. Overwritten
|
||||
on exit
|
||||
.br
|
||||
dim_in : leftmost dimension of u_in
|
||||
.br
|
||||
sze : Number of determinants
|
||||
.br
|
||||
N_st : Number of eigenstates
|
||||
.br
|
||||
iunit : Unit for the I/O
|
||||
.br
|
||||
Initial guess vectors are not necessarily orthonormal
|
||||
|
||||
|
||||
`davidson_diag_mrcc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils_new/davidson.irp.f#L1>`_
|
||||
Davidson diagonalization.
|
||||
.br
|
||||
dets_in : bitmasks corresponding to determinants
|
||||
.br
|
||||
u_in : guess coefficients on the various states. Overwritten
|
||||
on exit
|
||||
.br
|
||||
dim_in : leftmost dimension of u_in
|
||||
.br
|
||||
sze : Number of determinants
|
||||
.br
|
||||
N_st : Number of eigenstates
|
||||
.br
|
||||
iunit : Unit number for the I/O
|
||||
.br
|
||||
Initial guess vectors are not necessarily orthonormal
|
||||
|
||||
|
||||
`delta_ii <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils_new/mrcc_utils.irp.f#L45>`_
|
||||
Dressing matrix in N_det basis
|
||||
|
||||
|
||||
`delta_ij <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils_new/mrcc_utils.irp.f#L44>`_
|
||||
Dressing matrix in N_det basis
|
||||
|
||||
|
||||
`diagonalize_ci_dressed <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils_new/mrcc_utils.irp.f#L165>`_
|
||||
Replace the coefficients of the CI states by the coefficients of the
|
||||
eigenstates of the CI matrix
|
||||
|
||||
|
||||
`get_excitation_operators_for_one_ref <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils_new/mrcc_amplitudes.irp.f#L1>`_
|
||||
This subroutine provides all the amplitudes and excitation operators
|
||||
that one needs to go from the reference to the non reference wave function
|
||||
you enter with det_ref that is a reference determinant
|
||||
.br
|
||||
N_connect_ref is the number of determinants belonging to psi_non_ref
|
||||
that are connected to det_ref.
|
||||
.br
|
||||
amplitudes_phase_less(i) = amplitude phase less t_{I->i} = <I|H|i> * lambda_mrcc(i) * phase(I->i)
|
||||
.br
|
||||
excitation_operators(:,i) represents the holes and particles that
|
||||
link the ith connected determinant to det_ref
|
||||
if ::
|
||||
excitation_operators(5,i) = 2 :: double excitation alpha
|
||||
excitation_operators(5,i) = -2 :: double excitation beta
|
||||
!! excitation_operators(1,i) :: hole 1
|
||||
!! excitation_operators(2,i) :: particle 1
|
||||
!! excitation_operators(3,i) :: hole 2
|
||||
!! excitation_operators(4,i) :: particle 2
|
||||
else if ::
|
||||
excitation_operators(5,i) = 1 :: single excitation alpha
|
||||
!! excitation_operators(1,i) :: hole 1
|
||||
!! excitation_operators(2,i) :: particle 1
|
||||
else if ::
|
||||
excitation_operators(5,i) = -1 :: single excitation beta
|
||||
!! excitation_operators(3,i) :: hole 1
|
||||
!! excitation_operators(4,i) :: particle 1
|
||||
else if ::
|
||||
!! excitation_operators(5,i) = 0 :: double excitation alpha/beta
|
||||
!! excitation_operators(1,i) :: hole 1 alpha
|
||||
!! excitation_operators(2,i) :: particle 1 alpha
|
||||
!! excitation_operators(3,i) :: hole 2 beta
|
||||
!! excitation_operators(4,i) :: particle 2 beta
|
||||
|
||||
|
||||
`h_matrix_dressed <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils_new/mrcc_utils.irp.f#L58>`_
|
||||
Dressed H with Delta_ij
|
||||
|
||||
|
||||
`h_u_0_mrcc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils_new/davidson.irp.f#L360>`_
|
||||
Computes v_0 = H|u_0>
|
||||
.br
|
||||
n : number of determinants
|
||||
.br
|
||||
H_jj : array of <j|H|j>
|
||||
|
||||
|
||||
`lambda_mrcc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils_new/mrcc_utils.irp.f#L1>`_
|
||||
cm/<Psi_0|H|D_m> or perturbative 1/Delta_E(m)
|
||||
|
||||
|
||||
`lambda_pert <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils_new/mrcc_utils.irp.f#L2>`_
|
||||
cm/<Psi_0|H|D_m> or perturbative 1/Delta_E(m)
|
||||
|
||||
|
||||
`mrcc_dress <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils_new/mrcc_dress.irp.f#L1>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
`mrcc_iterations <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils_new/mrcc_general.irp.f#L7>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
`run_mrcc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils_new/mrcc_general.irp.f#L1>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
`set_generators_bitmasks_as_holes_and_particles <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils_new/mrcc_general.irp.f#L39>`_
|
||||
Undocumented
|
||||
|
430
plugins/MRCC_Utils_new/davidson.irp.f
Normal file
@ -0,0 +1,430 @@
|
||||
subroutine davidson_diag_mrcc(dets_in,u_in,energies,dim_in,sze,N_st,Nint,iunit,istate)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! 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
|
||||
!
|
||||
! iunit : Unit number for the I/O
|
||||
!
|
||||
! Initial guess vectors are not necessarily orthonormal
|
||||
END_DOC
|
||||
integer, intent(in) :: dim_in, sze, N_st, Nint, iunit, istate
|
||||
integer(bit_kind), intent(in) :: dets_in(Nint,2,sze)
|
||||
double precision, intent(inout) :: u_in(dim_in,N_st)
|
||||
double precision, intent(out) :: energies(N_st)
|
||||
double precision, allocatable :: H_jj(:)
|
||||
|
||||
double precision :: diag_h_mat_elem
|
||||
integer :: i
|
||||
ASSERT (N_st > 0)
|
||||
ASSERT (sze > 0)
|
||||
ASSERT (Nint > 0)
|
||||
ASSERT (Nint == N_int)
|
||||
PROVIDE mo_bielec_integrals_in_map
|
||||
allocate(H_jj(sze))
|
||||
|
||||
!$OMP PARALLEL DEFAULT(NONE) &
|
||||
!$OMP SHARED(sze,H_jj,N_det_ref,dets_in,Nint,istate,delta_ii,idx_ref) &
|
||||
!$OMP PRIVATE(i)
|
||||
!$OMP DO SCHEDULE(guided)
|
||||
do i=1,sze
|
||||
H_jj(i) = diag_h_mat_elem(dets_in(1,1,i),Nint)
|
||||
enddo
|
||||
!$OMP END DO
|
||||
!$OMP DO SCHEDULE(guided)
|
||||
do i=1,N_det_ref
|
||||
H_jj(idx_ref(i)) += delta_ii(i,istate)
|
||||
enddo
|
||||
!$OMP END DO
|
||||
!$OMP END PARALLEL
|
||||
|
||||
call davidson_diag_hjj_mrcc(dets_in,u_in,H_jj,energies,dim_in,sze,N_st,Nint,iunit,istate)
|
||||
deallocate (H_jj)
|
||||
end
|
||||
|
||||
subroutine davidson_diag_hjj_mrcc(dets_in,u_in,H_jj,energies,dim_in,sze,N_st,Nint,iunit,istate)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Davidson diagonalization with specific diagonal elements of the H matrix
|
||||
!
|
||||
! H_jj : specific diagonal H matrix elements to diagonalize de Davidson
|
||||
!
|
||||
! 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
|
||||
!
|
||||
! iunit : Unit for the I/O
|
||||
!
|
||||
! Initial guess vectors are not necessarily orthonormal
|
||||
END_DOC
|
||||
integer, intent(in) :: dim_in, sze, N_st, Nint, istate
|
||||
integer(bit_kind), intent(in) :: dets_in(Nint,2,sze)
|
||||
double precision, intent(in) :: H_jj(sze)
|
||||
integer, intent(in) :: iunit
|
||||
double precision, intent(inout) :: u_in(dim_in,N_st)
|
||||
double precision, intent(out) :: energies(N_st)
|
||||
|
||||
integer :: iter
|
||||
integer :: i,j,k,l,m
|
||||
logical :: converged
|
||||
|
||||
double precision :: overlap(N_st,N_st)
|
||||
double precision :: u_dot_v, u_dot_u
|
||||
|
||||
integer, allocatable :: kl_pairs(:,:)
|
||||
integer :: k_pairs, kl
|
||||
|
||||
integer :: iter2
|
||||
double precision, allocatable :: W(:,:,:), U(:,:,:), R(:,:)
|
||||
double precision, allocatable :: y(:,:,:,:), h(:,:,:,:), lambda(:)
|
||||
double precision :: diag_h_mat_elem
|
||||
double precision :: residual_norm(N_st)
|
||||
character*(16384) :: write_buffer
|
||||
double precision :: to_print(2,N_st)
|
||||
double precision :: cpu, wall
|
||||
|
||||
PROVIDE det_connections
|
||||
|
||||
call write_time(iunit)
|
||||
call wall_time(wall)
|
||||
call cpu_time(cpu)
|
||||
write(iunit,'(A)') ''
|
||||
write(iunit,'(A)') 'Davidson Diagonalization'
|
||||
write(iunit,'(A)') '------------------------'
|
||||
write(iunit,'(A)') ''
|
||||
call write_int(iunit,N_st,'Number of states')
|
||||
call write_int(iunit,sze,'Number of determinants')
|
||||
write(iunit,'(A)') ''
|
||||
write_buffer = '===== '
|
||||
do i=1,N_st
|
||||
write_buffer = trim(write_buffer)//' ================ ================'
|
||||
enddo
|
||||
write(iunit,'(A)') trim(write_buffer)
|
||||
write_buffer = ' Iter'
|
||||
do i=1,N_st
|
||||
write_buffer = trim(write_buffer)//' Energy Residual'
|
||||
enddo
|
||||
write(iunit,'(A)') trim(write_buffer)
|
||||
write_buffer = '===== '
|
||||
do i=1,N_st
|
||||
write_buffer = trim(write_buffer)//' ================ ================'
|
||||
enddo
|
||||
write(iunit,'(A)') trim(write_buffer)
|
||||
|
||||
allocate( &
|
||||
kl_pairs(2,N_st*(N_st+1)/2), &
|
||||
W(sze,N_st,davidson_sze_max), &
|
||||
U(sze,N_st,davidson_sze_max), &
|
||||
R(sze,N_st), &
|
||||
h(N_st,davidson_sze_max,N_st,davidson_sze_max), &
|
||||
y(N_st,davidson_sze_max,N_st,davidson_sze_max), &
|
||||
lambda(N_st*davidson_sze_max))
|
||||
|
||||
ASSERT (N_st > 0)
|
||||
ASSERT (sze > 0)
|
||||
ASSERT (Nint > 0)
|
||||
ASSERT (Nint == N_int)
|
||||
|
||||
! Initialization
|
||||
! ==============
|
||||
|
||||
k_pairs=0
|
||||
do l=1,N_st
|
||||
do k=1,l
|
||||
k_pairs+=1
|
||||
kl_pairs(1,k_pairs) = k
|
||||
kl_pairs(2,k_pairs) = l
|
||||
enddo
|
||||
enddo
|
||||
|
||||
!$OMP PARALLEL DEFAULT(NONE) &
|
||||
!$OMP SHARED(U,sze,N_st,overlap,kl_pairs,k_pairs, &
|
||||
!$OMP Nint,dets_in,u_in) &
|
||||
!$OMP PRIVATE(k,l,kl,i)
|
||||
|
||||
|
||||
! Orthonormalize initial guess
|
||||
! ============================
|
||||
|
||||
!$OMP DO
|
||||
do kl=1,k_pairs
|
||||
k = kl_pairs(1,kl)
|
||||
l = kl_pairs(2,kl)
|
||||
if (k/=l) then
|
||||
overlap(k,l) = u_dot_v(U_in(1,k),U_in(1,l),sze)
|
||||
overlap(l,k) = overlap(k,l)
|
||||
else
|
||||
overlap(k,k) = u_dot_u(U_in(1,k),sze)
|
||||
endif
|
||||
enddo
|
||||
!$OMP END DO
|
||||
!$OMP END PARALLEL
|
||||
|
||||
call ortho_lowdin(overlap,size(overlap,1),N_st,U_in,size(U_in,1),sze)
|
||||
|
||||
! Davidson iterations
|
||||
! ===================
|
||||
|
||||
converged = .False.
|
||||
|
||||
do while (.not.converged)
|
||||
|
||||
!$OMP PARALLEL DEFAULT(NONE) &
|
||||
!$OMP PRIVATE(k,i) SHARED(U,u_in,sze,N_st)
|
||||
do k=1,N_st
|
||||
!$OMP DO
|
||||
do i=1,sze
|
||||
U(i,k,1) = u_in(i,k)
|
||||
enddo
|
||||
!$OMP END DO
|
||||
enddo
|
||||
!$OMP END PARALLEL
|
||||
|
||||
do iter=1,davidson_sze_max-1
|
||||
|
||||
! Compute W_k = H |u_k>
|
||||
! ----------------------
|
||||
|
||||
do k=1,N_st
|
||||
call H_u_0_mrcc(W(1,k,iter),U(1,k,iter),H_jj,sze,dets_in,Nint,istate)
|
||||
enddo
|
||||
|
||||
! Compute h_kl = <u_k | W_l> = <u_k| H |u_l>
|
||||
! -------------------------------------------
|
||||
|
||||
do l=1,N_st
|
||||
do k=1,N_st
|
||||
do iter2=1,iter-1
|
||||
h(k,iter2,l,iter) = u_dot_v(U(1,k,iter2),W(1,l,iter),sze)
|
||||
h(k,iter,l,iter2) = h(k,iter2,l,iter)
|
||||
enddo
|
||||
enddo
|
||||
do k=1,l
|
||||
h(k,iter,l,iter) = u_dot_v(U(1,k,iter),W(1,l,iter),sze)
|
||||
h(l,iter,k,iter) = h(k,iter,l,iter)
|
||||
enddo
|
||||
enddo
|
||||
|
||||
!DEBUG H MATRIX
|
||||
!do i=1,iter
|
||||
! print '(10(x,F16.10))', h(1,i,1,1:i)
|
||||
!enddo
|
||||
!print *, ''
|
||||
!END
|
||||
|
||||
! Diagonalize h
|
||||
! -------------
|
||||
call lapack_diag(lambda,y,h,N_st*davidson_sze_max,N_st*iter)
|
||||
|
||||
! Express eigenvectors of h in the determinant basis
|
||||
! --------------------------------------------------
|
||||
|
||||
do k=1,N_st
|
||||
do i=1,sze
|
||||
U(i,k,iter+1) = 0.d0
|
||||
W(i,k,iter+1) = 0.d0
|
||||
do l=1,N_st
|
||||
do iter2=1,iter
|
||||
U(i,k,iter+1) = U(i,k,iter+1) + U(i,l,iter2)*y(l,iter2,k,1)
|
||||
W(i,k,iter+1) = W(i,k,iter+1) + W(i,l,iter2)*y(l,iter2,k,1)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
! Compute residual vector
|
||||
! -----------------------
|
||||
|
||||
do k=1,N_st
|
||||
do i=1,sze
|
||||
R(i,k) = lambda(k) * U(i,k,iter+1) - W(i,k,iter+1)
|
||||
enddo
|
||||
residual_norm(k) = u_dot_u(R(1,k),sze)
|
||||
to_print(1,k) = lambda(k) + nuclear_repulsion
|
||||
to_print(2,k) = residual_norm(k)
|
||||
enddo
|
||||
|
||||
write(iunit,'(X,I3,X,100(X,F16.10,X,E16.6))'), iter, to_print(:,1:N_st)
|
||||
call davidson_converged(lambda,residual_norm,wall,iter,cpu,N_st,converged)
|
||||
if (converged) then
|
||||
exit
|
||||
endif
|
||||
|
||||
|
||||
! Davidson step
|
||||
! -------------
|
||||
|
||||
do k=1,N_st
|
||||
do i=1,sze
|
||||
U(i,k,iter+1) = -1.d0/max(H_jj(i) - lambda(k),1.d-2) * R(i,k)
|
||||
enddo
|
||||
enddo
|
||||
|
||||
! Gram-Schmidt
|
||||
! ------------
|
||||
|
||||
double precision :: c
|
||||
do k=1,N_st
|
||||
do iter2=1,iter
|
||||
do l=1,N_st
|
||||
c = u_dot_v(U(1,k,iter+1),U(1,l,iter2),sze)
|
||||
do i=1,sze
|
||||
U(i,k,iter+1) -= c * U(i,l,iter2)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
do l=1,k-1
|
||||
c = u_dot_v(U(1,k,iter+1),U(1,l,iter+1),sze)
|
||||
do i=1,sze
|
||||
U(i,k,iter+1) -= c * U(i,l,iter+1)
|
||||
enddo
|
||||
enddo
|
||||
call normalize( U(1,k,iter+1), sze )
|
||||
enddo
|
||||
|
||||
!DEBUG : CHECK OVERLAP
|
||||
!print *, '==='
|
||||
!do k=1,iter+1
|
||||
! do l=1,k
|
||||
! c = u_dot_v(U(1,1,k),U(1,1,l),sze)
|
||||
! print *, k,l, c
|
||||
! enddo
|
||||
!enddo
|
||||
!print *, '==='
|
||||
!pause
|
||||
!END DEBUG
|
||||
|
||||
|
||||
enddo
|
||||
|
||||
if (.not.converged) then
|
||||
iter = davidson_sze_max-1
|
||||
endif
|
||||
|
||||
! Re-contract to u_in
|
||||
! -----------
|
||||
|
||||
do k=1,N_st
|
||||
energies(k) = lambda(k)
|
||||
do i=1,sze
|
||||
u_in(i,k) = 0.d0
|
||||
do iter2=1,iter
|
||||
do l=1,N_st
|
||||
u_in(i,k) += U(i,l,iter2)*y(l,iter2,k,1)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
enddo
|
||||
|
||||
write_buffer = '===== '
|
||||
do i=1,N_st
|
||||
write_buffer = trim(write_buffer)//' ================ ================'
|
||||
enddo
|
||||
write(iunit,'(A)') trim(write_buffer)
|
||||
write(iunit,'(A)') ''
|
||||
call write_time(iunit)
|
||||
|
||||
deallocate ( &
|
||||
kl_pairs, &
|
||||
W, &
|
||||
U, &
|
||||
R, &
|
||||
h, &
|
||||
y, &
|
||||
lambda &
|
||||
)
|
||||
abort_here = abort_all
|
||||
end
|
||||
|
||||
subroutine H_u_0_mrcc(v_0,u_0,H_jj,n,keys_tmp,Nint,istate)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Computes v_0 = H|u_0>
|
||||
!
|
||||
! n : number of determinants
|
||||
!
|
||||
! H_jj : array of <j|H|j>
|
||||
END_DOC
|
||||
integer, intent(in) :: n,Nint,istate
|
||||
double precision, intent(out) :: v_0(n)
|
||||
double precision, intent(in) :: u_0(n)
|
||||
double precision, intent(in) :: H_jj(n)
|
||||
integer(bit_kind),intent(in) :: keys_tmp(Nint,2,n)
|
||||
integer, allocatable :: idx(:)
|
||||
double precision :: hij
|
||||
double precision, allocatable :: vt(:)
|
||||
integer :: i,j,k,l, jj,ii
|
||||
integer :: i0, j0
|
||||
ASSERT (Nint > 0)
|
||||
ASSERT (Nint == N_int)
|
||||
ASSERT (n>0)
|
||||
PROVIDE ref_bitmask_energy delta_ij
|
||||
integer, parameter :: block_size = 157
|
||||
!$OMP PARALLEL DEFAULT(NONE) &
|
||||
!$OMP PRIVATE(i,hij,j,k,idx,jj,ii,vt) &
|
||||
!$OMP SHARED(n_det_ref,n_det_non_ref,idx_ref,idx_non_ref,n,H_jj,u_0,keys_tmp,Nint,v_0,istate,delta_ij)
|
||||
!$OMP DO SCHEDULE(static)
|
||||
do i=1,n
|
||||
v_0(i) = H_jj(i) * u_0(i)
|
||||
enddo
|
||||
!$OMP END DO
|
||||
allocate(idx(0:n), vt(n))
|
||||
Vt = 0.d0
|
||||
!$OMP DO SCHEDULE(guided)
|
||||
do i=1,n
|
||||
idx(0) = i
|
||||
call filter_connected_davidson(keys_tmp,keys_tmp(1,1,i),Nint,i-1,idx)
|
||||
do jj=1,idx(0)
|
||||
j = idx(jj)
|
||||
if ( (dabs(u_0(j)) > 1.d-7).or.((dabs(u_0(i)) > 1.d-7)) ) then
|
||||
call i_H_j(keys_tmp(1,1,j),keys_tmp(1,1,i),Nint,hij)
|
||||
hij = hij
|
||||
vt (i) = vt (i) + hij*u_0(j)
|
||||
vt (j) = vt (j) + hij*u_0(i)
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
!$OMP END DO
|
||||
|
||||
!$OMP DO SCHEDULE(guided)
|
||||
do ii=1,n_det_ref
|
||||
i = idx_ref(ii)
|
||||
do jj = 1, n_det_non_ref
|
||||
j = idx_non_ref(jj)
|
||||
vt (i) = vt (i) + delta_ij(ii,jj,istate)*u_0(j)
|
||||
vt (j) = vt (j) + delta_ij(ii,jj,istate)*u_0(i)
|
||||
enddo
|
||||
enddo
|
||||
!$OMP END DO
|
||||
!$OMP CRITICAL
|
||||
do i=1,n
|
||||
v_0(i) = v_0(i) + vt(i)
|
||||
enddo
|
||||
!$OMP END CRITICAL
|
||||
deallocate(idx,vt)
|
||||
!$OMP END PARALLEL
|
||||
end
|
||||
|
||||
|
93
plugins/MRCC_Utils_new/mrcc_amplitudes.irp.f
Normal file
@ -0,0 +1,93 @@
|
||||
subroutine get_excitation_operators_for_one_ref(det_ref,i_state,ndetnonref,N_connect_ref,excitation_operators,amplitudes_phase_less,index_connected)
|
||||
use bitmasks
|
||||
implicit none
|
||||
integer(bit_kind), intent(in) :: det_ref(N_int,2)
|
||||
integer, intent(in) :: i_state,ndetnonref
|
||||
integer*2, intent(out) :: excitation_operators(5,ndetnonref)
|
||||
integer, intent(out) :: index_connected(ndetnonref)
|
||||
integer, intent(out) :: N_connect_ref
|
||||
double precision, intent(out) :: amplitudes_phase_less(ndetnonref)
|
||||
|
||||
integer :: i,j,k,l,degree,h1,p1,h2,p2,s1,s2
|
||||
integer :: exc(0:2,2,2)
|
||||
double precision :: phase,hij
|
||||
BEGIN_DOC
|
||||
! This subroutine provides all the amplitudes and excitation operators
|
||||
! that one needs to go from the reference to the non reference wave function
|
||||
! you enter with det_ref that is a reference determinant
|
||||
!
|
||||
! N_connect_ref is the number of determinants belonging to psi_non_ref
|
||||
! that are connected to det_ref.
|
||||
!
|
||||
! amplitudes_phase_less(i) = amplitude phase less t_{I->i} = <I|H|i> * lambda_mrcc(i) * phase(I->i)
|
||||
!
|
||||
! excitation_operators(:,i) represents the holes and particles that
|
||||
! link the ith connected determinant to det_ref
|
||||
! if ::
|
||||
! excitation_operators(5,i) = 2 :: double excitation alpha
|
||||
! excitation_operators(5,i) = -2 :: double excitation beta
|
||||
!!! excitation_operators(1,i) :: hole 1
|
||||
!!! excitation_operators(2,i) :: particle 1
|
||||
!!! excitation_operators(3,i) :: hole 2
|
||||
!!! excitation_operators(4,i) :: particle 2
|
||||
! else if ::
|
||||
! excitation_operators(5,i) = 1 :: single excitation alpha
|
||||
!!! excitation_operators(1,i) :: hole 1
|
||||
!!! excitation_operators(2,i) :: particle 1
|
||||
! else if ::
|
||||
! excitation_operators(5,i) = -1 :: single excitation beta
|
||||
!!! excitation_operators(3,i) :: hole 1
|
||||
!!! excitation_operators(4,i) :: particle 1
|
||||
! else if ::
|
||||
!!! excitation_operators(5,i) = 0 :: double excitation alpha/beta
|
||||
!!! excitation_operators(1,i) :: hole 1 alpha
|
||||
!!! excitation_operators(2,i) :: particle 1 alpha
|
||||
!!! excitation_operators(3,i) :: hole 2 beta
|
||||
!!! excitation_operators(4,i) :: particle 2 beta
|
||||
END_DOC
|
||||
N_connect_ref = 0
|
||||
do i = 1, ndetnonref
|
||||
call i_H_j_phase_out(det_ref,psi_non_ref(1,1,i),N_int,hij,phase,exc,degree)
|
||||
if (dabs(hij) <= mo_integrals_threshold) then
|
||||
cycle
|
||||
endif
|
||||
N_connect_ref +=1
|
||||
index_connected(N_connect_ref) = i
|
||||
call decode_exc(exc,degree,h1,p1,h2,p2,s1,s2)
|
||||
amplitudes_phase_less(N_connect_ref) = hij * lambda_mrcc(i_state,i) !*phase
|
||||
|
||||
if (degree==2) then
|
||||
|
||||
excitation_operators(1,N_connect_ref) = h1
|
||||
excitation_operators(2,N_connect_ref) = p1
|
||||
excitation_operators(3,N_connect_ref) = h2
|
||||
excitation_operators(4,N_connect_ref) = p2
|
||||
if(s1==s2.and.s1==1)then ! double alpha
|
||||
excitation_operators(5,N_connect_ref) = 2
|
||||
elseif(s1==s2.and.s1==2)then ! double beta
|
||||
excitation_operators(5,N_connect_ref) = -2
|
||||
else ! double alpha/beta
|
||||
excitation_operators(5,N_connect_ref) = 0
|
||||
endif
|
||||
|
||||
else if(degree==1) then
|
||||
|
||||
if(s1==1)then ! mono alpha
|
||||
excitation_operators(5,N_connect_ref) = 1
|
||||
excitation_operators(1,N_connect_ref) = h1
|
||||
excitation_operators(2,N_connect_ref) = p1
|
||||
else ! mono beta
|
||||
excitation_operators(5,N_connect_ref) = -1
|
||||
excitation_operators(3,N_connect_ref) = h1
|
||||
excitation_operators(4,N_connect_ref) = p1
|
||||
endif
|
||||
|
||||
else
|
||||
|
||||
N_connect_ref-=1
|
||||
|
||||
endif
|
||||
|
||||
enddo
|
||||
|
||||
end
|
183
plugins/MRCC_Utils_new/mrcc_dress.irp.f
Normal file
@ -0,0 +1,183 @@
|
||||
subroutine mrcc_dress(ndetref,ndetnonref,nstates,delta_ij_,delta_ii_)
|
||||
use bitmasks
|
||||
implicit none
|
||||
integer, intent(in) :: ndetref,nstates,ndetnonref
|
||||
double precision, intent(inout) :: delta_ii_(ndetref,nstates),delta_ij_(ndetref,ndetnonref,nstates)
|
||||
integer :: i,j,k,l,m
|
||||
integer :: i_state
|
||||
integer :: N_connect_ref
|
||||
integer*2,allocatable :: excitation_operators(:,:)
|
||||
double precision, allocatable :: amplitudes_phase_less(:)
|
||||
double precision, allocatable :: coef_test(:)
|
||||
integer(bit_kind), allocatable :: key_test(:,:)
|
||||
integer, allocatable :: index_connected(:)
|
||||
integer :: i_hole,i_particle,ispin,i_ok,connected_to_ref,index_wf
|
||||
integer, allocatable :: idx_vector(:)
|
||||
double precision :: phase_ij
|
||||
double precision :: dij,phase_la
|
||||
double precision :: hij,phase
|
||||
integer :: exc(0:2,2,2),degree
|
||||
logical :: is_in_wavefunction
|
||||
double precision, allocatable :: delta_ij_tmp(:,:,:), delta_ii_tmp(:,:)
|
||||
logical, external :: is_in_psi_ref
|
||||
|
||||
i_state = 1
|
||||
allocate(excitation_operators(5,N_det_non_ref))
|
||||
allocate(amplitudes_phase_less(N_det_non_ref))
|
||||
allocate(index_connected(N_det_non_ref))
|
||||
|
||||
!$OMP PARALLEL DEFAULT(NONE) &
|
||||
!$OMP SHARED(N_det_ref, N_det_non_ref, psi_ref, i_state, &
|
||||
!$OMP N_connect_ref,index_connected,psi_non_ref, &
|
||||
!$OMP excitation_operators,amplitudes_phase_less, &
|
||||
!$OMP psi_non_ref_coef,N_int,lambda_mrcc, &
|
||||
!$OMP delta_ii_,delta_ij_,psi_ref_coef,nstates, &
|
||||
!$OMP mo_integrals_threshold,idx_non_ref_rev) &
|
||||
!$OMP PRIVATE(i,j,k,l,hil,phase_il,exc,degree,t_il, &
|
||||
!$OMP key_test,i_ok,phase_la,hij,phase_ij,m, &
|
||||
!$OMP dij,idx_vector,delta_ij_tmp, &
|
||||
!$OMP delta_ii_tmp,phase)
|
||||
allocate(idx_vector(0:N_det_non_ref))
|
||||
allocate(key_test(N_int,2))
|
||||
allocate(delta_ij_tmp(size(delta_ij_,1),size(delta_ij_,2),nstates))
|
||||
allocate(delta_ii_tmp(size(delta_ij_,1),nstates))
|
||||
delta_ij_tmp = 0.d0
|
||||
delta_ii_tmp = 0.d0
|
||||
|
||||
do i = 1, N_det_ref
|
||||
!$OMP SINGLE
|
||||
call get_excitation_operators_for_one_ref(psi_ref(1,1,i),i_state,N_det_non_ref,N_connect_ref,excitation_operators,amplitudes_phase_less,index_connected)
|
||||
print*,'N_connect_ref =',N_connect_ref
|
||||
print*,'N_det_non_ref =',N_det_non_ref
|
||||
!$OMP END SINGLE
|
||||
!$OMP BARRIER
|
||||
|
||||
!$OMP DO SCHEDULE(dynamic)
|
||||
do l = 1, N_det_non_ref
|
||||
! print *, l, '/', N_det_non_ref
|
||||
double precision :: t_il,phase_il,hil
|
||||
call i_H_j_phase_out(psi_ref(1,1,i),psi_non_ref(1,1,l),N_int,hil,phase_il,exc,degree)
|
||||
t_il = hil * lambda_mrcc(i_state,l)
|
||||
if (dabs(t_il) < mo_integrals_threshold) then
|
||||
cycle
|
||||
endif
|
||||
! loop on the non ref determinants
|
||||
|
||||
do j = 1, N_connect_ref
|
||||
! loop on the excitation operators linked to i
|
||||
|
||||
do k = 1, N_int
|
||||
key_test(k,1) = psi_non_ref(k,1,l)
|
||||
key_test(k,2) = psi_non_ref(k,2,l)
|
||||
enddo
|
||||
|
||||
! we apply the excitation operator T_I->j
|
||||
call apply_excitation_operator(key_test,excitation_operators(1,j),i_ok)
|
||||
if(i_ok.ne.1)cycle
|
||||
|
||||
! we check if such determinant is already in the wave function
|
||||
if(is_in_wavefunction(key_test,N_int))cycle
|
||||
|
||||
! we get the phase for psi_non_ref(l) -> T_I->j |psi_non_ref(l)>
|
||||
call get_excitation(psi_non_ref(1,1,l),key_test,exc,degree,phase_la,N_int)
|
||||
|
||||
! we get the phase T_I->j
|
||||
call i_H_j_phase_out(psi_ref(1,1,i),psi_non_ref(1,1,index_connected(j)),N_int,hij,phase_ij,exc,degree)
|
||||
|
||||
! we compute the contribution to the coef of key_test
|
||||
dij = t_il * hij * phase_la *phase_ij *lambda_mrcc(i_state,index_connected(j)) * 0.5d0
|
||||
if (dabs(dij) < mo_integrals_threshold) then
|
||||
cycle
|
||||
endif
|
||||
|
||||
! we compute the interaction of such determinant with all the non_ref dets
|
||||
call filter_connected(psi_non_ref,key_test,N_int,N_det_non_ref,idx_vector)
|
||||
|
||||
do k = 1, idx_vector(0)
|
||||
m = idx_vector(k)
|
||||
call i_H_j_phase_out(key_test,psi_non_ref(1,1,m),N_int,hij,phase,exc,degree)
|
||||
delta_ij_tmp(i,m,i_state) += hij * dij
|
||||
enddo
|
||||
|
||||
|
||||
enddo
|
||||
|
||||
if(dabs(psi_ref_coef(i,i_state)).le.5.d-5) then
|
||||
delta_ii_tmp(i,i_state) -= &
|
||||
delta_ij_tmp(i,l,i_state) * psi_non_ref_coef(l,i_state) &
|
||||
/ psi_ref_coef(i,i_state)
|
||||
endif
|
||||
|
||||
enddo
|
||||
!$OMP END DO
|
||||
enddo
|
||||
|
||||
!$OMP CRITICAL
|
||||
delta_ij_ = delta_ij_ + delta_ij_tmp
|
||||
delta_ii_ = delta_ii_ + delta_ii_tmp
|
||||
!$OMP END CRITICAL
|
||||
|
||||
deallocate(delta_ii_tmp,delta_ij_tmp)
|
||||
deallocate(idx_vector)
|
||||
deallocate(key_test)
|
||||
!$OMP END PARALLEL
|
||||
|
||||
deallocate(excitation_operators)
|
||||
deallocate(amplitudes_phase_less)
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
subroutine apply_excitation_operator(key_in,excitation_operator,i_ok)
|
||||
use bitmasks
|
||||
implicit none
|
||||
integer(bit_kind), intent(inout) :: key_in
|
||||
integer, intent (out) :: i_ok
|
||||
integer*2 :: excitation_operator(5)
|
||||
integer :: i_particle,i_hole,ispin
|
||||
! Do excitation
|
||||
if(excitation_operator(5)==1)then ! mono alpha
|
||||
i_hole = excitation_operator(1)
|
||||
i_particle = excitation_operator(2)
|
||||
ispin = 1
|
||||
call do_mono_excitation(key_in,i_hole,i_particle,ispin,i_ok)
|
||||
else if (excitation_operator(5)==-1)then ! mono beta
|
||||
i_hole = excitation_operator(3)
|
||||
i_particle = excitation_operator(4)
|
||||
ispin = 2
|
||||
call do_mono_excitation(key_in,i_hole,i_particle,ispin,i_ok)
|
||||
else if (excitation_operator(5) == -2 )then ! double beta
|
||||
i_hole = excitation_operator(1)
|
||||
i_particle = excitation_operator(2)
|
||||
ispin = 2
|
||||
call do_mono_excitation(key_in,i_hole,i_particle,ispin,i_ok)
|
||||
if(i_ok.ne.1)return
|
||||
i_hole = excitation_operator(3)
|
||||
i_particle = excitation_operator(4)
|
||||
ispin = 2
|
||||
call do_mono_excitation(key_in,i_hole,i_particle,ispin,i_ok)
|
||||
|
||||
else if (excitation_operator(5) == 2 )then ! double alpha
|
||||
i_hole = excitation_operator(1)
|
||||
i_particle = excitation_operator(2)
|
||||
ispin = 1
|
||||
call do_mono_excitation(key_in,i_hole,i_particle,ispin,i_ok)
|
||||
if(i_ok.ne.1)return
|
||||
i_hole = excitation_operator(3)
|
||||
i_particle = excitation_operator(4)
|
||||
ispin = 1
|
||||
call do_mono_excitation(key_in,i_hole,i_particle,ispin,i_ok)
|
||||
|
||||
else if (excitation_operator(5) == 0 )then ! double alpha/alpha
|
||||
i_hole = excitation_operator(1)
|
||||
i_particle = excitation_operator(2)
|
||||
ispin = 1
|
||||
call do_mono_excitation(key_in,i_hole,i_particle,ispin,i_ok)
|
||||
if(i_ok.ne.1)return
|
||||
i_hole = excitation_operator(3)
|
||||
i_particle = excitation_operator(4)
|
||||
ispin = 2
|
||||
call do_mono_excitation(key_in,i_hole,i_particle,ispin,i_ok)
|
||||
endif
|
||||
end
|
67
plugins/MRCC_Utils_new/mrcc_general.irp.f
Normal file
@ -0,0 +1,67 @@
|
||||
subroutine run_mrcc
|
||||
implicit none
|
||||
call set_generators_bitmasks_as_holes_and_particles
|
||||
call mrcc_iterations
|
||||
end
|
||||
|
||||
subroutine mrcc_iterations
|
||||
implicit none
|
||||
|
||||
integer :: i,j
|
||||
|
||||
double precision :: E_new, E_old, delta_e
|
||||
integer :: iteration
|
||||
E_new = 0.d0
|
||||
delta_E = 1.d0
|
||||
iteration = 0
|
||||
do while (delta_E > 1.d-8)
|
||||
iteration += 1
|
||||
print *, '==========================='
|
||||
print *, 'MRCC Iteration', iteration
|
||||
print *, '==========================='
|
||||
print *, ''
|
||||
E_old = sum(ci_energy_dressed)
|
||||
call write_double(6,ci_energy_dressed(1),"MRCC energy")
|
||||
call diagonalize_ci_dressed
|
||||
E_new = sum(ci_energy_dressed)
|
||||
delta_E = dabs(E_new - E_old)
|
||||
! stop
|
||||
if (iteration > 200) then
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
call write_double(6,ci_energy_dressed(1),"Final MRCC energy")
|
||||
call ezfio_set_mrcc_cassd_energy(ci_energy_dressed(1))
|
||||
call save_wavefunction
|
||||
|
||||
end
|
||||
|
||||
subroutine set_generators_bitmasks_as_holes_and_particles
|
||||
implicit none
|
||||
integer :: i,k
|
||||
do k = 1, N_generators_bitmask
|
||||
do i = 1, N_int
|
||||
! Pure single part
|
||||
generators_bitmask(i,1,1,k) = holes_operators(i,1) ! holes for pure single exc alpha
|
||||
generators_bitmask(i,1,2,k) = particles_operators(i,1) ! particles for pure single exc alpha
|
||||
generators_bitmask(i,2,1,k) = holes_operators(i,2) ! holes for pure single exc beta
|
||||
generators_bitmask(i,2,2,k) = particles_operators(i,2) ! particles for pure single exc beta
|
||||
|
||||
! Double excitation
|
||||
generators_bitmask(i,1,3,k) = holes_operators(i,1) ! holes for first single exc alpha
|
||||
generators_bitmask(i,1,4,k) = particles_operators(i,1) ! particles for first single exc alpha
|
||||
generators_bitmask(i,2,3,k) = holes_operators(i,2) ! holes for first single exc beta
|
||||
generators_bitmask(i,2,4,k) = particles_operators(i,2) ! particles for first single exc beta
|
||||
|
||||
generators_bitmask(i,1,5,k) = holes_operators(i,1) ! holes for second single exc alpha
|
||||
generators_bitmask(i,1,6,k) = particles_operators(i,1) ! particles for second single exc alpha
|
||||
generators_bitmask(i,2,5,k) = holes_operators(i,2) ! holes for second single exc beta
|
||||
generators_bitmask(i,2,6,k) = particles_operators(i,2) ! particles for second single exc beta
|
||||
|
||||
enddo
|
||||
enddo
|
||||
touch generators_bitmask
|
||||
|
||||
|
||||
|
||||
end
|
179
plugins/MRCC_Utils_new/mrcc_utils.irp.f
Normal file
@ -0,0 +1,179 @@
|
||||
BEGIN_PROVIDER [ double precision, lambda_mrcc, (N_states,psi_det_size) ]
|
||||
&BEGIN_PROVIDER [ double precision, lambda_pert, (N_states,psi_det_size) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! cm/<Psi_0|H|D_m> or perturbative 1/Delta_E(m)
|
||||
END_DOC
|
||||
integer :: i,k
|
||||
double precision :: ihpsi(N_states), hii
|
||||
integer :: i_ok
|
||||
i_ok = 0
|
||||
|
||||
do i=1,N_det_non_ref
|
||||
call i_h_psi(psi_non_ref(1,1,i), psi_ref, psi_ref_coef, N_int, N_det_ref,&
|
||||
size(psi_ref_coef,1), n_states, ihpsi)
|
||||
call i_h_j(psi_non_ref(1,1,i),psi_non_ref(1,1,i),N_int,hii)
|
||||
do k=1,N_states
|
||||
lambda_pert(k,i) = 1.d0 / (psi_ref_energy_diagonalized(k)-hii)
|
||||
if (dabs(ihpsi(k)).le.1.d-3) then
|
||||
i_ok +=1
|
||||
lambda_mrcc(k,i) = lambda_pert(k,i)
|
||||
else
|
||||
lambda_mrcc(k,i) = psi_non_ref_coef(i,k)/ihpsi(k)
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
print*,'N_det_non_ref = ',N_det_non_ref
|
||||
print*,'Number of Perturbatively treated determinants = ',i_ok
|
||||
print*,'psi_coef_ref_ratio = ',psi_ref_coef(2,1)/psi_ref_coef(1,1)
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
|
||||
|
||||
!BEGIN_PROVIDER [ double precision, delta_ij_non_ref, (N_det_non_ref, N_det_non_ref,N_states) ]
|
||||
!implicit none
|
||||
!BEGIN_DOC
|
||||
!! Dressing matrix in SD basis
|
||||
!END_DOC
|
||||
!delta_ij_non_ref = 0.d0
|
||||
!call H_apply_mrcc_simple(delta_ij_non_ref,N_det_non_ref)
|
||||
!END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ double precision, delta_ij, (N_det_ref,N_det_non_ref,N_states) ]
|
||||
&BEGIN_PROVIDER [ double precision, delta_ii, (N_det_ref,N_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Dressing matrix in N_det basis
|
||||
END_DOC
|
||||
integer :: i,j,m
|
||||
delta_ij = 0.d0
|
||||
delta_ii = 0.d0
|
||||
call mrcc_dress(N_det_ref,N_det_non_ref,N_states,delta_ij,delta_ii)
|
||||
write(33,*)delta_ij
|
||||
write(34,*)delta_ii
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ double precision, h_matrix_dressed, (N_det,N_det,N_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Dressed H with Delta_ij
|
||||
END_DOC
|
||||
integer :: i, j,istate,ii,jj
|
||||
do istate = 1,N_states
|
||||
do j=1,N_det
|
||||
do i=1,N_det
|
||||
h_matrix_dressed(i,j,istate) = h_matrix_all_dets(i,j)
|
||||
enddo
|
||||
enddo
|
||||
do ii = 1, N_det_ref
|
||||
i =idx_ref(ii)
|
||||
h_matrix_dressed(i,i,istate) += delta_ii(ii,istate)
|
||||
do jj = 1, N_det_non_ref
|
||||
j =idx_non_ref(jj)
|
||||
h_matrix_dressed(i,j,istate) += delta_ij(ii,jj,istate)
|
||||
h_matrix_dressed(j,i,istate) += delta_ij(ii,jj,istate)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ double precision, CI_electronic_energy_dressed, (N_states_diag) ]
|
||||
&BEGIN_PROVIDER [ double precision, CI_eigenvectors_dressed, (N_det,N_states_diag) ]
|
||||
&BEGIN_PROVIDER [ double precision, CI_eigenvectors_s2_dressed, (N_states_diag) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Eigenvectors/values of the CI matrix
|
||||
END_DOC
|
||||
integer :: i,j
|
||||
|
||||
do j=1,N_states_diag
|
||||
do i=1,N_det
|
||||
CI_eigenvectors_dressed(i,j) = psi_coef(i,j)
|
||||
enddo
|
||||
enddo
|
||||
|
||||
if (diag_algorithm == "Davidson") then
|
||||
|
||||
integer :: istate
|
||||
istate = 1
|
||||
call davidson_diag_mrcc(psi_det,CI_eigenvectors_dressed,CI_electronic_energy_dressed,&
|
||||
size(CI_eigenvectors_dressed,1),N_det,N_states_diag,N_int,output_determinants,istate)
|
||||
|
||||
else if (diag_algorithm == "Lapack") then
|
||||
|
||||
double precision, allocatable :: eigenvectors(:,:), eigenvalues(:)
|
||||
allocate (eigenvectors(size(H_matrix_dressed,1),N_det))
|
||||
allocate (eigenvalues(N_det))
|
||||
call lapack_diag(eigenvalues,eigenvectors, &
|
||||
H_matrix_dressed,size(H_matrix_dressed,1),N_det)
|
||||
CI_electronic_energy_dressed(:) = 0.d0
|
||||
do i=1,N_det
|
||||
CI_eigenvectors_dressed(i,1) = eigenvectors(i,1)
|
||||
enddo
|
||||
integer :: i_state
|
||||
double precision :: s2
|
||||
i_state = 0
|
||||
if (s2_eig) then
|
||||
do j=1,N_det
|
||||
call get_s2_u0(psi_det,eigenvectors(1,j),N_det,N_det,s2)
|
||||
if(dabs(s2-expected_s2).le.0.3d0)then
|
||||
i_state += 1
|
||||
do i=1,N_det
|
||||
CI_eigenvectors_dressed(i,i_state) = eigenvectors(i,j)
|
||||
enddo
|
||||
CI_electronic_energy_dressed(i_state) = eigenvalues(j)
|
||||
CI_eigenvectors_s2_dressed(i_state) = s2
|
||||
endif
|
||||
if (i_state.ge.N_states_diag) then
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
else
|
||||
do j=1,N_states_diag
|
||||
call get_s2_u0(psi_det,eigenvectors(1,j),N_det,N_det,s2)
|
||||
i_state += 1
|
||||
do i=1,N_det
|
||||
CI_eigenvectors_dressed(i,i_state) = eigenvectors(i,j)
|
||||
enddo
|
||||
CI_electronic_energy_dressed(i_state) = eigenvalues(j)
|
||||
CI_eigenvectors_s2_dressed(i_state) = s2
|
||||
enddo
|
||||
endif
|
||||
deallocate(eigenvectors,eigenvalues)
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ double precision, CI_energy_dressed, (N_states_diag) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! N_states lowest eigenvalues of the dressed CI matrix
|
||||
END_DOC
|
||||
|
||||
integer :: j
|
||||
character*(8) :: st
|
||||
call write_time(output_determinants)
|
||||
do j=1,N_states_diag
|
||||
CI_energy_dressed(j) = CI_electronic_energy_dressed(j) + nuclear_repulsion
|
||||
enddo
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
subroutine diagonalize_CI_dressed
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! 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_diag
|
||||
do i=1,N_det
|
||||
psi_coef(i,j) = CI_eigenvectors_dressed(i,j)
|
||||
enddo
|
||||
enddo
|
||||
SOFT_TOUCH psi_coef
|
||||
|
||||
end
|
BIN
plugins/MRCC_Utils_new/tree_dependency.png
Normal file
After Width: | Height: | Size: 106 KiB |
26
plugins/Molden/.gitignore
vendored
@ -1,18 +1,18 @@
|
||||
# Automatically created by /home/giner/quantum_package/scripts/module/module_handler.py
|
||||
IRPF90_temp
|
||||
IRPF90_man
|
||||
irpf90_entities
|
||||
tags
|
||||
irpf90.make
|
||||
Makefile
|
||||
Makefile.depend
|
||||
.ninja_log
|
||||
# Automatically created by $QP_ROOT/scripts/module/module_handler.py
|
||||
.ninja_deps
|
||||
ezfio_interface.irp.f
|
||||
Ezfio_files
|
||||
MO_Basis
|
||||
Utils
|
||||
.ninja_log
|
||||
AO_Basis
|
||||
Electrons
|
||||
Ezfio_files
|
||||
IRPF90_man
|
||||
IRPF90_temp
|
||||
MO_Basis
|
||||
Makefile
|
||||
Makefile.depend
|
||||
Nuclei
|
||||
Utils
|
||||
ezfio_interface.irp.f
|
||||
irpf90.make
|
||||
irpf90_entities
|
||||
print_mo
|
||||
tags
|
@ -31,7 +31,7 @@ subroutine perturb_buffer_$PERT(i_generator,buffer,buffer_size,e_2_pert_buffer,c
|
||||
cycle
|
||||
endif
|
||||
|
||||
if (is_in_wavefunction(buffer(1,1,i),Nint,N_det)) then
|
||||
if (is_in_wavefunction(buffer(1,1,i),Nint)) then
|
||||
cycle
|
||||
endif
|
||||
|
||||
@ -82,7 +82,7 @@ subroutine perturb_buffer_by_mono_$PERT(i_generator,buffer,buffer_size,e_2_pert_
|
||||
cycle
|
||||
endif
|
||||
|
||||
if (is_in_wavefunction(buffer(1,1,i),Nint,N_det)) then
|
||||
if (is_in_wavefunction(buffer(1,1,i),Nint)) then
|
||||
cycle
|
||||
endif
|
||||
|
||||
|
@ -12,6 +12,33 @@ Documentation
|
||||
.. Do not edit this section. It was auto-generated from the
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
`idx_ref <http://github.com/LCPQ/quantum_package/tree/master/src/Psiref_CAS/psi_ref.irp.f#L5>`_
|
||||
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.
|
||||
|
||||
|
||||
`n_det_ref <http://github.com/LCPQ/quantum_package/tree/master/src/Psiref_CAS/psi_ref.irp.f#L6>`_
|
||||
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.
|
||||
|
||||
|
||||
`psi_ref <http://github.com/LCPQ/quantum_package/tree/master/src/Psiref_CAS/psi_ref.irp.f#L3>`_
|
||||
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.
|
||||
|
||||
|
||||
`psi_ref_coef <http://github.com/LCPQ/quantum_package/tree/master/src/Psiref_CAS/psi_ref.irp.f#L4>`_
|
||||
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.
|
||||
|
||||
|
||||
`psi_ref_coef_restart <http://github.com/LCPQ/quantum_package/tree/master/src/Psiref_CAS/psi_ref.irp.f#L30>`_
|
||||
Projection of the CAS wave function on the restart wave function.
|
||||
|
||||
|
||||
`psi_ref_restart <http://github.com/LCPQ/quantum_package/tree/master/src/Psiref_CAS/psi_ref.irp.f#L29>`_
|
||||
Projection of the CAS wave function on the restart wave function.
|
||||
|
||||
Needed Modules
|
||||
==============
|
||||
|
||||
|
@ -26,3 +26,29 @@ use bitmasks
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_ref_restart, (N_int,2,psi_det_size) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_ref_coef_restart, (psi_det_size,n_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Projection of the CAS wave function on the restart wave function.
|
||||
END_DOC
|
||||
integer :: i,j,k
|
||||
integer, save :: ifirst
|
||||
|
||||
if(ifirst == 0)then
|
||||
ifirst = 1
|
||||
do i=1,N_det_ref
|
||||
do k=1,N_int
|
||||
psi_ref_restart(k,1,i) = psi_cas(k,1,i)
|
||||
psi_ref_restart(k,2,i) = psi_cas(k,2,i)
|
||||
enddo
|
||||
enddo
|
||||
do k=1,N_states
|
||||
do i=1,N_det_ref
|
||||
psi_ref_coef_restart(i,k) = psi_cas_coef(i,k)
|
||||
enddo
|
||||
enddo
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
|
@ -13,3 +13,109 @@ Documentation
|
||||
.. Do not edit this section. It was auto-generated from the
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
`get_index_in_psi_ref_sorted_bit <http://github.com/LCPQ/quantum_package/tree/master/src/Psiref_Utils/psi_ref_utils.irp.f#L182>`_
|
||||
Returns the index of the determinant in the ``psi_ref_sorted_bit`` array
|
||||
|
||||
|
||||
`h_matrix_ref <http://github.com/LCPQ/quantum_package/tree/master/src/Psiref_Utils/psi_ref_utils.irp.f#L116>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
`holes_operators <http://github.com/LCPQ/quantum_package/tree/master/src/Psiref_Utils/psi_ref_excitations_operators.irp.f#L3>`_
|
||||
holes_operators represents an array of integers where all the holes have
|
||||
been done going from psi_ref to psi_non_ref
|
||||
particles_operators represents an array of integers where all the particles have
|
||||
been done going from psi_ref to psi_non_ref
|
||||
|
||||
|
||||
`idx_non_ref <http://github.com/LCPQ/quantum_package/tree/master/src/Psiref_Utils/psi_ref_utils.irp.f#L20>`_
|
||||
Set of determinants which are not part of the reference, defined from the application
|
||||
of the reference bitmask on the determinants.
|
||||
idx_non_ref gives the indice of the determinant in psi_det.
|
||||
idx_non_ref_rev gives the reverse.
|
||||
|
||||
|
||||
`idx_non_ref_rev <http://github.com/LCPQ/quantum_package/tree/master/src/Psiref_Utils/psi_ref_utils.irp.f#L21>`_
|
||||
Set of determinants which are not part of the reference, defined from the application
|
||||
of the reference bitmask on the determinants.
|
||||
idx_non_ref gives the indice of the determinant in psi_det.
|
||||
idx_non_ref_rev gives the reverse.
|
||||
|
||||
|
||||
`is_in_psi_ref <http://github.com/LCPQ/quantum_package/tree/master/src/Psiref_Utils/psi_ref_utils.irp.f#L168>`_
|
||||
True if the determinant ``det`` is in the wave function
|
||||
|
||||
|
||||
`n_det_non_ref <http://github.com/LCPQ/quantum_package/tree/master/src/Psiref_Utils/psi_ref_utils.irp.f#L22>`_
|
||||
Set of determinants which are not part of the reference, defined from the application
|
||||
of the reference bitmask on the determinants.
|
||||
idx_non_ref gives the indice of the determinant in psi_det.
|
||||
idx_non_ref_rev gives the reverse.
|
||||
|
||||
|
||||
`particles_operators <http://github.com/LCPQ/quantum_package/tree/master/src/Psiref_Utils/psi_ref_excitations_operators.irp.f#L4>`_
|
||||
holes_operators represents an array of integers where all the holes have
|
||||
been done going from psi_ref to psi_non_ref
|
||||
particles_operators represents an array of integers where all the particles have
|
||||
been done going from psi_ref to psi_non_ref
|
||||
|
||||
|
||||
`psi_coef_ref_diagonalized <http://github.com/LCPQ/quantum_package/tree/master/src/Psiref_Utils/psi_ref_utils.irp.f#L128>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
`psi_non_ref <http://github.com/LCPQ/quantum_package/tree/master/src/Psiref_Utils/psi_ref_utils.irp.f#L18>`_
|
||||
Set of determinants which are not part of the reference, defined from the application
|
||||
of the reference bitmask on the determinants.
|
||||
idx_non_ref gives the indice of the determinant in psi_det.
|
||||
idx_non_ref_rev gives the reverse.
|
||||
|
||||
|
||||
`psi_non_ref_coef <http://github.com/LCPQ/quantum_package/tree/master/src/Psiref_Utils/psi_ref_utils.irp.f#L19>`_
|
||||
Set of determinants which are not part of the reference, defined from the application
|
||||
of the reference bitmask on the determinants.
|
||||
idx_non_ref gives the indice of the determinant in psi_det.
|
||||
idx_non_ref_rev gives the reverse.
|
||||
|
||||
|
||||
`psi_non_ref_coef_restart <http://github.com/LCPQ/quantum_package/tree/master/src/Psiref_Utils/psi_ref_utils.irp.f#L62>`_
|
||||
Set of determinants which are not part of the reference, defined from the application
|
||||
of the reference bitmask on the determinants.
|
||||
idx_non_ref gives the indice of the determinant in psi_det.
|
||||
But this is with respect to the restart wave function.
|
||||
|
||||
|
||||
`psi_non_ref_coef_sorted_bit <http://github.com/LCPQ/quantum_package/tree/master/src/Psiref_Utils/psi_ref_utils.irp.f#L104>`_
|
||||
Reference determinants sorted to accelerate the search of a random determinant in the wave
|
||||
function.
|
||||
|
||||
|
||||
`psi_non_ref_restart <http://github.com/LCPQ/quantum_package/tree/master/src/Psiref_Utils/psi_ref_utils.irp.f#L61>`_
|
||||
Set of determinants which are not part of the reference, defined from the application
|
||||
of the reference bitmask on the determinants.
|
||||
idx_non_ref gives the indice of the determinant in psi_det.
|
||||
But this is with respect to the restart wave function.
|
||||
|
||||
|
||||
`psi_non_ref_sorted_bit <http://github.com/LCPQ/quantum_package/tree/master/src/Psiref_Utils/psi_ref_utils.irp.f#L103>`_
|
||||
Reference determinants sorted to accelerate the search of a random determinant in the wave
|
||||
function.
|
||||
|
||||
|
||||
`psi_ref_coef_sorted_bit <http://github.com/LCPQ/quantum_package/tree/master/src/Psiref_Utils/psi_ref_utils.irp.f#L5>`_
|
||||
Reference determinants sorted to accelerate the search of a random determinant in the wave
|
||||
function.
|
||||
|
||||
|
||||
`psi_ref_energy <http://github.com/LCPQ/quantum_package/tree/master/src/Psiref_Utils/psi_ref_utils.irp.f#L147>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
`psi_ref_energy_diagonalized <http://github.com/LCPQ/quantum_package/tree/master/src/Psiref_Utils/psi_ref_utils.irp.f#L129>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
`psi_ref_sorted_bit <http://github.com/LCPQ/quantum_package/tree/master/src/Psiref_Utils/psi_ref_utils.irp.f#L4>`_
|
||||
Reference determinants sorted to accelerate the search of a random determinant in the wave
|
||||
function.
|
||||
|
||||
|
@ -1,36 +0,0 @@
|
||||
use bitmasks
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_ref, (N_int,2,psi_det_size) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_ref_coef, (psi_det_size,n_states) ]
|
||||
&BEGIN_PROVIDER [ integer, idx_ref, (psi_det_size) ]
|
||||
&BEGIN_PROVIDER [ integer, N_det_ref ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Reference wave function, defined as determinants with coefficients > 0.05
|
||||
! idx_ref gives the indice of the ref determinant in psi_det.
|
||||
END_DOC
|
||||
integer :: i, k, l
|
||||
logical :: good
|
||||
N_det_ref = 0
|
||||
do i=1,N_det
|
||||
good = .False.
|
||||
do l = 1, N_states
|
||||
psi_ref_coef(i,l) = 0.d0
|
||||
good = good.or.(dabs(psi_coef(i,l)) > 0.05d0)
|
||||
enddo
|
||||
if (good) then
|
||||
N_det_ref = N_det_ref+1
|
||||
do k=1,N_int
|
||||
psi_ref(k,1,N_det_ref) = psi_det(k,1,i)
|
||||
psi_ref(k,2,N_det_ref) = psi_det(k,2,i)
|
||||
enddo
|
||||
idx_ref(N_det_ref) = i
|
||||
do k=1,N_states
|
||||
psi_ref_coef(N_det_ref,k) = psi_coef(i,k)
|
||||
enddo
|
||||
endif
|
||||
enddo
|
||||
call write_int(output_determinants,N_det_ref, 'Number of determinants in the reference')
|
||||
|
||||
END_PROVIDER
|
||||
|
45
plugins/Psiref_Utils/psi_ref_excitations_operators.irp.f
Normal file
@ -0,0 +1,45 @@
|
||||
use bitmasks
|
||||
|
||||
BEGIN_PROVIDER [integer(bit_kind), holes_operators, (N_int,2)]
|
||||
&BEGIN_PROVIDER [integer(bit_kind), particles_operators, (N_int,2)]
|
||||
|
||||
BEGIN_DOC
|
||||
! holes_operators represents an array of integers where all the holes have
|
||||
! been done going from psi_ref to psi_non_ref
|
||||
! particles_operators represents an array of integers where all the particles have
|
||||
! been done going from psi_ref to psi_non_ref
|
||||
END_DOC
|
||||
holes_operators = 0_bit_kind
|
||||
particles_operators = 0_bit_kind
|
||||
implicit none
|
||||
integer(bit_kind), allocatable :: key_test(:,:)
|
||||
integer(bit_kind), allocatable :: holes(:,:),particles(:,:)
|
||||
allocate(key_test(N_int,2))
|
||||
allocate(holes(N_int,2),particles(N_int,2))
|
||||
integer :: i,j,k
|
||||
print*,'providing holes_operators and particles_operators'
|
||||
do i = 1, N_det_ref
|
||||
do j = 1, N_det_non_ref
|
||||
do k = 1, N_int
|
||||
key_test(k,1) = xor(psi_ref(k,1,i),psi_non_ref(k,1,j))
|
||||
key_test(k,2) = xor(psi_ref(k,2,i),psi_non_ref(k,2,j))
|
||||
enddo
|
||||
do k = 1,N_int
|
||||
holes(k,1) = iand(psi_ref(k,1,i),key_test(k,1))
|
||||
holes(k,2) = iand(psi_ref(k,2,i),key_test(k,2))
|
||||
particles(k,1) = iand(psi_non_ref(k,1,j),key_test(k,1))
|
||||
particles(k,2) = iand(psi_non_ref(k,2,j),key_test(k,2))
|
||||
enddo
|
||||
do k = 1, N_int
|
||||
holes_operators(k,1) = ior(holes_operators(k,1),holes(k,1))
|
||||
holes_operators(k,2) = ior(holes_operators(k,2),holes(k,2))
|
||||
particles_operators(k,1) = ior(particles_operators(k,1),particles(k,1))
|
||||
particles_operators(k,2) = ior(particles_operators(k,2),particles(k,2))
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
deallocate(key_test)
|
||||
deallocate(holes,particles)
|
||||
|
||||
END_PROVIDER
|
@ -18,17 +18,20 @@ END_PROVIDER
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_non_ref, (N_int,2,psi_det_size) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_non_ref_coef, (psi_det_size,n_states) ]
|
||||
&BEGIN_PROVIDER [ integer, idx_non_ref, (psi_det_size) ]
|
||||
&BEGIN_PROVIDER [ integer, idx_non_ref_rev, (psi_det_size) ]
|
||||
&BEGIN_PROVIDER [ integer, N_det_non_ref ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Set of determinants which are not part of the reference, defined from the application
|
||||
! of the reference bitmask on the determinants.
|
||||
! idx_non_ref gives the indice of the determinant in psi_det.
|
||||
! idx_non_ref_rev gives the reverse.
|
||||
END_DOC
|
||||
integer :: i_non_ref,j,k
|
||||
integer :: degree
|
||||
logical :: in_ref
|
||||
i_non_ref =0
|
||||
idx_non_ref_rev = 0
|
||||
do k=1,N_det
|
||||
in_ref = .False.
|
||||
do j=1,N_det_ref
|
||||
@ -49,11 +52,54 @@ END_PROVIDER
|
||||
psi_non_ref_coef(i_non_ref,j) = psi_coef(k,j)
|
||||
enddo
|
||||
idx_non_ref(i_non_ref) = k
|
||||
idx_non_ref_rev(k) = i_non_ref
|
||||
endif
|
||||
enddo
|
||||
N_det_non_ref = i_non_ref
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_non_ref_restart, (N_int,2,psi_det_size) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_non_ref_coef_restart, (psi_det_size,n_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Set of determinants which are not part of the reference, defined from the application
|
||||
! of the reference bitmask on the determinants.
|
||||
! idx_non_ref gives the indice of the determinant in psi_det.
|
||||
! But this is with respect to the restart wave function.
|
||||
END_DOC
|
||||
integer :: i_non_ref,j,k
|
||||
integer :: degree
|
||||
logical :: in_ref
|
||||
integer, save :: ifirst = 0
|
||||
if(ifirst==0)then
|
||||
ifirst = 1
|
||||
i_non_ref =0
|
||||
do k=1,N_det
|
||||
in_ref = .False.
|
||||
do j=1,N_det_ref
|
||||
call get_excitation_degree(psi_ref(1,1,j), psi_det(1,1,k), degree, N_int)
|
||||
if (degree == 0) then
|
||||
in_ref = .True.
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
if (.not.in_ref) then
|
||||
double precision :: hij
|
||||
i_non_ref += 1
|
||||
do j=1,N_int
|
||||
psi_non_ref_restart(j,1,i_non_ref) = psi_det(j,1,k)
|
||||
psi_non_ref_restart(j,2,i_non_ref) = psi_det(j,2,k)
|
||||
enddo
|
||||
do j=1,N_states
|
||||
psi_non_ref_coef_restart(i_non_ref,j) = psi_coef(k,j)
|
||||
enddo
|
||||
endif
|
||||
enddo
|
||||
endif
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), psi_non_ref_sorted_bit, (N_int,2,psi_det_size) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_non_ref_coef_sorted_bit, (psi_det_size,N_states) ]
|
||||
implicit none
|
||||
@ -119,5 +165,102 @@ END_PROVIDER
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
logical function is_in_psi_ref(key,Nint)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! True if the determinant ``det`` is in the wave function
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint
|
||||
integer(bit_kind), intent(in) :: key(Nint,2)
|
||||
integer, external :: get_index_in_psi_ref_sorted_bit
|
||||
|
||||
!DIR$ FORCEINLINE
|
||||
is_in_psi_ref = get_index_in_psi_ref_sorted_bit(key,Nint) > 0
|
||||
end
|
||||
|
||||
integer function get_index_in_psi_ref_sorted_bit(key,Nint)
|
||||
use bitmasks
|
||||
BEGIN_DOC
|
||||
! Returns the index of the determinant in the ``psi_ref_sorted_bit`` array
|
||||
END_DOC
|
||||
implicit none
|
||||
|
||||
integer, intent(in) :: Nint
|
||||
integer(bit_kind), intent(in) :: key(Nint,2)
|
||||
|
||||
integer :: i, ibegin, iend, istep, l
|
||||
integer*8 :: det_ref, det_search
|
||||
integer*8, external :: det_search_key
|
||||
logical :: in_wavefunction
|
||||
|
||||
in_wavefunction = .False.
|
||||
get_index_in_psi_ref_sorted_bit = 0
|
||||
ibegin = 1
|
||||
iend = N_det+1
|
||||
|
||||
!DIR$ FORCEINLINE
|
||||
det_ref = det_search_key(key,Nint)
|
||||
!DIR$ FORCEINLINE
|
||||
det_search = det_search_key(psi_ref_sorted_bit(1,1,1),Nint)
|
||||
|
||||
istep = ishft(iend-ibegin,-1)
|
||||
i=ibegin+istep
|
||||
do while (istep > 0)
|
||||
!DIR$ FORCEINLINE
|
||||
det_search = det_search_key(psi_ref_sorted_bit(1,1,i),Nint)
|
||||
if ( det_search > det_ref ) then
|
||||
iend = i
|
||||
else if ( det_search == det_ref ) then
|
||||
exit
|
||||
else
|
||||
ibegin = i
|
||||
endif
|
||||
istep = ishft(iend-ibegin,-1)
|
||||
i = ibegin + istep
|
||||
end do
|
||||
|
||||
!DIR$ FORCEINLINE
|
||||
do while (det_search_key(psi_ref_sorted_bit(1,1,i),Nint) == det_ref)
|
||||
i = i-1
|
||||
if (i == 0) then
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
i += 1
|
||||
|
||||
if (i > N_det) then
|
||||
return
|
||||
endif
|
||||
|
||||
!DIR$ FORCEINLINE
|
||||
do while (det_search_key(psi_ref_sorted_bit(1,1,i),Nint) == det_ref)
|
||||
if ( (key(1,1) /= psi_ref_sorted_bit(1,1,i)).or. &
|
||||
(key(1,2) /= psi_ref_sorted_bit(1,2,i)) ) then
|
||||
continue
|
||||
else
|
||||
in_wavefunction = .True.
|
||||
!DIR$ IVDEP
|
||||
!DIR$ LOOP COUNT MIN(3)
|
||||
do l=2,Nint
|
||||
if ( (key(l,1) /= psi_ref_sorted_bit(l,1,i)).or. &
|
||||
(key(l,2) /= psi_ref_sorted_bit(l,2,i)) ) then
|
||||
in_wavefunction = .False.
|
||||
endif
|
||||
enddo
|
||||
if (in_wavefunction) then
|
||||
get_index_in_psi_ref_sorted_bit = i
|
||||
! exit
|
||||
return
|
||||
endif
|
||||
endif
|
||||
i += 1
|
||||
if (i > N_det) then
|
||||
! exit
|
||||
return
|
||||
endif
|
||||
|
||||
enddo
|
||||
|
||||
end
|
||||
|
||||
|
@ -26,7 +26,7 @@ Documentation
|
||||
Undocumented
|
||||
|
||||
|
||||
`test_pseudo_grid_ao <http://github.com/LCPQ/quantum_package/tree/master/src/QmcChem/pot_ao_pseudo_ints.irp.f#L105>`_
|
||||
`test_pseudo_grid_ao <http://github.com/LCPQ/quantum_package/tree/master/src/QmcChem/pot_ao_pseudo_ints.irp.f#L111>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
|
@ -88,8 +88,14 @@ BEGIN_PROVIDER [ double precision, mo_pseudo_grid, (ao_num,-pseudo_lmax:pseudo_l
|
||||
do k=1,nucl_num
|
||||
do l=0,pseudo_lmax
|
||||
do m=-l,l
|
||||
do j=1,mo_tot_num
|
||||
do i=1,ao_num
|
||||
do j=1,mo_tot_num
|
||||
if (dabs(ao_pseudo_grid(i,m,l,k,n)) < 1.e-12) then
|
||||
cycle
|
||||
endif
|
||||
if (dabs(mo_coef(i,j)) < 1.e-8) then
|
||||
cycle
|
||||
endif
|
||||
mo_pseudo_grid(j,m,l,k,n) = mo_pseudo_grid(j,m,l,k,n) + &
|
||||
ao_pseudo_grid(i,m,l,k,n) * mo_coef(i,j)
|
||||
enddo
|
||||
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 33 KiB |
@ -161,7 +161,7 @@ def get_l_ezfio_config():
|
||||
|
||||
def ninja_ezfio_cfg_rule():
|
||||
"""
|
||||
Return the ezfio_interface rule who will create
|
||||
Return the ezfio_interface rule which will create
|
||||
the _ezfio_interface.irp.f the _ezfio_config from the EZFIO.cfg
|
||||
"""
|
||||
|
||||
@ -309,7 +309,7 @@ def ninja_symlink_rule():
|
||||
def ninja_symlink_build(path_module, l_symlink):
|
||||
"""
|
||||
Create the symlink
|
||||
and the l_symlink who are all the symlink list
|
||||
and the l_symlink which are all the symlink list
|
||||
"""
|
||||
|
||||
if not l_symlink:
|
||||
@ -400,7 +400,7 @@ def get_l_file_for_module(path_module):
|
||||
|
||||
def get_file_dependency(d_info_module):
|
||||
"""
|
||||
For a module return all the irp.f90 file who depend
|
||||
For a module return all the irp.f90 needed files
|
||||
"""
|
||||
d_irp = defaultdict(dict)
|
||||
|
||||
@ -578,13 +578,13 @@ def get_binaries(path_module):
|
||||
def get_dict_binaries(l_module, mode="production"):
|
||||
"""
|
||||
Return a dict [module] = list_binaries
|
||||
If a the production mode is enable only header module
|
||||
who will produce all binaries
|
||||
If the production mode is enabled, return header modules
|
||||
which will produce all binaries
|
||||
|
||||
Example : The module Full_CI can produce the binary SCF
|
||||
so you dont need to compile at all the module Hartree-Fock
|
||||
|
||||
But you need to change the path acordingly
|
||||
But you need to change the path accordingly
|
||||
Full_CI/Hartree-Fock/SCF
|
||||
"""
|
||||
d_binaries = defaultdict(list)
|
||||
@ -907,12 +907,10 @@ if __name__ == "__main__":
|
||||
for module in dict_root_path.values():
|
||||
|
||||
if module not in d_binaries:
|
||||
l_msg = ["{0} is a root module but he do not containt a main file",
|
||||
"Is intolerable !",
|
||||
"You need a main file:",
|
||||
l_msg = ["{0} is a root module but does not contain a main file.",
|
||||
"- Create it in {0}",
|
||||
"- Or delete {0} `qp_install_module.py uninstall {0}`",
|
||||
"- Or install a module who need {0} with a main "]
|
||||
"- Or install a module that needs {0} with a main "]
|
||||
|
||||
print "\n".join(l_msg).format(module.rel)
|
||||
sys.exit(1)
|
||||
|
@ -33,7 +33,7 @@ Required:
|
||||
doc:<str> The plain text documentation
|
||||
type:<str> A Fancy_type supported by the ocaml.
|
||||
type `ei_handler.py get_supported_type` for a list
|
||||
interface:<str> The interface is list of string sepeared by "," who can containt :
|
||||
interface:<str> The interface is list of string sepeared by "," which can contain :
|
||||
- ezfio (if you only whant the ezfiolib)
|
||||
- provider (if you want the provider)
|
||||
- ocaml (if you want the ocaml gestion)
|
||||
@ -233,7 +233,7 @@ def get_dict_config_file(module_obj):
|
||||
|
||||
d[pvd]["module"] = module_obj
|
||||
|
||||
# Create the dictionary who containt the value per default
|
||||
# Create the dictionary which contains the default value
|
||||
d_default = {"ezfio_name": pvd,
|
||||
"ezfio_dir": module_obj.lower,
|
||||
"size": "1"}
|
||||
@ -309,7 +309,7 @@ def create_ezfio_provider(dict_ezfio_cfg):
|
||||
interface,
|
||||
default
|
||||
size}
|
||||
create the a list who containt all the code for the provider
|
||||
create the a list which contains all the code for the provider
|
||||
output = output_dict_info['ezfio_dir'
|
||||
return [code, ...]
|
||||
"""
|
||||
@ -613,8 +613,8 @@ def save_ocaml_input(module_lower, str_ocaml_input):
|
||||
|
||||
def get_l_module_with_auto_generate_ocaml_lower():
|
||||
"""
|
||||
Get all module who have EZFIO.cfg with ocaml data
|
||||
(NB `search` in all the ligne and `match` only in one)
|
||||
Get all modules which have EZFIO.cfg with Ocaml data
|
||||
(NB `search` in all the lines and `match` only in one)
|
||||
"""
|
||||
|
||||
# ~#~#~#~#~#~#~#~ #
|
||||
|
@ -28,6 +28,7 @@ filterhole
|
||||
filterparticle
|
||||
do_double_excitations
|
||||
check_double_excitation
|
||||
filter_vvvv_excitation
|
||||
""".split()
|
||||
|
||||
class H_apply(object):
|
||||
@ -51,7 +52,7 @@ class H_apply(object):
|
||||
!$OMP accu,i_a,hole_tmp,particle_tmp,occ_particle_tmp, &
|
||||
!$OMP occ_hole_tmp,key_idx,i_b,j_b,key,N_elec_in_key_part_1,&
|
||||
!$OMP N_elec_in_key_hole_1,N_elec_in_key_part_2, &
|
||||
!$OMP N_elec_in_key_hole_2,ia_ja_pairs) &
|
||||
!$OMP N_elec_in_key_hole_2,ia_ja_pairs,key_union_hole_part) &
|
||||
!$OMP SHARED(key_in,N_int,elec_num_tab,mo_tot_num, &
|
||||
!$OMP hole_1, particl_1, hole_2, particl_2, &
|
||||
!$OMP elec_alpha_num,i_generator) FIRSTPRIVATE(iproc)"""
|
||||
@ -126,6 +127,21 @@ class H_apply(object):
|
||||
self["check_double_excitation"] = """
|
||||
check_double_excitation = .False.
|
||||
"""
|
||||
|
||||
def filter_vvvv_excitation(self):
|
||||
self["filter_vvvv_excitation"] = """
|
||||
key_union_hole_part = 0_bit_kind
|
||||
call set_bite_to_integer(i_a,key_union_hole_part,N_int)
|
||||
call set_bite_to_integer(j_a,key_union_hole_part,N_int)
|
||||
call set_bite_to_integer(i_b,key_union_hole_part,N_int)
|
||||
call set_bite_to_integer(j_b,key_union_hole_part,N_int)
|
||||
do jtest_vvvv = 1, N_int
|
||||
if(iand(key_union_hole_part(jtest_vvvv),virt_bitmask(jtest_vvvv,1).ne.key_union_hole_part(jtest_vvvv)))then
|
||||
b_cycle = .False.
|
||||
endif
|
||||
enddo
|
||||
if(b_cycle) cycle
|
||||
"""
|
||||
def set_filter_holes(self):
|
||||
self["filterhole"] = """
|
||||
if(iand(ibset(0_bit_kind,j),hole(k,other_spin)).eq.0_bit_kind )cycle
|
||||
|
@ -244,7 +244,10 @@ if __name__ == '__main__':
|
||||
print " ".join(sorted(m.l_descendant_unique([module])))
|
||||
|
||||
if arguments["create_png"]:
|
||||
try:
|
||||
m.create_png(l_module)
|
||||
except RuntimeError:
|
||||
pass
|
||||
|
||||
if arguments["clean"] or arguments["create_git_ignore"]:
|
||||
|
||||
|
@ -72,7 +72,7 @@ Documentation
|
||||
Transform a bit string to a string for printing
|
||||
|
||||
|
||||
`cas_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L173>`_
|
||||
`cas_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L220>`_
|
||||
Bitmasks for CAS reference determinants. (N_int, alpha/beta, CAS reference)
|
||||
|
||||
|
||||
@ -80,6 +80,10 @@ Documentation
|
||||
Bitmask to include all possible single excitations from Hartree-Fock
|
||||
|
||||
|
||||
`core_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L350>`_
|
||||
Reunion of the inactive, active and virtual bitmasks
|
||||
|
||||
|
||||
`debug_det <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks_routines.irp.f#L120>`_
|
||||
Subroutine to print the content of a determinant in '+-' notation and
|
||||
hexadecimal representation.
|
||||
@ -94,7 +98,27 @@ Documentation
|
||||
Bitmask to include all possible MOs
|
||||
|
||||
|
||||
`generators_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L100>`_
|
||||
`generators_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L147>`_
|
||||
Bitmasks for generator determinants.
|
||||
(N_int, alpha/beta, hole/particle, generator).
|
||||
.br
|
||||
3rd index is :
|
||||
.br
|
||||
* 1 : hole for single exc
|
||||
.br
|
||||
* 2 : particle for single exc
|
||||
.br
|
||||
* 3 : hole for 1st exc of double
|
||||
.br
|
||||
* 4 : particle for 1st exc of double
|
||||
.br
|
||||
* 5 : hole for 2nd exc of double
|
||||
.br
|
||||
* 6 : particle for 2nd exc of double
|
||||
.br
|
||||
|
||||
|
||||
`generators_bitmask_restart <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L103>`_
|
||||
Bitmasks for generator determinants.
|
||||
(N_int, alpha/beta, hole/particle, generator).
|
||||
.br
|
||||
@ -118,24 +142,36 @@ Documentation
|
||||
Hartree Fock bit mask
|
||||
|
||||
|
||||
`i_bitmask_gen <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L211>`_
|
||||
`i_bitmask_gen <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L364>`_
|
||||
Current bitmask for the generators
|
||||
|
||||
|
||||
`inact_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L193>`_
|
||||
`inact_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L254>`_
|
||||
Bitmasks for the inactive orbitals that are excited in post CAS method
|
||||
|
||||
|
||||
`inact_virt_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L338>`_
|
||||
Reunion of the inactive and virtual bitmasks
|
||||
|
||||
|
||||
`is_a_two_holes_two_particles <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmask_cas_routines.irp.f#L206>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
`list_inact <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L304>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
`list_to_bitstring <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks_routines.irp.f#L29>`_
|
||||
Returns the physical string "string(N_int,2)" from the array of
|
||||
occupations "list(N_int*bit_kind_size,2)
|
||||
|
||||
|
||||
`n_cas_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L143>`_
|
||||
`list_virt <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L305>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
`n_cas_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L190>`_
|
||||
Number of bitmasks for CAS
|
||||
|
||||
|
||||
@ -143,10 +179,18 @@ Documentation
|
||||
Number of bitmasks for generators
|
||||
|
||||
|
||||
`n_inact_orb <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L256>`_
|
||||
Bitmasks for the inactive orbitals that are excited in post CAS method
|
||||
|
||||
|
||||
`n_int <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L3>`_
|
||||
Number of 64-bit integers needed to represent determinants as binary strings
|
||||
|
||||
|
||||
`n_virt_orb <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L257>`_
|
||||
Bitmasks for the inactive orbitals that are excited in post CAS method
|
||||
|
||||
|
||||
`number_of_holes <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmask_cas_routines.irp.f#L1>`_
|
||||
Undocumented
|
||||
|
||||
@ -175,6 +219,14 @@ Documentation
|
||||
Reference bit mask, used in Slater rules, chosen as Hartree-Fock bitmask
|
||||
|
||||
|
||||
`virt_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L194>`_
|
||||
`reunion_of_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L325>`_
|
||||
Reunion of the inactive, active and virtual bitmasks
|
||||
|
||||
|
||||
`unpaired_alpha_electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L373>`_
|
||||
Bitmask reprenting the unpaired alpha electrons in the HF_bitmask
|
||||
|
||||
|
||||
`virt_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L255>`_
|
||||
Bitmasks for the inactive orbitals that are excited in post CAS method
|
||||
|
||||
|
@ -97,6 +97,53 @@ BEGIN_PROVIDER [ integer, N_generators_bitmask ]
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), generators_bitmask_restart, (N_int,2,6,N_generators_bitmask) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Bitmasks for generator determinants.
|
||||
! (N_int, alpha/beta, hole/particle, generator).
|
||||
!
|
||||
! 3rd index is :
|
||||
!
|
||||
! * 1 : hole for single exc
|
||||
!
|
||||
! * 2 : particle for single exc
|
||||
!
|
||||
! * 3 : hole for 1st exc of double
|
||||
!
|
||||
! * 4 : particle for 1st exc of double
|
||||
!
|
||||
! * 5 : hole for 2nd exc of double
|
||||
!
|
||||
! * 6 : particle for 2nd exc of double
|
||||
!
|
||||
END_DOC
|
||||
logical :: exists
|
||||
PROVIDE ezfio_filename
|
||||
|
||||
call ezfio_has_bitmasks_generators(exists)
|
||||
if (exists) then
|
||||
call ezfio_get_bitmasks_generators(generators_bitmask_restart)
|
||||
else
|
||||
integer :: k, ispin
|
||||
do k=1,N_generators_bitmask
|
||||
do ispin=1,2
|
||||
generators_bitmask_restart(:,ispin,s_hole ,k) = full_ijkl_bitmask(:,d_hole1)
|
||||
generators_bitmask_restart(:,ispin,s_part ,k) = full_ijkl_bitmask(:,d_part1)
|
||||
generators_bitmask_restart(:,ispin,d_hole1,k) = full_ijkl_bitmask(:,d_hole1)
|
||||
generators_bitmask_restart(:,ispin,d_part1,k) = full_ijkl_bitmask(:,d_part1)
|
||||
generators_bitmask_restart(:,ispin,d_hole2,k) = full_ijkl_bitmask(:,d_hole2)
|
||||
generators_bitmask_restart(:,ispin,d_part2,k) = full_ijkl_bitmask(:,d_part2)
|
||||
enddo
|
||||
enddo
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), generators_bitmask, (N_int,2,6,N_generators_bitmask) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
@ -176,38 +223,144 @@ BEGIN_PROVIDER [ integer(bit_kind), cas_bitmask, (N_int,2,N_cas_bitmask) ]
|
||||
! Bitmasks for CAS reference determinants. (N_int, alpha/beta, CAS reference)
|
||||
END_DOC
|
||||
logical :: exists
|
||||
integer :: i
|
||||
integer :: i,i_part,i_gen,j
|
||||
PROVIDE ezfio_filename
|
||||
|
||||
call ezfio_has_bitmasks_cas(exists)
|
||||
if (exists) then
|
||||
print*,'---------------------'
|
||||
print*,'CAS BITMASK RESTART'
|
||||
call ezfio_get_bitmasks_cas(cas_bitmask)
|
||||
print*,'---------------------'
|
||||
else
|
||||
if(N_generators_bitmask == 1)then
|
||||
do i=1,N_cas_bitmask
|
||||
cas_bitmask(:,:,i) = iand(not(HF_bitmask(:,:)),full_ijkl_bitmask(:,:))
|
||||
enddo
|
||||
else
|
||||
i_part = 2
|
||||
i_gen = 1
|
||||
do j = 1, N_cas_bitmask
|
||||
do i = 1, N_int
|
||||
cas_bitmask(i,1,j) = generators_bitmask_restart(i,1,i_part,i_gen)
|
||||
cas_bitmask(i,2,j) = generators_bitmask_restart(i,2,i_part,i_gen)
|
||||
enddo
|
||||
enddo
|
||||
endif
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), inact_bitmask, (N_int,2) ]
|
||||
&BEGIN_PROVIDER [ integer(bit_kind), virt_bitmask, (N_int,2) ]
|
||||
&BEGIN_PROVIDER [ integer, n_inact_orb ]
|
||||
&BEGIN_PROVIDER [ integer, n_virt_orb ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Bitmasks for the inactive orbitals that are excited in post CAS method
|
||||
END_DOC
|
||||
logical :: exists
|
||||
integer :: j
|
||||
integer :: j,i
|
||||
integer :: i_hole,i_part,i_gen
|
||||
PROVIDE ezfio_filename
|
||||
!do j = 1, N_int
|
||||
! inact_bitmask(j,1) = xor(generators_bitmask(j,1,1,1),cas_bitmask(j,1,1))
|
||||
! inact_bitmask(j,2) = xor(generators_bitmask(j,2,1,1),cas_bitmask(j,2,1))
|
||||
! virt_bitmask(j,1) = xor(generators_bitmask(j,1,2,1),cas_bitmask(j,1,1))
|
||||
! virt_bitmask(j,2) = xor(generators_bitmask(j,2,2,1),cas_bitmask(j,2,1))
|
||||
!enddo
|
||||
n_inact_orb = 0
|
||||
n_virt_orb = 0
|
||||
if(N_generators_bitmask == 1)then
|
||||
do j = 1, N_int
|
||||
inact_bitmask(j,1) = xor(generators_bitmask(j,1,1,1),cas_bitmask(j,1,1))
|
||||
inact_bitmask(j,2) = xor(generators_bitmask(j,2,1,1),cas_bitmask(j,2,1))
|
||||
virt_bitmask(j,1) = xor(generators_bitmask(j,1,2,1),cas_bitmask(j,1,1))
|
||||
virt_bitmask(j,2) = xor(generators_bitmask(j,2,2,1),cas_bitmask(j,2,1))
|
||||
inact_bitmask(j,1) = xor(generators_bitmask_restart(j,1,1,1),cas_bitmask(j,1,1))
|
||||
inact_bitmask(j,2) = xor(generators_bitmask_restart(j,2,1,1),cas_bitmask(j,2,1))
|
||||
virt_bitmask(j,1) = xor(generators_bitmask_restart(j,1,2,1),cas_bitmask(j,1,1))
|
||||
virt_bitmask(j,2) = xor(generators_bitmask_restart(j,2,2,1),cas_bitmask(j,2,1))
|
||||
n_inact_orb += popcnt(inact_bitmask(j,1))
|
||||
n_virt_orb += popcnt(virt_bitmask(j,1))
|
||||
enddo
|
||||
else
|
||||
i_hole = 1
|
||||
i_gen = 1
|
||||
do i = 1, N_int
|
||||
inact_bitmask(i,1) = generators_bitmask(i,1,i_hole,i_gen)
|
||||
inact_bitmask(i,2) = generators_bitmask(i,2,i_hole,i_gen)
|
||||
n_inact_orb += popcnt(inact_bitmask(i,1))
|
||||
enddo
|
||||
i_part = 2
|
||||
i_gen = 3
|
||||
do i = 1, N_int
|
||||
virt_bitmask(i,1) = generators_bitmask(i,1,i_part,i_gen)
|
||||
virt_bitmask(i,2) = generators_bitmask(i,2,i_part,i_gen)
|
||||
n_virt_orb += popcnt(virt_bitmask(i,1))
|
||||
enddo
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ integer, list_inact, (n_inact_orb)]
|
||||
&BEGIN_PROVIDER [ integer, list_virt, (n_virt_orb)]
|
||||
implicit none
|
||||
integer :: occ_inact(N_int*bit_kind_size)
|
||||
integer :: itest,i
|
||||
occ_inact = 0
|
||||
call bitstring_to_list(inact_bitmask(1,1), occ_inact(1), itest, N_int)
|
||||
ASSERT(itest==n_inact_orb)
|
||||
do i = 1, n_inact_orb
|
||||
list_inact(i) = occ_inact(i)
|
||||
enddo
|
||||
|
||||
occ_inact = 0
|
||||
call bitstring_to_list(virt_bitmask(1,1), occ_inact(1), itest, N_int)
|
||||
ASSERT(itest==n_virt_orb)
|
||||
do i = 1, n_virt_orb
|
||||
list_virt(i) = occ_inact(i)
|
||||
enddo
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), reunion_of_bitmask, (N_int,2)]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Reunion of the inactive, active and virtual bitmasks
|
||||
END_DOC
|
||||
integer :: i,j
|
||||
do i = 1, N_int
|
||||
reunion_of_bitmask(i,1) = ior(ior(cas_bitmask(i,1,1),inact_bitmask(i,1)),virt_bitmask(i,1))
|
||||
reunion_of_bitmask(i,2) = ior(ior(cas_bitmask(i,2,1),inact_bitmask(i,2)),virt_bitmask(i,2))
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), inact_virt_bitmask, (N_int,2)]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Reunion of the inactive and virtual bitmasks
|
||||
END_DOC
|
||||
integer :: i,j
|
||||
do i = 1, N_int
|
||||
inact_virt_bitmask(i,1) = ior(inact_bitmask(i,1),virt_bitmask(i,1))
|
||||
inact_virt_bitmask(i,2) = ior(inact_bitmask(i,2),virt_bitmask(i,2))
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), core_bitmask, (N_int,2)]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Reunion of the inactive, active and virtual bitmasks
|
||||
END_DOC
|
||||
integer :: i,j
|
||||
do i = 1, N_int
|
||||
core_bitmask(i,1) = iand(ref_bitmask(i,1),reunion_of_bitmask(i,1))
|
||||
core_bitmask(i,2) = iand(ref_bitmask(i,2),reunion_of_bitmask(i,2))
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ integer, i_bitmask_gen ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
@ -217,3 +370,14 @@ BEGIN_PROVIDER [ integer, i_bitmask_gen ]
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ integer(bit_kind), unpaired_alpha_electrons, (N_int)]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Bitmask reprenting the unpaired alpha electrons in the HF_bitmask
|
||||
END_DOC
|
||||
integer :: i
|
||||
unpaired_alpha_electrons = 0_bit_kind
|
||||
do i = 1, N_int
|
||||
unpaired_alpha_electrons(i) = xor(HF_bitmask(i,1),HF_bitmask(i,2))
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
1
src/Determinants/.gitignore
vendored
@ -15,7 +15,6 @@ Makefile.depend
|
||||
Nuclei
|
||||
Pseudo
|
||||
Utils
|
||||
det_svd
|
||||
ezfio_interface.irp.f
|
||||
guess_doublet
|
||||
guess_singlet
|
||||
|
@ -18,6 +18,7 @@ subroutine $subroutine_diexc(key_in, hole_1,particl_1, hole_2, particl_2, i_gene
|
||||
integer(bit_kind), allocatable :: hole_save(:,:)
|
||||
integer(bit_kind), allocatable :: key(:,:),hole(:,:), particle(:,:)
|
||||
integer(bit_kind), allocatable :: hole_tmp(:,:), particle_tmp(:,:)
|
||||
integer(bit_kind), allocatable :: key_union_hole_part(:)
|
||||
integer :: ii,i,jj,j,k,ispin,l
|
||||
integer, allocatable :: occ_particle(:,:), occ_hole(:,:)
|
||||
integer, allocatable :: occ_particle_tmp(:,:), occ_hole_tmp(:,:)
|
||||
@ -31,6 +32,7 @@ subroutine $subroutine_diexc(key_in, hole_1,particl_1, hole_2, particl_2, i_gene
|
||||
integer, allocatable :: ib_jb_pairs(:,:)
|
||||
double precision :: diag_H_mat_elem
|
||||
integer :: iproc
|
||||
integer :: jtest_vvvv
|
||||
integer(omp_lock_kind), save :: lck, ifirst=0
|
||||
if (ifirst == 0) then
|
||||
!$ call omp_init_lock(lck)
|
||||
@ -38,6 +40,7 @@ subroutine $subroutine_diexc(key_in, hole_1,particl_1, hole_2, particl_2, i_gene
|
||||
endif
|
||||
|
||||
logical :: check_double_excitation
|
||||
logical :: b_cycle
|
||||
check_double_excitation = .True.
|
||||
iproc = iproc_in
|
||||
|
||||
@ -50,7 +53,7 @@ subroutine $subroutine_diexc(key_in, hole_1,particl_1, hole_2, particl_2, i_gene
|
||||
key(N_int,2),hole(N_int,2), particle(N_int,2), hole_tmp(N_int,2),&
|
||||
particle_tmp(N_int,2), occ_particle(N_int*bit_kind_size,2), &
|
||||
occ_hole(N_int*bit_kind_size,2), occ_particle_tmp(N_int*bit_kind_size,2),&
|
||||
occ_hole_tmp(N_int*bit_kind_size,2))
|
||||
occ_hole_tmp(N_int*bit_kind_size,2),key_union_hole_part(N_int))
|
||||
$init_thread
|
||||
|
||||
|
||||
@ -151,6 +154,7 @@ subroutine $subroutine_diexc(key_in, hole_1,particl_1, hole_2, particl_2, i_gene
|
||||
ASSERT (j_b > 0)
|
||||
ASSERT (j_b <= mo_tot_num)
|
||||
if (array_pairs(i_b,j_b)) then
|
||||
$filter_vvvv_excitation
|
||||
i+= 1
|
||||
ib_jb_pairs(1,i) = i_b
|
||||
ib_jb_pairs(2,i) = j_b
|
||||
@ -200,6 +204,7 @@ subroutine $subroutine_diexc(key_in, hole_1,particl_1, hole_2, particl_2, i_gene
|
||||
ASSERT (j_b <= mo_tot_num)
|
||||
if (j_b <= j_a) cycle
|
||||
if (array_pairs(i_b,j_b)) then
|
||||
$filter_vvvv_excitation
|
||||
i+= 1
|
||||
ib_jb_pairs(1,i) = i_b
|
||||
ib_jb_pairs(2,i) = j_b
|
||||
@ -245,7 +250,7 @@ subroutine $subroutine_diexc(key_in, hole_1,particl_1, hole_2, particl_2, i_gene
|
||||
key,hole, particle, hole_tmp,&
|
||||
particle_tmp, occ_particle, &
|
||||
occ_hole, occ_particle_tmp,&
|
||||
occ_hole_tmp,array_pairs)
|
||||
occ_hole_tmp,array_pairs,key_union_hole_part)
|
||||
$omp_end_parallel
|
||||
$finalization
|
||||
end
|
||||
@ -278,6 +283,7 @@ subroutine $subroutine_monoexc(key_in, hole_1,particl_1,i_generator,iproc_in $pa
|
||||
integer :: N_elec_in_key_hole_1(2),N_elec_in_key_part_1(2)
|
||||
integer :: N_elec_in_key_hole_2(2),N_elec_in_key_part_2(2)
|
||||
logical :: is_a_two_holes_two_particles
|
||||
integer(bit_kind), allocatable :: key_union_hole_part(:)
|
||||
|
||||
integer, allocatable :: ia_ja_pairs(:,:,:)
|
||||
logical, allocatable :: array_pairs(:,:)
|
||||
@ -305,7 +311,7 @@ subroutine $subroutine_monoexc(key_in, hole_1,particl_1,i_generator,iproc_in $pa
|
||||
key(N_int,2),hole(N_int,2), particle(N_int,2), hole_tmp(N_int,2),&
|
||||
particle_tmp(N_int,2), occ_particle(N_int*bit_kind_size,2), &
|
||||
occ_hole(N_int*bit_kind_size,2), occ_particle_tmp(N_int*bit_kind_size,2),&
|
||||
occ_hole_tmp(N_int*bit_kind_size,2))
|
||||
occ_hole_tmp(N_int*bit_kind_size,2),key_union_hole_part(N_int))
|
||||
$init_thread
|
||||
!!!! First couple hole particle
|
||||
do j = 1, N_int
|
||||
@ -376,7 +382,7 @@ subroutine $subroutine_monoexc(key_in, hole_1,particl_1,i_generator,iproc_in $pa
|
||||
key,hole, particle, hole_tmp,&
|
||||
particle_tmp, occ_particle, &
|
||||
occ_hole, occ_particle_tmp,&
|
||||
occ_hole_tmp)
|
||||
occ_hole_tmp,key_union_hole_part)
|
||||
$omp_end_parallel
|
||||
$finalization
|
||||
|
||||
|
@ -54,11 +54,7 @@ Documentation
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
|
||||
`a_operator <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L962>`_
|
||||
Needed for diag_H_mat_elem
|
||||
|
||||
|
||||
`abs_psi_coef_max <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L451>`_
|
||||
Max and min values of the coefficients
|
||||
|
||||
|
||||
@ -66,7 +62,7 @@ Documentation
|
||||
Max and min values of the coefficients
|
||||
|
||||
|
||||
`ac_operator <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L1007>`_
|
||||
`ac_operator <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L1153>`_
|
||||
Needed for diag_H_mat_elem
|
||||
|
||||
|
||||
@ -152,8 +148,9 @@ Documentation
|
||||
After calling this subroutine, N_det, psi_det and psi_coef need to be touched
|
||||
|
||||
|
||||
`create_wf_of_psi_svd_matrix <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L416>`_
|
||||
Matrix of wf coefficients. Outer product of alpha and beta determinants
|
||||
`create_wf_of_psi_bilinear_matrix <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L417>`_
|
||||
Generate a wave function containing all possible products
|
||||
of alpha and beta determinants
|
||||
|
||||
|
||||
`davidson_converged <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/davidson.irp.f#L382>`_
|
||||
@ -228,7 +225,7 @@ Documentation
|
||||
det_coef
|
||||
|
||||
|
||||
`det_connections <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L1138>`_
|
||||
`det_connections <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L1283>`_
|
||||
Build connection proxy between determinants
|
||||
|
||||
|
||||
@ -244,10 +241,6 @@ Documentation
|
||||
Return an integer*8 corresponding to a determinant index for searching
|
||||
|
||||
|
||||
`det_svd <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/det_svd.irp.f#L1>`_
|
||||
Computes the SVD of the Alpha x Beta determinant coefficient matrix
|
||||
|
||||
|
||||
`det_to_occ_pattern <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/occ_pattern.irp.f#L2>`_
|
||||
Transform a determinant to an occupation pattern
|
||||
|
||||
@ -256,7 +249,7 @@ Documentation
|
||||
Diagonalization algorithm (Davidson or Lapack)
|
||||
|
||||
|
||||
`diag_h_mat_elem <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L900>`_
|
||||
`diag_h_mat_elem <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L1046>`_
|
||||
Computes <i|H|i>
|
||||
|
||||
|
||||
@ -358,7 +351,7 @@ Documentation
|
||||
Determinants are taken from the psi_det_sorted_ab array
|
||||
|
||||
|
||||
`generate_all_alpha_beta_det_products <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L471>`_
|
||||
`generate_all_alpha_beta_det_products <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L472>`_
|
||||
Create a wave function from all possible alpha x beta determinants
|
||||
|
||||
|
||||
@ -374,7 +367,7 @@ Documentation
|
||||
Returns the excitation degree between two determinants
|
||||
|
||||
|
||||
`get_excitation_degree_vector <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L816>`_
|
||||
`get_excitation_degree_vector <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L951>`_
|
||||
Applies get_excitation_degree to an array of determinants
|
||||
|
||||
|
||||
@ -394,7 +387,7 @@ Documentation
|
||||
Returns the excitation operator between two singly excited determinants and the phase
|
||||
|
||||
|
||||
`get_occ_from_key <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L1055>`_
|
||||
`get_occ_from_key <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L1201>`_
|
||||
Returns a list of occupation numbers from a bitstring
|
||||
|
||||
|
||||
@ -428,7 +421,7 @@ Documentation
|
||||
Undocumented
|
||||
|
||||
|
||||
`h_u_0 <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L1071>`_
|
||||
`h_u_0 <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L1217>`_
|
||||
Computes v_0 = H|u_0>
|
||||
.br
|
||||
n : number of determinants
|
||||
@ -440,15 +433,19 @@ Documentation
|
||||
Returns <i|H|j> where i and j are determinants
|
||||
|
||||
|
||||
`i_h_j_verbose <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L492>`_
|
||||
`i_h_j_phase_out <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L491>`_
|
||||
Returns <i|H|j> where i and j are determinants
|
||||
|
||||
|
||||
`i_h_psi <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L631>`_
|
||||
`i_h_j_verbose <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L627>`_
|
||||
Returns <i|H|j> where i and j are determinants
|
||||
|
||||
|
||||
`i_h_psi <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L766>`_
|
||||
<key|H|psi> for the various Nstates
|
||||
|
||||
|
||||
`i_h_psi_sc2 <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L713>`_
|
||||
`i_h_psi_sc2 <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L848>`_
|
||||
<key|H|psi> for the various Nstate
|
||||
.br
|
||||
returns in addition
|
||||
@ -462,7 +459,7 @@ Documentation
|
||||
to repeat the excitations
|
||||
|
||||
|
||||
`i_h_psi_sc2_verbose <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L760>`_
|
||||
`i_h_psi_sc2_verbose <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L895>`_
|
||||
<key|H|psi> for the various Nstate
|
||||
.br
|
||||
returns in addition
|
||||
@ -476,7 +473,7 @@ Documentation
|
||||
to repeat the excitations
|
||||
|
||||
|
||||
`i_h_psi_sec_ord <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L666>`_
|
||||
`i_h_psi_sec_ord <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L801>`_
|
||||
<key|H|psi> for the various Nstates
|
||||
|
||||
|
||||
@ -523,7 +520,7 @@ Documentation
|
||||
Energy of the reference bitmask used in Slater rules
|
||||
|
||||
|
||||
`n_con_int <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L1130>`_
|
||||
`n_con_int <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L1275>`_
|
||||
Number of integers to represent the connections between determinants
|
||||
|
||||
|
||||
@ -640,6 +637,26 @@ Documentation
|
||||
Wave function sorted by determinants contribution to the norm (state-averaged)
|
||||
|
||||
|
||||
`psi_bilinear_matrix <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L400>`_
|
||||
Coefficient matrix if the wave function is expressed in a bilinear form :
|
||||
D_a^t C D_b
|
||||
|
||||
|
||||
`psi_bilinear_matrix_columns <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L362>`_
|
||||
Sparse coefficient matrix if the wave function is expressed in a bilinear form :
|
||||
D_a^t C D_b
|
||||
|
||||
|
||||
`psi_bilinear_matrix_rows <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L361>`_
|
||||
Sparse coefficient matrix if the wave function is expressed in a bilinear form :
|
||||
D_a^t C D_b
|
||||
|
||||
|
||||
`psi_bilinear_matrix_values <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L360>`_
|
||||
Sparse coefficient matrix if the wave function is expressed in a bilinear form :
|
||||
D_a^t C D_b
|
||||
|
||||
|
||||
`psi_cas <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/psi_cas.irp.f#L3>`_
|
||||
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.
|
||||
@ -781,34 +798,6 @@ Documentation
|
||||
psi_occ_pattern(:,2,j) = jth occ_pattern of the wave function : represent all the double occupation
|
||||
|
||||
|
||||
`psi_svd_alpha <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L511>`_
|
||||
SVD wave function
|
||||
|
||||
|
||||
`psi_svd_beta <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L512>`_
|
||||
SVD wave function
|
||||
|
||||
|
||||
`psi_svd_coefs <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L513>`_
|
||||
SVD wave function
|
||||
|
||||
|
||||
`psi_svd_matrix <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L400>`_
|
||||
Matrix of wf coefficients. Outer product of alpha and beta determinants
|
||||
|
||||
|
||||
`psi_svd_matrix_columns <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L362>`_
|
||||
Matrix of wf coefficients. Outer product of alpha and beta determinants
|
||||
|
||||
|
||||
`psi_svd_matrix_rows <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L361>`_
|
||||
Matrix of wf coefficients. Outer product of alpha and beta determinants
|
||||
|
||||
|
||||
`psi_svd_matrix_values <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L360>`_
|
||||
Matrix of wf coefficients. Outer product of alpha and beta determinants
|
||||
|
||||
|
||||
`put_gess <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/guess_triplet.irp.f#L1>`_
|
||||
Undocumented
|
||||
|
||||
@ -874,10 +863,18 @@ Documentation
|
||||
Save the wave function into the EZFIO file
|
||||
|
||||
|
||||
`save_wavefunction_specified <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L752>`_
|
||||
Save the wave function into the EZFIO file
|
||||
|
||||
|
||||
`save_wavefunction_unsorted <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L655>`_
|
||||
Save the wave function into the EZFIO file
|
||||
|
||||
|
||||
`set_bite_to_integer <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/create_excitations.irp.f#L38>`_
|
||||
Undocumented
|
||||
|
||||
|
||||
`set_natural_mos <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/density_matrix.irp.f#L180>`_
|
||||
Set natural orbitals, obtained by diagonalization of the one-body density matrix in the MO basis
|
||||
|
||||
|
@ -33,13 +33,13 @@ end
|
||||
|
||||
|
||||
|
||||
logical function is_in_wavefunction(key,Nint,Ndet)
|
||||
logical function is_in_wavefunction(key,Nint)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! True if the determinant ``det`` is in the wave function
|
||||
END_DOC
|
||||
integer, intent(in) :: Nint, Ndet
|
||||
integer, intent(in) :: Nint
|
||||
integer(bit_kind), intent(in) :: key(Nint,2)
|
||||
integer, external :: get_index_in_psi_det_sorted_bit
|
||||
|
||||
@ -60,9 +60,9 @@ integer function get_index_in_psi_det_sorted_bit(key,Nint)
|
||||
integer :: i, ibegin, iend, istep, l
|
||||
integer*8 :: det_ref, det_search
|
||||
integer*8, external :: det_search_key
|
||||
logical :: is_in_wavefunction
|
||||
logical :: in_wavefunction
|
||||
|
||||
is_in_wavefunction = .False.
|
||||
in_wavefunction = .False.
|
||||
get_index_in_psi_det_sorted_bit = 0
|
||||
ibegin = 1
|
||||
iend = N_det+1
|
||||
@ -107,16 +107,16 @@ integer function get_index_in_psi_det_sorted_bit(key,Nint)
|
||||
(key(1,2) /= psi_det_sorted_bit(1,2,i)) ) then
|
||||
continue
|
||||
else
|
||||
is_in_wavefunction = .True.
|
||||
in_wavefunction = .True.
|
||||
!DIR$ IVDEP
|
||||
!DIR$ LOOP COUNT MIN(3)
|
||||
do l=2,Nint
|
||||
if ( (key(l,1) /= psi_det_sorted_bit(l,1,i)).or. &
|
||||
(key(l,2) /= psi_det_sorted_bit(l,2,i)) ) then
|
||||
is_in_wavefunction = .False.
|
||||
in_wavefunction = .False.
|
||||
endif
|
||||
enddo
|
||||
if (is_in_wavefunction) then
|
||||
if (in_wavefunction) then
|
||||
get_index_in_psi_det_sorted_bit = i
|
||||
! exit
|
||||
return
|
||||
@ -131,7 +131,7 @@ integer function get_index_in_psi_det_sorted_bit(key,Nint)
|
||||
enddo
|
||||
|
||||
! DEBUG is_in_wf
|
||||
! if (is_in_wavefunction) then
|
||||
! if (in_wavefunction) then
|
||||
! degree = 1
|
||||
! do i=1,N_det
|
||||
! integer :: degree
|
||||
|
@ -34,3 +34,14 @@ subroutine do_mono_excitation(key_in,i_hole,i_particle,ispin,i_ok)
|
||||
i_ok = -1
|
||||
endif
|
||||
end
|
||||
|
||||
subroutine set_bite_to_integer(i_physical,key,Nint)
|
||||
use bitmasks
|
||||
implicit none
|
||||
integer, intent(in) :: i_physical,Nint
|
||||
integer(bit_kind), intent(inout) :: key(Nint)
|
||||
integer :: k,j,i
|
||||
k = ishft(i_physical-1,-bit_kind_shift)+1
|
||||
j = i_physical-ishft(k-1,bit_kind_shift)-1
|
||||
key(k) = ibset(key(k),j)
|
||||
end
|
||||
|
@ -12,7 +12,7 @@ BEGIN_PROVIDER [ integer, davidson_sze_max ]
|
||||
! Max number of Davidson sizes
|
||||
END_DOC
|
||||
ASSERT (davidson_sze_max <= davidson_iter_max)
|
||||
davidson_sze_max = 8*N_states_diag
|
||||
davidson_sze_max = max(8,2*N_states_diag)
|
||||
END_PROVIDER
|
||||
|
||||
subroutine davidson_diag(dets_in,u_in,energies,dim_in,sze,N_st,Nint,iunit)
|
||||
@ -376,7 +376,7 @@ end
|
||||
! Can be : [ energy | residual | both | wall_time | cpu_time | iterations ]
|
||||
END_DOC
|
||||
davidson_criterion = 'residual'
|
||||
davidson_threshold = 1.d-9
|
||||
davidson_threshold = 1.d-10
|
||||
END_PROVIDER
|
||||
|
||||
subroutine davidson_converged(energy,residual,wall,iterations,cpu,N_st,converged)
|
||||
|
@ -1,61 +0,0 @@
|
||||
program det_svd
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Computes the SVD of the Alpha x Beta determinant coefficient matrix
|
||||
END_DOC
|
||||
integer :: i,j,k
|
||||
|
||||
read_wf = .True.
|
||||
TOUCH read_wf
|
||||
|
||||
print *, 'SVD matrix before filling'
|
||||
print *, '========================='
|
||||
print *, ''
|
||||
print *, 'N_det = ', N_det
|
||||
print *, 'N_det_alpha = ', N_det_alpha_unique
|
||||
print *, 'N_det_beta = ', N_det_beta_unique
|
||||
print *, ''
|
||||
|
||||
! do i=1,N_det_alpha_unique
|
||||
! do j=1,N_det_beta_unique
|
||||
! print *, i,j,psi_svd_matrix(i,j,:)
|
||||
! enddo
|
||||
! enddo
|
||||
|
||||
print *, ''
|
||||
print *, 'Energy = ', ci_energy
|
||||
print *, ''
|
||||
|
||||
print *, psi_svd_coefs(1:20,1)
|
||||
|
||||
call generate_all_alpha_beta_det_products
|
||||
print *, ''
|
||||
print *, 'Energy = ', ci_energy
|
||||
print *, ''
|
||||
|
||||
print *, 'SVD matrix after filling'
|
||||
print *, '========================'
|
||||
print *, ''
|
||||
print *, 'N_det = ', N_det
|
||||
print *, 'N_det_alpha = ', N_det_alpha_unique
|
||||
print *, 'N_det_beta = ', N_det_beta_unique
|
||||
print *, ''
|
||||
print *, ''
|
||||
call diagonalize_ci
|
||||
print *, 'Energy = ', ci_energy
|
||||
|
||||
do i=1,N_det_alpha_unique
|
||||
do j=1,N_det_beta_unique
|
||||
do k=1,N_states
|
||||
if (dabs(psi_svd_matrix(i,j,k)) < 1.d-15) then
|
||||
psi_svd_matrix(i,j,k) = 0.d0
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
print *, ''
|
||||
print *, psi_svd_coefs(1:20,1)
|
||||
call save_wavefunction
|
||||
|
||||
end
|
@ -749,3 +749,91 @@ 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
|
||||
END_DOC
|
||||
use bitmasks
|
||||
integer, intent(in) :: ndet,nstates
|
||||
integer(bit_kind), intent(in) :: psidet(N_int,2,ndet)
|
||||
double precision, intent(in) :: psicoef(ndet,nstates)
|
||||
integer, intent(in) :: index_det_save(ndet)
|
||||
integer, intent(in) :: ndetsave
|
||||
integer*8, allocatable :: psi_det_save(:,:,:)
|
||||
double precision, allocatable :: psi_coef_save(:,:)
|
||||
integer*8 :: det_8(100)
|
||||
integer(bit_kind) :: det_bk((100*8)/bit_kind)
|
||||
integer :: N_int2
|
||||
equivalence (det_8, det_bk)
|
||||
|
||||
integer :: i,k
|
||||
|
||||
PROVIDE progress_bar
|
||||
call start_progress(7,'Saving wfunction',0.d0)
|
||||
|
||||
progress_bar(1) = 1
|
||||
progress_value = dble(progress_bar(1))
|
||||
call ezfio_set_determinants_N_int(N_int)
|
||||
progress_bar(1) = 2
|
||||
progress_value = dble(progress_bar(1))
|
||||
call ezfio_set_determinants_bit_kind(bit_kind)
|
||||
progress_bar(1) = 3
|
||||
progress_value = dble(progress_bar(1))
|
||||
call ezfio_set_determinants_N_det(ndetsave)
|
||||
progress_bar(1) = 4
|
||||
progress_value = dble(progress_bar(1))
|
||||
call ezfio_set_determinants_n_states(nstates)
|
||||
progress_bar(1) = 5
|
||||
progress_value = dble(progress_bar(1))
|
||||
call ezfio_set_determinants_mo_label(mo_label)
|
||||
|
||||
progress_bar(1) = 6
|
||||
progress_value = dble(progress_bar(1))
|
||||
|
||||
N_int2 = (N_int*bit_kind)/8
|
||||
allocate (psi_det_save(N_int2,2,ndetsave))
|
||||
do i=1,ndetsave
|
||||
do k=1,N_int
|
||||
det_bk(k) = psidet(k,1,index_det_save(i))
|
||||
enddo
|
||||
do k=1,N_int2
|
||||
psi_det_save(k,1,i) = det_8(k)
|
||||
enddo
|
||||
do k=1,N_int
|
||||
det_bk(k) = psidet(k,2,index_det_save(i))
|
||||
enddo
|
||||
do k=1,N_int2
|
||||
psi_det_save(k,2,i) = det_8(k)
|
||||
enddo
|
||||
enddo
|
||||
call ezfio_set_determinants_psi_det(psi_det_save)
|
||||
deallocate (psi_det_save)
|
||||
|
||||
progress_bar(1) = 7
|
||||
progress_value = dble(progress_bar(1))
|
||||
allocate (psi_coef_save(ndetsave,nstates))
|
||||
double precision :: accu_norm(nstates)
|
||||
accu_norm = 0.d0
|
||||
do k=1,nstates
|
||||
do i=1,ndetsave
|
||||
accu_norm(k) = accu_norm(k) + psicoef(index_det_save(i),k) * psicoef(index_det_save(i),k)
|
||||
psi_coef_save(i,k) = psicoef(index_det_save(i),k)
|
||||
enddo
|
||||
enddo
|
||||
do k = 1, nstates
|
||||
accu_norm(k) = 1.d0/dsqrt(accu_norm(k))
|
||||
enddo
|
||||
do k=1,nstates
|
||||
do i=1,ndetsave
|
||||
psi_coef_save(i,k) = psi_coef_save(i,k) * accu_norm(k)
|
||||
enddo
|
||||
enddo
|
||||
|
||||
call ezfio_set_determinants_psi_coef(psi_coef_save)
|
||||
call write_int(output_determinants,ndet,'Saved determinants')
|
||||
call stop_progress
|
||||
deallocate (psi_coef_save)
|
||||
end
|
||||
|
||||
|
||||
|
@ -292,7 +292,7 @@ subroutine make_s2_eigenfunction
|
||||
endif
|
||||
call occ_pattern_to_dets(psi_occ_pattern(1,1,i),d,s,elec_alpha_num,N_int)
|
||||
do j=1,s
|
||||
if (.not. is_in_wavefunction( d(1,1,j), N_int, N_det)) then
|
||||
if (.not. is_in_wavefunction(d(1,1,j), N_int) ) then
|
||||
N_det_new += 1
|
||||
do k=1,N_int
|
||||
det_buffer(k,1,N_det_new) = d(k,1,j)
|
||||
|
@ -488,6 +488,141 @@ end
|
||||
|
||||
|
||||
|
||||
subroutine i_H_j_phase_out(key_i,key_j,Nint,hij,phase,exc,degree)
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Returns <i|H|j> 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)
|
||||
double precision, intent(out) :: hij, phase
|
||||
|
||||
integer,intent(out) :: exc(0:2,2,2)
|
||||
integer,intent(out) :: degree
|
||||
double precision :: get_mo_bielec_integral
|
||||
integer :: m,n,p,q
|
||||
integer :: i,j,k
|
||||
integer :: occ(Nint*bit_kind_size,2)
|
||||
double precision :: diag_H_mat_elem
|
||||
integer :: n_occ_alpha, n_occ_beta
|
||||
logical :: has_mipi(Nint*bit_kind_size)
|
||||
double precision :: mipi(Nint*bit_kind_size), miip(Nint*bit_kind_size)
|
||||
PROVIDE mo_bielec_integrals_in_map mo_integrals_map
|
||||
|
||||
ASSERT (Nint > 0)
|
||||
ASSERT (Nint == N_int)
|
||||
ASSERT (sum(popcnt(key_i(:,1))) == elec_alpha_num)
|
||||
ASSERT (sum(popcnt(key_i(:,2))) == elec_beta_num)
|
||||
ASSERT (sum(popcnt(key_j(:,1))) == elec_alpha_num)
|
||||
ASSERT (sum(popcnt(key_j(:,2))) == elec_beta_num)
|
||||
|
||||
hij = 0.d0
|
||||
!DEC$ FORCEINLINE
|
||||
call get_excitation_degree(key_i,key_j,degree,Nint)
|
||||
select case (degree)
|
||||
case (2)
|
||||
call get_double_excitation(key_i,key_j,exc,phase,Nint)
|
||||
if (exc(0,1,1) == 1) then
|
||||
! Mono alpha, mono beta
|
||||
hij = phase*get_mo_bielec_integral( &
|
||||
exc(1,1,1), &
|
||||
exc(1,1,2), &
|
||||
exc(1,2,1), &
|
||||
exc(1,2,2) ,mo_integrals_map)
|
||||
else if (exc(0,1,1) == 2) then
|
||||
! Double alpha
|
||||
hij = phase*(get_mo_bielec_integral( &
|
||||
exc(1,1,1), &
|
||||
exc(2,1,1), &
|
||||
exc(1,2,1), &
|
||||
exc(2,2,1) ,mo_integrals_map) - &
|
||||
get_mo_bielec_integral( &
|
||||
exc(1,1,1), &
|
||||
exc(2,1,1), &
|
||||
exc(2,2,1), &
|
||||
exc(1,2,1) ,mo_integrals_map) )
|
||||
else if (exc(0,1,2) == 2) then
|
||||
! Double beta
|
||||
hij = phase*(get_mo_bielec_integral( &
|
||||
exc(1,1,2), &
|
||||
exc(2,1,2), &
|
||||
exc(1,2,2), &
|
||||
exc(2,2,2) ,mo_integrals_map) - &
|
||||
get_mo_bielec_integral( &
|
||||
exc(1,1,2), &
|
||||
exc(2,1,2), &
|
||||
exc(2,2,2), &
|
||||
exc(1,2,2) ,mo_integrals_map) )
|
||||
endif
|
||||
case (1)
|
||||
call get_mono_excitation(key_i,key_j,exc,phase,Nint)
|
||||
call bitstring_to_list(key_i(1,1), occ(1,1), n_occ_alpha, Nint)
|
||||
call bitstring_to_list(key_i(1,2), occ(1,2), n_occ_beta, Nint)
|
||||
has_mipi = .False.
|
||||
if (exc(0,1,1) == 1) then
|
||||
! Mono alpha
|
||||
m = exc(1,1,1)
|
||||
p = exc(1,2,1)
|
||||
do k = 1, elec_alpha_num
|
||||
i = occ(k,1)
|
||||
if (.not.has_mipi(i)) then
|
||||
mipi(i) = get_mo_bielec_integral(m,i,p,i,mo_integrals_map)
|
||||
miip(i) = get_mo_bielec_integral(m,i,i,p,mo_integrals_map)
|
||||
has_mipi(i) = .True.
|
||||
endif
|
||||
enddo
|
||||
do k = 1, elec_beta_num
|
||||
i = occ(k,2)
|
||||
if (.not.has_mipi(i)) then
|
||||
mipi(i) = get_mo_bielec_integral(m,i,p,i,mo_integrals_map)
|
||||
has_mipi(i) = .True.
|
||||
endif
|
||||
enddo
|
||||
|
||||
do k = 1, elec_alpha_num
|
||||
hij = hij + mipi(occ(k,1)) - miip(occ(k,1))
|
||||
enddo
|
||||
do k = 1, elec_beta_num
|
||||
hij = hij + mipi(occ(k,2))
|
||||
enddo
|
||||
|
||||
else
|
||||
! Mono beta
|
||||
m = exc(1,1,2)
|
||||
p = exc(1,2,2)
|
||||
do k = 1, elec_beta_num
|
||||
i = occ(k,2)
|
||||
if (.not.has_mipi(i)) then
|
||||
mipi(i) = get_mo_bielec_integral(m,i,p,i,mo_integrals_map)
|
||||
miip(i) = get_mo_bielec_integral(m,i,i,p,mo_integrals_map)
|
||||
has_mipi(i) = .True.
|
||||
endif
|
||||
enddo
|
||||
do k = 1, elec_alpha_num
|
||||
i = occ(k,1)
|
||||
if (.not.has_mipi(i)) then
|
||||
mipi(i) = get_mo_bielec_integral(m,i,p,i,mo_integrals_map)
|
||||
has_mipi(i) = .True.
|
||||
endif
|
||||
enddo
|
||||
|
||||
do k = 1, elec_alpha_num
|
||||
hij = hij + mipi(occ(k,1))
|
||||
enddo
|
||||
do k = 1, elec_beta_num
|
||||
hij = hij + mipi(occ(k,2)) - miip(occ(k,2))
|
||||
enddo
|
||||
|
||||
endif
|
||||
hij = phase*(hij + mo_mono_elec_integral(m,p))
|
||||
|
||||
case (0)
|
||||
hij = diag_H_mat_elem(key_i,Nint)
|
||||
end select
|
||||
end
|
||||
|
||||
|
||||
|
||||
subroutine i_H_j_verbose(key_i,key_j,Nint,hij,hmono,hdouble)
|
||||
use bitmasks
|
||||
@ -825,7 +960,7 @@ subroutine get_excitation_degree_vector(key1,key2,degree,Nint,sze,idx)
|
||||
integer, intent(out) :: degree(sze)
|
||||
integer, intent(out) :: idx(0:sze)
|
||||
|
||||
integer :: i,l
|
||||
integer :: i,l,d
|
||||
|
||||
ASSERT (Nint > 0)
|
||||
ASSERT (sze > 0)
|
||||
@ -835,9 +970,12 @@ subroutine get_excitation_degree_vector(key1,key2,degree,Nint,sze,idx)
|
||||
|
||||
!DIR$ LOOP COUNT (1000)
|
||||
do i=1,sze
|
||||
degree(l) = ishft(popcnt(xor( key1(1,1,i), key2(1,1))) + &
|
||||
popcnt(xor( key1(1,2,i), key2(1,2))),-1)
|
||||
if (degree(l) < 3) then
|
||||
d = popcnt(xor( key1(1,1,i), key2(1,1))) + &
|
||||
popcnt(xor( key1(1,2,i), key2(1,2)))
|
||||
if (d > 4) then
|
||||
cycle
|
||||
else
|
||||
degree(l) = ishft(d,-1)
|
||||
idx(l) = i
|
||||
l = l+1
|
||||
endif
|
||||
@ -847,11 +985,14 @@ subroutine get_excitation_degree_vector(key1,key2,degree,Nint,sze,idx)
|
||||
|
||||
!DIR$ LOOP COUNT (1000)
|
||||
do i=1,sze
|
||||
degree(l) = ishft(popcnt(xor( key1(1,1,i), key2(1,1))) + &
|
||||
d = popcnt(xor( key1(1,1,i), key2(1,1))) + &
|
||||
popcnt(xor( key1(1,2,i), key2(1,2))) + &
|
||||
popcnt(xor( key1(2,1,i), key2(2,1))) + &
|
||||
popcnt(xor( key1(2,2,i), key2(2,2))),-1)
|
||||
if (degree(l) < 3) then
|
||||
popcnt(xor( key1(2,2,i), key2(2,2)))
|
||||
if (d > 4) then
|
||||
cycle
|
||||
else
|
||||
degree(l) = ishft(d,-1)
|
||||
idx(l) = i
|
||||
l = l+1
|
||||
endif
|
||||
@ -861,13 +1002,16 @@ subroutine get_excitation_degree_vector(key1,key2,degree,Nint,sze,idx)
|
||||
|
||||
!DIR$ LOOP COUNT (1000)
|
||||
do i=1,sze
|
||||
degree(l) = ishft( popcnt(xor( key1(1,1,i), key2(1,1))) + &
|
||||
d = popcnt(xor( key1(1,1,i), key2(1,1))) + &
|
||||
popcnt(xor( key1(1,2,i), key2(1,2))) + &
|
||||
popcnt(xor( key1(2,1,i), key2(2,1))) + &
|
||||
popcnt(xor( key1(2,2,i), key2(2,2))) + &
|
||||
popcnt(xor( key1(3,1,i), key2(3,1))) + &
|
||||
popcnt(xor( key1(3,2,i), key2(3,2))),-1)
|
||||
if (degree(l) < 3) then
|
||||
popcnt(xor( key1(3,2,i), key2(3,2)))
|
||||
if (d > 4) then
|
||||
cycle
|
||||
else
|
||||
degree(l) = ishft(d,-1)
|
||||
idx(l) = i
|
||||
l = l+1
|
||||
endif
|
||||
@ -877,14 +1021,16 @@ subroutine get_excitation_degree_vector(key1,key2,degree,Nint,sze,idx)
|
||||
|
||||
!DIR$ LOOP COUNT (1000)
|
||||
do i=1,sze
|
||||
degree(l) = 0
|
||||
d = 0
|
||||
!DEC$ LOOP COUNT MIN(4)
|
||||
do l=1,Nint
|
||||
degree(l) = degree(l)+ popcnt(xor( key1(l,1,i), key2(l,1))) +&
|
||||
popcnt(xor( key1(l,2,i), key2(l,2)))
|
||||
d = d + popcnt(xor( key1(l,1,i), key2(l,1))) &
|
||||
+ popcnt(xor( key1(l,2,i), key2(l,2)))
|
||||
enddo
|
||||
degree(l) = ishft(degree(l),-1)
|
||||
if (degree(l) < 3) then
|
||||
if (d > 4) then
|
||||
cycle
|
||||
else
|
||||
degree(l) = ishft(d,-1)
|
||||
idx(l) = i
|
||||
l = l+1
|
||||
endif
|
||||
@ -1095,13 +1241,9 @@ subroutine H_u_0(v_0,u_0,H_jj,n,keys_tmp,Nint)
|
||||
!$OMP PARALLEL DEFAULT(NONE) &
|
||||
!$OMP PRIVATE(i,hij,j,k,idx,jj,vt) &
|
||||
!$OMP SHARED(n,H_jj,u_0,keys_tmp,Nint,v_0,davidson_threshold)
|
||||
!$OMP DO SCHEDULE(static)
|
||||
do i=1,n
|
||||
v_0(i) = H_jj(i) * u_0(i)
|
||||
enddo
|
||||
!$OMP END DO
|
||||
allocate(idx(0:n), vt(n))
|
||||
Vt = 0.d0
|
||||
v_0 = 0.d0
|
||||
!$OMP DO SCHEDULE(guided)
|
||||
do i=1,n
|
||||
idx(0) = i
|
||||
@ -1123,6 +1265,9 @@ subroutine H_u_0(v_0,u_0,H_jj,n,keys_tmp,Nint)
|
||||
!$OMP END CRITICAL
|
||||
deallocate(idx,vt)
|
||||
!$OMP END PARALLEL
|
||||
do i=1,n
|
||||
v_0(i) += H_jj(i) * u_0(i)
|
||||
enddo
|
||||
end
|
||||
|
||||
|
||||
|
@ -151,9 +151,9 @@ integer function get_index_in_psi_det_alpha_unique(key,Nint)
|
||||
integer :: i, ibegin, iend, istep, l
|
||||
integer*8 :: det_ref, det_search
|
||||
integer*8, external :: spin_det_search_key
|
||||
logical :: is_in_wavefunction
|
||||
logical :: in_wavefunction
|
||||
|
||||
is_in_wavefunction = .False.
|
||||
in_wavefunction = .False.
|
||||
get_index_in_psi_det_alpha_unique = 0
|
||||
ibegin = 1
|
||||
iend = N_det_alpha_unique + 1
|
||||
@ -198,15 +198,15 @@ integer function get_index_in_psi_det_alpha_unique(key,Nint)
|
||||
if (key(1) /= psi_det_alpha_unique(1,i)) then
|
||||
continue
|
||||
else
|
||||
is_in_wavefunction = .True.
|
||||
in_wavefunction = .True.
|
||||
!DIR$ IVDEP
|
||||
!DIR$ LOOP COUNT MIN(3)
|
||||
do l=2,Nint
|
||||
if (key(l) /= psi_det_alpha_unique(l,i)) then
|
||||
is_in_wavefunction = .False.
|
||||
in_wavefunction = .False.
|
||||
endif
|
||||
enddo
|
||||
if (is_in_wavefunction) then
|
||||
if (in_wavefunction) then
|
||||
get_index_in_psi_det_alpha_unique = i
|
||||
return
|
||||
endif
|
||||
@ -233,9 +233,9 @@ integer function get_index_in_psi_det_beta_unique(key,Nint)
|
||||
integer :: i, ibegin, iend, istep, l
|
||||
integer*8 :: det_ref, det_search
|
||||
integer*8, external :: spin_det_search_key
|
||||
logical :: is_in_wavefunction
|
||||
logical :: in_wavefunction
|
||||
|
||||
is_in_wavefunction = .False.
|
||||
in_wavefunction = .False.
|
||||
get_index_in_psi_det_beta_unique = 0
|
||||
ibegin = 1
|
||||
iend = N_det_beta_unique + 1
|
||||
@ -279,15 +279,15 @@ integer function get_index_in_psi_det_beta_unique(key,Nint)
|
||||
if (key(1) /= psi_det_beta_unique(1,i)) then
|
||||
continue
|
||||
else
|
||||
is_in_wavefunction = .True.
|
||||
in_wavefunction = .True.
|
||||
!DIR$ IVDEP
|
||||
!DIR$ LOOP COUNT MIN(3)
|
||||
do l=2,Nint
|
||||
if (key(l) /= psi_det_beta_unique(l,i)) then
|
||||
is_in_wavefunction = .False.
|
||||
in_wavefunction = .False.
|
||||
endif
|
||||
enddo
|
||||
if (is_in_wavefunction) then
|
||||
if (in_wavefunction) then
|
||||
get_index_in_psi_det_beta_unique = i
|
||||
return
|
||||
endif
|
||||
@ -344,9 +344,9 @@ subroutine write_spindeterminants
|
||||
call ezfio_set_spindeterminants_psi_det_beta(psi_det_beta_unique)
|
||||
deallocate(tmpdet)
|
||||
|
||||
call ezfio_set_spindeterminants_psi_coef_matrix_values(psi_svd_matrix_values)
|
||||
call ezfio_set_spindeterminants_psi_coef_matrix_rows(psi_svd_matrix_rows)
|
||||
call ezfio_set_spindeterminants_psi_coef_matrix_columns(psi_svd_matrix_columns)
|
||||
call ezfio_set_spindeterminants_psi_coef_matrix_values(psi_bilinear_matrix_values)
|
||||
call ezfio_set_spindeterminants_psi_coef_matrix_rows(psi_bilinear_matrix_rows)
|
||||
call ezfio_set_spindeterminants_psi_coef_matrix_columns(psi_bilinear_matrix_columns)
|
||||
|
||||
end
|
||||
|
||||
@ -357,19 +357,19 @@ end
|
||||
! !
|
||||
!==============================================================================!
|
||||
|
||||
BEGIN_PROVIDER [ double precision, psi_svd_matrix_values, (N_det,N_states) ]
|
||||
&BEGIN_PROVIDER [ integer, psi_svd_matrix_rows, (N_det) ]
|
||||
&BEGIN_PROVIDER [ integer, psi_svd_matrix_columns, (N_det) ]
|
||||
BEGIN_PROVIDER [ double precision, psi_bilinear_matrix_values, (N_det,N_states) ]
|
||||
&BEGIN_PROVIDER [ integer, psi_bilinear_matrix_rows, (N_det) ]
|
||||
&BEGIN_PROVIDER [ integer, psi_bilinear_matrix_columns, (N_det) ]
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Matrix of wf coefficients. Outer product of alpha and beta determinants
|
||||
! Sparse coefficient matrix if the wave function is expressed in a bilinear form :
|
||||
! D_a^t C D_b
|
||||
END_DOC
|
||||
integer :: i,j,k, l
|
||||
integer(bit_kind) :: tmp_det(N_int,2)
|
||||
integer :: idx
|
||||
integer, external :: get_index_in_psi_det_sorted_bit
|
||||
logical, external :: is_in_wavefunction
|
||||
|
||||
|
||||
PROVIDE psi_coef_sorted_bit
|
||||
@ -383,47 +383,48 @@ BEGIN_PROVIDER [ double precision, psi_svd_matrix_values, (N_det,N_states) ]
|
||||
j = get_index_in_psi_det_beta_unique (psi_det(1,2,k),N_int)
|
||||
|
||||
do l=1,N_states
|
||||
psi_svd_matrix_values(k,l) = psi_coef(k,l)
|
||||
psi_bilinear_matrix_values(k,l) = psi_coef(k,l)
|
||||
enddo
|
||||
psi_svd_matrix_rows(k) = i
|
||||
psi_svd_matrix_columns(k) = j
|
||||
psi_bilinear_matrix_rows(k) = i
|
||||
psi_bilinear_matrix_columns(k) = j
|
||||
to_sort(k) = N_det_alpha_unique * (j-1) + i
|
||||
iorder(k) = k
|
||||
enddo
|
||||
call isort(to_sort, iorder, N_det)
|
||||
call iset_order(psi_svd_matrix_rows,iorder,N_det)
|
||||
call iset_order(psi_svd_matrix_columns,iorder,N_det)
|
||||
call dset_order(psi_svd_matrix_values,iorder,N_det)
|
||||
call iset_order(psi_bilinear_matrix_rows,iorder,N_det)
|
||||
call iset_order(psi_bilinear_matrix_columns,iorder,N_det)
|
||||
call dset_order(psi_bilinear_matrix_values,iorder,N_det)
|
||||
deallocate(iorder,to_sort)
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ double precision, psi_svd_matrix, (N_det_alpha_unique,N_det_beta_unique,N_states) ]
|
||||
BEGIN_PROVIDER [ double precision, psi_bilinear_matrix, (N_det_alpha_unique,N_det_beta_unique,N_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Matrix of wf coefficients. Outer product of alpha and beta determinants
|
||||
! Coefficient matrix if the wave function is expressed in a bilinear form :
|
||||
! D_a^t C D_b
|
||||
END_DOC
|
||||
integer :: i,j,k,istate
|
||||
psi_svd_matrix = 0.d0
|
||||
psi_bilinear_matrix = 0.d0
|
||||
do k=1,N_det
|
||||
i = psi_svd_matrix_rows(k)
|
||||
j = psi_svd_matrix_columns(k)
|
||||
i = psi_bilinear_matrix_rows(k)
|
||||
j = psi_bilinear_matrix_columns(k)
|
||||
do istate=1,N_states
|
||||
psi_svd_matrix(i,j,istate) = psi_svd_matrix_values(k,istate)
|
||||
psi_bilinear_matrix(i,j,istate) = psi_bilinear_matrix_values(k,istate)
|
||||
enddo
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
||||
subroutine create_wf_of_psi_svd_matrix
|
||||
subroutine create_wf_of_psi_bilinear_matrix
|
||||
use bitmasks
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Matrix of wf coefficients. Outer product of alpha and beta determinants
|
||||
! Generate a wave function containing all possible products
|
||||
! of alpha and beta determinants
|
||||
END_DOC
|
||||
integer :: i,j,k
|
||||
integer(bit_kind) :: tmp_det(N_int,2)
|
||||
integer :: idx
|
||||
integer, external :: get_index_in_psi_det_sorted_bit
|
||||
logical, external :: is_in_wavefunction
|
||||
double precision :: norm(N_states)
|
||||
|
||||
call generate_all_alpha_beta_det_products
|
||||
@ -439,8 +440,8 @@ subroutine create_wf_of_psi_svd_matrix
|
||||
idx = get_index_in_psi_det_sorted_bit(tmp_det,N_int)
|
||||
if (idx > 0) then
|
||||
do k=1,N_states
|
||||
psi_coef_sorted_bit(idx,k) = psi_svd_matrix(i,j,k)
|
||||
norm(k) += psi_svd_matrix(i,j,k)
|
||||
psi_coef_sorted_bit(idx,k) = psi_bilinear_matrix(i,j,k)
|
||||
norm(k) += psi_bilinear_matrix(i,j,k)
|
||||
enddo
|
||||
endif
|
||||
enddo
|
||||
@ -494,7 +495,7 @@ subroutine generate_all_alpha_beta_det_products
|
||||
tmp_det(k,1,l) = psi_det_alpha_unique(k,i)
|
||||
tmp_det(k,2,l) = psi_det_beta_unique (k,j)
|
||||
enddo
|
||||
if (.not.is_in_wavefunction(tmp_det(1,1,l),N_int,N_det)) then
|
||||
if (.not.is_in_wavefunction(tmp_det(1,1,l),N_int)) then
|
||||
l = l+1
|
||||
endif
|
||||
enddo
|
||||
@ -508,51 +509,4 @@ subroutine generate_all_alpha_beta_det_products
|
||||
SOFT_TOUCH psi_det psi_coef N_det
|
||||
end
|
||||
|
||||
BEGIN_PROVIDER [ double precision, psi_svd_alpha, (N_det_alpha_unique,N_det_alpha_unique,N_states) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_svd_beta , (N_det_beta_unique,N_det_beta_unique,N_states) ]
|
||||
&BEGIN_PROVIDER [ double precision, psi_svd_coefs, (N_det_beta_unique,N_states) ]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! SVD wave function
|
||||
END_DOC
|
||||
|
||||
integer :: lwork, info, istate
|
||||
double precision, allocatable :: work(:), tmp(:,:), copy(:,:)
|
||||
allocate (work(1),tmp(N_det_beta_unique,N_det_beta_unique), &
|
||||
copy(size(psi_svd_matrix,1),size(psi_svd_matrix,2)))
|
||||
|
||||
do istate = 1,N_states
|
||||
copy(:,:) = psi_svd_matrix(:,:,istate)
|
||||
lwork=-1
|
||||
call dgesvd('A','A', N_det_alpha_unique, N_det_beta_unique, &
|
||||
copy, size(copy,1), &
|
||||
psi_svd_coefs(1,istate), psi_svd_alpha(1,1,istate), &
|
||||
size(psi_svd_alpha,1), &
|
||||
tmp, size(psi_svd_beta,2), &
|
||||
work, lwork, info)
|
||||
lwork = work(1)
|
||||
deallocate(work)
|
||||
allocate(work(lwork))
|
||||
call dgesvd('A','A', N_det_alpha_unique, N_det_beta_unique, &
|
||||
copy, size(copy,1), &
|
||||
psi_svd_coefs(1,istate), psi_svd_alpha(1,1,istate), &
|
||||
size(psi_svd_alpha,1), &
|
||||
tmp, size(psi_svd_beta,2), &
|
||||
work, lwork, info)
|
||||
deallocate(work)
|
||||
if (info /= 0) then
|
||||
print *, irp_here//': error in det SVD'
|
||||
stop 1
|
||||
endif
|
||||
integer :: i,j
|
||||
do j=1,N_det_beta_unique
|
||||
do i=1,N_det_beta_unique
|
||||
psi_svd_beta(i,j,istate) = tmp(j,i)
|
||||
enddo
|
||||
enddo
|
||||
deallocate(tmp,copy)
|
||||
enddo
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
|
172
src/Ezfio_files/README.rst
Normal file
@ -0,0 +1,172 @@
|
||||
==================
|
||||
Ezfio_files Module
|
||||
==================
|
||||
|
||||
This modules essentially contains the name of the EZFIO directory in the
|
||||
``ezfio_filename`` variable. This is read as the first argument of the
|
||||
command-line, or as the ``QP_INPUT`` environment variable.
|
||||
Documentation
|
||||
=============
|
||||
|
||||
.. Do not edit this section. It was auto-generated from the
|
||||
.. by the `update_README.py` script.
|
||||
|
||||
`ezfio_filename <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/ezfio.irp.f#L1>`_
|
||||
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.
|
||||
|
||||
|
||||
`getunitandopen <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/get_unit_and_open.irp.f#L1>`_
|
||||
:f:
|
||||
file name
|
||||
.br
|
||||
:mode:
|
||||
'R' : READ, UNFORMATTED
|
||||
'W' : WRITE, UNFORMATTED
|
||||
'r' : READ, FORMATTED
|
||||
'w' : WRITE, FORMATTED
|
||||
'a' : APPEND, FORMATTED
|
||||
'x' : READ/WRITE, FORMATTED
|
||||
.br
|
||||
|
||||
|
||||
`output_ao_basis <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L1>`_
|
||||
Output file for AO_Basis
|
||||
|
||||
|
||||
`output_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L21>`_
|
||||
Output file for Bitmask
|
||||
|
||||
|
||||
`output_cas_sd <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L41>`_
|
||||
Output file for CAS_SD
|
||||
|
||||
|
||||
`output_cis <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L61>`_
|
||||
Output file for CIS
|
||||
|
||||
|
||||
`output_cisd <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L81>`_
|
||||
Output file for CISD
|
||||
|
||||
|
||||
`output_cisd_selected <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L101>`_
|
||||
Output file for CISD_selected
|
||||
|
||||
|
||||
`output_cpu_time_0 <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f#L2>`_
|
||||
Initial CPU and wall times when printing in the output files
|
||||
|
||||
|
||||
`output_determinants <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L121>`_
|
||||
Output file for Determinants
|
||||
|
||||
|
||||
`output_electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L141>`_
|
||||
Output file for Electrons
|
||||
|
||||
|
||||
`output_ezfio_files <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L161>`_
|
||||
Output file for Ezfio_files
|
||||
|
||||
|
||||
`output_full_ci <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L181>`_
|
||||
Output file for Full_CI
|
||||
|
||||
|
||||
`output_generators_cas <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L201>`_
|
||||
Output file for Generators_CAS
|
||||
|
||||
|
||||
`output_generators_full <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L221>`_
|
||||
Output file for Generators_full
|
||||
|
||||
|
||||
`output_hartree_fock <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L241>`_
|
||||
Output file for Hartree_Fock
|
||||
|
||||
|
||||
`output_integrals_bielec <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L261>`_
|
||||
Output file for Integrals_Bielec
|
||||
|
||||
|
||||
`output_integrals_monoelec <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L281>`_
|
||||
Output file for Integrals_Monoelec
|
||||
|
||||
|
||||
`output_mo_basis <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L301>`_
|
||||
Output file for MO_Basis
|
||||
|
||||
|
||||
`output_moguess <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L321>`_
|
||||
Output file for MOGuess
|
||||
|
||||
|
||||
`output_mrcc_cassd <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L341>`_
|
||||
Output file for MRCC_CASSD
|
||||
|
||||
|
||||
`output_mrcc_utils_new <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L361>`_
|
||||
Output file for MRCC_Utils_new
|
||||
|
||||
|
||||
`output_nuclei <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L381>`_
|
||||
Output file for Nuclei
|
||||
|
||||
|
||||
`output_perturbation <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L401>`_
|
||||
Output file for Perturbation
|
||||
|
||||
|
||||
`output_properties <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L421>`_
|
||||
Output file for Properties
|
||||
|
||||
|
||||
`output_pseudo <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L441>`_
|
||||
Output file for Pseudo
|
||||
|
||||
|
||||
`output_psiref_cas <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L461>`_
|
||||
Output file for Psiref_CAS
|
||||
|
||||
|
||||
`output_psiref_utils <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L481>`_
|
||||
Output file for Psiref_Utils
|
||||
|
||||
|
||||
`output_qmcchem <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L501>`_
|
||||
Output file for QmcChem
|
||||
|
||||
|
||||
`output_selectors_full <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L521>`_
|
||||
Output file for Selectors_full
|
||||
|
||||
|
||||
`output_singlerefmethod <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L541>`_
|
||||
Output file for SingleRefMethod
|
||||
|
||||
|
||||
`output_utils <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L561>`_
|
||||
Output file for Utils
|
||||
|
||||
|
||||
`output_wall_time_0 <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f#L1>`_
|
||||
Initial CPU and wall times when printing in the output files
|
||||
|
||||
|
||||
`write_bool <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f#L88>`_
|
||||
Write an logical value in output
|
||||
|
||||
|
||||
`write_double <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f#L58>`_
|
||||
Write a double precision value in output
|
||||
|
||||
|
||||
`write_int <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f#L73>`_
|
||||
Write an integer value in output
|
||||
|
||||
|
||||
`write_time <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f#L42>`_
|
||||
Write a time stamp in the output for chronological reconstruction
|
||||
|
||||
|