10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-08 07:03:57 +01:00

Merge pull request #2 from scemama/master

MRCC utils
This commit is contained in:
Emmanuel Giner 2015-07-13 18:31:05 +02:00
commit d9ebed61db
109 changed files with 1509 additions and 1094 deletions

View File

@ -31,14 +31,14 @@ OPENMP : 1 ; Append OpenMP flags
# -ftz : Flushes denormal results to zero
#
[OPT]
FCFLAGS : -xHost -O2 -ip -opt-prefetch -ftz
FCFLAGS : -xSSE4.2 -O2 -ip -opt-prefetch -ftz -g
# Profiling flags
#################
#
[PROFILE]
FC : -p -g
FCFLAGS : -xHost -O2 -ip -opt-prefetch -ftz
FCFLAGS : -xSSE4.2 -O2 -ip -opt-prefetch -ftz
# Debugging flags
#################

54
configure vendored
View File

@ -17,9 +17,11 @@ Options:
who contains a binary, than you can compile then
individualy if you want
Example:
Examples:
./configure config/gfortran.cfg --production
./configure config/ifort.cfg --development
"""
@ -45,7 +47,7 @@ QP_ROOT = os.getcwd()
QP_ROOT_BIN = join(QP_ROOT, "bin")
QP_ROOT_INSTALL = join(QP_ROOT, "install")
os.environ["PATH"] = os.environ["PATH"] + ":"+QP_ROOT_BIN
os.environ["PATH"] = os.environ["PATH"] + ":" + QP_ROOT_BIN
d_dependency = {
"ocaml": ["m4", "curl", "zlib", "patch", "gcc"],
@ -133,7 +135,7 @@ for m in ["ocaml", "m4", "curl", "zlib", "path", "irpf90", "docopt",
exec ("d_info['{0}']={0}".format(m))
def find_path(bin_, l_installed):
def find_path(bin_, l_installed, var_for_qp_root=False):
"""Use the global variable
* l_installed
* d_info
@ -143,6 +145,10 @@ def find_path(bin_, l_installed):
locate = l_installed[bin_]
except KeyError:
locate = d_info[bin_].default_path
if var_for_qp_root:
locate = locate.replace(QP_ROOT, "${QP_ROOT}")
return locate
@ -158,7 +164,8 @@ def check_output(*popenargs, **kwargs):
>>> check_output(['/usr/bin/python', '--version'])
Python 2.6.2
"""
process = subprocess.Popen(stdout=subprocess.PIPE,stderr=subprocess.PIPE, *popenargs, **kwargs)
process = subprocess.Popen(stdout=subprocess.PIPE,
stderr=subprocess.PIPE, *popenargs, **kwargs)
output, unused_err = process.communicate()
retcode = process.poll()
if retcode:
@ -277,7 +284,8 @@ def installation(l_install_descendant):
def create_rule_ninja():
l_rules = [
"rule download", " command = wget --no-check-certificate ${url} -O ${out} -o /dev/null",
"rule download",
" command = wget --no-check-certificate ${url} -O ${out} -o /dev/null",
" description = Downloading ${descr}", ""
]
@ -409,10 +417,8 @@ def create_ninja_and_rc(l_installed):
"""
d_print = {
"qp_root": "Creating quantum_package.rc...",
"build": "Creating build.ninja..."
}
d_print = {"qp_root": "Creating quantum_package.rc...",
"build": "Creating build.ninja..."}
length = max(map(len, d_print.values()))
@ -429,16 +435,21 @@ def create_ninja_and_rc(l_installed):
if os.path.isdir(path):
l_python.append(path)
path_ezfio = find_path('ezfio', l_installed, var_for_qp_root=True)
path_irpf90 = find_path("irpf90", l_installed, var_for_qp_root=True)
path_ninja = find_path("ninja", l_installed, var_for_qp_root=True)
l_rc = [
'export QP_ROOT={0}'.format(QP_ROOT),
'export QP_EZFIO={0}'.format(find_path('ezfio', l_installed)),
'export IRPF90={0}'.format(find_path("irpf90", l_installed)),
'export NINJA={0}'.format(find_path("ninja", l_installed)),
'export QP_EZFIO={0}'.format(path_ezfio),
'export IRPF90={0}'.format(path_irpf90),
'export NINJA={0}'.format(path_ninja),
'export QP_PYTHON={0}'.format(":".join(l_python)), "",
'export PYTHONPATH="${QP_PYTHON}":"${PYTHONPATH}"',
'export PATH="${QP_PYTHON}":"${QP_ROOT}"/bin:"${QP_ROOT}"/ocaml:"${PATH}"',
'export LD_LIBRARY_PATH="${QP_ROOT}"/lib:"${LD_LIBRARY_PATH}"',
'export LIBRARY_PATH="${QP_ROOT}"/lib:"${LIBRARY_PATH}"', ""
'export LIBRARY_PATH="${QP_ROOT}"/lib:"${LIBRARY_PATH}"', "",
'source ${QP_ROOT}/install/EZFIO/Bash/ezfio.sh', "",
'source ${HOME}/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true',
""
]
@ -449,30 +460,33 @@ def create_ninja_and_rc(l_installed):
print "[ OK ] ({0})".format(path)
print str_info("build"),
command = ['bash', '-c', 'source {0} && env'.format(path)]
proc = subprocess.Popen(command, stdout=subprocess.PIPE)
for line in proc.stdout:
(key, _, value) = line.partition("=")
os.environ[key] = value.strip()
print str_info("build"),
qp_create_ninja = os.path.join(QP_ROOT, "scripts", "compilation",
"qp_create_ninja.py")
l = [qp_create_ninja, "create"] + sys.argv[1:]
try:
subprocess.check_call(" ".join(l), shell=True)
with open('/dev/null', 'w') as dnull:
subprocess.check_call(" ".join(l), shell=True,stderr=dnull)
except:
raise
print "[ FAIL ]"
print "Check the valididy of the config file provided ({0})".format(sys.argv[1])
print "Exit..."
sys.exit(1)
else:
print "[ OK ]"
def recommendation():
print "Last Step:"
path = join(QP_ROOT, "quantum_package.rc")
print "Now :"
print " source {0}".format(path)

8
ocaml/.gitignore vendored
View File

@ -38,12 +38,12 @@ qp_print
qp_run
qp_set_ddci
qp_set_mo_class
Input_integrals_bielec.ml
Input_pseudo.ml
Input_perturbation.ml
Input_properties.ml
Input_determinants.ml
Input_hartree_fock.ml
Input_integrals_bielec.ml
Input_perturbation.ml
Input_properties.ml
Input_pseudo.ml
qp_edit.ml
qp_edit
qp_edit.native

View File

@ -18,7 +18,7 @@ MLIFILES=$(wildcard *.mli)
ALL_TESTS=$(patsubst %.ml,%.byte,$(wildcard test_*.ml))
ALL_EXE=$(patsubst %.ml,%.native,$(wildcard qp_*.ml)) qp_edit.native
.PHONY: executables default
.PHONY: executables default remake_executables
default: $(ALL_TESTS) $(ALL_EXE) .gitignore
@ -34,7 +34,7 @@ default: $(ALL_TESTS) $(ALL_EXE) .gitignore
executables: $(QP_ROOT)/data/executables
$(QP_ROOT)/data/executables:
$(QP_ROOT)/data/executables: remake_executables
$(QP_ROOT)/scripts/module/create_executables_list.sh
external_libs:

View File

@ -1,32 +1,30 @@
# Automatically created by /home/giner/quantum_package/scripts/module/module_handler.py
IRPF90_temp
# Automatically created by $QP_ROOT/scripts/module/module_handler.py
.ninja_deps
.ninja_log
AO_Basis
Bitmask
Determinants
Electrons
Ezfio_files
Generators_CAS
Hartree_Fock
IRPF90_man
irpf90_entities
tags
irpf90.make
IRPF90_temp
Integrals_Bielec
Integrals_Monoelec
MOGuess
MO_Basis
Makefile
Makefile.depend
build.ninja
.ninja_log
.ninja_deps
ezfio_interface.irp.f
Ezfio_files
Perturbation
Determinants
Utils
Integrals_Monoelec
MO_Basis
Selectors_full
Integrals_Bielec
Pseudo
Bitmask
Generators_CAS
AO_Basis
Electrons
MOGuess
Nuclei
Hartree_Fock
Perturbation
Properties
cas_sd_selected_no_skip
Pseudo
Selectors_full
Utils
cas_sd
cas_sd_selected
ezfio_interface.irp.f
irpf90.make
irpf90_entities
tags

View File

@ -13,11 +13,11 @@ Documentation
.. Do not edit this section. It was auto-generated from the
.. by the `update_README.py` script.
`full_ci <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/cas_sd_selected_no_skip.irp.f#L1>`_
`full_ci <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/cas_sd_selected.irp.f#L1>`_
Undocumented
`h_apply_cas_sd <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L406>`_
`h_apply_cas_sd <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L408>`_
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#L263>`_
`h_apply_cas_sd_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L264>`_
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#L2578>`_
`h_apply_cas_sd_pt2 <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L2586>`_
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#L2094>`_
`h_apply_cas_sd_pt2_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L2100>`_
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#L2397>`_
`h_apply_cas_sd_pt2_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L2404>`_
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#L1848>`_
`h_apply_cas_sd_selected <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L1854>`_
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#L1330>`_
`h_apply_cas_sd_selected_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L1334>`_
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#L1653>`_
`h_apply_cas_sd_selected_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L1658>`_
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#L1112>`_
`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>`_
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#L594>`_
`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>`_
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#L917>`_
`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>`_
Generate all single excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 100 KiB

23
plugins/Casino/.gitignore vendored Normal file
View File

@ -0,0 +1,23 @@
# Automatically created by /home/razoa/quantum_package/scripts/module/module_handler.py
IRPF90_temp
IRPF90_man
irpf90_entities
tags
irpf90.make
Makefile
Makefile.depend
.ninja_log
.ninja_deps
ezfio_interface.irp.f
Ezfio_files
Determinants
Integrals_Monoelec
MO_Basis
Utils
Pseudo
Bitmask
AO_Basis
Electrons
Nuclei
Integrals_Bielec
save_for_casino

View File

@ -0,0 +1 @@
Determinants

27
plugins/Casino/README.rst Normal file
View File

@ -0,0 +1,27 @@
======
Casino
======
Documentation
=============
.. Do not edit this section. It was auto-generated from the
.. by the `update_README.py` script.
`prog_save_casino <http://github.com/LCPQ/quantum_package/tree/master/src/Casino/save_for_casino.irp.f#L266>`_
Undocumented
`save_casino <http://github.com/LCPQ/quantum_package/tree/master/src/Casino/save_for_casino.irp.f#L1>`_
Undocumented
Needed Modules
==============
.. Do not edit this section. It was auto-generated from the
.. by the `update_README.py` script.
.. image:: tree_dependency.png
* `Determinants <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants>`_

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

View File

@ -1,4 +1,4 @@
program full_ci
program ddci
implicit none
integer :: i,k

View File

@ -1,33 +1,32 @@
# Automatically created by /home/giner/quantum_package/scripts/module/module_handler.py
IRPF90_temp
# Automatically created by $QP_ROOT/scripts/module/module_handler.py
.ninja_deps
.ninja_log
AO_Basis
Bitmask
Determinants
Electrons
Ezfio_files
Generators_full
Hartree_Fock
IRPF90_man
irpf90_entities
tags
irpf90.make
IRPF90_temp
Integrals_Bielec
Integrals_Monoelec
MOGuess
MO_Basis
Makefile
Makefile.depend
build.ninja
.ninja_log
.ninja_deps
ezfio_interface.irp.f
Ezfio_files
Perturbation
Determinants
Utils
Integrals_Monoelec
MO_Basis
Selectors_full
Integrals_Bielec
Pseudo
Generators_full
Bitmask
AO_Basis
Electrons
MOGuess
Nuclei
Hartree_Fock
Perturbation
Properties
var_pt2_ratio
target_pt2
Pseudo
Selectors_full
Utils
ezfio_interface.irp.f
full_ci
full_ci_no_skip
irpf90.make
irpf90_entities
tags
target_pt2
var_pt2_ratio

View File

@ -14,7 +14,7 @@ Documentation
Undocumented
`h_apply_fci <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L519>`_
`h_apply_fci <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#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.
@ -25,126 +25,126 @@ Documentation
Assume N_int is already provided.
`h_apply_fci_mono <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L2712>`_
`h_apply_fci_mono <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L2720>`_
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_fci_mono_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L2192>`_
`h_apply_fci_mono_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L2198>`_
Generate all double excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_fci_mono_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L2515>`_
`h_apply_fci_mono_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L2522>`_
Generate all single excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_fci_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L324>`_
`h_apply_fci_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L325>`_
Generate all single excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_fci_no_skip <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L1974>`_
`h_apply_fci_no_skip <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L1980>`_
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_fci_no_skip_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L1456>`_
`h_apply_fci_no_skip_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L1460>`_
Generate all double excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_fci_no_skip_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L1779>`_
`h_apply_fci_no_skip_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L1784>`_
Generate all single excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_fci_pt2 <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L1249>`_
`h_apply_fci_pt2 <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L1253>`_
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_fci_pt2_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L765>`_
`h_apply_fci_pt2_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L767>`_
Generate all double excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_fci_pt2_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L1068>`_
`h_apply_fci_pt2_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L1071>`_
Generate all single excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_pt2_mono_delta_rho <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L4210>`_
`h_apply_pt2_mono_delta_rho <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L4222>`_
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_pt2_mono_delta_rho_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L3724>`_
`h_apply_pt2_mono_delta_rho_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L3734>`_
Generate all double excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_pt2_mono_delta_rho_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L4027>`_
`h_apply_pt2_mono_delta_rho_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L4038>`_
Generate all single excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_pt2_mono_di_delta_rho <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L5665>`_
`h_apply_pt2_mono_di_delta_rho <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L5681>`_
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_pt2_mono_di_delta_rho_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L5181>`_
`h_apply_pt2_mono_di_delta_rho_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L5195>`_
Generate all double excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_pt2_mono_di_delta_rho_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L5484>`_
`h_apply_pt2_mono_di_delta_rho_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L5499>`_
Generate all single excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_select_mono_delta_rho <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L3478>`_
`h_apply_select_mono_delta_rho <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L3488>`_
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_select_mono_delta_rho_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L2958>`_
`h_apply_select_mono_delta_rho_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L2966>`_
Generate all double excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_select_mono_delta_rho_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L3281>`_
`h_apply_select_mono_delta_rho_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L3290>`_
Generate all single excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_select_mono_di_delta_rho <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L4935>`_
`h_apply_select_mono_di_delta_rho <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L4949>`_
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_select_mono_di_delta_rho_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L4417>`_
`h_apply_select_mono_di_delta_rho_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L4429>`_
Generate all double excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_select_mono_di_delta_rho_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L4740>`_
`h_apply_select_mono_di_delta_rho_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L4753>`_
Generate all single excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 73 KiB

View File

@ -1,25 +1,24 @@
# Automatically created by /home/giner/quantum_package/scripts/module/module_handler.py
IRPF90_temp
# Automatically created by $QP_ROOT/scripts/module/module_handler.py
.ninja_deps
.ninja_log
AO_Basis
Bitmask
Electrons
Ezfio_files
Huckel_guess
IRPF90_man
irpf90_entities
tags
irpf90.make
IRPF90_temp
Integrals_Bielec
Integrals_Monoelec
MOGuess
MO_Basis
Makefile
Makefile.depend
build.ninja
.ninja_log
.ninja_deps
ezfio_interface.irp.f
Ezfio_files
Integrals_Monoelec
MO_Basis
Integrals_Bielec
Pseudo
Bitmask
AO_Basis
Electrons
MOGuess
Nuclei
Utils
Pseudo
SCF
Huckel_guess
Utils
ezfio_interface.irp.f
irpf90.make
irpf90_entities
tags

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 57 KiB

View File

@ -1,28 +0,0 @@
use bitmasks
BEGIN_SHELL [ /usr/bin/env python ]
from generate_h_apply import *
s = H_apply("mrcc")
s.data["parameters"] = ", delta_ij_, delta_ii_,Ndet_cas, Ndet_non_cas"
s.data["declarations"] += """
integer, intent(in) :: Ndet_cas,Ndet_non_cas
double precision, intent(in) :: delta_ij_(Ndet_cas,Ndet_non_cas,*)
double precision, intent(in) :: delta_ii_(Ndet_cas,*)
"""
s.data["keys_work"] = "call mrcc_dress(delta_ij_,delta_ii_,Ndet_cas,Ndet_non_cas,i_generator,key_idx,keys_out,N_int,iproc)"
s.data["params_post"] += ", delta_ij_, delta_ii_, Ndet_cas, Ndet_non_cas"
s.data["params_main"] += "delta_ij_, delta_ii_, Ndet_cas, Ndet_non_cas"
s.data["decls_main"] += """
integer, intent(in) :: Ndet_cas,Ndet_non_cas
double precision, intent(in) :: delta_ij_(Ndet_cas,Ndet_non_cas,*)
double precision, intent(in) :: delta_ii_(Ndet_cas,*)
"""
s.data["finalization"] = ""
s.data["copy_buffer"] = ""
s.data["generate_psi_guess"] = ""
s.data["size_max"] = "3072"
print s
END_SHELL

View File

@ -1 +0,0 @@
Perturbation Selectors_full Generators_full

View File

@ -1,67 +0,0 @@
program mrcc
implicit none
read_wf = .True.
TOUCH read_wf
call run
call run_mrcc
! call run_mrcc_test
end
subroutine run
implicit none
integer :: i,j
print *, 'CAS'
print *, '==='
do i=1,N_det_cas
print *, psi_cas_coef(i,:)
call debug_det(psi_cas(1,1,i),N_int)
enddo
! print *, 'SD'
! print *, '=='
! do i=1,N_det_non_cas
! print *, psi_non_cas_coef(i,:)
! call debug_det(psi_non_cas(1,1,i),N_int)
! enddo
call write_double(6,ci_energy(1),"Initial CI energy")
end
subroutine run_mrcc_test
implicit none
integer :: i,j
double precision :: pt2
pt2 = 0.d0
do j=1,N_det
do i=1,N_det
pt2 += psi_coef(i,1)*psi_coef(j,1) * delta_ij(i,j,1)
enddo
enddo
print *, ci_energy(1)
print *, ci_energy(1)+pt2
end
subroutine run_mrcc
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-10)
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)
enddo
call write_double(6,ci_energy_dressed(1),"Final MRCC energy")
call ezfio_set_mrcc_energy(ci_energy_dressed(1))
! call save_wavefunction
end

View File

@ -1,171 +0,0 @@
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
do i=1,N_det_non_cas
call i_h_psi(psi_non_cas(1,1,i), psi_cas, psi_cas_coef, N_int, N_det_cas, &
size(psi_cas_coef,1), n_states, ihpsi)
call i_h_j(psi_non_cas(1,1,i),psi_non_cas(1,1,i),N_int,hii)
do k=1,N_states
lambda_pert(k,i) = 1.d0 / (psi_cas_energy_diagonalized(k)-hii)
if (dabs(ihpsi(k)).le.1.d-3) then
lambda_mrcc(k,i) = lambda_pert(k,i)
else
lambda_mrcc(k,i) = psi_non_cas_coef(i,k)/ihpsi(k)
endif
enddo
enddo
END_PROVIDER
!BEGIN_PROVIDER [ double precision, delta_ij_non_cas, (N_det_non_cas, N_det_non_cas,N_states) ]
!implicit none
!BEGIN_DOC
!! Dressing matrix in SD basis
!END_DOC
!delta_ij_non_cas = 0.d0
!call H_apply_mrcc_simple(delta_ij_non_cas,N_det_non_cas)
!END_PROVIDER
BEGIN_PROVIDER [ double precision, delta_ij, (N_det_cas,N_det_non_cas,N_states) ]
&BEGIN_PROVIDER [ double precision, delta_ii, (N_det_cas,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 H_apply_mrcc(delta_ij,delta_ii,N_det_cas,N_det_non_cas)
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_cas
i =idx_cas(ii)
h_matrix_dressed(i,i,istate) += delta_ii(ii,istate)
do jj = 1, N_det_non_cas
j =idx_cas(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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

32
plugins/MRCC_CASSD/.gitignore vendored Normal file
View File

@ -0,0 +1,32 @@
# Automatically created by $QP_ROOT/scripts/module/module_handler.py
.ninja_deps
.ninja_log
AO_Basis
Bitmask
Determinants
Electrons
Ezfio_files
Generators_full
Hartree_Fock
IRPF90_man
IRPF90_temp
Integrals_Bielec
Integrals_Monoelec
MOGuess
MO_Basis
MRCC_Utils
Makefile
Makefile.depend
Nuclei
Perturbation
Properties
Pseudo
Psiref_CAS
Psiref_Utils
Selectors_full
Utils
ezfio_interface.irp.f
irpf90.make
irpf90_entities
mrcc
tags

View File

@ -0,0 +1,4 @@
[energy]
type: double precision
doc: Calculated energy
interface: ezfio

View File

@ -0,0 +1 @@
Perturbation Selectors_full Generators_full Psiref_CAS MRCC_Utils

View File

@ -0,0 +1,33 @@
===========
MRCC Module
===========
MRCC as a coupled cluster on a CAS+SD wave function.
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_CAS <http://github.com/LCPQ/quantum_package/tree/master/src/Psiref_CAS>`_
* `MRCC_Utils <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils>`_
Documentation
=============
.. Do not edit this section. It was auto-generated from the
.. by the `update_README.py` script.
`mrcc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_CASSD/mrcc.irp.f#L1>`_
Undocumented
`print_cas_coefs <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_CASSD/mrcc.irp.f#L7>`_
Undocumented

View File

@ -0,0 +1,24 @@
program mrcc
implicit none
if (.not.read_wf) then
print *, 'read_wf has to be true.'
stop 1
endif
call print_cas_coefs
call run_mrcc
end
subroutine print_cas_coefs
implicit none
integer :: i,j
print *, 'CAS'
print *, '==='
do i=1,N_det_cas
print *, psi_cas_coef(i,:)
call debug_det(psi_cas(1,1,i),N_int)
enddo
call write_double(6,ci_energy(1),"Initial CI energy")
end

31
plugins/MRCC_Utils/.gitignore vendored Normal file
View File

@ -0,0 +1,31 @@
# Automatically created by $QP_ROOT/scripts/module/module_handler.py
.ninja_deps
.ninja_log
AO_Basis
Bitmask
Determinants
Electrons
Ezfio_files
Generators_full
Hartree_Fock
IRPF90_man
IRPF90_temp
Integrals_Bielec
Integrals_Monoelec
MOGuess
MO_Basis
Makefile
Makefile.depend
Nuclei
Perturbation
Properties
Pseudo
Psiref_CAS
Psiref_Utils
Selectors_full
Utils
ezfio_interface.irp.f
irpf90.make
irpf90_entities
mrcc_general
tags

View File

@ -0,0 +1,28 @@
use bitmasks
BEGIN_SHELL [ /usr/bin/env python ]
from generate_h_apply import *
s = H_apply("mrcc")
s.data["parameters"] = ", delta_ij_, delta_ii_,Ndet_ref, Ndet_non_ref"
s.data["declarations"] += """
integer, intent(in) :: Ndet_ref,Ndet_non_ref
double precision, intent(in) :: delta_ij_(Ndet_ref,Ndet_non_ref,*)
double precision, intent(in) :: delta_ii_(Ndet_ref,*)
"""
s.data["keys_work"] = "call mrcc_dress(delta_ij_,delta_ii_,Ndet_ref,Ndet_non_ref,i_generator,key_idx,keys_out,N_int,iproc)"
s.data["params_post"] += ", delta_ij_, delta_ii_, Ndet_ref, Ndet_non_ref"
s.data["params_main"] += "delta_ij_, delta_ii_, Ndet_ref, Ndet_non_ref"
s.data["decls_main"] += """
integer, intent(in) :: Ndet_ref,Ndet_non_ref
double precision, intent(in) :: delta_ij_(Ndet_ref,Ndet_non_ref,*)
double precision, intent(in) :: delta_ii_(Ndet_ref,*)
"""
s.data["finalization"] = ""
s.data["copy_buffer"] = ""
s.data["generate_psi_guess"] = ""
s.data["size_max"] = "3072"
print s
END_SHELL

View File

@ -0,0 +1 @@
Perturbation Selectors_full Generators_full Psiref_Utils

View File

@ -13,6 +13,7 @@ Needed Modules
* `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
=============
@ -20,23 +21,23 @@ 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/mrcc_utils.irp.f#L152>`_
`ci_eigenvectors_dressed <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L76>`_
Eigenvectors/values of the CI matrix
`ci_eigenvectors_s2_dressed <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC/mrcc_utils.irp.f#L153>`_
`ci_eigenvectors_s2_dressed <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L77>`_
Eigenvectors/values of the CI matrix
`ci_electronic_energy_dressed <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC/mrcc_utils.irp.f#L151>`_
`ci_electronic_energy_dressed <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L75>`_
Eigenvectors/values of the CI matrix
`ci_energy_dressed <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC/mrcc_utils.irp.f#L218>`_
`ci_energy_dressed <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L142>`_
N_states lowest eigenvalues of the dressed CI matrix
`davidson_diag_hjj_mrcc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC/davidson.irp.f#L51>`_
`davidson_diag_hjj_mrcc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/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
@ -57,7 +58,7 @@ Documentation
Initial guess vectors are not necessarily orthonormal
`davidson_diag_mrcc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC/davidson.irp.f#L1>`_
`davidson_diag_mrcc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/davidson.irp.f#L1>`_
Davidson diagonalization.
.br
dets_in : bitmasks corresponding to determinants
@ -76,66 +77,45 @@ Documentation
Initial guess vectors are not necessarily orthonormal
`delta_ij <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC/mrcc_utils.irp.f#L99>`_
`delta_ii <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L39>`_
Dressing matrix in N_det basis
`delta_ij_non_cas <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC/mrcc_utils.irp.f#L90>`_
Dressing matrix in SD basis
`delta_ij <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L38>`_
Dressing matrix in N_det basis
`diagonalize_ci_dressed <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC/mrcc_utils.irp.f#L233>`_
`diagonalize_ci_dressed <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L157>`_
Replace the coefficients of the CI states by the coefficients of the
eigenstates of the CI matrix
`dressing_type <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC/mrcc_utils.irp.f#L82>`_
[ Simple | MRCC ]
`find_triples_and_quadruples <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC/mrcc_dress.irp.f#L206>`_
`find_triples_and_quadruples <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_dress.irp.f#L206>`_
Undocumented
`h_apply_mrcc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC/H_apply.irp.f_shell_31#L986>`_
`h_apply_mrcc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/H_apply.irp.f_shell_27#L416>`_
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_mrcc_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC/H_apply.irp.f_shell_31#L575>`_
`h_apply_mrcc_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/H_apply.irp.f_shell_27#L1>`_
Generate all double excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_mrcc_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC/H_apply.irp.f_shell_31#L840>`_
`h_apply_mrcc_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/H_apply.irp.f_shell_27#L268>`_
Generate all single excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_mrcc_simple <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC/H_apply.irp.f_shell_31#L412>`_
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_mrcc_simple_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC/H_apply.irp.f_shell_31#L1>`_
Generate all double excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_mrcc_simple_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC/H_apply.irp.f_shell_31#L266>`_
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/mrcc_utils.irp.f#L136>`_
`h_matrix_dressed <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L50>`_
Dressed H with Delta_ij
`h_u_0_mrcc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC/davidson.irp.f#L355>`_
`h_u_0_mrcc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/davidson.irp.f#L360>`_
Computes v_0 = H|u_0>
.br
n : number of determinants
@ -143,38 +123,26 @@ Documentation
H_jj : array of <j|H|j>
`lambda_mrcc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC/mrcc_utils.irp.f#L1>`_
cm/<Psi_0|H|D_m>
`lambda_mrcc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/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/mrcc_utils.irp.f#L2>`_
cm/<Psi_0|H|D_m>
`lambda_pert <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_utils.irp.f#L2>`_
cm/<Psi_0|H|D_m> or perturbative 1/Delta_E(m)
`mrcc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC/mrcc.irp.f#L1>`_
`mrcc_dress <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_dress.irp.f#L15>`_
Undocumented
`mrcc_dress <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC/mrcc_dress.irp.f#L15>`_
`mrcc_dress_simple <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_dress.irp.f#L160>`_
Undocumented
`mrcc_dress_simple <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC/mrcc_dress.irp.f#L160>`_
Undocumented
`psi_cas_lock <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC/mrcc_dress.irp.f#L3>`_
Locks on CAS determinants to fill delta_ij
`run <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC/mrcc.irp.f#L10>`_
Undocumented
`run_mrcc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC/mrcc.irp.f#L42>`_
Undocumented
`run_mrcc_test <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC/mrcc.irp.f#L29>`_
`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
`run_mrcc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/mrcc_general.irp.f#L1>`_
Undocumented

View File

@ -35,7 +35,7 @@ subroutine davidson_diag_mrcc(dets_in,u_in,energies,dim_in,sze,N_st,Nint,iunit,i
allocate(H_jj(sze))
!$OMP PARALLEL DEFAULT(NONE) &
!$OMP SHARED(sze,H_jj,N_det_cas,dets_in,Nint,istate,delta_ii,idx_cas) &
!$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
@ -43,8 +43,8 @@ subroutine davidson_diag_mrcc(dets_in,u_in,energies,dim_in,sze,N_st,Nint,iunit,i
enddo
!$OMP END DO
!$OMP DO SCHEDULE(guided)
do i=1,N_det_cas
H_jj(idx_cas(i)) += delta_ii(i,istate)
do i=1,N_det_ref
H_jj(idx_ref(i)) += delta_ii(i,istate)
enddo
!$OMP END DO
!$OMP END PARALLEL
@ -384,7 +384,7 @@ subroutine H_u_0_mrcc(v_0,u_0,H_jj,n,keys_tmp,Nint,istate)
integer, parameter :: block_size = 157
!$OMP PARALLEL DEFAULT(NONE) &
!$OMP PRIVATE(i,hij,j,k,idx,jj,ii,vt) &
!$OMP SHARED(n_det_cas,n_det_non_cas,idx_cas,idx_non_cas,n,H_jj,u_0,keys_tmp,Nint,v_0,istate,delta_ij)
!$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)
@ -409,10 +409,10 @@ subroutine H_u_0_mrcc(v_0,u_0,H_jj,n,keys_tmp,Nint,istate)
!$OMP END DO
!$OMP DO SCHEDULE(guided)
do ii=1,n_det_cas
i = idx_cas(ii)
do jj = 1, n_det_non_cas
j = idx_non_cas(jj)
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

View File

@ -1,25 +1,25 @@
use omp_lib
BEGIN_PROVIDER [ integer(omp_lock_kind), psi_cas_lock, (psi_det_size) ]
BEGIN_PROVIDER [ integer(omp_lock_kind), psi_ref_lock, (psi_det_size) ]
implicit none
BEGIN_DOC
! Locks on CAS determinants to fill delta_ij
! Locks on ref determinants to fill delta_ij
END_DOC
integer :: i
do i=1,psi_det_size
call omp_init_lock( psi_cas_lock(i) )
call omp_init_lock( psi_ref_lock(i) )
enddo
END_PROVIDER
subroutine mrcc_dress(delta_ij_, delta_ii_, Ndet_cas, Ndet_non_cas,i_generator,n_selected,det_buffer,Nint,iproc)
subroutine mrcc_dress(delta_ij_, delta_ii_, Ndet_ref, Ndet_non_ref,i_generator,n_selected,det_buffer,Nint,iproc)
use bitmasks
implicit none
integer, intent(in) :: i_generator,n_selected, Nint, iproc
integer, intent(in) :: Ndet_cas, Ndet_non_cas
double precision, intent(inout) :: delta_ij_(Ndet_cas,Ndet_non_cas,*)
double precision, intent(inout) :: delta_ii_(Ndet_cas,*)
integer, intent(in) :: Ndet_ref, Ndet_non_ref
double precision, intent(inout) :: delta_ij_(Ndet_ref,Ndet_non_ref,*)
double precision, intent(inout) :: delta_ii_(Ndet_ref,*)
integer(bit_kind), intent(in) :: det_buffer(Nint,2,n_selected)
integer :: i,j,k,l
@ -43,18 +43,18 @@ subroutine mrcc_dress(delta_ij_, delta_ii_, Ndet_cas, Ndet_non_cas,i_generator,n
call find_triples_and_quadruples(i_generator,n_selected,det_buffer,Nint,tq,N_tq)
allocate (dIa_hla(N_states,Ndet_non_cas))
allocate (dIa_hla(N_states,Ndet_non_ref))
! |I>
! |alpha>
do i_alpha=1,N_tq
call get_excitation_degree_vector(psi_non_cas,tq(1,1,i_alpha),degree_alpha,Nint,N_det_non_cas,idx_alpha)
call get_excitation_degree_vector(psi_non_ref,tq(1,1,i_alpha),degree_alpha,Nint,N_det_non_ref,idx_alpha)
! |I>
do i_I=1,N_det_cas
do i_I=1,N_det_ref
! Find triples and quadruple grand parents
call get_excitation_degree(tq(1,1,i_alpha),psi_cas(1,1,i_I),degree,Nint)
call get_excitation_degree(tq(1,1,i_alpha),psi_ref(1,1,i_I),degree,Nint)
if (degree > 4) then
cycle
endif
@ -65,22 +65,22 @@ subroutine mrcc_dress(delta_ij_, delta_ii_, Ndet_cas, Ndet_non_cas,i_generator,n
! <I| <> |alpha>
do k_sd=1,idx_alpha(0)
call get_excitation_degree(psi_cas(1,1,i_I),psi_non_cas(1,1,idx_alpha(k_sd)),degree,Nint)
call get_excitation_degree(psi_ref(1,1,i_I),psi_non_ref(1,1,idx_alpha(k_sd)),degree,Nint)
if (degree > 2) then
cycle
endif
! <I| /k\ |alpha>
! <I|H|k>
call i_h_j(psi_cas(1,1,i_I),psi_non_cas(1,1,idx_alpha(k_sd)),Nint,hIk)
call i_h_j(psi_ref(1,1,i_I),psi_non_ref(1,1,idx_alpha(k_sd)),Nint,hIk)
do i_state=1,N_states
dIk(i_state) = hIk * lambda_mrcc(i_state,idx_alpha(k_sd))
enddo
! |l> = Exc(k -> alpha) |I>
call get_excitation(psi_non_cas(1,1,idx_alpha(k_sd)),tq(1,1,i_alpha),exc,degree,phase,Nint)
call get_excitation(psi_non_ref(1,1,idx_alpha(k_sd)),tq(1,1,i_alpha),exc,degree,phase,Nint)
call decode_exc(exc,degree,h1,p1,h2,p2,s1,s2)
do k=1,N_int
tmp_det(k,1) = psi_cas(k,1,i_I)
tmp_det(k,2) = psi_cas(k,2,i_I)
tmp_det(k,1) = psi_ref(k,1,i_I)
tmp_det(k,2) = psi_ref(k,2,i_I)
enddo
! Hole (see list_to_bitstring)
iint = ishft(h1-1,-bit_kind_shift) + 1
@ -108,10 +108,10 @@ subroutine mrcc_dress(delta_ij_, delta_ii_, Ndet_cas, Ndet_non_cas,i_generator,n
dka(i_state) = 0.d0
enddo
do l_sd=k_sd+1,idx_alpha(0)
call get_excitation_degree(tmp_det,psi_non_cas(1,1,idx_alpha(l_sd)),degree,Nint)
call get_excitation_degree(tmp_det,psi_non_ref(1,1,idx_alpha(l_sd)),degree,Nint)
if (degree == 0) then
call get_excitation(psi_cas(1,1,i_I),psi_non_cas(1,1,idx_alpha(l_sd)),exc,degree,phase2,Nint)
call i_h_j(psi_cas(1,1,i_I),psi_non_cas(1,1,idx_alpha(l_sd)),Nint,hIl)
call get_excitation(psi_ref(1,1,i_I),psi_non_ref(1,1,idx_alpha(l_sd)),exc,degree,phase2,Nint)
call i_h_j(psi_ref(1,1,i_I),psi_non_ref(1,1,idx_alpha(l_sd)),Nint,hIl)
do i_state=1,N_states
dka(i_state) = hIl * lambda_mrcc(i_state,idx_alpha(l_sd)) * phase * phase2
enddo
@ -124,28 +124,28 @@ subroutine mrcc_dress(delta_ij_, delta_ii_, Ndet_cas, Ndet_non_cas,i_generator,n
enddo
do i_state=1,N_states
ci_inv(i_state) = 1.d0/psi_cas_coef(i_I,i_state)
ci_inv(i_state) = 1.d0/psi_ref_coef(i_I,i_state)
enddo
do l_sd=1,idx_alpha(0)
k_sd = idx_alpha(l_sd)
call i_h_j(tq(1,1,i_alpha),psi_non_cas(1,1,idx_alpha(l_sd)),Nint,hla)
call i_h_j(tq(1,1,i_alpha),psi_non_ref(1,1,idx_alpha(l_sd)),Nint,hla)
do i_state=1,N_states
dIa_hla(i_state,k_sd) = dIa(i_state) * hla
enddo
enddo
call omp_set_lock( psi_cas_lock(i_I) )
call omp_set_lock( psi_ref_lock(i_I) )
do l_sd=1,idx_alpha(0)
k_sd = idx_alpha(l_sd)
do i_state=1,N_states
delta_ij_(i_I,k_sd,i_state) += dIa_hla(i_state,k_sd)
if(dabs(psi_cas_coef(i_I,i_state)).ge.5.d-5)then
delta_ii_(i_I,i_state) -= dIa_hla(i_state,k_sd) * ci_inv(i_state) * psi_non_cas_coef(k_sd,i_state)
if(dabs(psi_ref_coef(i_I,i_state)).ge.5.d-5)then
delta_ii_(i_I,i_state) -= dIa_hla(i_state,k_sd) * ci_inv(i_state) * psi_non_ref_coef(k_sd,i_state)
else
delta_ii_(i_I,i_state) = 0.d0
endif
enddo
enddo
call omp_unset_lock( psi_cas_lock(i_I) )
call omp_unset_lock( psi_ref_lock(i_I) )
enddo
enddo
deallocate (dIa_hla)
@ -157,13 +157,13 @@ end
subroutine mrcc_dress_simple(delta_ij_non_cas_,Ndet_non_cas,i_generator,n_selected,det_buffer,Nint,iproc)
subroutine mrcc_dress_simple(delta_ij_non_ref_,Ndet_non_ref,i_generator,n_selected,det_buffer,Nint,iproc)
use bitmasks
implicit none
integer, intent(in) :: i_generator,n_selected, Nint, iproc
integer, intent(in) :: Ndet_non_cas
double precision, intent(inout) :: delta_ij_non_cas_(Ndet_non_cas,Ndet_non_cas,*)
integer, intent(in) :: Ndet_non_ref
double precision, intent(inout) :: delta_ij_non_ref_(Ndet_non_ref,Ndet_non_ref,*)
integer(bit_kind), intent(in) :: det_buffer(Nint,2,n_selected)
integer :: i,j,k,m
@ -184,18 +184,18 @@ subroutine mrcc_dress_simple(delta_ij_non_cas_,Ndet_non_cas,i_generator,n_select
double precision :: f(N_states)
do i=1,N_tq
call get_excitation_degree_vector(psi_non_cas,tq(1,1,i),degree,Nint,Ndet_non_cas,idx)
call get_excitation_degree_vector(psi_non_ref,tq(1,1,i),degree,Nint,Ndet_non_ref,idx)
call i_h_j(tq(1,1,i),tq(1,1,i),Nint,haa)
do m=1,N_states
f(m) = 1.d0/(ci_electronic_energy(m)-haa)
enddo
do k=1,idx(0)
call i_h_j(tq(1,1,i),psi_non_cas(1,1,idx(k)),Nint,hka)
call i_h_j(tq(1,1,i),psi_non_ref(1,1,idx(k)),Nint,hka)
do j=k,idx(0)
call i_h_j(tq(1,1,i),psi_non_cas(1,1,idx(j)),Nint,haj)
call i_h_j(tq(1,1,i),psi_non_ref(1,1,idx(j)),Nint,haj)
do m=1,N_states
delta_ij_non_cas_(idx(k), idx(j),m) += haj*hka* f(m)
delta_ij_non_cas_(idx(j), idx(k),m) += haj*hka* f(m)
delta_ij_non_ref_(idx(k), idx(j),m) += haj*hka* f(m)
delta_ij_non_ref_(idx(j), idx(k),m) += haj*hka* f(m)
enddo
enddo
enddo
@ -231,9 +231,9 @@ subroutine find_triples_and_quadruples(i_generator,n_selected,det_buffer,Nint,tq
endif
! Select determinants that are triple or quadruple excitations
! from the CAS
! from the ref
good = .True.
call get_excitation_degree_vector(psi_cas,det_buffer(1,1,i),degree,Nint,N_det_cas,idx)
call get_excitation_degree_vector(psi_ref,det_buffer(1,1,i),degree,Nint,N_det_ref,idx)
do k=1,idx(0)
if (degree(k) < 3) then
good = .False.

View File

@ -0,0 +1,29 @@
subroutine run_mrcc
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-10)
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)
if (iteration > 20) then
exit
endif
enddo
call write_double(6,ci_energy_dressed(1),"Final MRCC energy")
call ezfio_set_mrcc_energy(ci_energy_dressed(1))
call save_wavefunction
end

View File

@ -0,0 +1,171 @@
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
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
lambda_mrcc(k,i) = lambda_pert(k,i)
else
lambda_mrcc(k,i) = psi_non_ref_coef(i,k)/ihpsi(k)
endif
enddo
enddo
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 H_apply_mrcc(delta_ij,delta_ii,N_det_ref,N_det_non_ref)
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_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

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

View File

@ -6,7 +6,6 @@ tags
irpf90.make
Makefile
Makefile.depend
build.ninja
.ninja_log
.ninja_deps
ezfio_interface.irp.f

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

@ -90,32 +90,32 @@ Documentation
routine.
`perturb_buffer_by_mono_dipole_moment_z <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L896>`_
`perturb_buffer_by_mono_dipole_moment_z <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L686>`_
Applly pertubration ``dipole_moment_z`` to the buffer of determinants generated in the H_apply
routine.
`perturb_buffer_by_mono_epstein_nesbet <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L161>`_
`perturb_buffer_by_mono_epstein_nesbet <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L476>`_
Applly pertubration ``epstein_nesbet`` to the buffer of determinants generated in the H_apply
routine.
`perturb_buffer_by_mono_epstein_nesbet_2x2 <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L266>`_
`perturb_buffer_by_mono_epstein_nesbet_2x2 <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L581>`_
Applly pertubration ``epstein_nesbet_2x2`` to the buffer of determinants generated in the H_apply
routine.
`perturb_buffer_by_mono_epstein_nesbet_sc2 <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L581>`_
`perturb_buffer_by_mono_epstein_nesbet_sc2 <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L371>`_
Applly pertubration ``epstein_nesbet_sc2`` to the buffer of determinants generated in the H_apply
routine.
`perturb_buffer_by_mono_epstein_nesbet_sc2_no_projected <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L476>`_
`perturb_buffer_by_mono_epstein_nesbet_sc2_no_projected <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L266>`_
Applly pertubration ``epstein_nesbet_sc2_no_projected`` to the buffer of determinants generated in the H_apply
routine.
`perturb_buffer_by_mono_epstein_nesbet_sc2_projected <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L371>`_
`perturb_buffer_by_mono_epstein_nesbet_sc2_projected <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L161>`_
Applly pertubration ``epstein_nesbet_sc2_projected`` to the buffer of determinants generated in the H_apply
routine.
@ -125,7 +125,7 @@ Documentation
routine.
`perturb_buffer_by_mono_moller_plesset <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L686>`_
`perturb_buffer_by_mono_moller_plesset <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L896>`_
Applly pertubration ``moller_plesset`` to the buffer of determinants generated in the H_apply
routine.
@ -135,32 +135,32 @@ Documentation
routine.
`perturb_buffer_dipole_moment_z <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L845>`_
`perturb_buffer_dipole_moment_z <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L635>`_
Applly pertubration ``dipole_moment_z`` to the buffer of determinants generated in the H_apply
routine.
`perturb_buffer_epstein_nesbet <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L110>`_
`perturb_buffer_epstein_nesbet <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L425>`_
Applly pertubration ``epstein_nesbet`` to the buffer of determinants generated in the H_apply
routine.
`perturb_buffer_epstein_nesbet_2x2 <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L215>`_
`perturb_buffer_epstein_nesbet_2x2 <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L530>`_
Applly pertubration ``epstein_nesbet_2x2`` to the buffer of determinants generated in the H_apply
routine.
`perturb_buffer_epstein_nesbet_sc2 <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L530>`_
`perturb_buffer_epstein_nesbet_sc2 <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L320>`_
Applly pertubration ``epstein_nesbet_sc2`` to the buffer of determinants generated in the H_apply
routine.
`perturb_buffer_epstein_nesbet_sc2_no_projected <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L425>`_
`perturb_buffer_epstein_nesbet_sc2_no_projected <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L215>`_
Applly pertubration ``epstein_nesbet_sc2_no_projected`` to the buffer of determinants generated in the H_apply
routine.
`perturb_buffer_epstein_nesbet_sc2_projected <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L320>`_
`perturb_buffer_epstein_nesbet_sc2_projected <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L110>`_
Applly pertubration ``epstein_nesbet_sc2_projected`` to the buffer of determinants generated in the H_apply
routine.
@ -170,7 +170,7 @@ Documentation
routine.
`perturb_buffer_moller_plesset <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L635>`_
`perturb_buffer_moller_plesset <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L845>`_
Applly pertubration ``moller_plesset`` to the buffer of determinants generated in the H_apply
routine.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 60 KiB

View File

@ -1,30 +1,29 @@
# Automatically created by /home/giner/quantum_package/scripts/module/module_handler.py
IRPF90_temp
# Automatically created by $QP_ROOT/scripts/module/module_handler.py
.ninja_deps
.ninja_log
AO_Basis
Bitmask
Determinants
Electrons
Ezfio_files
Generators_full
Hartree_Fock
IRPF90_man
irpf90_entities
tags
irpf90.make
IRPF90_temp
Integrals_Bielec
Integrals_Monoelec
MOGuess
MO_Basis
Makefile
Makefile.depend
build.ninja
.ninja_log
.ninja_deps
ezfio_interface.irp.f
Ezfio_files
Perturbation
Determinants
Utils
Integrals_Monoelec
MO_Basis
Selectors_full
Integrals_Bielec
Pseudo
Generators_full
Bitmask
AO_Basis
Electrons
MOGuess
Nuclei
Hartree_Fock
Perturbation
Properties
mrcc
Pseudo
Selectors_full
Utils
ezfio_interface.irp.f
irpf90.make
irpf90_entities
mrcc_general
tags

View File

@ -0,0 +1 @@
Psiref_Utils

View File

@ -0,0 +1,24 @@
=======================
Psiref_threshold Module
=======================
Reference wave function is defined as all determinants with coefficients
such that | c_i/c_max | > threshold.
Documentation
=============
.. Do not edit this section. It was auto-generated from the
.. by the `update_README.py` script.
Needed Modules
==============
.. Do not edit this section. It was auto-generated from the
.. by the `update_README.py` script.
.. image:: tree_dependency.png
* `Psiref_Utils <http://github.com/LCPQ/quantum_package/tree/master/src/Psiref_Utils>`_

View File

@ -0,0 +1,28 @@
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
! CAS wave function, defined from the application of the CAS bitmask on the
! determinants. idx_cas gives the indice of the CAS determinant in psi_det.
END_DOC
integer :: i,j,k
N_det_ref = N_det_cas
do i=1,N_det_ref
do k=1,N_int
psi_ref(k,1,i) = psi_cas(k,1,i)
psi_ref(k,2,i) = psi_cas(k,2,i)
enddo
idx_ref(i) = idx_cas(i)
enddo
do k=1,N_states
do i=1,N_det_ref
psi_ref_coef(i,k) = psi_cas_coef(i,k)
enddo
enddo
END_PROVIDER

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

29
plugins/Psiref_Utils/.gitignore vendored Normal file
View File

@ -0,0 +1,29 @@
# Automatically created by $QP_ROOT/scripts/module/module_handler.py
.ninja_deps
.ninja_log
AO_Basis
Bitmask
Determinants
Electrons
Ezfio_files
Generators_full
Hartree_Fock
IRPF90_man
IRPF90_temp
Integrals_Bielec
Integrals_Monoelec
MOGuess
MO_Basis
Makefile
Makefile.depend
Nuclei
Perturbation
Properties
Pseudo
Selectors_full
Utils
ezfio_interface.irp.f
irpf90.make
irpf90_entities
mrcc_general
tags

View File

@ -0,0 +1,15 @@
===================
Psiref_utils Module
===================
Utilities related to the use of a reference wave function. This module
needs to be loaded with any psi_ref module.
Documentation
=============
.. Do not edit this section. It was auto-generated from the
.. by the `update_README.py` script.

View File

@ -0,0 +1,36 @@
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

View File

@ -0,0 +1,123 @@
use bitmasks
BEGIN_PROVIDER [ integer(bit_kind), psi_ref_sorted_bit, (N_int,2,psi_det_size) ]
&BEGIN_PROVIDER [ double precision, psi_ref_coef_sorted_bit, (psi_det_size,N_states) ]
implicit none
BEGIN_DOC
! Reference determinants sorted to accelerate the search of a random determinant in the wave
! function.
END_DOC
call sort_dets_by_det_search_key(N_det_ref, psi_ref, psi_ref_coef, &
psi_ref_sorted_bit, psi_ref_coef_sorted_bit)
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, 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.
END_DOC
integer :: i_non_ref,j,k
integer :: degree
logical :: in_ref
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(j,1,i_non_ref) = psi_det(j,1,k)
psi_non_ref(j,2,i_non_ref) = psi_det(j,2,k)
enddo
do j=1,N_states
psi_non_ref_coef(i_non_ref,j) = psi_coef(k,j)
enddo
idx_non_ref(i_non_ref) = k
endif
enddo
N_det_non_ref = i_non_ref
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
BEGIN_DOC
! Reference determinants sorted to accelerate the search of a random determinant in the wave
! function.
END_DOC
call sort_dets_by_det_search_key(N_det_ref, psi_non_ref, psi_non_ref_coef, &
psi_non_ref_sorted_bit, psi_non_ref_coef_sorted_bit)
END_PROVIDER
BEGIN_PROVIDER [double precision, H_matrix_ref, (N_det_ref,N_det_ref)]
implicit none
integer :: i,j
double precision :: hij
do i = 1, N_det_ref
do j = 1, N_det_ref
call i_H_j(psi_ref(1,1,i),psi_ref(1,1,j),N_int,hij)
H_matrix_ref(i,j) = hij
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER [double precision, psi_coef_ref_diagonalized, (N_det_ref,N_states)]
&BEGIN_PROVIDER [double precision, psi_ref_energy_diagonalized, (N_states)]
implicit none
integer :: i,j
double precision, allocatable :: eigenvectors(:,:), eigenvalues(:)
allocate (eigenvectors(size(H_matrix_ref,1),N_det_ref))
allocate (eigenvalues(N_det_ref))
call lapack_diag(eigenvalues,eigenvectors, &
H_matrix_ref,size(H_matrix_ref,1),N_det_ref)
do i = 1, N_states
psi_ref_energy_diagonalized(i) = eigenvalues(i)
do j = 1, N_det_ref
psi_coef_ref_diagonalized(j,i) = eigenvectors(j,i)
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER [double precision, psi_ref_energy, (N_states)]
implicit none
integer :: i,j,k
double precision :: hij,norm,u_dot_v
psi_ref_energy = 0.d0
do k = 1, N_states
norm = 0.d0
do i = 1, N_det_ref
norm += psi_ref_coef(i,k) * psi_ref_coef(i,k)
do j = 1, N_det_ref
psi_ref_energy(k) += psi_ref_coef(i,k) * psi_ref_coef(j,k) * H_matrix_ref(i,j)
enddo
enddo
psi_ref_energy(k) = psi_ref_energy(k) /norm
enddo
END_PROVIDER

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

29
plugins/Psiref_threshold/.gitignore vendored Normal file
View File

@ -0,0 +1,29 @@
# Automatically created by $QP_ROOT/scripts/module/module_handler.py
.ninja_deps
.ninja_log
AO_Basis
Bitmask
Determinants
Electrons
Ezfio_files
Generators_full
Hartree_Fock
IRPF90_man
IRPF90_temp
Integrals_Bielec
Integrals_Monoelec
MOGuess
MO_Basis
Makefile
Makefile.depend
Nuclei
Perturbation
Properties
Pseudo
Selectors_full
Utils
ezfio_interface.irp.f
irpf90.make
irpf90_entities
mrcc_general
tags

View File

@ -0,0 +1 @@
Psiref_Utils

View File

@ -0,0 +1,24 @@
=======================
Psiref_threshold Module
=======================
Reference wave function is defined as all determinants with coefficients
such that | c_i/c_max | > threshold.
Documentation
=============
.. Do not edit this section. It was auto-generated from the
.. by the `update_README.py` script.
Needed Modules
==============
.. Do not edit this section. It was auto-generated from the
.. by the `update_README.py` script.
.. image:: tree_dependency.png
* `Psiref_Utils <http://github.com/LCPQ/quantum_package/tree/master/src/Psiref_Utils>`_

View File

@ -0,0 +1,38 @@
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
double precision, parameter :: threshold=0.05d0
N_det_ref = 0
t = threshold * abs_psi_coef_max
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)) > t)
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

@ -1,26 +1,23 @@
#
# Do not modify this file. Add your ignored files to the gitignore
# (without the dot at the beginning) file.
#
IRPF90_temp
IRPF90_man
irpf90.make
tags
Makefile.depend
irpf90_entities
build.ninja
.ninja_log
# Automatically created by $QP_ROOT/scripts/module/module_handler.py
.ninja_deps
Pseudo
Integrals_Monoelec
.ninja_log
AO_Basis
Bitmask
Integrals_Bielec
AOs
MOs
Determinants
Electrons
DensityFit
Utils
Nuclei
Ezfio_files
IRPF90_man
IRPF90_temp
Integrals_Bielec
Integrals_Monoelec
MO_Basis
Makefile
Makefile.depend
Nuclei
Pseudo
Utils
ezfio_interface.irp.f
irpf90.make
irpf90_entities
save_for_qmcchem
tags

View File

@ -1 +1 @@
Determinants DensityFit
Determinants

View File

@ -8,41 +8,25 @@ Documentation
.. Do not edit this section. It was auto-generated from the
.. by the `update_README.py` script.
`ao_pseudo_grid <http://github.com/LCPQ/quantum_package/tree/master/src/QmcChem/pot_ao_pseudo_ints.irp.f#L225>`_
`ao_pseudo_grid <http://github.com/LCPQ/quantum_package/tree/master/src/QmcChem/pot_ao_pseudo_ints.irp.f#L2>`_
Grid points for f(|r-r_A|) = \int Y_{lm}^{C} (|r-r_C|, \Omega_C) \chi_i^{A} (r-r_A) d\Omega_C
.br
<img src="http://latex.codecogs.com/gif.latex?f(|r-r_A|)&space;=&space;\int&space;Y_{lm}^{C}&space;(|r-r_C|,&space;\Omega_C)&space;\chi_i^{A}&space;(r-r_A)&space;d\Omega_C"
title="f(|r-r_A|) = \int Y_{lm}^{C} (|r-r_C|, \Omega_C) \chi_i^{A} (r-r_A) d\Omega_C" />
`aux_pseudo_integral <http://github.com/LCPQ/quantum_package/tree/master/src/QmcChem/pot_ao_pseudo_ints.irp.f#L1>`_
Pseudo-potential
`aux_pseudo_integral_local <http://github.com/LCPQ/quantum_package/tree/master/src/QmcChem/pot_ao_pseudo_ints.irp.f#L15>`_
Local pseudo-potential
`aux_pseudo_integral_non_local <http://github.com/LCPQ/quantum_package/tree/master/src/QmcChem/pot_ao_pseudo_ints.irp.f#L121>`_
Local pseudo-potential
`mo_pseudo_grid <http://github.com/LCPQ/quantum_package/tree/master/src/QmcChem/pot_ao_pseudo_ints.irp.f#L276>`_
`mo_pseudo_grid <http://github.com/LCPQ/quantum_package/tree/master/src/QmcChem/pot_ao_pseudo_ints.irp.f#L56>`_
Grid points for f(|r-r_A|) = \int Y_{lm}^{C} (|r-r_C|, \Omega_C) \phi_i^{A} (r-r_A) d\Omega_C
.br
<img src="http://latex.codecogs.com/gif.latex?f(|r-r_A|)&space;=&space;\int&space;Y_{lm}^{C}&space;(|r-r_C|,&space;\Omega_C)&space;\chi_i^{A}&space;(r-r_A)&space;d\Omega_C"
title="f(|r-r_A|) = \int Y_{lm}^{C} (|r-r_C|, \Omega_C) \chi_i^{A} (r-r_A) d\Omega_C" />
`pseudo_matrix <http://github.com/LCPQ/quantum_package/tree/master/src/QmcChem/pseudo.irp.f#L12>`_
Pseudo-potential expressed in the basis of ao products
`save_for_qmc <http://github.com/LCPQ/quantum_package/tree/master/src/QmcChem/save_for_qmcchem.irp.f#L1>`_
Undocumented
`test_pseudo_grid_ao <http://github.com/LCPQ/quantum_package/tree/master/src/QmcChem/pot_ao_pseudo_ints.irp.f#L321>`_
`test_pseudo_grid_ao <http://github.com/LCPQ/quantum_package/tree/master/src/QmcChem/pot_ao_pseudo_ints.irp.f#L105>`_
Undocumented
@ -58,5 +42,4 @@ Needed Modules
.. image:: tree_dependency.png
* `Determinants <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants>`_
* `DensityFit <http://github.com/LCPQ/quantum_package/tree/master/src/DensityFit>`_

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 72 KiB

View File

@ -1 +1 @@
AO_Basis Electrons Ezfio_files MO_Basis Nuclei Utils
MO_Basis

View File

@ -1,7 +1,3 @@
===============
loc_cele Module
===============
Documentation
=============
@ -9,7 +5,10 @@ Documentation
.. by the `update_README.py` script.
`loc_rasorb <http://github.com/LCPQ/quantum_package/tree/master/src/loc_cele/loc_cele.irp.f#L1>`_
Undocumented
This program performs a localization of the active orbitals
of a CASSCF wavefunction, reading the orbitals from a RASORB
file of molcas.
id1=max number of MO in a given symmetry.
Needed Modules
==============
@ -19,10 +18,5 @@ Needed Modules
.. image:: tree_dependency.png
* `AO_Basis <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis>`_
* `Electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Electrons>`_
* `Ezfio_files <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files>`_
* `MO_Basis <http://github.com/LCPQ/quantum_package/tree/master/src/MO_Basis>`_
* `Nuclei <http://github.com/LCPQ/quantum_package/tree/master/src/Nuclei>`_
* `Utils <http://github.com/LCPQ/quantum_package/tree/master/src/Utils>`_

View File

@ -2,25 +2,12 @@
implicit none
!
! This program performs a localization of the active orbitals
! of a CASSCF wavefunction, reading the orbitals from a RASORB
! file of molcas.
!
! id1=max number of MO in a given symmetry.
!
BEGIN_DOC
! This program performs a localization of the active orbitals
! of a CASSCF wavefunction, reading the orbitals from a RASORB
! file of molcas.
! id1=max is the number of MO in a given symmetry.
END_DOC
integer id1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -26,6 +26,16 @@ Error:
"""%f
sys.exit(1)
# __
# /__ | _ |_ _. | _. ._ o _. |_ | _ _
# \_| | (_) |_) (_| | \/ (_| | | (_| |_) | (/_ _>
#
from qp_path import QP_ROOT, QP_SRC, QP_EZFIO
EZFIO_LIB = join(QP_ROOT, "lib", "libezfio.a")
ROOT_BUILD_NINJA = join(QP_ROOT, "config", "build.ninja")
header = r"""#
# _______ _____
# __ __ \___ _______ _________ /____ ________ ___
@ -45,17 +55,8 @@ header = r"""#
# Generated automatically by {0}
#
#
""".format(__file__)
""".format(__file__).replace(QP_ROOT,"$QP_ROOT")
# __
# /__ | _ |_ _. | _. ._ o _. |_ | _ _
# \_| | (_) |_) (_| | \/ (_| | | (_| |_) | (/_ _>
#
from qp_path import QP_ROOT, QP_SRC, QP_EZFIO
EZFIO_LIB = join(QP_ROOT, "lib", "libezfio.a")
ROOT_BUILD_NINJA = join(QP_ROOT, "config", "build.ninja")
#
# |\ | _. ._ _ _ _| _|_ ._ | _
@ -333,7 +334,7 @@ def ninja_gitignore_rule():
" description = Create gitignore for $module_rel", ""]
def ninja_gitignore_build(path_module, l_symlink, d_binaries):
def ninja_gitignore_build(path_module, d_binaries):
"""
"""
@ -342,9 +343,9 @@ def ninja_gitignore_build(path_module, l_symlink, d_binaries):
l_b = [i.abs for i in d_binaries[path_module]]
l_sym = [i.destination for i in l_symlink]
l_string = ["build {0}: build_gitignore {1} || {2}".format(path_gitignore,
" ".join(l_b),
" ".join(l_sym)),
l_string = ["build {0}: build_gitignore {1} || l_symlink_{2}".format(path_gitignore,
" ".join(l_b),
path_module.rel),
" module_rel = {0}".format(path_module.rel),
""]
@ -519,10 +520,15 @@ def ninja_readme_build(path_module, d_irp, dict_root_path):
path_readme = join(path_module.abs, "README.rst")
root_module = dict_root_path[module]
l_depend = d_irp[path_module]["l_depend"] + [join(root_module.abs, "tags")]
tags = join(root_module.abs, "tags")
str_depend = " ".join(d_irp[path_module]["l_depend"])
l_string = ["build {0}: build_readme {1}".format(path_readme,
" ".join(l_depend)),
tree = join(root_module.abs, "tree_dependency.png")
l_string = ["build {0}: build_readme {1} {2} {3}".format(path_readme,
tags,
str_depend,
tree),
" module_root = {0}".format(root_module.abs),
" module_abs = {0}".format(path_module.abs),
" module_rel = {0}".format(path_module.rel), ""]
@ -737,7 +743,7 @@ def create_build_ninja_module(path_module):
l_string += ["build dummy_target: update_build_ninja_root", "",
"build all: make_all_binaries dummy_target", "",
"build local: make_local_binaries dummy_target",
"build local: make_local_binaries dummy_target", "",
"default local", "", "build clean: make_clean dummy_target",
""]
@ -767,7 +773,7 @@ def create_build_ninja_global(l_module):
"build all: make_all_binaries dummy_target",
"default all",
"",
"build clean: make_clean",
"build clean: make_clean dummy_target",
"", ]
path_ninja_cur = join(QP_ROOT, "build.ninja")
@ -903,7 +909,7 @@ if __name__ == "__main__":
l_string += ninja_binaries_build(module_to_compile, l_children,
d_binaries)
l_string += ninja_gitignore_build(module_to_compile, l_symlink, d_binaries)
l_string += ninja_gitignore_build(module_to_compile, d_binaries)
with open(join(QP_ROOT, "config", "build.ninja"), "w+") as f:
f.write(header)

View File

@ -239,13 +239,13 @@ def get_dict_config_file(module_obj):
# Check if type is avalaible
try:
type_ = config_file.get(section, "type")
type_ = config_file.get(section, "type").strip()
except ConfigParser.NoOptionError:
error("type", pvd, module_obj.path)
sys.exit(1)
if type_ not in type_dict:
print "{0} not avalaible. Choose in:".format(type_)
print "{0} not avalaible. Choose in:".format(type_).strip()
print ", ".join(sorted([i for i in type_dict]))
sys.exit(1)
else:
@ -279,13 +279,16 @@ def get_dict_config_file(module_obj):
d[pvd][option] = d_default[option]
# If interface is input we need a default value information
if "ocaml" in d[pvd]["interface"]:
try:
default_raw = config_file.get(section, "default")
except ConfigParser.NoOptionError:
try:
default_raw = config_file.get(section, "default")
except ConfigParser.NoOptionError:
if "ocaml" in d[pvd]["interface"]:
error("default", pvd, module_obj.path)
sys.exit(1)
else:
pass
else:
try:
d[pvd]["default"] = is_bool(default_raw)
except TypeError:
@ -367,7 +370,7 @@ def create_ezfio_stuff(dict_ezfio_cfg, config_or_default="config"):
size_raw = str(size_raw)
if size_raw.startswith('='):
size_convert = size_raw
size_convert = size_raw.replace('.', '_')
else:
size_raw = provider_info["size"].translate(None, "()")
size_raw = size_raw.replace('.', '_')
@ -435,13 +438,18 @@ def create_ezfio_stuff(dict_ezfio_cfg, config_or_default="config"):
# It is the last so we don't need to right align it
str_size = size_format_to_ezfio(size_raw) if size_raw else ""
if "default" in provider_info and provider_info["default"].fortran.startswith("="):
str_default = provider_info["default"].fortran.replace('.', '_')
else:
str_default = ""
# Get the string in to good format (left align and co)
str_name = str_name_format(name_raw)
str_fortran_type = str_type_format(fortran_type_raw)
# Return the string
if config_or_default == "config":
s = " {0} {1} {2}".format(str_name, str_fortran_type, str_size)
s = " {0} {1} {2} {3}".format(str_name, str_fortran_type, str_size, str_default)
elif config_or_default == "default":
try:
str_value = provider_info["default"].ocaml

View File

@ -43,7 +43,8 @@ class H_apply(object):
self.perturbation = None
#s["omp_parallel"] = """!$OMP PARALLEL DEFAULT(NONE) &
s["omp_parallel"] = """!$OMP PARALLEL DEFAULT(SHARED) &
s["omp_parallel"] = """ PROVIDE elec_num_tab
!$OMP PARALLEL DEFAULT(SHARED) &
!$OMP PRIVATE(i,j,k,l,keys_out,hole,particle, &
!$OMP occ_particle,occ_hole,j_a,k_a,other_spin, &
!$OMP hole_save,ispin,jj,l_a,ib_jb_pairs,array_pairs, &

View File

@ -21,15 +21,15 @@ function do_gitingore()
# Do not modify this file. Add your ignored files to the gitignore
# (without the dot at the beginning) file.
#
IRPF90_temp
IRPF90_man
irpf90.make
tags
Makefile.depend
irpf90_entities
build.ninja
.ninja_log
irpf90_entities
irpf90.make
IRPF90_man
IRPF90_temp
Makefile.depend
.ninja_deps
.ninja_log
tags
EOF
if [[ -f gitignore ]]
@ -59,3 +59,6 @@ else
done
fi
# Sort the .gitignore to reduce conflict in git merges
sort .gitignore |uniq > .gitignore.new
mv .gitignore.new .gitignore

View File

@ -24,6 +24,7 @@ import shutil
try:
from docopt import docopt
from qp_path import QP_SRC
from qp_path import QP_ROOT
except ImportError:
print "source .quantum_package.rc"
raise
@ -85,7 +86,7 @@ def get_l_module_descendant(d_child, l_module):
except KeyError:
print >> sys.stderr, "`{0}` not submodule".format(module)
print >> sys.stderr, "Check the corresponding NEEDED_CHILDREN_MODULES"
sys.exit(1)
raise
return list(set(l))
@ -123,8 +124,12 @@ class ModuleHandler():
d_child = self.dict_child
for module_name in d_child:
d[module_name] = get_l_module_descendant(d_child,
d_child[module_name])
try :
d[module_name] = get_l_module_descendant(d_child,
d_child[module_name])
except KeyError:
print "Check NEEDED_CHILDREN_MODULES for {0}".format(module_name)
sys.exit(1)
return d
@ -219,7 +224,7 @@ if __name__ == '__main__':
for module in l_module:
if not is_module(module):
print "{0} is not a volide module. Abort".format(module)
print "{0} is not a valide module. Abort".format(module)
print "No NEEDED_CHILDREN_MODULES in it"
sys.exit(1)
@ -237,8 +242,7 @@ if __name__ == '__main__':
l_dir = ['IRPF90_temp', 'IRPF90_man']
l_file = ["irpf90_entities", "tags", "irpf90.make",
"Makefile", "Makefile.depend",
"build.ninja", ".ninja_log", ".ninja_deps",
"Makefile", "Makefile.depend", ".ninja_log", ".ninja_deps",
"ezfio_interface.irp.f"]
for module in l_module:
@ -276,5 +280,8 @@ if __name__ == '__main__':
path = os.path.join(module_abs, ".gitignore")
with open(path, "w+") as f:
f.write("# Automatically created by {0} \n".format(__file__))
f.write("\n".join(l_dir + l_file + l_symlink + l_exe))
f.write("# Automatically created by {0} \n".format(__file__).replace(QP_ROOT,"$QP_ROOT"))
l_text = l_dir + l_file + l_symlink + l_exe
l_text.sort()
f.write("\n".join(l_text))

View File

@ -23,10 +23,10 @@ try:
from module_handler import get_l_module_descendant
from update_README import Doc_key, Needed_key
from qp_path import QP_SRC, QP_PLUGINS
except ImportError:
print "source .quantum_package.rc"
raise
print "Please check if you have source the .quantum_package.rc"
print "(`source .quantum_package.rc`)"
print sys.exit(1)
def save_new_module(path, l_child):
@ -79,7 +79,7 @@ if __name__ == '__main__':
l_children = arguments["<children_module>"]
path = os.path.join(QP_SRC, arguments["<name>"])
path = os.path.join(QP_PLUGINS, arguments["<name>"][0])
print "You will create the module:"
print path
@ -103,6 +103,7 @@ if __name__ == '__main__':
print l_child_reduce
save_new_module(path, l_child_reduce)
print "This was a plugin, you can install it now"
elif arguments["download"]:
pass
# d_local = get_dict_child([QP_SRC])

1
src/.gitignore vendored
View File

@ -23,3 +23,4 @@ QmcChem
Selectors_full
Selectors_no_sorted
SingleRefMethod
Casino

50
src/AO_Basis/EZFIO.cfg Normal file
View File

@ -0,0 +1,50 @@
[ao_basis]
type: character*(256)
doc: name of the ao basis
interface: ezfio
[ao_num]
type: integer
doc: number of ao
interface: ezfio, provider
[ao_prim_num]
type: integer
doc: Number of primitives per atomic orbital
size: (ao_basis.ao_num)
interface: ezfio, provider
[ao_prim_num_max]
type: integer
doc: number of primitive maximun
default: =maxval(ao_basis.ao_prim_num)
interface: ezfio
[ao_nucl]
type: integer
doc: Index of the nuclei on which the ao is centered
size: (ao_basis.ao_num)
interface: ezfio, provider
[ao_power]
type: integer
doc: power for each dimension for each ao_basis
size: (ao_basis.ao_num,3)
interface: ezfio, provider
[ao_coef]
type: double precision
doc: AO Coefficients, read from input. Those should not be used directly, as the MOs are expressed on the basis of **normalized** AOs.
size: (ao_basis.ao_num,ao_basis.ao_prim_num_max)
interface: ezfio, provider
[ao_expo]
type: double precision
doc: expo for each primitive of each ao_basis
size: (ao_basis.ao_num,ao_basis.ao_prim_num_max)
interface: ezfio, provider
[ao_md5]
type: character*(32)
doc: MD5 key characteristic of the AO basis
interface: ezfio, provider

View File

@ -46,61 +46,60 @@ Documentation
.. Do not edit this section. It was auto-generated from the
.. by the `update_README.py` script.
`ao_coef <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L62>`_
AO Coefficients, read from input. Those should not be used directly, as
the MOs are expressed on the basis of **normalized** AOs.
`ao_coef <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/ezfio_interface.irp.f#L24>`_
AO Coefficients, read from input. Those should not be used directly, as the MOs are expressed on the basis of **normalized** AOs.
`ao_coef_normalized <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L84>`_
`ao_coef_normalized <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L22>`_
Coefficients including the AO normalization
`ao_coef_normalized_ordered <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L107>`_
`ao_coef_normalized_ordered <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L45>`_
Sorted primitives to accelerate 4 index MO transformation
`ao_coef_normalized_ordered_transp <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L133>`_
`ao_coef_normalized_ordered_transp <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L71>`_
Transposed ao_coef_normalized_ordered
`ao_expo <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L41>`_
AO Exponents read from input
`ao_expo <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/ezfio_interface.irp.f#L134>`_
expo for each primitive of each ao_basis
`ao_expo_ordered <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L108>`_
`ao_expo_ordered <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L46>`_
Sorted primitives to accelerate 4 index MO transformation
`ao_expo_ordered_transp <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L147>`_
`ao_expo_ordered_transp <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L85>`_
Transposed ao_expo_ordered
`ao_l <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L162>`_
`ao_l <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L99>`_
ao_l = l value of the AO: a+b+c in x^a y^b z^c
`ao_l_char <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L163>`_
`ao_l_char <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L100>`_
ao_l = l value of the AO: a+b+c in x^a y^b z^c
`ao_l_char_space <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L311>`_
`ao_l_char_space <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L216>`_
Undocumented
`ao_md5 <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L403>`_
`ao_md5 <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/ezfio_interface.irp.f#L6>`_
MD5 key characteristic of the AO basis
`ao_nucl <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L209>`_
`ao_nucl <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/ezfio_interface.irp.f#L112>`_
Index of the nuclei on which the ao is centered
`ao_num <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L1>`_
Number of atomic orbitals
`ao_num <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/ezfio_interface.irp.f#L68>`_
number of ao
`ao_num_align <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L2>`_
Number of atomic orbitals
`ao_num_align <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L1>`_
Number of atomic orbitals align
`ao_overlap <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/ao_overlap.irp.f#L1>`_
@ -128,27 +127,27 @@ Documentation
:math:`\int \chi_i(r) \chi_j(r) dr)`
`ao_power <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L19>`_
Powers of x,y and z read from input
`ao_power <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/ezfio_interface.irp.f#L46>`_
power for each dimension for each ao_basis
`ao_prim_num <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L177>`_
`ao_prim_num <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/ezfio_interface.irp.f#L90>`_
Number of primitives per atomic orbital
`ao_prim_num_max <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L199>`_
`ao_prim_num_max <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L12>`_
Undocumented
`ao_prim_num_max_align <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L200>`_
Undocumented
`ao_prim_num_max_align <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L112>`_
Number of primitives per atomic orbital aligned
`l_to_charater <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L218>`_
`l_to_charater <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L123>`_
character corresponding to the "L" value of an AO orbital
`n_aos_max <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L231>`_
`n_aos_max <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L136>`_
Number of AOs per atom
@ -160,21 +159,21 @@ Documentation
Undocumented
`nucl_aos <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L244>`_
`nucl_aos <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L149>`_
List of AOs attached on each atom
`nucl_list_shell_aos <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L262>`_
`nucl_list_shell_aos <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L167>`_
Index of the shell type Aos and of the corresponding Aos
Per convention, for P,D,F and G AOs, we take the index
of the AO with the the corresponding power in the "X" axis
`nucl_n_aos <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L230>`_
`nucl_n_aos <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L135>`_
Number of AOs per atom
`nucl_num_shell_aos <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L263>`_
`nucl_num_shell_aos <http://github.com/LCPQ/quantum_package/tree/master/src/AO_Basis/aos.irp.f#L168>`_
Index of the shell type Aos and of the corresponding Aos
Per convention, for P,D,F and G AOs, we take the index
of the AO with the the corresponding power in the "X" axis

View File

@ -1,12 +0,0 @@
ao_basis
ao_basis character*(256)
ao_num integer
ao_prim_num integer (ao_basis_ao_num)
ao_nucl integer (ao_basis_ao_num)
ao_power integer (ao_basis_ao_num,3)
ao_prim_num_max integer = maxval(ao_basis_ao_prim_num)
ao_coef double precision (ao_basis_ao_num,ao_basis_ao_prim_num_max)
ao_expo double precision (ao_basis_ao_num,ao_basis_ao_prim_num_max)
ao_md5 character*(32)

View File

@ -1,85 +1,23 @@
BEGIN_PROVIDER [ integer, ao_num ]
&BEGIN_PROVIDER [ integer, ao_num_align ]
BEGIN_PROVIDER [ integer, ao_num_align ]
implicit none
BEGIN_DOC
! Number of atomic orbitals
! Number of atomic orbitals align
END_DOC
ao_num = -1
PROVIDE ezfio_filename
call ezfio_get_ao_basis_ao_num(ao_num)
if (ao_num <= 0) then
stop 'Number of contracted gaussians should be > 0'
endif
integer :: align_double
ao_num_align = align_double(ao_num)
END_PROVIDER
BEGIN_PROVIDER [ integer, ao_power, (ao_num_align,3) ]
implicit none
BEGIN_DOC
! Powers of x,y and z read from input
END_DOC
PROVIDE ezfio_filename
integer :: i,j,k
integer, allocatable :: ibuffer(:,:)
allocate ( ibuffer(ao_num,3) )
ibuffer = 0
call ezfio_get_ao_basis_ao_power(ibuffer)
ao_power = 0
do j = 1, 3
do i = 1, ao_num
ao_power(i,j) = ibuffer(i,j)
enddo
enddo
deallocate(ibuffer)
END_PROVIDER
BEGIN_PROVIDER [ double precision, ao_expo, (ao_num_align,ao_prim_num_max) ]
implicit none
BEGIN_DOC
! AO Exponents read from input
END_DOC
PROVIDE ezfio_filename
double precision, allocatable :: buffer(:,:)
allocate ( buffer(ao_num,ao_prim_num_max) )
integer :: i,j,k
ao_expo = 0.d0
buffer = 0.d0
call ezfio_get_ao_basis_ao_expo(buffer)
do j = 1, ao_prim_num_max
do i = 1, ao_num
ao_expo(i,j) = buffer(i,j)
enddo
enddo
deallocate(buffer)
END_PROVIDER
BEGIN_PROVIDER [ double precision, ao_coef, (ao_num_align,ao_prim_num_max) ]
implicit none
BEGIN_DOC
! AO Coefficients, read from input. Those should not be used directly, as
! the MOs are expressed on the basis of **normalized** AOs.
END_DOC
PROVIDE ezfio_filename
double precision, allocatable :: buffer(:,:)
allocate ( buffer(ao_num,ao_prim_num_max) )
integer :: i,j,k
ao_coef = 0.d0
buffer = 0.d0
call ezfio_get_ao_basis_ao_coef(buffer)
do j = 1, ao_prim_num_max
do i = 1, ao_num
ao_coef(i,j) = buffer(i,j)
enddo
enddo
deallocate(buffer)
END_PROVIDER
BEGIN_PROVIDER [ integer, ao_prim_num_max ]
&BEGIN_PROVIDER [ integer, ao_prim_num_max_align ]
implicit none
ao_prim_num_max = 0
PROVIDE ezfio_filename
call ezfio_get_ao_basis_ao_prim_num_max(ao_prim_num_max)
integer :: align_double
ao_prim_num_max_align = align_double(ao_prim_num_max)
END_PROVIDER
BEGIN_PROVIDER [ double precision, ao_coef_normalized, (ao_num_align,ao_prim_num_max) ]
implicit none
@ -158,7 +96,6 @@ BEGIN_PROVIDER [ double precision, ao_expo_ordered_transp, (ao_prim_num_max_alig
END_PROVIDER
BEGIN_PROVIDER [ integer, ao_l, (ao_num) ]
&BEGIN_PROVIDER [ character*(128), ao_l_char, (ao_num) ]
implicit none
@ -172,49 +109,17 @@ END_PROVIDER
enddo
END_PROVIDER
BEGIN_PROVIDER [ integer, ao_prim_num, (ao_num_align) ]
BEGIN_PROVIDER [ integer, ao_prim_num_max_align ]
implicit none
BEGIN_DOC
! Number of primitives per atomic orbital
! Number of primitives per atomic orbital aligned
END_DOC
ao_prim_num = 0
PROVIDE ezfio_filename
call ezfio_get_ao_basis_ao_prim_num(ao_prim_num)
integer :: i
character*(80) :: message
do i=1,ao_num
if (ao_prim_num(i) <= 0) then
write(message,'(A,I6,A)') 'Number of primitives of contraction ',i,' should be > 0'
print *, message
stop
endif
enddo
END_PROVIDER
BEGIN_PROVIDER [ integer, ao_prim_num_max ]
&BEGIN_PROVIDER [ integer, ao_prim_num_max_align ]
implicit none
ao_prim_num_max = 0
PROVIDE ezfio_filename
call ezfio_get_ao_basis_ao_prim_num_max(ao_prim_num_max)
integer :: align_double
ao_prim_num_max_align = align_double(ao_prim_num_max)
END_PROVIDER
BEGIN_PROVIDER [ integer, ao_nucl, (ao_num)]
BEGIN_DOC
! Index of the nuclei on which the ao is centered
END_DOC
implicit none
PROVIDE ezfio_filename
call ezfio_get_ao_basis_ao_nucl(ao_nucl)
END_PROVIDER
BEGIN_PROVIDER [ character*(128), l_to_charater, (0:4)]
BEGIN_DOC
! character corresponding to the "L" value of an AO orbital
@ -399,13 +304,3 @@ BEGIN_PROVIDER [ character*(4), ao_l_char_space, (ao_num) ]
ao_l_char_space(i) = give_ao_character_space
enddo
END_PROVIDER
BEGIN_PROVIDER [ character*(32), ao_md5 ]
BEGIN_DOC
! MD5 key characteristic of the AO basis
END_DOC
implicit none
PROVIDE ezfio_filename
call ezfio_get_ao_basis_ao_md5(ao_md5)
END_PROVIDER

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -1,32 +1,28 @@
# Automatically created by /home/giner/quantum_package/scripts/module/module_handler.py
IRPF90_temp
IRPF90_man
irpf90_entities
tags
irpf90.make
Makefile
Makefile.depend
build.ninja
.ninja_log
# Automatically created by $QP_ROOT/scripts/module/module_handler.py
.ninja_deps
ezfio_interface.irp.f
.ninja_log
AO_Basis
Bitmask
Electrons
Ezfio_files
IRPF90_man
IRPF90_temp
Integrals_Bielec
Integrals_Monoelec
MO_Basis
Utils
Pseudo
Bitmask
AO_Basis
Electrons
Makefile
Makefile.depend
Nuclei
Integrals_Bielec
Pseudo
Utils
det_svd
ezfio_interface.irp.f
guess_doublet
program_initial_determinants
save_natorb
guess_singlet
guess_triplet
irpf90.make
irpf90_entities
program_initial_determinants
save_natorb
tags
truncate_wf
save_for_casino
det_svd
print_cas_energy
print_s2

View File

@ -47,6 +47,14 @@ Documentation
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
`abs_psi_coef_min <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L452>`_
Max and min values of the coefficients
`ac_operator <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L1007>`_
Needed for diag_H_mat_elem
@ -120,11 +128,11 @@ Documentation
Initial guess vectors are not necessarily orthonormal
`connected_to_ref <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/connected_to_ref.irp.f#L155>`_
`connected_to_ref <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/connected_to_ref.irp.f#L157>`_
Undocumented
`connected_to_ref_by_mono <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/connected_to_ref.irp.f#L253>`_
`connected_to_ref_by_mono <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/connected_to_ref.irp.f#L255>`_
Undocumented
@ -133,7 +141,7 @@ 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#L483>`_
`create_wf_of_psi_svd_matrix <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L484>`_
Matrix of wf coefficients. Outer product of alpha and beta determinants
@ -213,7 +221,7 @@ Documentation
Build connection proxy between determinants
`det_num <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ezfio_interface.irp.f#L116>`_
`det_num <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ezfio_interface.irp.f#L248>`_
det_num
@ -339,7 +347,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#L538>`_
`generate_all_alpha_beta_det_products <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L539>`_
Create a wave function from all possible alpha x beta determinants
@ -359,15 +367,15 @@ Documentation
Applies get_excitation_degree to an array of determinants
`get_index_in_psi_det_alpha_unique <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L139>`_
`get_index_in_psi_det_alpha_unique <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L140>`_
Returns the index of the determinant in the ``psi_det_alpha_unique`` array
`get_index_in_psi_det_beta_unique <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L221>`_
`get_index_in_psi_det_beta_unique <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L222>`_
Returns the index of the determinant in the ``psi_det_beta_unique`` array
`get_index_in_psi_det_sorted_bit <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/connected_to_ref.irp.f#L48>`_
`get_index_in_psi_det_sorted_bit <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/connected_to_ref.irp.f#L50>`_
Returns the index of the determinant in the ``psi_det_sorted_bit`` array
@ -480,7 +488,7 @@ Documentation
.br
`is_in_wavefunction <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/connected_to_ref.irp.f#L34>`_
`is_in_wavefunction <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/connected_to_ref.irp.f#L36>`_
True if the determinant ``det`` is in the wave function
@ -508,11 +516,11 @@ Documentation
Number of determinants in the wave function
`n_det_alpha_unique <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f_template_134#L4>`_
`n_det_alpha_unique <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f_template_135#L4>`_
Unique alpha determinants
`n_det_beta_unique <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f_template_134#L80>`_
`n_det_beta_unique <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f_template_135#L80>`_
Unique beta determinants
@ -565,7 +573,7 @@ Documentation
Energy of the reference bitmask used in Slater rules
`occ_pattern_search_key <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/connected_to_ref.irp.f#L17>`_
`occ_pattern_search_key <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/connected_to_ref.irp.f#L18>`_
Return an integer*8 corresponding to a determinant index for searching
@ -609,14 +617,6 @@ Documentation
Undocumented
`print_psi_cas <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/print_cas_energy.irp.f#L1>`_
Undocumented
`prog_save_casino <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/save_for_casino.irp.f#L266>`_
Undocumented
`psi_average_norm_contrib <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L273>`_
Contribution of determinants to the state-averaged density
@ -662,11 +662,19 @@ Documentation
Undocumented
`psi_coef_max <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L449>`_
Max and min values of the coefficients
`psi_coef_min <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L450>`_
Max and min values of the coefficients
`psi_coef_sorted <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L302>`_
Wave function sorted by determinants contribution to the norm (state-averaged)
`psi_coef_sorted_ab <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L450>`_
`psi_coef_sorted_ab <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L468>`_
Determinants on which we apply <i|H|j>.
They are sorted by the 3 highest electrons in the alpha part,
then by the 3 highest electrons in the beta part to accelerate
@ -685,19 +693,19 @@ Documentation
is empty
`psi_det_alpha <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L25>`_
`psi_det_alpha <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L26>`_
List of alpha determinants of psi_det
`psi_det_alpha_unique <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f_template_134#L3>`_
`psi_det_alpha_unique <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f_template_135#L3>`_
Unique alpha determinants
`psi_det_beta <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L39>`_
`psi_det_beta <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L40>`_
List of beta determinants of psi_det
`psi_det_beta_unique <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f_template_134#L79>`_
`psi_det_beta_unique <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f_template_135#L79>`_
Unique beta determinants
@ -709,7 +717,7 @@ Documentation
Wave function sorted by determinants contribution to the norm (state-averaged)
`psi_det_sorted_ab <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L449>`_
`psi_det_sorted_ab <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L467>`_
Determinants on which we apply <i|H|j>.
They are sorted by the 3 highest electrons in the alpha part,
then by the 3 highest electrons in the beta part to accelerate
@ -723,7 +731,7 @@ Documentation
function.
`psi_det_sorted_next_ab <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L451>`_
`psi_det_sorted_next_ab <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L469>`_
Determinants on which we apply <i|H|j>.
They are sorted by the 3 highest electrons in the alpha part,
then by the 3 highest electrons in the beta part to accelerate
@ -758,31 +766,31 @@ 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#L578>`_
`psi_svd_alpha <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L579>`_
SVD wave function
`psi_svd_beta <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L579>`_
`psi_svd_beta <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L580>`_
SVD wave function
`psi_svd_coefs <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L580>`_
`psi_svd_coefs <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L581>`_
SVD wave function
`psi_svd_matrix <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L467>`_
`psi_svd_matrix <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L468>`_
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#L407>`_
`psi_svd_matrix_columns <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L408>`_
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#L406>`_
`psi_svd_matrix_rows <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L407>`_
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#L405>`_
`psi_svd_matrix_values <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L406>`_
Matrix of wf coefficients. Outer product of alpha and beta determinants
@ -790,7 +798,7 @@ Documentation
Undocumented
`read_dets <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L580>`_
`read_dets <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L598>`_
Reads the determinants from the EZFIO file
@ -819,7 +827,7 @@ Documentation
Undocumented
`s2_eig <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ezfio_interface.irp.f#L248>`_
`s2_eig <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ezfio_interface.irp.f#L116>`_
Force the wave function to be an eigenfunction of S^2
@ -835,10 +843,6 @@ Documentation
z component of the Spin
`save_casino <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/save_for_casino.irp.f#L1>`_
Undocumented
`save_natorb <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/save_natorb.irp.f#L1>`_
Undocumented
@ -847,15 +851,15 @@ Documentation
Save natural orbitals, obtained by diagonalization of the one-body density matrix in the MO basis
`save_wavefunction <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L627>`_
`save_wavefunction <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L645>`_
Save the wave function into the EZFIO file
`save_wavefunction_general <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L646>`_
`save_wavefunction_general <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L664>`_
Save the wave function into the EZFIO file
`save_wavefunction_unsorted <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L637>`_
`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
@ -869,7 +873,7 @@ Documentation
for a given couple of hole/particle excitations i.
`sort_dets_by_3_highest_electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L471>`_
`sort_dets_by_3_highest_electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L489>`_
Determinants on which we apply <i|H|j>.
They are sorted by the 3 highest electrons in the alpha part,
then by the 3 highest electrons in the beta part to accelerate
@ -902,6 +906,6 @@ Documentation
Thresholds on selectors (fraction of the norm)
`write_spindeterminants <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L303>`_
`write_spindeterminants <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L304>`_
Undocumented

View File

@ -11,6 +11,7 @@ integer*8 function det_search_key(det,Nint)
do i=2,Nint
det_search_key = ieor(det_search_key,iand(det(i,1),det(i,2)))
enddo
det_search_key = iand(huge(det(1,1)),det_search_key)
end
@ -27,6 +28,7 @@ integer*8 function occ_pattern_search_key(det,Nint)
do i=2,Nint
occ_pattern_search_key = ieor(occ_pattern_search_key,iand(det(i,1),det(i,2)))
enddo
occ_pattern_search_key = iand(huge(det(1,1)),occ_pattern_search_key)
end

View File

@ -446,6 +446,24 @@ subroutine filter_3_highest_electrons( det_in, det_out, Nint )
enddo
end
BEGIN_PROVIDER [ double precision, psi_coef_max, (N_states) ]
&BEGIN_PROVIDER [ double precision, psi_coef_min, (N_states) ]
&BEGIN_PROVIDER [ double precision, abs_psi_coef_max, (N_states) ]
&BEGIN_PROVIDER [ double precision, abs_psi_coef_min, (N_states) ]
implicit none
BEGIN_DOC
! Max and min values of the coefficients
END_DOC
integer:: i
do i=1,N_states
psi_coef_min(i) = minval(psi_coef(:,i))
psi_coef_max(i) = maxval(psi_coef(:,i))
abs_psi_coef_min(i) = dabs(psi_coef_min(i))
abs_psi_coef_max(i) = dabs(psi_coef_max(i))
enddo
END_PROVIDER
BEGIN_PROVIDER [ integer(bit_kind), psi_det_sorted_ab, (N_int,2,psi_det_size) ]
&BEGIN_PROVIDER [ double precision, psi_coef_sorted_ab, (N_det,N_states) ]
&BEGIN_PROVIDER [ integer, psi_det_sorted_next_ab, (2,psi_det_size) ]

View File

@ -19,6 +19,7 @@ integer*8 function spin_det_search_key(det,Nint)
do i=2,Nint
spin_det_search_key = ieor(spin_det_search_key,det(i))
enddo
spin_det_search_key = iand(huge(det(1)),spin_det_search_key)
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 55 KiB

15
src/Electrons/EZFIO.cfg Normal file
View File

@ -0,0 +1,15 @@
[elec_alpha_num]
type: Positive_int
doc: Numbers of electrons alpha ("up")
interface: ezfio, provider
[elec_beta_num]
type: Positive_int
doc: Numbers of electrons beta ("down")
interface: ezfio, provider
[elec_num]
type: Positive_int
doc: Numbers total of electrons (alpha + beta)
default: = electrons.elec_alpha_num + electrons.elec_beta_num
interface: ezfio

View File

@ -34,18 +34,18 @@ Documentation
.. Do not edit this section. It was auto-generated from the
.. by the `update_README.py` script.
`elec_alpha_num <http://github.com/LCPQ/quantum_package/tree/master/src/Electrons/electrons.irp.f#L1>`_
`elec_alpha_num <http://github.com/LCPQ/quantum_package/tree/master/src/Electrons/ezfio_interface.irp.f#L28>`_
Numbers of electrons alpha ("up")
`elec_beta_num <http://github.com/LCPQ/quantum_package/tree/master/src/Electrons/ezfio_interface.irp.f#L6>`_
Numbers of electrons beta ("down")
`elec_num <http://github.com/LCPQ/quantum_package/tree/master/src/Electrons/electrons.irp.f#L1>`_
Numbers of alpha ("up") , beta ("down") and total electrons
`elec_beta_num <http://github.com/LCPQ/quantum_package/tree/master/src/Electrons/electrons.irp.f#L2>`_
Numbers of alpha ("up") , beta ("down") and total electrons
`elec_num <http://github.com/LCPQ/quantum_package/tree/master/src/Electrons/electrons.irp.f#L3>`_
Numbers of alpha ("up") , beta ("down") and total electrons
`elec_num_tab <http://github.com/LCPQ/quantum_package/tree/master/src/Electrons/electrons.irp.f#L4>`_
`elec_num_tab <http://github.com/LCPQ/quantum_package/tree/master/src/Electrons/electrons.irp.f#L2>`_
Numbers of alpha ("up") , beta ("down") and total electrons

View File

@ -1,5 +0,0 @@
electrons
elec_alpha_num integer
elec_beta_num integer
elec_num integer = electrons_elec_alpha_num + electrons_elec_beta_num

View File

@ -1,29 +1,15 @@
BEGIN_PROVIDER [ integer, elec_alpha_num ]
&BEGIN_PROVIDER [ integer, elec_beta_num ]
&BEGIN_PROVIDER [ integer, elec_num ]
&BEGIN_PROVIDER [ integer, elec_num_tab, (2) ]
BEGIN_PROVIDER [ integer, elec_num]
&BEGIN_PROVIDER [ integer, elec_num_tab, (2)]
implicit none
BEGIN_DOC
! Numbers of alpha ("up") , beta ("down") and total electrons
END_DOC
PROVIDE ezfio_filename
call ezfio_get_electrons_elec_alpha_num(elec_alpha_num)
call ezfio_get_electrons_elec_beta_num(elec_beta_num)
call ezfio_get_electrons_elec_num(elec_num)
elec_num_tab(1) = elec_alpha_num
elec_num_tab(2) = elec_beta_num
ASSERT (elec_alpha_num > 0)
ASSERT (elec_beta_num >= 0)
call write_time(output_Electrons)
call write_int(output_Electrons,elec_num, &
'Number of electrons' )
call write_int(output_Electrons,elec_alpha_num, &
'Number of alpha electrons' )
call write_int(output_Electrons,elec_beta_num, &
'Number of beta electrons' )
write(output_Electrons,*)
END_PROVIDER

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@ -42,107 +42,99 @@ Documentation
Output file for CAS_SD
`output_cisd <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L61>`_
Output file for CISD
`output_cisd_sc2_selected <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L81>`_
Output file for CISD_SC2_selected
`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_ddci_selected <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L121>`_
Output file for DDCI_selected
`output_determinants <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L141>`_
`output_determinants <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L61>`_
Output file for Determinants
`output_electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L161>`_
`output_electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L81>`_
Output file for Electrons
`output_ezfio_files <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L181>`_
`output_ezfio_files <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L101>`_
Output file for Ezfio_files
`output_full_ci <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L201>`_
`output_full_ci <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L121>`_
Output file for Full_CI
`output_generators_cas <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L221>`_
`output_generators_cas <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L141>`_
Output file for Generators_CAS
`output_generators_full <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L241>`_
`output_generators_full <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L161>`_
Output file for Generators_full
`output_hartree_fock <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L261>`_
`output_hartree_fock <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L181>`_
Output file for Hartree_Fock
`output_integrals_bielec <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L281>`_
`output_integrals_bielec <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L201>`_
Output file for Integrals_Bielec
`output_integrals_monoelec <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L301>`_
`output_integrals_monoelec <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L221>`_
Output file for Integrals_Monoelec
`output_loc_cele <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L321>`_
Output file for loc_cele
`output_mo_basis <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L341>`_
`output_mo_basis <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L241>`_
Output file for MO_Basis
`output_moguess <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L361>`_
`output_moguess <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L261>`_
Output file for MOGuess
`output_molden <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L381>`_
Output file for Molden
`output_mrcc <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L401>`_
`output_mrcc <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L281>`_
Output file for MRCC
`output_nuclei <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L421>`_
`output_mrcc_general <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L301>`_
Output file for MRCC_general
`output_nuclei <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L321>`_
Output file for Nuclei
`output_perturbation <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L441>`_
`output_perturbation <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L341>`_
Output file for Perturbation
`output_properties <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L461>`_
`output_properties <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L361>`_
Output file for Properties
`output_pseudo <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L481>`_
`output_pseudo <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L381>`_
Output file for Pseudo
`output_selectors_full <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L501>`_
`output_psiref_cas <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L401>`_
Output file for Psiref_CAS
`output_psiref_threshold <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L421>`_
Output file for Psiref_threshold
`output_psiref_utils <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L441>`_
Output file for Psiref_Utils
`output_qmcchem <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L461>`_
Output file for QmcChem
`output_selectors_full <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L481>`_
Output file for Selectors_full
`output_singlerefmethod <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L521>`_
Output file for SingleRefMethod
`output_utils <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L541>`_
`output_utils <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L501>`_
Output file for Utils

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -1,21 +1,20 @@
# Automatically created by /home/giner/quantum_package/scripts/module/module_handler.py
IRPF90_temp
IRPF90_man
irpf90_entities
tags
irpf90.make
Makefile
Makefile.depend
build.ninja
.ninja_log
# Automatically created by $QP_ROOT/scripts/module/module_handler.py
.ninja_deps
ezfio_interface.irp.f
Ezfio_files
MO_Basis
Utils
Pseudo
.ninja_log
AO_Basis
Electrons
Ezfio_files
IRPF90_man
IRPF90_temp
MO_Basis
Makefile
Makefile.depend
Nuclei
save_ortho_mos
Pseudo
Utils
check_orthonormality
ezfio_interface.irp.f
irpf90.make
irpf90_entities
save_ortho_mos
tags

View File

@ -702,7 +702,7 @@ integer n_k(klocmax_max)
double precision a(3),g_a,b(3),g_b,c(3),d(3)
integer n_a(3),n_b(3),ntotA,ntotB,ntot,m
integer i,l,k,ktot,k1,k2,k3,k1p,k2p,k3p
double precision f,fourpi,ac,bc,freal,d2,dreal,theta_DC0,phi_DC0
double precision f,fourpi,ac,bc,freal,d2,dreal,theta_DC0,phi_DC0,coef
double precision,allocatable :: array_R_loc(:,:,:)
double precision,allocatable :: array_coefs(:,:,:,:,:,:)
double precision int_prod_bessel_loc,binom_func,accu,prod,ylm,bigI,arg
@ -713,8 +713,8 @@ double precision int_prod_bessel_loc,binom_func,accu,prod,ylm,bigI,arg
bc=dsqrt((b(1)-c(1))**2+(b(2)-c(2))**2+(b(3)-c(3))**2)
arg=g_a*ac**2+g_b*bc**2
if(arg.gt.-dlog(10.d-20))then
Vloc=0.d0
return
Vloc=0.d0
return
endif
ntotA=n_a(1)+n_a(2)+n_a(3)
@ -722,82 +722,108 @@ double precision int_prod_bessel_loc,binom_func,accu,prod,ylm,bigI,arg
ntot=ntotA+ntotB
if(ac.eq.0.d0.and.bc.eq.0.d0)then
accu=0.d0
accu=0.d0
do k=1,klocmax
accu=accu+v_k(k)*crochet(n_k(k)+2+ntot,g_a+g_b+dz_k(k))
enddo
Vloc=accu*fourpi*bigI(0,0,0,0,n_a(1)+n_b(1),n_a(2)+n_b(2),n_a(3)+n_b(3))
!bigI frequantly is null
return
do k=1,klocmax
accu=accu+v_k(k)*crochet(n_k(k)+2+ntot,g_a+g_b+dz_k(k))
enddo
Vloc=accu*fourpi*bigI(0,0,0,0,n_a(1)+n_b(1),n_a(2)+n_b(2),n_a(3)+n_b(3))
!bigI frequently is null
return
endif
freal=dexp(-g_a*ac**2-g_b*bc**2)
d2=0.d0
d2 = 0.d0
do i=1,3
d(i)=g_a*(a(i)-c(i))+g_b*(b(i)-c(i))
d2=d2+d(i)**2
d(i)=g_a*(a(i)-c(i))+g_b*(b(i)-c(i))
d2=d2+d(i)*d(i)
enddo
d2=dsqrt(d2)
dreal=2.d0*d2
theta_DC0=dacos(d(3)/d2)
phi_DC0=datan2(d(2)/d2,d(1)/d2)
allocate (array_R_loc(-2:ntot_max+klocmax_max,klocmax_max,0:ntot_max))
allocate (array_coefs(0:ntot_max,0:ntot_max,0:ntot_max,0:ntot_max,0:ntot_max,0:ntot_max))
allocate (array_R_loc(-2:ntot_max+klocmax_max,klocmax_max,0:ntot_max))
allocate (array_coefs(0:ntot_max,0:ntot_max,0:ntot_max,0:ntot_max,0:ntot_max,0:ntot_max))
do ktot=-2,ntotA+ntotB+klocmax
do l=0,ntot
do k=1,klocmax
array_R_loc(ktot,k,l)=freal*int_prod_bessel_loc(ktot+2,g_a+g_b+dz_k(k),l,dreal)
enddo
enddo
do l=0,ntot
do k=1,klocmax
array_R_loc(ktot,k,l)=freal*int_prod_bessel_loc(ktot+2,g_a+g_b+dz_k(k),l,dreal)
enddo
enddo
enddo
do k1=0,n_a(1)
do k2=0,n_a(2)
do k3=0,n_a(3)
do k1p=0,n_b(1)
do k2p=0,n_b(2)
do k3p=0,n_b(3)
array_coefs(k1,k2,k3,k1p,k2p,k3p)=binom_func(n_a(1),k1)*binom_func(n_a(2),k2)*binom_func(n_a(3),k3) &
*(c(1)-a(1))**(n_a(1)-k1)*(c(2)-a(2))**(n_a(2)-k2)*(c(3)-a(3))**(n_a(3)-k3) &
*binom_func(n_b(1),k1p)*binom_func(n_b(2),k2p)*binom_func(n_b(3),k3p) &
*(c(1)-b(1))**(n_b(1)-k1p)*(c(2)-b(2))**(n_b(2)-k2p)*(c(3)-b(3))**(n_b(3)-k3p)
enddo
enddo
enddo
enddo
enddo
do k2=0,n_a(2)
do k3=0,n_a(3)
do k1p=0,n_b(1)
do k2p=0,n_b(2)
do k3p=0,n_b(3)
array_coefs(k1,k2,k3,k1p,k2p,k3p)=binom_func(n_a(1),k1)*binom_func(n_a(2),k2)*binom_func(n_a(3),k3)&
*(c(1)-a(1))**(n_a(1)-k1)*(c(2)-a(2))**(n_a(2)-k2)*(c(3)-a(3))**(n_a(3)-k3)&
*binom_func(n_b(1),k1p)*binom_func(n_b(2),k2p)*binom_func(n_b(3),k3p)&
*(c(1)-b(1))**(n_b(1)-k1p)*(c(2)-b(2))**(n_b(2)-k2p)*(c(3)-b(3))**(n_b(3)-k3p)
enddo
enddo
enddo
enddo
enddo
enddo
accu=0.d0
do k=1,klocmax
do k1=0,n_a(1)
do k2=0,n_a(2)
do k3=0,n_a(3)
do k1p=0,n_b(1)
do k2p=0,n_b(2)
do k3p=0,n_b(3)
do l=0,ntot
do m=-l,l
prod=ylm(l,m,theta_DC0,phi_DC0)*array_coefs(k1,k2,k3,k1p,k2p,k3p) &
*bigI(l,m,0,0,k1+k1p,k2+k2p,k3+k3p)
ktot=k1+k2+k3+k1p+k2p+k3p+n_k(k)
accu=accu+prod*v_k(k)*array_R_loc(ktot,k,l)
if(d2 == 0.d0)then
l=0
m=0
coef=1.d0/dsqrt(4.d0*dacos(-1.d0))
do k=1,klocmax
do k1=0,n_a(1)
do k2=0,n_a(2)
do k3=0,n_a(3)
do k1p=0,n_b(1)
do k2p=0,n_b(2)
do k3p=0,n_b(3)
prod=coef*array_coefs(k1,k2,k3,k1p,k2p,k3p) &
*bigI(l,m,0,0,k1+k1p,k2+k2p,k3+k3p)
ktot=k1+k2+k3+k1p+k2p+k3p+n_k(k)
accu=accu+prod*v_k(k)*array_R_loc(ktot,k,l)
enddo
enddo
enddo
enddo
enddo
enddo
enddo
enddo
enddo
enddo
enddo
enddo
enddo
enddo
enddo
else
theta_DC0=dacos(d(3)/d2)
phi_DC0=datan2(d(2)/d2,d(1)/d2)
do k=1,klocmax
do k1=0,n_a(1)
do k2=0,n_a(2)
do k3=0,n_a(3)
do k1p=0,n_b(1)
do k2p=0,n_b(2)
do k3p=0,n_b(3)
do l=0,ntot
do m=-l,l
coef=ylm(l,m,theta_DC0,phi_DC0)
prod=coef*array_coefs(k1,k2,k3,k1p,k2p,k3p) &
*bigI(l,m,0,0,k1+k1p,k2+k2p,k3+k3p)
ktot=k1+k2+k3+k1p+k2p+k3p+n_k(k)
accu=accu+prod*v_k(k)*array_R_loc(ktot,k,l)
enddo
enddo
enddo
enddo
enddo
enddo
enddo
enddo
enddo
endif
Vloc=f*accu
deallocate (array_R_loc)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Some files were not shown because too many files have changed in this diff Show More