10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-19 04:22:36 +01:00

Merge branch 'master' of github.com:scemama/quantum_package

This commit is contained in:
Anthony Scemama 2015-05-04 19:24:25 +02:00
commit ac285a09d9
224 changed files with 7130 additions and 2183 deletions

View File

@ -45,5 +45,5 @@ ocaml:
veryclean: veryclean:
rm -rf EZFIO rm -rf EZFIO
$(MAKE) EZFIO rm -rf resultsFile
$(MAKE) -C src veryclean $(MAKE) -C src veryclean

View File

@ -1,19 +1,19 @@
bielec_integrals bielec_integrals
read_ao_integrals False read_ao_integrals false
read_mo_integrals False read_mo_integrals false
write_ao_integrals False write_ao_integrals false
write_mo_integrals False write_mo_integrals false
threshold_ao 1.e-15 threshold_ao 1.e-15
threshold_mo 1.e-15 threshold_mo 1.e-15
direct False direct false
cis_dressed cis_dressed
n_state_cis 10 n_state_cis 10
n_core_cis 0 n_core_cis 0
n_act_cis mo_basis_mo_tot_num n_act_cis mo_basis_mo_tot_num
mp2_dressing False mp2_dressing false
standard_doubles True standard_doubles true
en_2_2 False en_2_2 false
determinants determinants
n_states 1 n_states 1
@ -21,27 +21,27 @@ determinants
n_det_max_jacobi 1000 n_det_max_jacobi 1000
threshold_generators 0.99 threshold_generators 0.99
threshold_selectors 0.999 threshold_selectors 0.999
read_wf False read_wf false
s2_eig False s2_eig false
only_single_double_dm False only_single_double_dm false
full_ci full_ci
n_det_max_fci 10000 n_det_max_fci 10000
n_det_max_fci_property 50000 n_det_max_fci_property 50000
pt2_max 1.e-4 pt2_max 1.e-4
do_pt2_end True do_pt2_end true
var_pt2_ratio 0.75 var_pt2_ratio 0.75
cas_sd cas_sd
n_det_max_cas_sd 100000 n_det_max_cas_sd 100000
pt2_max 1.e-4 pt2_max 1.e-4
do_pt2_end True do_pt2_end true
var_pt2_ratio 0.75 var_pt2_ratio 0.75
all_singles all_singles
n_det_max_fci 50000 n_det_max_fci 50000
pt2_max 1.e-8 pt2_max 1.e-8
do_pt2_end False do_pt2_end false
hartree_fock hartree_fock
n_it_scf_max 200 n_it_scf_max 200
@ -55,7 +55,7 @@ cisd_selected
cisd_sc2_selected cisd_sc2_selected
n_det_max_cisd_sc2 10000 n_det_max_cisd_sc2 10000
pt2_max 1.e-4 pt2_max 1.e-4
do_pt2_end True do_pt2_end true
properties properties
z_one_point 3.9 z_one_point 3.9

View File

@ -1,9 +0,0 @@
determinants
n_states 1
n_states_diag determinants_n_states
n_det_max_jacobi 1000
threshold_generators 0.99
threshold_selectors 0.999
read_wf false
s2_eig false
only_single_double_dm false

View File

@ -1,2 +0,0 @@
properties
z_one_point 3.9

4
ocaml/.merlin Normal file
View File

@ -0,0 +1,4 @@
PKG core ZMQ cryptokit
B _build/

View File

@ -4,7 +4,7 @@ open Core.Std;;
include Input_ao_basis;; include Input_ao_basis;;
include Input_bitmasks;; include Input_bitmasks;;
include Input_determinants;; include Input_determinants_by_hand;;
include Input_electrons;; include Input_electrons;;
include Input_mo_basis;; include Input_mo_basis;;
include Input_nuclei;; include Input_nuclei;;

View File

@ -2,20 +2,14 @@ open Qptypes;;
open Qputils;; open Qputils;;
open Core.Std;; open Core.Std;;
module Determinants : sig module Determinants_by_hand : sig
type t = type t =
{ n_int : N_int_number.t; { n_int : N_int_number.t;
bit_kind : Bit_kind.t; bit_kind : Bit_kind.t;
mo_label : MO_label.t;
n_det : Det_number.t; n_det : Det_number.t;
n_states : States_number.t; n_states : States_number.t;
n_states_diag : States_number.t; n_states_diag : States_number.t;
n_det_max_jacobi : Strictly_positive_int.t;
threshold_generators : Threshold.t;
threshold_selectors : Threshold.t;
read_wf : bool;
expected_s2 : Positive_float.t; expected_s2 : Positive_float.t;
s2_eig : bool;
psi_coef : Det_coef.t array; psi_coef : Det_coef.t array;
psi_det : Determinant.t array; psi_det : Determinant.t array;
} with sexp } with sexp
@ -28,16 +22,10 @@ end = struct
type t = type t =
{ n_int : N_int_number.t; { n_int : N_int_number.t;
bit_kind : Bit_kind.t; bit_kind : Bit_kind.t;
mo_label : MO_label.t;
n_det : Det_number.t; n_det : Det_number.t;
n_states : States_number.t; n_states : States_number.t;
n_states_diag : States_number.t; n_states_diag : States_number.t;
n_det_max_jacobi : Strictly_positive_int.t;
threshold_generators : Threshold.t;
threshold_selectors : Threshold.t;
read_wf : bool;
expected_s2 : Positive_float.t; expected_s2 : Positive_float.t;
s2_eig : bool;
psi_coef : Det_coef.t array; psi_coef : Det_coef.t array;
psi_det : Determinant.t array; psi_det : Determinant.t array;
} with sexp } with sexp
@ -77,22 +65,6 @@ end = struct
|> Ezfio.set_determinants_bit_kind |> Ezfio.set_determinants_bit_kind
;; ;;
let read_mo_label () =
if (not (Ezfio.has_determinants_mo_label ())) then
Ezfio.get_mo_basis_mo_label ()
|> Ezfio.set_determinants_mo_label
;
Ezfio.get_determinants_mo_label ()
|> MO_label.of_string
;;
let write_mo_label l =
MO_label.to_string l
|> Ezfio.set_determinants_mo_label
;;
let read_n_det () = let read_n_det () =
if not (Ezfio.has_determinants_n_det ()) then if not (Ezfio.has_determinants_n_det ()) then
Ezfio.set_determinants_n_det 1 Ezfio.set_determinants_n_det 1
@ -138,67 +110,6 @@ end = struct
Ezfio.set_determinants_n_states_diag (max n_states n) Ezfio.set_determinants_n_states_diag (max n_states n)
;; ;;
let read_n_det_max_jacobi () =
if not (Ezfio.has_determinants_n_det_max_jacobi ()) then
get_default "n_det_max_jacobi"
|> Int.of_string
|> Ezfio.set_determinants_n_det_max_jacobi
;
Ezfio.get_determinants_n_det_max_jacobi ()
|> Strictly_positive_int.of_int
;;
let write_n_det_max_jacobi n =
Strictly_positive_int.to_int n
|> Ezfio.set_determinants_n_det_max_jacobi
;;
let read_threshold_generators () =
if not (Ezfio.has_determinants_threshold_generators ()) then
get_default "threshold_generators"
|> Float.of_string
|> Ezfio.set_determinants_threshold_generators
;
Ezfio.get_determinants_threshold_generators ()
|> Threshold.of_float
;;
let write_threshold_generators t =
Threshold.to_float t
|> Ezfio.set_determinants_threshold_generators
;;
let read_threshold_selectors () =
if not (Ezfio.has_determinants_threshold_selectors ()) then
get_default "threshold_selectors"
|> Float.of_string
|> Ezfio.set_determinants_threshold_selectors
;
Ezfio.get_determinants_threshold_selectors ()
|> Threshold.of_float
;;
let write_threshold_selectors t =
Threshold.to_float t
|> Ezfio.set_determinants_threshold_selectors
;;
let read_read_wf () =
if not (Ezfio.has_determinants_read_wf ()) then
get_default "read_wf"
|> Bool.of_string
|> Ezfio.set_determinants_read_wf
;
Ezfio.get_determinants_read_wf ()
;;
let write_read_wf = Ezfio.set_determinants_read_wf ;;
let read_expected_s2 () = let read_expected_s2 () =
if not (Ezfio.has_determinants_expected_s2 ()) then if not (Ezfio.has_determinants_expected_s2 ()) then
begin begin
@ -219,19 +130,6 @@ end = struct
|> Ezfio.set_determinants_expected_s2 |> Ezfio.set_determinants_expected_s2
;; ;;
let read_s2_eig () =
if not (Ezfio.has_determinants_s2_eig ()) then
get_default "s2_eig"
|> Bool.of_string
|> Ezfio.set_determinants_s2_eig
;
Ezfio.get_determinants_s2_eig ()
;;
let write_s2_eig = Ezfio.set_determinants_s2_eig ;;
let read_psi_coef () = let read_psi_coef () =
if not (Ezfio.has_determinants_psi_coef ()) then if not (Ezfio.has_determinants_psi_coef ()) then
begin begin
@ -315,16 +213,10 @@ end = struct
Some Some
{ n_int = read_n_int () ; { n_int = read_n_int () ;
bit_kind = read_bit_kind () ; bit_kind = read_bit_kind () ;
mo_label = read_mo_label () ;
n_det = read_n_det () ; n_det = read_n_det () ;
n_states = read_n_states () ; n_states = read_n_states () ;
n_states_diag = read_n_states_diag () ; n_states_diag = read_n_states_diag () ;
n_det_max_jacobi = read_n_det_max_jacobi () ;
threshold_generators = read_threshold_generators () ;
threshold_selectors = read_threshold_selectors () ;
read_wf = read_read_wf () ;
expected_s2 = read_expected_s2 () ; expected_s2 = read_expected_s2 () ;
s2_eig = read_s2_eig () ;
psi_coef = read_psi_coef () ; psi_coef = read_psi_coef () ;
psi_det = read_psi_det () ; psi_det = read_psi_det () ;
} }
@ -334,31 +226,19 @@ end = struct
let write { n_int ; let write { n_int ;
bit_kind ; bit_kind ;
mo_label ;
n_det ; n_det ;
n_states ; n_states ;
n_states_diag ; n_states_diag ;
n_det_max_jacobi ;
threshold_generators ;
threshold_selectors ;
read_wf ;
expected_s2 ; expected_s2 ;
s2_eig ;
psi_coef ; psi_coef ;
psi_det ; psi_det ;
} = } =
write_n_int n_int ; write_n_int n_int ;
write_bit_kind bit_kind; write_bit_kind bit_kind;
write_mo_label mo_label;
write_n_det n_det; write_n_det n_det;
write_n_states n_states; write_n_states n_states;
write_n_states_diag ~n_states:n_states n_states_diag; write_n_states_diag ~n_states:n_states n_states_diag;
write_n_det_max_jacobi n_det_max_jacobi;
write_threshold_generators threshold_generators;
write_threshold_selectors threshold_selectors;
write_read_wf read_wf;
write_expected_s2 expected_s2; write_expected_s2 expected_s2;
write_s2_eig s2_eig;
write_psi_coef ~n_det:n_det psi_coef ~n_states:n_states; write_psi_coef ~n_det:n_det psi_coef ~n_states:n_states;
write_psi_det ~n_int:n_int ~n_det:n_det psi_det; write_psi_det ~n_int:n_int ~n_det:n_det psi_det;
;; ;;
@ -399,35 +279,17 @@ end = struct
|> String.concat_array ~sep:"\n" |> String.concat_array ~sep:"\n"
in in
Printf.sprintf " Printf.sprintf "
Read the current wave function ::
read_wf = %s
Label of the MOs on which the determinants were computed ::
mo_label = %s
Force the selected wave function to be an eigenfunction of S^2. Force the selected wave function to be an eigenfunction of S^2.
If true, input the expected value of S^2 :: If true, input the expected value of S^2 ::
s2_eig = %s
expected_s2 = %s expected_s2 = %s
Thresholds on generators and selectors (fraction of the norm) ::
threshold_generators = %s
threshold_selectors = %s
Number of requested states, and number of states used for the Number of requested states, and number of states used for the
Davidson diagonalization :: Davidson diagonalization ::
n_states = %s n_states = %s
n_states_diag = %s n_states_diag = %s
Maximum size of the Hamiltonian matrix that will be fully diagonalized ::
n_det_max_jacobi = %s
Number of determinants :: Number of determinants ::
n_det = %s n_det = %s
@ -436,15 +298,9 @@ Determinants ::
%s %s
" "
(b.read_wf |> Bool.to_string)
(b.mo_label |> MO_label.to_string)
(b.s2_eig |> Bool.to_string)
(b.expected_s2 |> Positive_float.to_string) (b.expected_s2 |> Positive_float.to_string)
(b.threshold_generators |> Threshold.to_string)
(b.threshold_selectors |> Threshold.to_string)
(b.n_states |> States_number.to_string) (b.n_states |> States_number.to_string)
(b.n_states_diag |> States_number.to_string) (b.n_states_diag |> States_number.to_string)
(b.n_det_max_jacobi |> Strictly_positive_int.to_string)
(b.n_det |> Det_number.to_string) (b.n_det |> Det_number.to_string)
det_text det_text
|> Rst_string.of_string |> Rst_string.of_string
@ -456,31 +312,19 @@ Determinants ::
Printf.sprintf " Printf.sprintf "
n_int = %s n_int = %s
bit_kind = %s bit_kind = %s
mo_label = \"%s\"
n_det = %s n_det = %s
n_states = %s n_states = %s
n_states_diag = %s n_states_diag = %s
n_det_max_jacobi = %s
threshold_generators = %s
threshold_selectors = %s
read_wf = %s
expected_s2 = %s expected_s2 = %s
s2_eig = %s
psi_coef = %s psi_coef = %s
psi_det = %s psi_det = %s
" "
(b.n_int |> N_int_number.to_string) (b.n_int |> N_int_number.to_string)
(b.bit_kind |> Bit_kind.to_string) (b.bit_kind |> Bit_kind.to_string)
(b.mo_label |> MO_label.to_string)
(b.n_det |> Det_number.to_string) (b.n_det |> Det_number.to_string)
(b.n_states |> States_number.to_string) (b.n_states |> States_number.to_string)
(b.n_states_diag |> States_number.to_string) (b.n_states_diag |> States_number.to_string)
(b.n_det_max_jacobi |> Strictly_positive_int.to_string)
(b.threshold_generators |> Threshold.to_string)
(b.threshold_selectors |> Threshold.to_string)
(b.read_wf |> Bool.to_string)
(b.expected_s2 |> Positive_float.to_string) (b.expected_s2 |> Positive_float.to_string)
(b.s2_eig |> Bool.to_string)
(b.psi_coef |> Array.to_list |> List.map ~f:Det_coef.to_string (b.psi_coef |> Array.to_list |> List.map ~f:Det_coef.to_string
|> String.concat ~sep:", ") |> String.concat ~sep:", ")
(b.psi_det |> Array.to_list |> List.map ~f:(Determinant.to_string (b.psi_det |> Array.to_list |> List.map ~f:(Determinant.to_string

View File

@ -35,7 +35,7 @@ default: $(ALL_TESTS) $(ALL_EXE) .gitignore
executables: $(QPACKAGE_ROOT)/data/executables executables: $(QPACKAGE_ROOT)/data/executables
$(QPACKAGE_ROOT)/data/executables: $(QPACKAGE_ROOT)/data/executables:
$(QPACKAGE_ROOT)/scripts/create_executables_list.sh $(QPACKAGE_ROOT)/scripts/create/create_executables_list.sh
external_libs: external_libs:
opam install cryptokit core opam install cryptokit core

View File

@ -13,10 +13,12 @@ let spec =
~doc:"int Total charge of the molecule. Default is 0." ~doc:"int Total charge of the molecule. Default is 0."
+> flag "m" (optional_with_default 1 int) +> flag "m" (optional_with_default 1 int)
~doc:"int Spin multiplicity (2S+1) of the molecule. Default is 1." ~doc:"int Spin multiplicity (2S+1) of the molecule. Default is 1."
+> flag "p" (optional_with_default 0 int)
~doc:"Using pseudo. Default is not (aka 0)"
+> anon ("xyz_file" %: string) +> anon ("xyz_file" %: string)
;; ;;
let run ?o b c m xyz_file = let run ?o b c m p xyz_file =
(* Read molecule *) (* Read molecule *)
let molecule = let molecule =
@ -60,8 +62,12 @@ let run ?o b c m xyz_file =
| None -> (* Principal basis *) | None -> (* Principal basis *)
let basis = elem_and_basis_name in let basis = elem_and_basis_name in
let command = let command =
if (p = 0) then
Qpackage.root ^ "/scripts/get_basis.sh \"" ^ temp_filename Qpackage.root ^ "/scripts/get_basis.sh \"" ^ temp_filename
^ "\" \"" ^ basis ^"\"" ^ "\" \"" ^ basis ^"\""
else
Qpackage.root ^ "/scripts/get_basis.sh \"" ^ temp_filename
^ "\" \"" ^ basis ^"\" pseudo"
in in
begin begin
let filename = let filename =
@ -247,6 +253,9 @@ let run ?o b c m xyz_file =
~rank:2 ~dim:[| ao_num ; ao_prim_num_max |] ~data:ao_expo) ; ~rank:2 ~dim:[| ao_num ; ao_prim_num_max |] ~data:ao_expo) ;
(* Doesn't work... *)
(* if p = 1 then Qpackage.root ^ "scripts/pseudo/put_pseudo_in_ezfio.py" ezfio_file.to_string; *)
match Input.Ao_basis.read () with match Input.Ao_basis.read () with
| None -> failwith "Error in basis" | None -> failwith "Error in basis"
| Some x -> Input.Ao_basis.write x | Some x -> Input.Ao_basis.write x
@ -266,8 +275,8 @@ elements can be defined as follows:
") ")
spec spec
(fun o b c m xyz_file () -> (fun o b c m p xyz_file () ->
run ?o b c m xyz_file ) run ?o b c m p xyz_file )
;; ;;
let () = let () =

1
scripts/.gitignore vendored
View File

@ -1,2 +1,3 @@
*.pyc *.pyc
*.pyo *.pyo
docopt.py

View File

@ -1,63 +0,0 @@
#!/bin/bash
#
# usage:
# check_dependencies.sh MOs AOs Electrons
#
# Checks that the list of dependencies given in
# argument is consistent. If the dependencies
# are OK the exit code is 0, otherwise it is 1.
# If no argument is given, the dependencies are
# read in the Makefile.
# Thu Apr 3 01:44:23 CEST 2014
if [[ -z ${QPACKAGE_ROOT} ]]
then
print "The QPACKAGE_ROOT environment variable is not set."
print "Please reload the quantum_package.rc file."
exit -1
fi
source ${QPACKAGE_ROOT}/scripts/qp_include.sh
if [[ -z $1 ]]
then
exit 0
fi
if [[ $1 == "-" ]]
then
COMMAND_LINE=$(cat NEEDED_MODULES)
else
COMMAND_LINE=$(unique_list $@)
fi
for d in $COMMAND_LINE
do
if [[ ! -d ${QPACKAGE_ROOT}/src/$d ]]
then
echo Error: Directory $d does not exist
exit 2
fi
done
DEPS_LONG=""
for i in $COMMAND_LINE
do
DEPS_LONG+=" $i "
DEPS_LONG+=$(cat "${QPACKAGE_ROOT}/src/${i}/NEEDED_MODULES")
done
DEPS=$(unique_list $DEPS_LONG)
if [[ ! "$COMMAND_LINE" == "$DEPS" ]]
then
DEPS=$(${QPACKAGE_ROOT}/scripts/check_dependencies.sh ${DEPS})
fi
echo "$DEPS"
if [[ "$COMMAND_LINE" == "$DEPS" ]]
then
exit 0
else
exit 1
fi

View File

@ -1,590 +0,0 @@
"""Pythonic command-line interface parser that will make you smile.
* http://docopt.org
* Repository and issue-tracker: https://github.com/docopt/docopt
* Licensed under terms of MIT license (see LICENSE-MIT)
* Copyright (c) 2013 Vladimir Keleshev, vladimir@keleshev.com
"""
import sys
import re
__all__ = ['docopt']
__version__ = '0.6.1'
class DocoptLanguageError(Exception):
"""Error in construction of usage-message by developer."""
class DocoptExit(SystemExit):
"""Exit in case user invoked program with incorrect arguments."""
usage = ''
def __init__(self, message=''):
SystemExit.__init__(self, (message + '\n' + self.usage).strip())
class Pattern(object):
def __eq__(self, other):
return repr(self) == repr(other)
def __hash__(self):
return hash(repr(self))
def fix(self):
self.fix_identities()
self.fix_repeating_arguments()
return self
def fix_identities(self, uniq=None):
"""Make pattern-tree tips point to same object if they are equal."""
if not hasattr(self, 'children'):
return self
uniq = list(set(self.flat())) if uniq is None else uniq
for i, child in enumerate(self.children):
if not hasattr(child, 'children'):
assert child in uniq
self.children[i] = uniq[uniq.index(child)]
else:
child.fix_identities(uniq)
def fix_repeating_arguments(self):
"""Fix elements that should accumulate/increment values."""
either = [list(child.children) for child in transform(self).children]
for case in either:
for e in [child for child in case if case.count(child) > 1]:
if isinstance(
e,
Argument) or isinstance(
e,
Option) and e.argcount:
if e.value is None:
e.value = []
elif not isinstance(e.value, list):
e.value = e.value.split()
if isinstance(
e,
Command) or isinstance(
e,
Option) and e.argcount == 0:
e.value = 0
return self
def transform(pattern):
"""Expand pattern into an (almost) equivalent one, but with single Either.
Example: ((-a | -b) (-c | -d)) => (-a -c | -a -d | -b -c | -b -d)
Quirks: [-a] => (-a), (-a...) => (-a -a)
"""
result = []
groups = [[pattern]]
while groups:
children = groups.pop(0)
parents = [Required, Optional, OptionsShortcut, Either, OneOrMore]
if any(t in map(type, children) for t in parents):
child = [c for c in children if type(c) in parents][0]
children.remove(child)
if isinstance(child, Either):
for c in child.children:
groups.append([c] + children)
elif isinstance(child, OneOrMore):
groups.append(child.children * 2 + children)
else:
groups.append(child.children + children)
else:
result.append(children)
return Either(*[Required(*e) for e in result])
class LeafPattern(Pattern):
"""Leaf/terminal node of a pattern tree."""
def __init__(self, name, value=None):
self.name, self.value = name, value
def __repr__(self):
return '%s(%r, %r)' % (self.__class__.__name__, self.name, self.value)
def flat(self, *types):
return [self] if not types or type(self) in types else []
def match(self, left, collected=None):
collected = [] if collected is None else collected
pos, match = self.single_match(left)
if match is None:
return False, left, collected
left_ = left[:pos] + left[pos + 1:]
same_name = [a for a in collected if a.name == self.name]
if type(self.value) in (int, list):
if isinstance(self.value, int):
increment = 1
else:
increment = ([match.value] if isinstance(match.value, str)
else match.value)
if not same_name:
match.value = increment
return True, left_, collected + [match]
same_name[0].value += increment
return True, left_, collected
return True, left_, collected + [match]
class BranchPattern(Pattern):
"""Branch/inner node of a pattern tree."""
def __init__(self, *children):
self.children = list(children)
def __repr__(self):
return '%s(%s)' % (self.__class__.__name__,
', '.join(repr(a) for a in self.children))
def flat(self, *types):
if type(self) in types:
return [self]
return sum([child.flat(*types) for child in self.children], [])
class Argument(LeafPattern):
def single_match(self, left):
for n, pattern in enumerate(left):
if isinstance(pattern, Argument):
return n, Argument(self.name, pattern.value)
return None, None
@classmethod
def parse(class_, source):
name = re.findall('(<\S*?>)', source)[0]
value = re.findall('\[default: (.*)\]', source, flags=re.I)
return class_(name, value[0] if value else None)
class Command(Argument):
def __init__(self, name, value=False):
self.name, self.value = name, value
def single_match(self, left):
for n, pattern in enumerate(left):
if isinstance(pattern, Argument):
if pattern.value == self.name:
return n, Command(self.name, True)
else:
break
return None, None
class Option(LeafPattern):
def __init__(self, short=None, long=None, argcount=0, value=False):
assert argcount in (0, 1)
self.short, self.long, self.argcount = short, long, argcount
self.value = None if value is False and argcount else value
@classmethod
def parse(class_, option_description):
short, long, argcount, value = None, None, 0, False
options, _, description = option_description.strip().partition(' ')
options = options.replace(',', ' ').replace('=', ' ')
for s in options.split():
if s.startswith('--'):
long = s
elif s.startswith('-'):
short = s
else:
argcount = 1
if argcount:
matched = re.findall('\[default: (.*)\]', description, flags=re.I)
value = matched[0] if matched else None
return class_(short, long, argcount, value)
def single_match(self, left):
for n, pattern in enumerate(left):
if self.name == pattern.name:
return n, pattern
return None, None
@property
def name(self):
return self.long or self.short
def __repr__(self):
return 'Option(%r, %r, %r, %r)' % (self.short, self.long,
self.argcount, self.value)
class Required(BranchPattern):
def match(self, left, collected=None):
collected = [] if collected is None else collected
l = left
c = collected
for pattern in self.children:
matched, l, c = pattern.match(l, c)
if not matched:
return False, left, collected
return True, l, c
class Optional(BranchPattern):
def match(self, left, collected=None):
collected = [] if collected is None else collected
for pattern in self.children:
m, left, collected = pattern.match(left, collected)
return True, left, collected
class OptionsShortcut(Optional):
"""Marker/placeholder for [options] shortcut."""
class OneOrMore(BranchPattern):
def match(self, left, collected=None):
assert len(self.children) == 1
collected = [] if collected is None else collected
l = left
c = collected
l_ = None
matched = True
times = 0
while matched:
# could it be that something didn't match but changed l or c?
matched, l, c = self.children[0].match(l, c)
times += 1 if matched else 0
if l_ == l:
break
l_ = l
if times >= 1:
return True, l, c
return False, left, collected
class Either(BranchPattern):
def match(self, left, collected=None):
collected = [] if collected is None else collected
outcomes = []
for pattern in self.children:
matched, _, _ = outcome = pattern.match(left, collected)
if matched:
outcomes.append(outcome)
if outcomes:
return min(outcomes, key=lambda outcome: len(outcome[1]))
return False, left, collected
class Tokens(list):
def __init__(self, source, error=DocoptExit):
self += source.split() if hasattr(source, 'split') else source
self.error = error
@staticmethod
def from_pattern(source):
source = re.sub(r'([\[\]\(\)\|]|\.\.\.)', r' \1 ', source)
source = [s for s in re.split('\s+|(\S*<.*?>)', source) if s]
return Tokens(source, error=DocoptLanguageError)
def move(self):
return self.pop(0) if len(self) else None
def current(self):
return self[0] if len(self) else None
def parse_long(tokens, options):
"""long ::= '--' chars [ ( ' ' | '=' ) chars ] ;"""
long, eq, value = tokens.move().partition('=')
assert long.startswith('--')
value = None if eq == value == '' else value
similar = [o for o in options if o.long == long]
if tokens.error is DocoptExit and similar == []: # if no exact match
similar = [o for o in options if o.long and o.long.startswith(long)]
if len(similar) > 1: # might be simply specified ambiguously 2+ times?
raise tokens.error('%s is not a unique prefix: %s?' %
(long, ', '.join(o.long for o in similar)))
elif len(similar) < 1:
argcount = 1 if eq == '=' else 0
o = Option(None, long, argcount)
options.append(o)
if tokens.error is DocoptExit:
o = Option(None, long, argcount, value if argcount else True)
else:
o = Option(similar[0].short, similar[0].long,
similar[0].argcount, similar[0].value)
if o.argcount == 0:
if value is not None:
raise tokens.error('%s must not have an argument' % o.long)
else:
if value is None:
if tokens.current() in [None, '--']:
raise tokens.error('%s requires argument' % o.long)
value = tokens.move()
if tokens.error is DocoptExit:
o.value = value if value is not None else True
return [o]
def parse_shorts(tokens, options):
"""shorts ::= '-' ( chars )* [ [ ' ' ] chars ] ;"""
token = tokens.move()
assert token.startswith('-') and not token.startswith('--')
left = token.lstrip('-')
parsed = []
while left != '':
short, left = '-' + left[0], left[1:]
similar = [o for o in options if o.short == short]
if len(similar) > 1:
raise tokens.error('%s is specified ambiguously %d times' %
(short, len(similar)))
elif len(similar) < 1:
o = Option(short, None, 0)
options.append(o)
if tokens.error is DocoptExit:
o = Option(short, None, 0, True)
else: # why copying is necessary here?
o = Option(short, similar[0].long,
similar[0].argcount, similar[0].value)
value = None
if o.argcount != 0:
if left == '':
if tokens.current() in [None, '--']:
raise tokens.error('%s requires argument' % short)
value = tokens.move()
else:
value = left
left = ''
if tokens.error is DocoptExit:
o.value = value if value is not None else True
parsed.append(o)
return parsed
def parse_pattern(source, options):
tokens = Tokens.from_pattern(source)
result = parse_expr(tokens, options)
if tokens.current() is not None:
raise tokens.error('unexpected ending: %r' % ' '.join(tokens))
return Required(*result)
def parse_expr(tokens, options):
"""expr ::= seq ( '|' seq )* ;"""
seq = parse_seq(tokens, options)
if tokens.current() != '|':
return seq
result = [Required(*seq)] if len(seq) > 1 else seq
while tokens.current() == '|':
tokens.move()
seq = parse_seq(tokens, options)
result += [Required(*seq)] if len(seq) > 1 else seq
return [Either(*result)] if len(result) > 1 else result
def parse_seq(tokens, options):
"""seq ::= ( atom [ '...' ] )* ;"""
result = []
while tokens.current() not in [None, ']', ')', '|']:
atom = parse_atom(tokens, options)
if tokens.current() == '...':
atom = [OneOrMore(*atom)]
tokens.move()
result += atom
return result
def parse_atom(tokens, options):
"""atom ::= '(' expr ')' | '[' expr ']' | 'options'
| long | shorts | argument | command ;
"""
token = tokens.current()
result = []
if token in '([':
tokens.move()
matching, pattern = {'(': [')', Required], '[': [']', Optional]}[token]
result = pattern(*parse_expr(tokens, options))
if tokens.move() != matching:
raise tokens.error("unmatched '%s'" % token)
return [result]
elif token == 'options':
tokens.move()
return [OptionsShortcut()]
elif token.startswith('--') and token != '--':
return parse_long(tokens, options)
elif token.startswith('-') and token not in ('-', '--'):
return parse_shorts(tokens, options)
elif token.startswith('<') and token.endswith('>') or token.isupper():
return [Argument(tokens.move())]
else:
return [Command(tokens.move())]
def parse_argv(tokens, options, options_first=False):
"""Parse command-line argument vector.
If options_first:
argv ::= [ long | shorts ]* [ argument ]* [ '--' [ argument ]* ] ;
else:
argv ::= [ long | shorts | argument ]* [ '--' [ argument ]* ] ;
"""
parsed = []
while tokens.current() is not None:
if tokens.current() == '--':
return parsed + [Argument(None, v) for v in tokens]
elif tokens.current().startswith('--'):
parsed += parse_long(tokens, options)
elif tokens.current().startswith('-') and tokens.current() != '-':
parsed += parse_shorts(tokens, options)
elif options_first:
return parsed + [Argument(None, v) for v in tokens]
else:
parsed.append(Argument(None, tokens.move()))
return parsed
def parse_defaults(doc):
defaults = []
for s in parse_section('options:', doc):
# FIXME corner case "bla: options: --foo"
_, _, s = s.partition(':') # get rid of "options:"
split = re.split('\n[ \t]*(-\S+?)', '\n' + s)[1:]
split = [s1 + s2 for s1, s2 in zip(split[::2], split[1::2])]
options = [Option.parse(s) for s in split if s.startswith('-')]
defaults += options
return defaults
def parse_section(name, source):
pattern = re.compile('^([^\n]*' + name + '[^\n]*\n?(?:[ \t].*?(?:\n|$))*)',
re.IGNORECASE | re.MULTILINE)
return [s.strip() for s in pattern.findall(source)]
def formal_usage(section):
_, _, section = section.partition(':') # drop "usage:"
pu = section.split()
return '( ' + ' '.join(') | (' if s == pu[0] else s for s in pu[1:]) + ' )'
def extras(help, version, options, doc):
if help and any((o.name in ('-h', '--help')) and o.value for o in options):
print(doc.strip("\n"))
sys.exit()
if version and any(o.name == '--version' and o.value for o in options):
print(version)
sys.exit()
class Dict(dict):
def __repr__(self):
return '{%s}' % ',\n '.join('%r: %r' % i for i in sorted(self.items()))
def docopt(doc, argv=None, help=True, version=None, options_first=False):
"""Parse `argv` based on command-line interface described in `doc`.
`docopt` creates your command-line interface based on its
description that you pass as `doc`. Such description can contain
--options, <positional-argument>, commands, which could be
[optional], (required), (mutually | exclusive) or repeated...
Parameters
----------
doc : str
Description of your command-line interface.
argv : list of str, optional
Argument vector to be parsed. sys.argv[1:] is used if not
provided.
help : bool (default: True)
Set to False to disable automatic help on -h or --help
options.
version : any object
If passed, the object will be printed if --version is in
`argv`.
options_first : bool (default: False)
Set to True to require options precede positional arguments,
i.e. to forbid options and positional arguments intermix.
Returns
-------
args : dict
A dictionary, where keys are names of command-line elements
such as e.g. "--verbose" and "<path>", and values are the
parsed values of those elements.
Example
-------
>>> from docopt import docopt
>>> doc = '''
... Usage:
... my_program tcp <host> <port> [--timeout=<seconds>]
... my_program serial <port> [--baud=<n>] [--timeout=<seconds>]
... my_program (-h | --help | --version)
...
... Options:
... -h, --help Show this screen and exit.
... --baud=<n> Baudrate [default: 9600]
... '''
>>> argv = ['tcp', '127.0.0.1', '80', '--timeout', '30']
>>> docopt(doc, argv)
{'--baud': '9600',
'--help': False,
'--timeout': '30',
'--version': False,
'<host>': '127.0.0.1',
'<port>': '80',
'serial': False,
'tcp': True}
See also
--------
* For video introduction see http://docopt.org
* Full documentation is available in README.rst as well as online
at https://github.com/docopt/docopt#readme
"""
argv = sys.argv[1:] if argv is None else argv
usage_sections = parse_section('usage:', doc)
if len(usage_sections) == 0:
raise DocoptLanguageError('"usage:" (case-insensitive) not found.')
if len(usage_sections) > 1:
raise DocoptLanguageError('More than one "usage:" (case-insensitive).')
DocoptExit.usage = usage_sections[0]
options = parse_defaults(doc)
pattern = parse_pattern(formal_usage(DocoptExit.usage), options)
# [default] syntax for argument is disabled
# for a in pattern.flat(Argument):
# same_name = [d for d in arguments if d.name == a.name]
# if same_name:
# a.value = same_name[0].value
argv = parse_argv(Tokens(argv), list(options), options_first)
pattern_options = set(pattern.flat(Option))
for options_shortcut in pattern.flat(OptionsShortcut):
doc_options = parse_defaults(doc)
options_shortcut.children = list(set(doc_options) - pattern_options)
# if any_options:
# options_shortcut.children += [Option(o.short, o.long, o.argcount)
# for o in argv if type(o) is Option]
extras(help, version, argv, doc)
matched, left, collected = pattern.fix().match(argv)
if matched and left == []: # better error message if left?
return Dict((a.name, a.value) for a in (pattern.flat() + collected))
raise DocoptExit()

View File

@ -70,9 +70,9 @@ def is_bool(str_):
Take a string, if is a bool return the conversion into Take a string, if is a bool return the conversion into
fortran and ocaml. fortran and ocaml.
""" """
if "true" in str_.lower(): if "true" in str_.strip().lower():
return Type(None, "true", ".True.") return Type(None, "true", ".True.")
elif "false" in str_.lower(): elif "false" in str_.strip().lower():
return Type(None, "false", ".False") return Type(None, "false", ".False")
else: else:
raise TypeError raise TypeError
@ -112,6 +112,8 @@ def get_type_dict():
# ~#~#~#~#~#~#~#~ # # ~#~#~#~#~#~#~#~ #
fancy_type['integer'] = Type(None, "int", "integer") fancy_type['integer'] = Type(None, "int", "integer")
fancy_type['integer*8'] = Type(None, "int", "integer*8")
fancy_type['int'] = Type(None, "int", "integer") fancy_type['int'] = Type(None, "int", "integer")
fancy_type['float'] = Type(None, "float", "double precision") fancy_type['float'] = Type(None, "float", "double precision")
@ -121,7 +123,7 @@ def get_type_dict():
fancy_type['bool'] = Type(None, "bool", "logical") fancy_type['bool'] = Type(None, "bool", "logical")
fancy_type['character*(32)'] = Type(None, "string", "character*(32)") fancy_type['character*(32)'] = Type(None, "string", "character*(32)")
fancy_type['character*(60)'] = Type(None, "string", "character*(60)") fancy_type['character*(64)'] = Type(None, "string", "character*(68)")
fancy_type['character*(256)'] = Type(None, "string", "character*(256)") fancy_type['character*(256)'] = Type(None, "string", "character*(256)")
# ~#~#~#~#~#~#~#~ # # ~#~#~#~#~#~#~#~ #
@ -203,7 +205,7 @@ def get_dict_config_file(config_file_path, module_lower):
- ezfio_name : Will be the name of the file - ezfio_name : Will be the name of the file
- ezfio_dir : Will be the folder who containt the ezfio_name - ezfio_dir : Will be the folder who containt the ezfio_name
* /ezfio_dir/ezfio_name * /ezfio_dir/ezfio_name
* equal to MODULE_lower name for the moment. * equal to MODULE_lower name by default.
- interface : The provider is a imput or a output - interface : The provider is a imput or a output
- default : The default value /!\ stored in a Type named type! - default : The default value /!\ stored in a Type named type!
if interface == output if interface == output
@ -216,7 +218,7 @@ def get_dict_config_file(config_file_path, module_lower):
d = defaultdict(dict) d = defaultdict(dict)
l_info_required = ["doc", "interface"] l_info_required = ["doc", "interface"]
l_info_optional = ["ezfio_name", "size"] l_info_optional = ["ezfio_dir", "ezfio_name", "size"]
# ~#~#~#~#~#~#~#~#~#~#~ # # ~#~#~#~#~#~#~#~#~#~#~ #
# L o a d _ C o n f i g # # L o a d _ C o n f i g #
@ -238,10 +240,8 @@ def get_dict_config_file(config_file_path, module_lower):
pvd = section.lower() pvd = section.lower()
# Create the dictionary who containt the value per default # Create the dictionary who containt the value per default
d_default = {"ezfio_name": pvd} d_default = {"ezfio_name": pvd,
"ezfio_dir": module_lower}
# Set the ezfio_dir
d[pvd]["ezfio_dir"] = module_lower
# Check if type if avalaible # Check if type if avalaible
type_ = config_file.get(section, "type") type_ = config_file.get(section, "type")
@ -269,7 +269,7 @@ def get_dict_config_file(config_file_path, module_lower):
d[pvd][option] = d_default[option] d[pvd][option] = d_default[option]
# If interface is input we need a default value information # If interface is input we need a default value information
if d[pvd]["interface"] == "input": if d[pvd]["interface"].lower() == "input":
try: try:
default_raw = config_file.get(section, "default") default_raw = config_file.get(section, "default")
except ConfigParser.NoOptionError: except ConfigParser.NoOptionError:
@ -294,6 +294,7 @@ def create_ezfio_provider(dict_ezfio_cfg):
default default
size} size}
create the a list who containt all the code for the provider create the a list who containt all the code for the provider
output = output_dict_info['ezfio_dir'
return [code, ...] return [code, ...]
""" """
from ezfio_generate_provider import EZFIO_Provider from ezfio_generate_provider import EZFIO_Provider

View File

@ -1,7 +1,13 @@
#!/usr/bin/env python #!/usr/bin/env python
"""
This programme generate all the
ocaml template needed by qp_edit
You can see `ezfio_generate_provider.py`
for an example of utilisation
"""
import sys import sys
import os
# If type in **kwargs # If type in **kwargs
from ei_handler import Type from ei_handler import Type

View File

@ -45,7 +45,7 @@ END_PROVIDER
self.set_write() self.set_write()
for v in self.values: for v in self.values:
if not v: if not v:
msg = "Error : %s is not set in ezfio_with_default.py" % (v) msg = "Error : %s is not set in EZFIO.cfg" % (v)
print >>sys.stderr, msg print >>sys.stderr, msg
sys.exit(1) sys.exit(1)
return self.data % self.__dict__ return self.data % self.__dict__

View File

@ -0,0 +1,36 @@
#!/bin/bash
# Convert a old ezfio file (with option.irp.f ezfio_default)
# into a new EZFIO.cfg type
# Hartree Fock
# Changin the case, don't know if is needed or not
echo "Will tranform qp_v1.*_ezfio to qp_v2.*_ezfio"
echo "All action are irrevocable! And is by choice"
echo "You need to stop to use a old version! Plz..."
echo "Change thresh_SCF > thresh_scf0"
mv $1/hartree_Fock/thresh_SCF $1/hartree_fock/thresh_scf 2> /dev/null
# Set disk_acess
echo "Change {read,write}_ao_integrals > disk_access_ao_integrals"
biint=$1/bielec_integrals
if [[ -f $biint/read_ao_integrals ]]; then
if [[ `cat $1/bielec_integrals/read_ao_integrals` -eq "T" ]]
then
echo "Read" > $biint/disk_access_ao_integrals
elif [[ `cat $biint/write_ao_integrals` -eq "T" ]]
then
echo "Write" > $biint/disk_access_ao_integrals
else
echo "None" > $biint/disk_access_ao_integrals
fi
rm $biint/read_ao_integrals $biint/write_ao_integrals $biint/write_ao_intergals 2> /dev/null
fi
echo "Done"

View File

@ -0,0 +1,302 @@
#!/usr/bin/env python
"""
This function acceep
Usage:
qp_convert_output_to_ezfio.py <file.out> [--ezfio=<folder.ezfio>]
Option:
file.out is the file to check (like gamess.out)
folder.ezfio is the name you whant for the ezfio
(by default is file.out.ezfio)
"""
import sys
import os
from functools import reduce
# ~#~#~#~#~#~#~#~ #
# Add to the path #
# ~#~#~#~#~#~#~#~ #
try:
QPACKAGE_ROOT = os.environ["QPACKAGE_ROOT"]
except:
print "Error: QPACKAGE_ROOT environment variable not found."
sys.exit(1)
else:
sys.path = [QPACKAGE_ROOT + "/EZFIO/Python",
QPACKAGE_ROOT + "/resultsFile",
QPACKAGE_ROOT + "/scripts"] + sys.path
# ~#~#~#~#~#~ #
# I m p o r t #
# ~#~#~#~#~#~ #
from ezfio import ezfio
try:
from resultsFile import *
except:
print "Error: resultsFile Python library not installed"
sys.exit(1)
from docopt import docopt
# _
# |_ ._ _ _|_ o _ ._
# | |_| | | (_ |_ | (_) | |
#
def write_ezfio(res, filename):
res.clean_uncontractions()
ezfio.set_file(filename)
# _
# |_ | _ _ _|_ ._ _ ._ _
# |_ | (/_ (_ |_ | (_) | | _>
#
ezfio.set_electrons_elec_alpha_num(res.num_alpha)
ezfio.set_electrons_elec_beta_num(res.num_beta)
#
# |\ | _ | _ o
# | \| |_| (_ | (/_ |
#
# ~#~#~#~ #
# I n i t #
# ~#~#~#~ #
charge = []
coord_x = []
coord_y = []
coord_z = []
# ~#~#~#~#~#~#~ #
# P a r s i n g #
# ~#~#~#~#~#~#~ #
for a in res.geometry:
charge.append(a.charge)
if res.units == 'BOHR':
coord_x.append(a.coord[0])
coord_y.append(a.coord[1])
coord_z.append(a.coord[2])
else:
coord_x.append(a.coord[0] / a0)
coord_y.append(a.coord[1] / a0)
coord_z.append(a.coord[2] / a0)
# ~#~#~#~#~ #
# W r i t e #
# ~#~#~#~#~ #
ezfio.set_nuclei_nucl_num(len(res.geometry))
ezfio.set_nuclei_nucl_charge(charge)
# Transformt H1 into H
import re
p = re.compile(ur'(\d*)$')
label = [p.sub("", x.name).capitalize() for x in res.geometry]
ezfio.set_nuclei_nucl_label(label)
ezfio.set_nuclei_nucl_coord(coord_x + coord_y + coord_z)
# _
# /\ _ _ |_) _. _ o _
# /--\ (_) _> |_) (_| _> | _>
#
# ~#~#~#~ #
# I n i t #
# ~#~#~#~ #
import string
at = []
num_prim = []
power_x = []
power_y = []
power_z = []
coefficient = []
exponent = []
res.clean_contractions()
res.convert_to_cartesian()
# ~#~#~#~#~#~#~ #
# P a r s i n g #
# ~#~#~#~#~#~#~ #
for b in res.basis:
c = b.center
for i, atom in enumerate(res.geometry):
if atom.coord == c:
at.append(i + 1)
num_prim.append(len(b.prim))
s = b.sym
power_x.append(string.count(s, "x"))
power_y.append(string.count(s, "y"))
power_z.append(string.count(s, "z"))
coefficient.append(b.coef)
exponent.append([p.expo for p in b.prim])
# ~#~#~#~#~ #
# W r i t e #
# ~#~#~#~#~ #
ezfio.set_ao_basis_ao_num(len(res.basis))
ezfio.set_ao_basis_ao_nucl(at)
ezfio.set_ao_basis_ao_prim_num(num_prim)
ezfio.set_ao_basis_ao_power(power_x + power_y + power_z)
# ~#~#~#~#~#~#~ #
# P a r s i n g #
# ~#~#~#~#~#~#~ #
prim_num_max = ezfio.get_ao_basis_ao_prim_num_max()
for i in range(len(res.basis)):
coefficient[
i] += [0. for j in range(len(coefficient[i]), prim_num_max)]
exponent[i] += [0. for j in range(len(exponent[i]), prim_num_max)]
coefficient = reduce(lambda x, y: x + y, coefficient, [])
exponent = reduce(lambda x, y: x + y, exponent, [])
coef = []
expo = []
for i in range(prim_num_max):
for j in range(i, len(coefficient), prim_num_max):
coef.append(coefficient[j])
expo.append(exponent[j])
# ~#~#~#~#~ #
# W r i t e #
# ~#~#~#~#~ #
ezfio.set_ao_basis_ao_coef(coef)
ezfio.set_ao_basis_ao_expo(expo)
ezfio.set_ao_basis_ao_basis("Read by resultsFile")
# _
# |\/| _ _ |_) _. _ o _
# | | (_) _> |_) (_| _> | _>
#
# ~#~#~#~ #
# I n i t #
# ~#~#~#~ #
MoTag = res.determinants_mo_type
ezfio.set_mo_basis_mo_label('Orthonormalized')
MO_type = MoTag
allMOs = res.mo_sets[MO_type]
# ~#~#~#~#~#~#~ #
# P a r s i n g #
# ~#~#~#~#~#~#~ #
try:
closed = [(allMOs[i].eigenvalue, i) for i in res.closed_mos]
active = [(allMOs[i].eigenvalue, i) for i in res.active_mos]
virtual = [(allMOs[i].eigenvalue, i) for i in res.virtual_mos]
except:
closed = []
virtual = []
active = [(allMOs[i].eigenvalue, i) for i in range(len(allMOs))]
closed = map(lambda x: x[1], closed)
active = map(lambda x: x[1], active)
virtual = map(lambda x: x[1], virtual)
MOindices = closed + active + virtual
MOs = []
for i in MOindices:
MOs.append(allMOs[i])
mo_tot_num = len(MOs)
while len(MOindices) < mo_tot_num:
MOindices.append(len(MOindices))
MOmap = list(MOindices)
for i in range(len(MOindices)):
MOmap[i] = MOindices.index(i)
energies = []
for i in xrange(mo_tot_num):
energies.append(MOs[i].eigenvalue)
if res.occ_num is not None:
OccNum = []
for i in MOindices:
OccNum.append(res.occ_num[MO_type][i])
while len(OccNum) < mo_tot_num:
OccNum.append(0.)
MoMatrix = []
sym0 = [i.sym for i in res.mo_sets[MO_type]]
sym = [i.sym for i in res.mo_sets[MO_type]]
for i in xrange(len(sym)):
sym[MOmap[i]] = sym0[i]
MoMatrix = []
for i in xrange(len(MOs)):
m = MOs[i]
for coef in m.vector:
MoMatrix.append(coef)
while len(MoMatrix) < len(MOs[0].vector) ** 2:
MoMatrix.append(0.)
# ~#~#~#~#~ #
# W r i t e #
# ~#~#~#~#~ #
ezfio.set_mo_basis_mo_tot_num(mo_tot_num)
ezfio.set_mo_basis_mo_occ(OccNum)
ezfio.set_mo_basis_mo_coef(MoMatrix)
# ______ _
# | ___ \ | |
# | |_/ /__ ___ _ _ __| | ___
# | __/ __|/ _ \ | | |/ _` |/ _ \
# | | \__ \ __/ |_| | (_| | (_) |
# \_| |___/\___|\__,_|\__,_|\___/
#
ezfio.set_pseudo_integrals_do_pseudo(False)
def get_full_path(file_path):
file_path = os.path.expanduser(file_path)
file_path = os.path.expandvars(file_path)
file_path = os.path.abspath(file_path)
return file_path
if __name__ == '__main__':
arguments = docopt(__doc__)
file_ = get_full_path(arguments['<file.out>'])
if arguments["--ezfio"]:
ezfio_file = get_full_path(arguments["--ezfio"])
else:
ezfio_file = "{0}.ezfio".format(file_)
try:
res_file = getFile(file_)
except:
raise
else:
print file_, 'recognized as', str(res_file).split('.')[-1].split()[0]
write_ezfio(res_file, ezfio_file)

View File

@ -4,14 +4,16 @@ open Core.Std;;
(** Interactive editing of the input. (** Interactive editing of the input.
@author A. Scemama WARNING
This file is autogenerad by
`${{QP_ROOT}}/script/ezfio_interface/ei_handler.py`
*) *)
(** Keywords used to define input sections *) (** Keywords used to define input sections *)
type keyword = type keyword =
| Ao_basis | Ao_basis
| Determinants | Determinants_by_hand
| Electrons | Electrons
| Mo_basis | Mo_basis
| Nuclei | Nuclei
@ -21,7 +23,7 @@ type keyword =
let keyword_to_string = function let keyword_to_string = function
| Ao_basis -> "AO basis" | Ao_basis -> "AO basis"
| Determinants -> "Determinants" | Determinants_by_hand -> "Determinants_by_hand"
| Electrons -> "Electrons" | Electrons -> "Electrons"
| Mo_basis -> "MO basis" | Mo_basis -> "MO basis"
| Nuclei -> "Molecule" | Nuclei -> "Molecule"
@ -72,8 +74,8 @@ let get s =
f Nuclei.(read, to_rst) f Nuclei.(read, to_rst)
| Ao_basis -> | Ao_basis ->
f Ao_basis.(read, to_rst) f Ao_basis.(read, to_rst)
| Determinants -> | Determinants_by_hand ->
f Determinants.(read, to_rst) f Determinants_by_hand.(read, to_rst)
{section_to_rst} {section_to_rst}
end end
with with
@ -114,7 +116,7 @@ let set str s =
match s with match s with
{write} {write}
| Electrons -> write Electrons.(of_rst, write) s | Electrons -> write Electrons.(of_rst, write) s
| Determinants -> write Determinants.(of_rst, write) s | Determinants_by_hand -> write Determinants_by_hand.(of_rst, write) s
| Nuclei -> write Nuclei.(of_rst, write) s | Nuclei -> write Nuclei.(of_rst, write) s
| Ao_basis -> () (* TODO *) | Ao_basis -> () (* TODO *)
| Mo_basis -> () (* TODO *) | Mo_basis -> () (* TODO *)
@ -162,7 +164,7 @@ let run check_only ezfio_filename =
Electrons ; Electrons ;
{tasks} {tasks}
Mo_basis; Mo_basis;
Determinants ; Determinants_by_hand ;
] ]
in in

View File

@ -0,0 +1,27 @@
#!/bin/bash
# Convert a old ezfio file (with option.irp.f ezfio_default)
# into a new EZFIO.cfg type
# Hartree Fock
# Changin the case, don't know if is needed or not
mv $1/Hartree_Fock $1/hartree_fock 2> /dev/null
mv $1/hartree_Fock/thresh_SCF $1/hartree_fock/thresh_scf 2> /dev/null
# BiInts
mv $1/bi_integrals $1/bielect_integrals 2> /dev/null
if [ -f $1/bielect_integrals/read_ao_integrals ]; then
if [ `cat $1/bielect_integrals/read_ao_integrals` -eq "True" ]
then
echo "Read" > $1/bielect_integrals/disk_access_ao_integrals
elif [ `cat bielect_integrals/write_ao_integrals` -eq "True" ]
then
echo "Write" > $1/bielect_integrals/disk_access_ao_integrals
else
echo "None" > $1/bielect_integrals/disk_access_ao_integrals
fi
fi

View File

@ -90,13 +90,19 @@ END_PROVIDER
self.default = t self.default = t
def get_default(self): def get_default(self):
filename = '/'.join( [os.environ['QPACKAGE_ROOT'], 'data', mypath = '/'.join( [os.environ['QPACKAGE_ROOT'], 'data',
'ezfio_defaults', 'ezfio_defaults'] )
'WILL_BE_DELETED.ezfio_default'] )
from os import listdir
from os.path import isfile, join
onlyfiles = [ join(mypath,f) for f in listdir(mypath) if isfile(join(mypath,f)) ]
lines = []
for filename in onlyfiles:
file = open(filename,'r') file = open(filename,'r')
lines = file.readlines() lines.extend(file.readlines())
file.close() file.close()
k=-1 k=-1
# Search directory # Search directory
for k,line in enumerate(lines): for k,line in enumerate(lines):

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
import os import os
file = open(os.environ["QPACKAGE_ROOT"]+'/src/Dets/H_apply_template.f','r') file = open(os.environ["QPACKAGE_ROOT"]+'/src/Determinants/H_apply_template.f','r')
template = file.read() template = file.read()
file.close() file.close()
@ -104,7 +104,7 @@ class H_apply(object):
endif endif
SOFT_TOUCH psi_det psi_coef N_det SOFT_TOUCH psi_det psi_coef N_det
""" """
s["printout_now"] = """write(output_Dets,*) & s["printout_now"] = """write(output_determinants,*) &
100.*float(i_generator)/float(N_det_generators), '% in ', wall_1-wall_0, 's'""" 100.*float(i_generator)/float(N_det_generators), '% in ', wall_1-wall_0, 's'"""
self.data = s self.data = s
@ -211,9 +211,9 @@ class H_apply(object):
delta_pt2(k) = 0.d0 delta_pt2(k) = 0.d0
pt2_old(k) = 0.d0 pt2_old(k) = 0.d0
enddo enddo
write(output_Dets,'(A12, X, A8, 3(2X, A9), 2X, A8, 2X, A8, 2X, A8)') & write(output_determinants,'(A12, X, A8, 3(2X, A9), 2X, A8, 2X, A8, 2X, A8)') &
'N_generators', 'Norm', 'Delta PT2', 'PT2', 'Est. PT2', 'secs' 'N_generators', 'Norm', 'Delta PT2', 'PT2', 'Est. PT2', 'secs'
write(output_Dets,'(A12, X, A8, 3(2X, A9), 2X, A8, 2X, A8, 2X, A8)') & write(output_determinants,'(A12, X, A8, 3(2X, A9), 2X, A8, 2X, A8, 2X, A8)') &
'============', '========', '=========', '=========', '=========', & '============', '========', '=========', '=========', '=========', &
'=========' '========='
""" """
@ -226,7 +226,7 @@ class H_apply(object):
""" """
self.data["printout_now"] = """ self.data["printout_now"] = """
do k=1,N_st do k=1,N_st
write(output_Dets,'(I10, 4(2X, F9.6), 2X, F8.1)') & write(output_determinants,'(I10, 4(2X, F9.6), 2X, F8.1)') &
i_generator, norm_psi(k), delta_pt2(k), pt2(k), & i_generator, norm_psi(k), delta_pt2(k), pt2(k), &
pt2(k)/(norm_psi(k)*norm_psi(k)), & pt2(k)/(norm_psi(k)*norm_psi(k)), &
wall_1-wall_0 wall_1-wall_0
@ -258,7 +258,7 @@ class H_apply(object):
! SOFT_TOUCH psi_det psi_coef N_det ! SOFT_TOUCH psi_det psi_coef N_det
selection_criterion_min = min(selection_criterion_min, maxval(select_max))*0.1d0 selection_criterion_min = min(selection_criterion_min, maxval(select_max))*0.1d0
selection_criterion = selection_criterion_min selection_criterion = selection_criterion_min
call write_double(output_Dets,selection_criterion,'Selection criterion') call write_double(output_determinants,selection_criterion,'Selection criterion')
""" """
self.data["keys_work"] = """ self.data["keys_work"] = """
e_2_pert_buffer = 0.d0 e_2_pert_buffer = 0.d0

View File

@ -42,9 +42,14 @@ then
echo "ERROR" echo "ERROR"
exit 1 exit 1
fi fi
${EMSL_API_ROOT}/EMSL_api.py get_basis_data --treat_l --save --path="${tmpfile}" --basis="${basis}" $atoms
pseudo="$1"
shift
if [[ -z $pseudo ]]
then
${EMSL_API_ROOT}/EMSL_api.py get_basis_data --treat_l --save --path="${tmpfile}" --basis="${basis}"
else
${EMSL_API_ROOT}/EMSL_api.py get_basis_data --save --path="${tmpfile}" --basis="${basis}" --db_path="${EMSL_API_ROOT}/db/Pseudo.db"
fi

View File

@ -8,8 +8,8 @@ CURL_URL="http://qmcchem.ups-tlse.fr/files/scemama/${CURL}.tar.bz2"
if [[ -z ${QPACKAGE_ROOT} ]] if [[ -z ${QPACKAGE_ROOT} ]]
then then
print "The QPACKAGE_ROOT environment variable is not set." echo "The QPACKAGE_ROOT environment variable is not set."
print "Please reload the quantum_package.rc file." echo "Please reload the quantum_package.rc file."
exit -1 exit -1
fi fi

View File

@ -0,0 +1,21 @@
#!/bin/bash
#
# Installs docopt
# lundi 27 avril 2015, 16:51:34 (UTC+0200)
DOCOPT="docopt.py"
DOCOPT_URL="https://raw.githubusercontent.com/docopt/docopt/master/${DOCOPT}"
if [[ -z ${QPACKAGE_ROOT} ]]
then
echo "The QPACKAGE_ROOT environment variable is not set."
echo "Please reload the quantum_package.rc file."
exit -1
fi
cd ${QPACKAGE_ROOT}
rm -f -- scripts/${DOCOPT}{,c}
${QPACKAGE_ROOT}/scripts/fetch_from_web.py ${DOCOPT_URL} ${DOCOPT}
mv ${DOCOPT} scripts/${DOCOPT}

View File

@ -8,8 +8,8 @@ URL="https://github.com/LCPQ/${BASE}/archive/master.tar.gz"
if [[ -z ${QPACKAGE_ROOT} ]] if [[ -z ${QPACKAGE_ROOT} ]]
then then
print "The QPACKAGE_ROOT environment variable is not set." echo "The QPACKAGE_ROOT environment variable is not set."
print "Please reload the quantum_package.rc file." echo "Please reload the quantum_package.rc file."
exit -1 exit -1
fi fi

View File

@ -8,8 +8,8 @@ URL="https://github.com/LCPQ/${BASE}/archive/master.tar.gz"
if [[ -z ${QPACKAGE_ROOT} ]] if [[ -z ${QPACKAGE_ROOT} ]]
then then
print "The QPACKAGE_ROOT environment variable is not set." echo "The QPACKAGE_ROOT environment variable is not set."
print "Please reload the quantum_package.rc file." echo "Please reload the quantum_package.rc file."
exit -1 exit -1
fi fi

View File

@ -30,7 +30,7 @@ Build failed for module $MODULE
" "
fi fi
fi fi
${QPACKAGE_ROOT}/scripts/create_gitignore.sh ${QPACKAGE_ROOT}/scripts/module/create_gitignore.sh
cd ${OLDPWD} cd ${OLDPWD}
done done
${QPACKAGE_ROOT}/scripts/create_executables_list.sh ${QPACKAGE_ROOT}/scripts/module/create_executables_list.sh

View File

@ -13,8 +13,9 @@ source ${QPACKAGE_ROOT}/scripts/qp_include.sh
function do_clean() function do_clean()
{ {
rm -rf -- \ rm -rf -- \
IRPF90_temp IRPF90_man Makefile.depend $(cat NEEDED_MODULES) include \ IRPF90_temp IRPF90_man Makefile.depend \
ezfio_interface.irp.f irpf90.make irpf90_entities tags $(ls_exe) $(module_handler.py print_genealogy) include \
ezfio_interface.irp.f irpf90.make irpf90_entities tags $(ls_exe) *.mod
} }
if [[ -z $1 ]] if [[ -z $1 ]]

View File

@ -14,7 +14,9 @@ source ${QPACKAGE_ROOT}/scripts/qp_include.sh
check_current_dir_is_module check_current_dir_is_module
OUTPUT=$(${QPACKAGE_ROOT}/scripts/check_dependencies.sh $@) OUTPUT=$(module_handler.py check_dependencies $@)
echo ${OUTPUT} > NEEDED_MODULES
if [[ $? -eq 0 ]]
then
echo $@ > NEEDED_CHILDREN_MODULES
fi

202
scripts/module/module_handler.py Executable file
View File

@ -0,0 +1,202 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Create the NEEDED_MODULE
aka the genealogy (children module, subchildren module and so on),
of a NEEDED_CHILDREN_MODULES file
Usage:
module_handler.py print_genealogy [<NEEDED_CHILDREN_MODULES>]
module_handler.py check_dependencies [<module_name>...]
module_handler.py create_png [<NEEDED_CHILDREN_MODULES>]
Options:
print_genealogy Print the genealogy of the NEEDED_CHILDREN_MODULES
aka (children, subchildren, etc)
create_png Create a png of the file
NEEDED_CHILDREN_MODULES The path of NEEDED_CHILDREN_MODULES
by default try to open the file in the current path
"""
from docopt import docopt
import os
import sys
import os.path
from functools import wraps
def cache(func):
"""
A decorator for lazy evaluation off true function
"""
saved = {}
@wraps(func)
def newfunc(*args):
if args in saved:
return saved[args]
result = func(*args)
saved[args] = result
return result
return newfunc
@cache
def get_dict_genealogy():
"""Loop over MODULE in QPACKAGE_ROOT/src, open all the NEEDED_CHILDREN_MODULES
and create a dict[MODULE] = [sub module needed, ...]
"""
d_ref = dict()
qpackage_root = os.environ['QPACKAGE_ROOT']
dir_ = os.path.join(qpackage_root, 'src')
for o in os.listdir(dir_):
try:
with open(os.path.join(dir_, o, "NEEDED_CHILDREN_MODULES"), "r") as f:
l_children = f.read().split()
except IOError:
pass
else:
d_ref[o] = l_children
return d_ref
def module_genealogy(path):
"""
Take a name of a NEEDED_CHILDREN_MODULES
and return a list of all the {sub, subsub, ...}children
"""
try:
with open(path, "r") as f:
l_children = f.read().split()
except IOError as e:
print >> sys.stderr, e
sys.exit(1)
else:
needed_module = get_it_and_children(l_children)
return needed_module
def get_it_and_children(l_module):
"""
From a list of module return the module and all of the genealogy
"""
d_ref = get_dict_genealogy()
l = []
for module in l_module:
if module not in l:
l.append(module)
try:
l.extend(get_it_and_children(d_ref[module]))
except KeyError:
print >> sys.stderr, "`{0}` in not a good submodule name".format(module)
print >> sys.stderr, "Check the corresponding NEEDED_CHILDREN_MODULES"
sys.exit(1)
return list(set(l))
def get_all_children(l_module):
"""
From a list of module return all the genealogy
"""
it_and_all = get_it_and_children(l_module)
return [children for children in it_and_all if children not in l_module]
def reduce_(l_module):
"""
Take a l_module and try to find the lower combinaitions
of module with the same genealogy
"""
import itertools
d_ref = get_dict_genealogy()
target_genealogy = sorted(get_all_children(l_module))
for i in xrange(len(d_ref)):
for c in itertools.combinations(d_ref, i):
guess_genealogy = sorted(get_it_and_children(d_ref, c))
if target_genealogy == guess_genealogy:
return c
def create_png_from_path(path):
" Change a path like this into a module list"
"path = /home/razoa/quantum_package/src/Molden/NEEDED_CHILDREN_MODULES"
l_module = os.path.split(path)[0].split("/")[-1]
create_png([l_module])
def create_png(l_module):
"""Create the png of the dependancy tree for a l_module"""
# Init
import pydot
all_ready_done = []
def draw_module_edge(module, l_children):
"Draw all the module recursifly"
if module not in all_ready_done:
for children in l_children:
# Add Edge
edge = pydot.Edge(module, children)
graph.add_edge(edge)
# Recurs
draw_module_edge(children, d_ref[children])
all_ready_done.append(module)
# Init
graph = pydot.Dot(graph_type='digraph')
d_ref = get_dict_genealogy()
# Create all the edge
for module in l_module:
node_a = pydot.Node(module, fontcolor="red")
graph.add_node(node_a)
draw_module_edge(module, d_ref[module])
# Save
path = '{0}.png'.format("_".join(l_module))
print "png saved in {0}".format(path)
graph.write_png(path)
if __name__ == '__main__':
arguments = docopt(__doc__)
if not arguments['<NEEDED_CHILDREN_MODULES>']:
dir_ = os.getcwd()
path = os.path.join(dir_, "NEEDED_CHILDREN_MODULES")
else:
path = os.path.abspath(arguments['<NEEDED_CHILDREN_MODULES>'])
path = os.path.expanduser(path)
path = os.path.expandvars(path)
if arguments['print_genealogy']:
l_all_needed_molule = module_genealogy(path)
print " ".join(sorted(l_all_needed_molule))
elif arguments["check_dependencies"]:
l_module = arguments['<module_name>']
if l_module:
l_all_needed_molule = get_it_and_children(l_module)
else:
l_all_needed_molule = module_genealogy(path)
elif arguments["create_png"]:
create_png_from_path(path)

2125
scripts/module/pydot.py Normal file

File diff suppressed because it is too large Load Diff

View File

@ -71,7 +71,7 @@ debug "Module does not already exist: OK"
# Set up dependencies # Set up dependencies
ALL_MODULES="${NEEDED_MODULES}" ALL_MODULES="$(cat NEEDED_MODULES)"
echo "Select which modules you are sure you will need: (press q to quit)" echo "Select which modules you are sure you will need: (press q to quit)"
NEEDED_MODULES="" NEEDED_MODULES=""
select M in ${ALL_MODULES} select M in ${ALL_MODULES}
@ -117,7 +117,7 @@ debug "Module directory is created."
# Create the Makefile # Create the Makefile
"${QPACKAGE_ROOT}/scripts/create_Makefile.sh" || fail "Unable to create Makefile" "${QPACKAGE_ROOT}/scripts/module/create_Makefile.sh" || fail "Unable to create Makefile"
if [[ ! -f Makefile ]] if [[ ! -f Makefile ]]
then then
fail "Makefile was not created" fail "Makefile was not created"
@ -125,8 +125,8 @@ fi
debug "Makefile created" debug "Makefile created"
# Create the NEEDED_MODULES file # Create the NEEDED_MODULES file
"${QPACKAGE_ROOT}/scripts/create_Needed_modules.sh" ${NEEDED_MODULES} || fail "Unable to create the NEEDED_MODULES file" "${QPACKAGE_ROOT}/scripts/module/create_Needed_modules.sh" ${NEEDED_MODULES} || fail "Unable to create the NEEDED_MODULES file"
if [[ ! -f NEEDED_MODULES ]] if [[ ! -f NEEDED_CHILDREN_MODULES ]]
then then
fail "NEEDED_MODULES was not created" fail "NEEDED_MODULES was not created"
fi fi
@ -135,7 +135,7 @@ debug "NEEDED_MODULES created"
# Create rst templates # Create rst templates
"${QPACKAGE_ROOT}/scripts/create_rst_templates.sh" || fail "Unable to create rst templates" "${QPACKAGE_ROOT}/scripts/module/create_rst_templates.sh" || fail "Unable to create rst templates"
# Update module list in main NEEDED_MODULES # Update module list in main NEEDED_MODULES

View File

@ -0,0 +1,118 @@
name_to_elec = {"H": 1,
"He": 2,
"Li": 3,
"Be": 4,
"B": 5,
"C": 6,
"N": 7,
"O": 8,
"F": 9,
"Ne": 10,
"Na": 11,
"Mg": 12,
"Al": 13,
"Si": 14,
"P": 15,
"S": 16,
"Cl": 17,
"Ar": 18,
"K": 19,
"Ca": 20,
"Sc": 21,
"Ti": 22,
"V": 23,
"Cr": 24,
"Mn": 25,
"Fe": 26,
"Co": 27,
"Ni": 28,
"Cu": 29,
"Zn": 30,
"Ga": 31,
"Ge": 32,
"As": 33,
"Se": 34,
"Br": 35,
"Kr": 36,
"Rb": 37,
"Sr": 38,
"Y": 39,
"Zr": 40,
"Nb": 41,
"Mo": 42,
"Tc": 43,
"Ru": 44,
"Rh": 45,
"Pd": 46,
"Ag": 47,
"Cd": 48,
"In": 49,
"Sn": 50,
"Sb": 51,
"Te": 52,
"I": 53,
"Xe": 54,
"Cs": 55,
"Ba": 56,
"La": 57,
"Ce": 58,
"Pr": 59,
"Nd": 60,
"Pm": 61,
"Sm": 62,
"Eu": 63,
"Gd": 64,
"Tb": 65,
"Dy": 66,
"Ho": 67,
"Er": 68,
"Tm": 69,
"Yb": 70,
"Lu": 71,
"Hf": 72,
"Ta": 73,
"W": 74,
"Re": 75,
"Os": 76,
"Ir": 77,
"Pt": 78,
"Au": 79,
"Hg": 80,
"Tl": 81,
"Pb": 82,
"Bi": 83,
"Po": 84,
"At": 85,
"Rn": 86,
"Fr": 87,
"Ra": 88,
"Ac": 89,
"Th": 90,
"Pa": 91,
"U": 92,
"Np": 93,
"Pu": 94,
"Am": 95,
"Cm": 96,
"Bk": 97,
"Cf": 98,
"Es": 99,
"Fm": 100,
"Md": 101,
"No": 102,
"Lr": 103,
"Rf": 104,
"Db": 105,
"Sg": 106,
"Bh": 107,
"Hs": 108,
"Mt": 109,
"Ds": 110,
"Rg": 111,
"Cn": 112,
"Uut": 113,
"Fl": 114,
"Uup": 115,
"Lv": 116,
"Uus": 117,
"Uuo": 118}

View File

@ -0,0 +1,338 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Create the pseudo potential for a given atom
Usage:
put_pseudo_in_ezfio.py <ezfio_path>
Help:
atom is the Abreviation of the atom
"""
import os
import sys
from docopt import docopt
from subprocess import Popen, PIPE
qpackage_root = os.environ['QPACKAGE_ROOT']
EZFIO = "{0}/EZFIO".format(qpackage_root)
sys.path = [EZFIO + "/Python"] + sys.path
from ezfio import ezfio
import re
p = re.compile(ur'\|(\d+)><\d+\|')
def get_pseudo_str(l_atom):
"""
Run EMSL_local for geting the str of the speudo potential
str_ele :
Element Symbol: Na
Number of replaced protons: 10
Number of projectors: 2
Pseudopotential data:
Local component:
Coeff. r^n Exp.
1.00000000 -1 5.35838717
5.35838717 1 3.67918975
-2.07764789 0 1.60507673
Non-local component:
Coeff. r^n Exp. Proj.
10.69640234 0 1.32389367 |0><0|
10.11238853 0 1.14052020 |1><1|
"""
EMSL_root = "{0}/EMSL_Basis/".format(qpackage_root)
EMSL_path = "{0}/EMSL_api.py".format(EMSL_root)
db_path = "{0}/db/Pseudo.db".format(EMSL_root)
str_ = ""
for a in l_atom:
l_cmd_atom = ["--atom", a]
l_cmd_head = [EMSL_path, "get_basis_data",
"--db_path", db_path,
"--basis", "BFD-Pseudo"]
process = Popen(l_cmd_head + l_cmd_atom, stdout=PIPE, stderr=PIPE)
stdout, _ = process.communicate()
str_ += stdout.strip() + "\n"
return str_
def get_v_n_dz_local(str_ele):
"""
From a str_ele of the pseudo (aka only one ele in the str)
get the list ussefull for the Local potential : v_k n_k and dz_k
"""
l_v_k = []
l_n_k = []
l_dz_k = []
for l in str_ele.splitlines():
try:
v, n, dz = l.split()
v = float(v)
n = int(n)
dz = float(dz)
except ValueError:
pass
else:
l_v_k.append(v)
l_n_k.append(n)
l_dz_k.append(dz)
return l_v_k, l_n_k, l_dz_k
def get_v_n_dz_l_nonlocal(str_ele):
"""
From a str_ele of the pseudo (aka only one ele in the str)
get the list ussefull for the non Local potential
v_kl (v, l)
n_k (v, l)
dz_k (dz ,l)
"""
l_v_kl = []
l_n_kl = []
l_dz_kl = []
for l in str_ele.splitlines():
try:
v, n, dz, proj = l.split()
v = float(v)
n = int(n)
dz = float(dz)
l = int(p.match(proj).group(1))
except ValueError:
pass
else:
l_v_kl.append([v])
l_n_kl.append([n])
l_dz_kl.append([dz])
if not l_v_kl:
l_v_kl.append([0.])
l_n_kl.append([0])
l_dz_kl.append([0.])
return l_v_kl, l_n_kl, l_dz_kl
def get_zeff_alpha_beta(str_ele):
"""
Return the the zeff, alpha num elec and beta num elec
Assert ezfio_set_file alredy defined
"""
import re
# ___
# | ._ o _|_
# _|_ | | | |_
#
# ~#~#~#~#~#~#~ #
# s t r _ e l e #
# ~#~#~#~#~#~#~ #
# m = re.search('Element Symbol: ([a-zA-Z]+)', str_ele)
# name = m.group(1).capitalize()
name = str_ele.split("\n")[0].strip().capitalize()
m = re.search('Number of replaced protons: (\d+)', str_ele)
z_remove = int(m.group(1))
# _
# |_) _. ._ _ _
# | (_| | _> (/_
#
from elts_num_ele import name_to_elec
z = name_to_elec[name]
z_eff = z - z_remove
alpha = (z_remove / 2)
beta = (z_remove / 2)
# _
# |_) _ _|_ ._ ._
# | \ (/_ |_ |_| | | |
#
return [z_eff, alpha, beta]
def add_zero(array, size, type):
for add in xrange(len(array), size):
array.append([type(0)])
return array
def make_it_square(matrix, dim, type=float):
"""
matix the matrix to squate
dim array [lmax, kmax]
type the null value you want
[[[28.59107316], [19.37583724]], [[50.25646328]]]
=>
[[[28.59107316], [19.37583724]], [[50.25646328], [0.0]]]
"""
lmax = dim[0]
kmax = dim[1]
for l_list in matrix:
l_list = add_zero(l_list, lmax, type)
for k_list in list_:
k_list = add_zero(k_list, kmax, type)
return matrix
if __name__ == "__main__":
arguments = docopt(__doc__)
# ___
# | ._ o _|_
# _|_ | | | |_
#
# ~#~#~#~#~ #
# E Z F I O #
# ~#~#~#~#~ #
ezfio_path = arguments["<ezfio_path>"]
ezfio_path = os.path.expanduser(ezfio_path)
ezfio_path = os.path.expandvars(ezfio_path)
ezfio_path = os.path.abspath(ezfio_path)
ezfio.set_file("{0}".format(ezfio_path))
# ~#~#~#~#~#~#~#~#~#~#~ #
# P s e u d o _ d a t a #
# ~#~#~#~#~#~#~#~#~#~#~ #
l_ele = ezfio.get_nuclei_nucl_label()
str_ = get_pseudo_str(l_ele)
# _
# |_) _. ._ _ _
# | (_| | _> (/_
#
l_str_ele = [str_ele for str_ele in str_.split("Element Symbol: ")
if str_ele]
for i in "l_zeff v_k n_k dz_k v_kl n_kl dz_kl".split():
exec("{0} = []".format(i))
alpha_tot = 0
beta_tot = 0
for str_ele in l_str_ele:
# ~#~#~#~#~ #
# S p l i t #
# ~#~#~#~#~ #
l = str_ele.find("Local component:")
nl = str_ele.find("Non-local component")
# ~#~#~#~#~ #
# L o c a l #
# ~#~#~#~#~ #
l_v, l_n, l_dz = get_v_n_dz_local(str_ele[l:nl])
v_k.append(l_v)
n_k.append(l_n)
dz_k.append(l_dz)
# ~#~#~#~#~#~#~#~#~ #
# N o n _ L o c a l #
# ~#~#~#~#~#~#~#~#~ #
l_v_kl, l_n_kl, l_dz_kl = get_v_n_dz_l_nonlocal(str_ele[nl:])
v_kl.append(l_v_kl)
n_kl.append(l_n_kl)
dz_kl.append(l_dz_kl)
# ~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~ #
# Z _ e f f , a l p h a / b e t a _ e l e c #
# ~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~ #
zeff, alpha, beta = get_zeff_alpha_beta(str_ele)
alpha_tot += alpha
beta_tot += beta
l_zeff.append(zeff)
# _
# /\ _| _| _|_ _ _ _ _|_ o _
# /--\ (_| (_| |_ (_) (/_ /_ | | (_)
#
# ~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~ #
# Z _ e f f , a l p h a / b e t a _ e l e c #
# ~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~ #
ezfio.nuclei_nucl_charge = l_zeff
alpha_tot = ezfio.get_electrons_elec_alpha_num() - alpha_tot
beta_tot = ezfio.get_electrons_elec_beta_num() - beta_tot
ezfio.electrons_elec_alpha_num = alpha_tot
ezfio.electrons_elec_beta_num = beta_tot
# Change all the array 'cause EZFIO
# v_kl (v, l) => v_kl(l,v)
# v_kl => zip(*_v_kl)
# [[7.0, 79.74474797, -49.45159098], [1.0, 5.41040609, -4.60151975]]
# [(7.0, 1.0), (79.74474797, 5.41040609), (-49.45159098, -4.60151975)]
# ~#~#~#~#~ #
# L o c a l #
# ~#~#~#~#~ #
klocmax = max([len(i) for i in v_k])
ezfio.pseudo_intergrals_klocmax = klocmax
ezfio.pseudo_intergrals_v_k = zip(*v_k)
ezfio.pseudo_intergrals_n_k = zip(*n_k)
ezfio.pseudo_intergrals_dz_k = zip(*dz_k)
# ~#~#~#~#~#~#~#~#~ #
# N o n _ L o c a l #
# ~#~#~#~#~#~#~#~#~ #
lmax = max([len(i) for i in v_kl])
kmax = max([len(sublist) for list_ in v_kl for sublist in list_])
ezfio.pseudo_intergrals_lmaxpo = lmax
ezfio.pseudo_intergrals_kmax = kmax
v_kl = make_it_square(v_kl, [lmax, kmax])
n_kl = make_it_square(n_kl, [lmax, kmax], int)
dz_kl = make_it_square(dz_kl, [lmax, kmax])
ezfio.pseudo_intergrals_v_kl = zip(*v_kl)
ezfio.pseudo_intergrals_n_kl = zip(*n_kl)
ezfio.pseudo_intergrals_dz_kl = zip(*dz_kl)
ezfio.pseudo_intergrals_do_pseudo = True

View File

@ -1,210 +0,0 @@
#!/usr/bin/env python
import sys,os
try:
QPACKAGE_ROOT = os.environ["QPACKAGE_ROOT"]
except:
print "Error: QPACKAGE_ROOT environment variable not found."
sys.exit(1)
sys.path = [ QPACKAGE_ROOT+"/EZFIO/Python", QPACKAGE_ROOT+"/resultsFile" ]+sys.path
from ezfio import ezfio
import ezfio as ez
print "EZFIO: ", os.path.dirname(ez.__file__)
try:
from resultsFile import *
except:
print "Error: resultsFile Python library not installed"
sys.exit(1)
def write_ezfioFile(res,filename):
res.clean_uncontractions()
ezfio.set_file(filename)
# Electrons
ezfio.set_electrons_elec_alpha_num(res.num_alpha)
ezfio.set_electrons_elec_beta_num(res.num_beta)
# Nuclei
ezfio.set_nuclei_nucl_num(len(res.geometry))
charge = []
coord = []
coord_x = []
coord_y = []
coord_z = []
for a in res.geometry:
charge.append(a.charge)
if res.units == 'BOHR':
coord_x.append(a.coord[0])
coord_y.append(a.coord[1])
coord_z.append(a.coord[2])
else:
coord_x.append(a.coord[0]/a0)
coord_y.append(a.coord[1]/a0)
coord_z.append(a.coord[2]/a0)
ezfio.set_nuclei_nucl_charge(charge)
label = map(lambda x: x.name, res.geometry)
ezfio.set_nuclei_nucl_label(label)
ezfio.set_nuclei_nucl_coord(coord_x+coord_y+coord_z)
# Basis
basis = res.uncontracted_basis
geom = res.geometry
res.clean_contractions()
# AO Basis
import string
at = []
num_prim = []
magnetic_number = []
angular_number = []
power_x = []
power_y = []
power_z = []
coefficient = []
exponent = []
res.convert_to_cartesian()
for b in res.basis:
c = b.center
for i,atom in enumerate(res.geometry):
if atom.coord == c:
at.append(i+1)
num_prim.append(len(b.prim))
s = b.sym
power_x.append( string.count(s,"x") )
power_y.append( string.count(s,"y") )
power_z.append( string.count(s,"z") )
coefficient.append( b.coef )
exponent.append( [ p.expo for p in b.prim ] )
ezfio.set_ao_basis_ao_num(len(res.basis))
ezfio.set_ao_basis_ao_nucl(at)
ezfio.set_ao_basis_ao_prim_num(num_prim)
ezfio.set_ao_basis_ao_power(power_x+power_y+power_z)
prim_num_max = ezfio.get_ao_basis_ao_prim_num_max()
len_res_basis = len(res.basis)
for i in range(len(res.basis)):
coefficient[i] += [ 0. for j in range(len(coefficient[i]),prim_num_max) ]
exponent[i] += [ 0. for j in range(len(exponent[i]),prim_num_max) ]
coefficient = reduce(lambda x, y: x+y, coefficient, [])
exponent = reduce(lambda x, y: x+y, exponent, [])
coef = []
expo = []
for i in range(prim_num_max):
for j in range(i,len(coefficient),prim_num_max):
coef.append ( coefficient[j] )
expo.append ( exponent[j] )
ezfio.set_ao_basis_ao_coef(coef)
ezfio.set_ao_basis_ao_expo(expo)
ezfio.set_ao_basis_ao_basis("Read by resultsFile")
# MO
MoTag = res.determinants_mo_type
ezfio.set_mo_basis_mo_label('Orthonormalized')
MO_type = MoTag
allMOs = res.mo_sets[MO_type]
try:
closed = [ (allMOs[i].eigenvalue,i) for i in res.closed_mos ]
active = [ (allMOs[i].eigenvalue,i) for i in res.active_mos ]
virtual =[ (allMOs[i].eigenvalue,i) for i in res.virtual_mos ]
except:
closed = []
virtual = []
active = [ (allMOs[i].eigenvalue,i) for i in range(len(allMOs)) ]
# closed.sort()
# active.sort()
# virtual.sort()
closed = map( lambda x: x[1], closed)
active = map( lambda x: x[1], active)
virtual = map( lambda x: x[1], virtual)
MOindices = closed + active + virtual
MOs = []
for i in MOindices:
MOs.append(allMOs[i])
mo_tot_num = len(MOs)
while len(MOindices) < mo_tot_num:
MOindices.append(len(MOindices))
MOmap = list(MOindices)
for i in range(len(MOindices)):
MOmap[i] = MOindices.index(i)
energies = []
for i in xrange(mo_tot_num):
energies.append(MOs[i].eigenvalue)
if res.occ_num is not None:
OccNum = []
for i in MOindices:
OccNum.append(res.occ_num[MO_type][i])
while len(OccNum) < mo_tot_num:
OccNum.append(0.)
MoMatrix = []
sym0 = [ i.sym for i in res.mo_sets[MO_type] ]
sym = [ i.sym for i in res.mo_sets[MO_type] ]
for i in xrange(len(sym)):
sym[MOmap[i]] = sym0[i]
MoMatrix = []
for i in xrange(len(MOs)):
m = MOs[i]
for coef in m.vector:
MoMatrix.append(coef)
while len(MoMatrix) < len(MOs[0].vector)**2:
MoMatrix.append(0.)
mo = []
for i in MOindices:
mo.append(res.mo_sets[MoTag][i])
if len(mo) < mo_tot_num:
newmo = orbital()
newmo.eigenvalue = 0.
newmo.vector = [0. for i in range(mo_tot_num)]
newmo.vector[len(mo)] = 1.
while len(mo) < mo_tot_num:
mo.append(newmo)
Energies = [ m.eigenvalue for m in mo ]
ezfio.set_mo_basis_mo_tot_num(mo_tot_num)
ezfio.set_mo_basis_mo_occ(OccNum)
ezfio.set_mo_basis_mo_coef(MoMatrix)
if __name__ == '__main__':
# Check command line
det_threshold = 0.
if len(sys.argv) == 2:
State=0
elif len(sys.argv) == 3:
State=int(sys.argv[2])
else:
print "usage: "+sys.argv[0]+" file.out [state]"
sys.exit(2)
firstArg = sys.argv[1]
file = getFile(firstArg)
print firstArg, 'recognized as', str(file).split('.')[-1].split()[0]
filename = firstArg+".ezfio"
write_ezfioFile(file,filename)

View File

@ -35,9 +35,10 @@ function check_current_dir_is_module()
exit -1 exit -1
fi fi
} }
if [[ -f NEEDED_MODULES ]]
if [[ -f NEEDED_CHILDREN_MODULES ]]
then then
NEEDED_MODULES=$(cat NEEDED_MODULES) NEEDED_MODULES=$(module_handler.py print_genealogy NEEDED_CHILDREN_MODULES)
fi fi
# List of executables in the current directory # List of executables in the current directory

View File

@ -14,7 +14,7 @@ check_current_dir_is_module
# Check if the NEEDED_MODULES file is consistent # Check if the NEEDED_MODULES file is consistent
INCLUDE_DIRS="${NEEDED_MODULES} include" INCLUDE_DIRS="${NEEDED_MODULES} include"
NEEDED_MODULES_OK=$( ${QPACKAGE_ROOT}/scripts/check_dependencies.sh ${NEEDED_MODULES} ) NEEDED_MODULES_OK=$(module_handler.py check_dependencies ${NEEDED_MODULES} )
if [[ $? -ne 0 ]] if [[ $? -ne 0 ]]
then then
error " error "
@ -28,7 +28,7 @@ fi
# Check if README.rst exists # Check if README.rst exists
if [[ ! -f README.rst ]] if [[ ! -f README.rst ]]
then then
${QPACKAGE_ROOT}/scripts/create_rst_templates.sh ${QPACKAGE_ROOT}/scripts/module/create_rst_templates.sh
error " error "
README.rst was not present, so I created a README.rst was not present, so I created a
default one for you. default one for you.
@ -62,7 +62,7 @@ then
fi fi
# Update Makefile.depend # Update Makefile.depend
${QPACKAGE_ROOT}/scripts/create_Makefile_depend.sh ${QPACKAGE_ROOT}/scripts/module/create_Makefile_depend.sh
# Update EZFIO interface # Update EZFIO interface
${QPACKAGE_ROOT}/scripts/ezfio_interface/ei_handler.py ${QPACKAGE_ROOT}/scripts/ezfio_interface/ei_handler.py

View File

@ -52,7 +52,7 @@ ${IRPF90_VERSION}.
IRPF90 version >= ${IRPF90_REQUIRED_VERSION} is required. IRPF90 version >= ${IRPF90_REQUIRED_VERSION} is required.
To upgrade IRPF90, run : To upgrade IRPF90, run :
${QPACKAGE_ROOT}/scripts/upgrade_irpf90.sh ${QPACKAGE_ROOT}/scripts/upgrade/upgrade_irpf90.sh
" "
else else
info "irpf90 version is OK" info "irpf90 version is OK"
@ -75,7 +75,7 @@ then
Current EZFIO version : ${EZFIO_VERSION} Current EZFIO version : ${EZFIO_VERSION}
EZFIO version >= ${EZFIO_REQUIRED_VERSION} is required. EZFIO version >= ${EZFIO_REQUIRED_VERSION} is required.
To upgrade EZFIO, run : To upgrade EZFIO, run :
${QPACKAGE_ROOT}/scripts/upgrade_ezfio.sh ${QPACKAGE_ROOT}/scripts/upgrade/upgrade_ezfio.sh
" "
else else
info "EZFIO version is OK" info "EZFIO version is OK"

View File

@ -83,7 +83,7 @@ def update_needed(data):
"""Read the NEEDED_MODULES file, and replace the data with it. """Read the NEEDED_MODULES file, and replace the data with it.
Create the links to the GitHub pages.""" Create the links to the GitHub pages."""
file = open('NEEDED_MODULES', 'r') file = open('NEEDED_CHILDREN_MODULES', 'r')
modules = file.read() modules = file.read()
file.close() file.close()

View File

@ -12,7 +12,7 @@ fi
cd -- ${QPACKAGE_ROOT} cd -- ${QPACKAGE_ROOT}
mv -- ${QPACKAGE_ROOT}/EZFIO ${QPACKAGE_ROOT}/EZFIO.old mv -- ${QPACKAGE_ROOT}/EZFIO ${QPACKAGE_ROOT}/EZFIO.old
${QPACKAGE_ROOT}/scripts/install_ezfio.sh ${QPACKAGE_ROOT}/scripts/install/install_ezfio.sh
if [[ $? -eq 0 ]] if [[ $? -eq 0 ]]
then then

View File

@ -12,7 +12,7 @@ fi
cd -- ${QPACKAGE_ROOT} cd -- ${QPACKAGE_ROOT}
mv -f -- ${QPACKAGE_ROOT}/irpf90 ${QPACKAGE_ROOT}/irpf90.old mv -f -- ${QPACKAGE_ROOT}/irpf90 ${QPACKAGE_ROOT}/irpf90.old
${QPACKAGE_ROOT}/scripts/install_irpf90.sh ${QPACKAGE_ROOT}/scripts/install/install_irpf90.sh
if [[ $? -eq 0 ]] if [[ $? -eq 0 ]]
then then

View File

@ -17,8 +17,10 @@ export QPACKAGE_ROOT=\$( cd \$(dirname "\${BASH_SOURCE}") ; pwd -P )
export LD_LIBRARY_PATH="\${QPACKAGE_ROOT}"/lib:\${LD_LIBRARY_PATH} export LD_LIBRARY_PATH="\${QPACKAGE_ROOT}"/lib:\${LD_LIBRARY_PATH}
export LIBRARY_PATH="\${QPACKAGE_ROOT}"/lib:\${LIBRARY_PATH} export LIBRARY_PATH="\${QPACKAGE_ROOT}"/lib:\${LIBRARY_PATH}
export C_INCLUDE_PATH="\${QPACKAGE_ROOT}"/include:\${C_INCLUDE_PATH} export C_INCLUDE_PATH="\${QPACKAGE_ROOT}"/include:\${C_INCLUDE_PATH}
export PYTHONPATH=\${PYTHONPATH}:"\${QPACKAGE_ROOT}"/scripts:"\${QPACKAGE_ROOT}"/scripts/ezfio_interface
export PATH=\${PATH}:"\${QPACKAGE_ROOT}"/scripts:"\${QPACKAGE_ROOT}"/scripts/ezfio_interface export PYTHONPATH=\${PYTHONPATH}\$(find "${QPACKAGE_ROOT}"/scripts -type d -printf ":%p")
export PATH=\${PATH}\$(find "${QPACKAGE_ROOT}"/scripts -type d -printf ":%p")
export PATH=\${PATH}:"\${QPACKAGE_ROOT}"/bin export PATH=\${PATH}:"\${QPACKAGE_ROOT}"/bin
export PATH=\${PATH}:"\${QPACKAGE_ROOT}"/ocaml export PATH=\${PATH}:"\${QPACKAGE_ROOT}"/ocaml
source "\${QPACKAGE_ROOT}"/bin/irpman &> /dev/null source "\${QPACKAGE_ROOT}"/bin/irpman &> /dev/null
@ -28,37 +30,29 @@ EOF
source quantum_package.rc source quantum_package.rc
echo "${BLUE}===== Installing IRPF90 ===== ${BLACK}" echo "${BLUE}===== Installing IRPF90 ===== ${BLACK}"
${QPACKAGE_ROOT}/scripts/install_irpf90.sh | tee install_irpf90.log ${QPACKAGE_ROOT}/scripts/install/install_irpf90.sh | tee ${QPACKAGE_ROOT}/install_logs/install_irpf90.log
if [[ ! -d ${QPACKAGE_ROOT}/irpf90 ]] if [[ ! -d ${QPACKAGE_ROOT}/irpf90 ]] || [[ ! -x ${QPACKAGE_ROOT}/bin/irpf90 ]] || [[ ! -x ${QPACKAGE_ROOT}/bin/irpman ]]
then
echo $RED "Error in IRPF90 installation" $BLACK
exit 1
fi
if [[ ! -x ${QPACKAGE_ROOT}/bin/irpf90 ]]
then
echo $RED "Error in IRPF90 installation" $BLACK
exit 1
fi
if [[ ! -x ${QPACKAGE_ROOT}/bin/irpman ]]
then then
echo $RED "Error in IRPF90 installation" $BLACK echo $RED "Error in IRPF90 installation" $BLACK
exit 1 exit 1
fi fi
mkdir -p ${QPACKAGE_ROOT}/install_logs
echo "${BLUE}===== Installing Zlib ===== ${BLACK}" echo "${BLUE}===== Installing Zlib ===== ${BLACK}"
${QPACKAGE_ROOT}/scripts/install_zlib.sh | tee install_zlib.log ${QPACKAGE_ROOT}/scripts/install/install_zlib.sh | tee ${QPACKAGE_ROOT}/install_logs/install_zlib.log
echo "${BLUE}===== Installing Curl ===== ${BLACK}" echo "${BLUE}===== Installing Curl ===== ${BLACK}"
${QPACKAGE_ROOT}/scripts/install_curl.sh | tee install_curl.log ${QPACKAGE_ROOT}/scripts/install/install_curl.sh | tee ${QPACKAGE_ROOT}/install_logs/install_curl.log
echo "${BLUE}===== Installing M4 ===== ${BLACK}" echo "${BLUE}===== Installing M4 ===== ${BLACK}"
${QPACKAGE_ROOT}/scripts/install_m4.sh | tee install_m4.log ${QPACKAGE_ROOT}/scripts/install/install_m4.sh | tee ${QPACKAGE_ROOT}/install_logs/install_m4.log
echo "${BLUE}===== Installing Docopt ===== ${BLACK}"
${QPACKAGE_ROOT}/scripts/install/install_docopt.sh | tee ${QPACKAGE_ROOT}/install_logs/install_docopt.log
echo "${BLUE}===== Installing EMSL Basis set library ===== ${BLACK}" echo "${BLUE}===== Installing EMSL Basis set library ===== ${BLACK}"
${QPACKAGE_ROOT}/scripts/install_emsl.sh | tee install_emsl.log ${QPACKAGE_ROOT}/scripts/install/install_emsl.sh | tee ${QPACKAGE_ROOT}/install_logs/install_emsl.log
if [[ ! -d ${QPACKAGE_ROOT}/EMSL_Basis ]] if [[ ! -d ${QPACKAGE_ROOT}/EMSL_Basis ]]
then then
@ -68,7 +62,7 @@ fi
echo "${BLUE}===== Installing EZFIO ===== ${BLACK}" echo "${BLUE}===== Installing EZFIO ===== ${BLACK}"
${QPACKAGE_ROOT}/scripts/install_ezfio.sh | tee install_ezfio.log ${QPACKAGE_ROOT}/scripts/install/install_ezfio.sh | tee ${QPACKAGE_ROOT}/install_logs/install_ezfio.log
if [[ ! -d ${QPACKAGE_ROOT}/EZFIO ]] if [[ ! -d ${QPACKAGE_ROOT}/EZFIO ]]
then then
echo $RED "Error in EZFIO installation" $BLACK echo $RED "Error in EZFIO installation" $BLACK
@ -78,7 +72,7 @@ fi
echo "${BLUE}===== Installing Ocaml compiler and libraries ===== ${BLACK}" echo "${BLUE}===== Installing Ocaml compiler and libraries ===== ${BLACK}"
rm -f -- ocaml/Qptypes.ml rm -f -- ocaml/Qptypes.ml
${QPACKAGE_ROOT}/scripts/install_ocaml.sh | tee install_ocaml.log ${QPACKAGE_ROOT}/scripts/install/install_ocaml.sh | tee ${QPACKAGE_ROOT}/install_logs/install_ocaml.log
if [[ ! -f ${QPACKAGE_ROOT}/ocaml/Qptypes.ml ]] if [[ ! -f ${QPACKAGE_ROOT}/ocaml/Qptypes.ml ]]
then then
@ -87,7 +81,7 @@ then
fi fi
echo "${BLUE}===== Installing resultsFile Python library ===== ${BLACK}" echo "${BLUE}===== Installing resultsFile Python library ===== ${BLACK}"
${QPACKAGE_ROOT}/scripts/install_resultsFile.sh ${QPACKAGE_ROOT}/scripts/install/install_resultsFile.sh
if [[ ! -d ${QPACKAGE_ROOT}/resultsFile ]] if [[ ! -d ${QPACKAGE_ROOT}/resultsFile ]]
then then
echo $RED "Error in resultsFile installation" $BLACK echo $RED "Error in resultsFile installation" $BLACK
@ -106,8 +100,7 @@ source ${QPACKAGE_ROOT}/quantum_package.rc
" $BLACK " $BLACK
mkdir -p ${QPACKAGE_ROOT}/install_logs
mv ${QPACKAGE_ROOT}/*.log ${QPACKAGE_ROOT}/install_logs/
if [[ $1 == "--robot" ]] ; if [[ $1 == "--robot" ]] ;
then then

View File

@ -1,8 +1 @@
* The atomic orbitals are normalized:
.. math::
\int \left(\chi_i({\bf r}) \right)^2 dr = 1
* The AO coefficients in the EZFIO files are not necessarily normalized and are normalized after reading * The AO coefficients in the EZFIO files are not necessarily normalized and are normalized after reading
* The AO coefficients and exponents are ordered in increasing order of exponents

View File

@ -0,0 +1 @@
Nuclei

View File

@ -1,2 +0,0 @@
Ezfio_files Nuclei Output Utils

View File

@ -17,21 +17,19 @@ The AO coefficients are normalized as:
{\tilde c}_{ki} = \frac{c_{ki}}{ \int \left( (x-X_A)^a (y-Y_A)^b (z-Z_A)^c e^{-\gamma_{ki} |{\bf r} - {\bf R}_A|^2} \right)^2} dr {\tilde c}_{ki} = \frac{c_{ki}}{ \int \left( (x-X_A)^a (y-Y_A)^b (z-Z_A)^c e^{-\gamma_{ki} |{\bf r} - {\bf R}_A|^2} \right)^2} dr
Warning: ``ao_coef`` contains the AO coefficients given in input. These do not
include the normalization constant of the AO. The ``ao_coef_normalized`` includes
this normalization factor.
The AOs are also sorted by increasing exponent to accelerate the calculation of
the two electron integrals.
Assumptions Assumptions
=========== ===========
.. Do not edit this section. It was auto-generated from the .. Do not edit this section. It was auto-generated from the
.. NEEDED_MODULES file. .. NEEDED_MODULES file.
* The atomic orbitals are normalized:
.. math::
\int \left(\chi_i({\bf r}) \right)^2 dr = 1
* The AO coefficients in the EZFIO files are not necessarily normalized and are normalized after reading
* The AO coefficients and exponents are ordered in increasing order of exponents
Needed Modules Needed Modules
============== ==============
@ -39,10 +37,7 @@ Needed Modules
.. Do not edit this section. It was auto-generated from the .. Do not edit this section. It was auto-generated from the
.. NEEDED_MODULES file. .. NEEDED_MODULES file.
* `Ezfio_files <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files>`_
* `Nuclei <http://github.com/LCPQ/quantum_package/tree/master/src/Nuclei>`_ * `Nuclei <http://github.com/LCPQ/quantum_package/tree/master/src/Nuclei>`_
* `Output <http://github.com/LCPQ/quantum_package/tree/master/src/Output>`_
* `Utils <http://github.com/LCPQ/quantum_package/tree/master/src/Utils>`_
Documentation Documentation
============= =============
@ -70,45 +65,41 @@ Documentation
Overlap between atomic basis functions: Overlap between atomic basis functions:
:math:`\int \chi_i(r) \chi_j(r) dr)` :math:`\int \chi_i(r) \chi_j(r) dr)`
`ao_coef <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L21>`_ `ao_coef <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L62>`_
Coefficients, exponents and powers of x,y and z AO Coefficients, read from input. Those should not be used directly, as
the MOs are expressed on the basis of **normalized** AOs.
`ao_coef_transp <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L157>`_ `ao_coef_normalized <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L84>`_
Transposed ao_coef and ao_expo Coefficients including the AO normalization
`ao_coef_unnormalized <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L116>`_ `ao_coef_normalized_ordered <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L107>`_
Coefficients, exponents and powers of x,y and z as in the EZFIO file Sorted primitives to accelerate 4 index MO transformation
ao_coef(i,j) = coefficient of the jth primitive on the ith ao
`ao_coef_normalized_ordered_transp <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L133>`_
Transposed ao_coef_normalized_ordered
`ao_expo <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L41>`_
AO Exponents read from input
`ao_expo_ordered <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L108>`_
Sorted primitives to accelerate 4 index MO transformation
`ao_expo_ordered_transp <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L147>`_
Transposed ao_expo_ordered
`ao_l <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L162>`_
ao_l = l value of the AO: a+b+c in x^a y^b z^c ao_l = l value of the AO: a+b+c in x^a y^b z^c
`ao_expo <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L20>`_ `ao_l_char <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L163>`_
Coefficients, exponents and powers of x,y and z
`ao_expo_transp <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L158>`_
Transposed ao_coef and ao_expo
`ao_expo_unsorted <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L117>`_
Coefficients, exponents and powers of x,y and z as in the EZFIO file
ao_coef(i,j) = coefficient of the jth primitive on the ith ao
ao_l = l value of the AO: a+b+c in x^a y^b z^c ao_l = l value of the AO: a+b+c in x^a y^b z^c
`ao_l <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L118>`_ `ao_l_char_space <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L311>`_
Coefficients, exponents and powers of x,y and z as in the EZFIO file
ao_coef(i,j) = coefficient of the jth primitive on the ith ao
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/AOs/aos.irp.f#L119>`_
Coefficients, exponents and powers of x,y and z as in the EZFIO file
ao_coef(i,j) = coefficient of the jth primitive on the ith ao
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/AOs/aos.irp.f#L309>`_
Undocumented Undocumented
`ao_md5 <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L400>`_ `ao_md5 <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L403>`_
MD5 key characteristic of the AO basis MD5 key characteristic of the AO basis
`ao_nucl <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L207>`_ `ao_nucl <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L209>`_
Index of the nuclei on which the ao is centered Index of the nuclei on which the ao is centered
`ao_num <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L1>`_ `ao_num <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L1>`_
@ -118,35 +109,35 @@ Documentation
Number of atomic orbitals Number of atomic orbitals
`ao_power <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L19>`_ `ao_power <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L19>`_
Coefficients, exponents and powers of x,y and z Powers of x,y and z read from input
`ao_prim_num <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L175>`_ `ao_prim_num <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L177>`_
Number of primitives per atomic orbital Number of primitives per atomic orbital
`ao_prim_num_max <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L197>`_ `ao_prim_num_max <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L199>`_
Undocumented Undocumented
`ao_prim_num_max_align <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L198>`_ `ao_prim_num_max_align <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L200>`_
Undocumented Undocumented
`l_to_charater <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L216>`_ `l_to_charater <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L218>`_
character corresponding to the "L" value of an AO orbital character corresponding to the "L" value of an AO orbital
`n_aos_max <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L229>`_ `n_aos_max <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L231>`_
Number of AOs per atom Number of AOs per atom
`nucl_aos <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L242>`_ `nucl_aos <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L244>`_
List of AOs attached on each atom List of AOs attached on each atom
`nucl_list_shell_aos <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L260>`_ `nucl_list_shell_aos <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L262>`_
Index of the shell type Aos and of the corresponding Aos Index of the shell type Aos and of the corresponding Aos
Per convention, for P,D,F and G AOs, we take the index 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 of the AO with the the corresponding power in the "X" axis
`nucl_n_aos <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L228>`_ `nucl_n_aos <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L230>`_
Number of AOs per atom Number of AOs per atom
`nucl_num_shell_aos <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L261>`_ `nucl_num_shell_aos <http://github.com/LCPQ/quantum_package/tree/master/src/AOs/aos.irp.f#L263>`_
Index of the shell type Aos and of the corresponding Aos Index of the shell type Aos and of the corresponding Aos
Per convention, for P,D,F and G AOs, we take the index 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 of the AO with the the corresponding power in the "X" axis

View File

@ -21,8 +21,8 @@
!$OMP overlap_x,overlap_y, overlap_z, overlap, & !$OMP overlap_x,overlap_y, overlap_z, overlap, &
!$OMP alpha, beta,i,j,c) & !$OMP alpha, beta,i,j,c) &
!$OMP SHARED(nucl_coord,ao_power,ao_prim_num, & !$OMP SHARED(nucl_coord,ao_power,ao_prim_num, &
!$OMP ao_overlap_x,ao_overlap_y,ao_overlap_z,ao_overlap,ao_num,ao_coef_transp,ao_nucl, & !$OMP ao_overlap_x,ao_overlap_y,ao_overlap_z,ao_overlap,ao_num,ao_coef_normalized_ordered_transp,ao_nucl, &
!$OMP ao_expo_transp,dim1) !$OMP ao_expo_ordered_transp,dim1)
do j=1,ao_num do j=1,ao_num
A_center(1) = nucl_coord( ao_nucl(j), 1 ) A_center(1) = nucl_coord( ao_nucl(j), 1 )
A_center(2) = nucl_coord( ao_nucl(j), 2 ) A_center(2) = nucl_coord( ao_nucl(j), 2 )
@ -44,12 +44,12 @@
power_B(2) = ao_power( i, 2 ) power_B(2) = ao_power( i, 2 )
power_B(3) = ao_power( i, 3 ) power_B(3) = ao_power( i, 3 )
do n = 1,ao_prim_num(j) do n = 1,ao_prim_num(j)
alpha = ao_expo_transp(n,j) alpha = ao_expo_ordered_transp(n,j)
!DEC$ VECTOR ALIGNED !DEC$ VECTOR ALIGNED
do l = 1, ao_prim_num(i) do l = 1, ao_prim_num(i)
beta = ao_expo_transp(l,i) beta = ao_expo_ordered_transp(l,i)
call overlap_gaussian_xyz(A_center,B_center,alpha,beta,power_A,power_B,overlap_x,overlap_y,overlap_z,overlap,dim1) call overlap_gaussian_xyz(A_center,B_center,alpha,beta,power_A,power_B,overlap_x,overlap_y,overlap_z,overlap,dim1)
c = ao_coef_transp(n,j) * ao_coef_transp(l,i) c = ao_coef_normalized_ordered_transp(n,j) * ao_coef_normalized_ordered_transp(l,i)
ao_overlap(i,j) += c * overlap ao_overlap(i,j) += c * overlap
ao_overlap_x(i,j) += c * overlap_x ao_overlap_x(i,j) += c * overlap_x
ao_overlap_y(i,j) += c * overlap_y ao_overlap_y(i,j) += c * overlap_y
@ -84,8 +84,8 @@ BEGIN_PROVIDER [ double precision, ao_overlap_abs,(ao_num_align,ao_num) ]
!$OMP overlap_x,overlap_y, overlap_z, overlap, & !$OMP overlap_x,overlap_y, overlap_z, overlap, &
!$OMP alpha, beta,i,j,dx) & !$OMP alpha, beta,i,j,dx) &
!$OMP SHARED(nucl_coord,ao_power,ao_prim_num, & !$OMP SHARED(nucl_coord,ao_power,ao_prim_num, &
!$OMP ao_overlap_abs,ao_num,ao_coef_transp,ao_nucl, & !$OMP ao_overlap_abs,ao_num,ao_coef_normalized_ordered_transp,ao_nucl, &
!$OMP ao_expo_transp,dim1,lower_exp_val) !$OMP ao_expo_ordered_transp,dim1,lower_exp_val)
do j=1,ao_num do j=1,ao_num
A_center(1) = nucl_coord( ao_nucl(j), 1 ) A_center(1) = nucl_coord( ao_nucl(j), 1 )
A_center(2) = nucl_coord( ao_nucl(j), 2 ) A_center(2) = nucl_coord( ao_nucl(j), 2 )
@ -104,14 +104,14 @@ BEGIN_PROVIDER [ double precision, ao_overlap_abs,(ao_num_align,ao_num) ]
power_B(2) = ao_power( i, 2 ) power_B(2) = ao_power( i, 2 )
power_B(3) = ao_power( i, 3 ) power_B(3) = ao_power( i, 3 )
do n = 1,ao_prim_num(j) do n = 1,ao_prim_num(j)
alpha = ao_expo_transp(n,j) alpha = ao_expo_ordered_transp(n,j)
!DEC$ VECTOR ALIGNED !DEC$ VECTOR ALIGNED
do l = 1, ao_prim_num(i) do l = 1, ao_prim_num(i)
beta = ao_expo_transp(l,i) beta = ao_expo_ordered_transp(l,i)
call overlap_x_abs(A_center(1),B_center(1),alpha,beta,power_A(1),power_B(1),overlap_x,lower_exp_val,dx,dim1) call overlap_x_abs(A_center(1),B_center(1),alpha,beta,power_A(1),power_B(1),overlap_x,lower_exp_val,dx,dim1)
call overlap_x_abs(A_center(2),B_center(2),alpha,beta,power_A(2),power_B(2),overlap_y,lower_exp_val,dx,dim1) call overlap_x_abs(A_center(2),B_center(2),alpha,beta,power_A(2),power_B(2),overlap_y,lower_exp_val,dx,dim1)
call overlap_x_abs(A_center(3),B_center(3),alpha,beta,power_A(3),power_B(3),overlap_z,lower_exp_val,dx,dim1) call overlap_x_abs(A_center(3),B_center(3),alpha,beta,power_A(3),power_B(3),overlap_z,lower_exp_val,dx,dim1)
ao_overlap_abs(i,j) += abs(ao_coef_transp(n,j) * ao_coef_transp(l,i)) * overlap_x * overlap_y * overlap_z ao_overlap_abs(i,j) += abs(ao_coef_normalized_ordered_transp(n,j) * ao_coef_normalized_ordered_transp(l,i)) * overlap_x * overlap_y * overlap_z
enddo enddo
enddo enddo
enddo enddo

View File

@ -17,20 +17,15 @@
END_PROVIDER END_PROVIDER
BEGIN_PROVIDER [ integer, ao_power, (ao_num_align,3) ] BEGIN_PROVIDER [ integer, ao_power, (ao_num_align,3) ]
&BEGIN_PROVIDER [ double precision, ao_expo, (ao_num_align,ao_prim_num_max) ]
&BEGIN_PROVIDER [ double precision, ao_coef, (ao_num_align,ao_prim_num_max) ]
implicit none implicit none
BEGIN_DOC BEGIN_DOC
! Coefficients, exponents and powers of x,y and z ! Powers of x,y and z read from input
END_DOC END_DOC
PROVIDE ezfio_filename PROVIDE ezfio_filename
double precision, allocatable :: buffer(:,:)
allocate ( buffer(ao_num,ao_prim_num_max) )
integer :: ibuffer(ao_num,3)
integer :: i,j,k integer :: i,j,k
character*(128) :: give_ao_character_space integer, allocatable :: ibuffer(:,:)
allocate ( ibuffer(ao_num,3) )
ibuffer = 0 ibuffer = 0
call ezfio_get_ao_basis_ao_power(ibuffer) call ezfio_get_ao_basis_ao_power(ibuffer)
ao_power = 0 ao_power = 0
@ -39,6 +34,20 @@ END_PROVIDER
ao_power(i,j) = ibuffer(i,j) ao_power(i,j) = ibuffer(i,j)
enddo enddo
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 ao_expo = 0.d0
buffer = 0.d0 buffer = 0.d0
call ezfio_get_ao_basis_ao_expo(buffer) call ezfio_get_ao_basis_ao_expo(buffer)
@ -47,7 +56,20 @@ END_PROVIDER
ao_expo(i,j) = buffer(i,j) ao_expo(i,j) = buffer(i,j)
enddo enddo
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 ao_coef = 0.d0
buffer = 0.d0 buffer = 0.d0
call ezfio_get_ao_basis_ao_coef(buffer) call ezfio_get_ao_basis_ao_coef(buffer)
@ -56,13 +78,17 @@ END_PROVIDER
ao_coef(i,j) = buffer(i,j) ao_coef(i,j) = buffer(i,j)
enddo enddo
enddo enddo
deallocate(buffer) deallocate(buffer)
END_PROVIDER
! Normalization of the AO coefficients BEGIN_PROVIDER [ double precision, ao_coef_normalized, (ao_num_align,ao_prim_num_max) ]
! ------------------------------------ implicit none
BEGIN_DOC
! Coefficients including the AO normalization
END_DOC
double precision :: norm, norm2,overlap_x,overlap_y,overlap_z,C_A(3) double precision :: norm, norm2,overlap_x,overlap_y,overlap_z,C_A(3)
integer :: l, powA(3), nz integer :: l, powA(3), nz
integer :: i,j
nz=100 nz=100
C_A(1) = 0.d0 C_A(1) = 0.d0
C_A(2) = 0.d0 C_A(2) = 0.d0
@ -73,80 +99,73 @@ END_PROVIDER
powA(3) = ao_power(i,3) powA(3) = ao_power(i,3)
do j=1,ao_prim_num(i) do j=1,ao_prim_num(i)
call overlap_gaussian_xyz(C_A,C_A,ao_expo(i,j),ao_expo(i,j),powA,powA,overlap_x,overlap_y,overlap_z,norm,nz) call overlap_gaussian_xyz(C_A,C_A,ao_expo(i,j),ao_expo(i,j),powA,powA,overlap_x,overlap_y,overlap_z,norm,nz)
ao_coef(i,j) = ao_coef(i,j)/sqrt(norm) ao_coef_normalized(i,j) = ao_coef(i,j)/sqrt(norm)
enddo enddo
enddo enddo
END_PROVIDER
BEGIN_PROVIDER [ double precision, ao_coef_normalized_ordered, (ao_num_align,ao_prim_num_max) ]
&BEGIN_PROVIDER [ double precision, ao_expo_ordered, (ao_num_align,ao_prim_num_max) ]
implicit none
BEGIN_DOC
! Sorted primitives to accelerate 4 index MO transformation
END_DOC
! Sorting of the exponents for efficient integral calculations
integer :: iorder(ao_prim_num_max) integer :: iorder(ao_prim_num_max)
double precision :: d(ao_prim_num_max,2) double precision :: d(ao_prim_num_max,2)
integer :: i,j
do i=1,ao_num do i=1,ao_num
do j=1,ao_prim_num(i) do j=1,ao_prim_num(i)
iorder(j) = j iorder(j) = j
d(j,1) = ao_expo(i,j) d(j,1) = ao_expo(i,j)
d(j,2) = ao_coef(i,j) d(j,2) = ao_coef_normalized(i,j)
enddo enddo
call dsort(d(1,1),iorder,ao_prim_num(i)) call dsort(d(1,1),iorder,ao_prim_num(i))
call dset_order(d(1,2),iorder,ao_prim_num(i)) call dset_order(d(1,2),iorder,ao_prim_num(i))
do j=1,ao_prim_num(i) do j=1,ao_prim_num(i)
ao_expo(i,j) = d(j,1) ao_expo_ordered(i,j) = d(j,1)
ao_coef(i,j) = d(j,2) ao_coef_normalized_ordered(i,j) = d(j,2)
enddo enddo
enddo enddo
END_PROVIDER END_PROVIDER
BEGIN_PROVIDER [ double precision, ao_coef_transp, (ao_prim_num_max_align,ao_num) ] BEGIN_PROVIDER [ double precision, ao_coef_normalized_ordered_transp, (ao_prim_num_max_align,ao_num) ]
&BEGIN_PROVIDER [ double precision, ao_expo_transp, (ao_prim_num_max_align,ao_num) ]
implicit none implicit none
BEGIN_DOC BEGIN_DOC
! Transposed ao_coef and ao_expo ! Transposed ao_coef_normalized_ordered
END_DOC END_DOC
integer :: i,j integer :: i,j
do j=1, ao_num do j=1, ao_num
do i=1, ao_prim_num_max do i=1, ao_prim_num_max
ao_coef_transp(i,j) = ao_coef(j,i) ao_coef_normalized_ordered_transp(i,j) = ao_coef_normalized_ordered(j,i)
ao_expo_transp(i,j) = ao_expo(j,i)
enddo enddo
enddo enddo
END_PROVIDER END_PROVIDER
BEGIN_PROVIDER [ double precision, ao_coef_unnormalized, (ao_num_align,ao_prim_num_max) ] BEGIN_PROVIDER [ double precision, ao_expo_ordered_transp, (ao_prim_num_max_align,ao_num) ]
&BEGIN_PROVIDER [ double precision, ao_expo_unsorted, (ao_num_align,ao_prim_num_max) ] implicit none
&BEGIN_PROVIDER [ integer, ao_l, (ao_num) ] BEGIN_DOC
! Transposed ao_expo_ordered
END_DOC
integer :: i,j
do j=1, ao_num
do i=1, ao_prim_num_max
ao_expo_ordered_transp(i,j) = ao_expo_ordered(j,i)
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER [ integer, ao_l, (ao_num) ]
&BEGIN_PROVIDER [ character*(128), ao_l_char, (ao_num) ] &BEGIN_PROVIDER [ character*(128), ao_l_char, (ao_num) ]
implicit none implicit none
BEGIN_DOC BEGIN_DOC
! Coefficients, exponents and powers of x,y and z as in the EZFIO file
! ao_coef(i,j) = coefficient of the jth primitive on the ith ao
! ao_l = l value of the AO: a+b+c in x^a y^b z^c ! ao_l = l value of the AO: a+b+c in x^a y^b z^c
END_DOC END_DOC
PROVIDE ezfio_filename integer :: i
double precision, allocatable :: buffer(:,:)
allocate ( buffer(ao_num,ao_prim_num_max) )
integer :: i,j,k
character*(128) :: give_ao_character_space
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_unsorted(i,j) = buffer(i,j)
enddo
enddo
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_unnormalized(i,j) = buffer(i,j)
enddo
enddo
deallocate(buffer)
do i=1,ao_num do i=1,ao_num
ao_l(i) = ao_power(i,1) + ao_power(i,2) + ao_power(i,3) ao_l(i) = ao_power(i,1) + ao_power(i,2) + ao_power(i,3)
ao_l_char(i) = l_to_charater(ao_l(i)) ao_l_char(i) = l_to_charater(ao_l(i))
@ -154,23 +173,6 @@ END_PROVIDER
END_PROVIDER END_PROVIDER
BEGIN_PROVIDER [ double precision, ao_coef_transp, (ao_prim_num_max_align,ao_num) ]
&BEGIN_PROVIDER [ double precision, ao_expo_transp, (ao_prim_num_max_align,ao_num) ]
implicit none
BEGIN_DOC
! Transposed ao_coef and ao_expo
END_DOC
integer :: i,j
do j=1, ao_num
do i=1, ao_prim_num_max
ao_coef_transp(i,j) = ao_coef(j,i)
ao_expo_transp(i,j) = ao_expo(j,i)
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER [ integer, ao_prim_num, (ao_num_align) ] BEGIN_PROVIDER [ integer, ao_prim_num, (ao_num_align) ]
implicit none implicit none
@ -397,6 +399,7 @@ END_PROVIDER
ao_l_char_space(i) = give_ao_character_space ao_l_char_space(i) = give_ao_character_space
enddo enddo
END_PROVIDER END_PROVIDER
BEGIN_PROVIDER [ character*(32), ao_md5 ] BEGIN_PROVIDER [ character*(32), ao_md5 ]
BEGIN_DOC BEGIN_DOC
! MD5 key characteristic of the AO basis ! MD5 key characteristic of the AO basis

View File

@ -0,0 +1 @@
MonoInts Bitmask

View File

@ -1 +0,0 @@
AOs Bitmask Electrons Ezfio_files MOs Nuclei Output Utils MonoInts

View File

@ -16,15 +16,8 @@ Needed Modules
.. Do not edit this section. It was auto-generated from the .. Do not edit this section. It was auto-generated from the
.. NEEDED_MODULES file. .. NEEDED_MODULES file.
* `AOs <http://github.com/LCPQ/quantum_package/tree/master/src/AOs>`_
* `Bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask>`_
* `Electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Electrons>`_
* `Ezfio_files <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files>`_
* `MOs <http://github.com/LCPQ/quantum_package/tree/master/src/MOs>`_
* `Nuclei <http://github.com/LCPQ/quantum_package/tree/master/src/Nuclei>`_
* `Output <http://github.com/LCPQ/quantum_package/tree/master/src/Output>`_
* `Utils <http://github.com/LCPQ/quantum_package/tree/master/src/Utils>`_
* `MonoInts <http://github.com/LCPQ/quantum_package/tree/master/src/MonoInts>`_ * `MonoInts <http://github.com/LCPQ/quantum_package/tree/master/src/MonoInts>`_
* `Bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask>`_
Documentation Documentation
============= =============

View File

@ -42,24 +42,24 @@ double precision function ao_bielec_integral(i,j,k,l)
do p = 1, ao_prim_num(i) do p = 1, ao_prim_num(i)
double precision :: coef1 double precision :: coef1
coef1 = ao_coef_transp(p,i) coef1 = ao_coef_normalized_ordered_transp(p,i)
do q = 1, ao_prim_num(j) do q = 1, ao_prim_num(j)
double precision :: coef2 double precision :: coef2
coef2 = coef1*ao_coef_transp(q,j) coef2 = coef1*ao_coef_normalized_ordered_transp(q,j)
double precision :: p_inv,q_inv double precision :: p_inv,q_inv
call give_explicit_poly_and_gaussian(P_new,P_center,pp,fact_p,iorder_p,& call give_explicit_poly_and_gaussian(P_new,P_center,pp,fact_p,iorder_p,&
ao_expo_transp(p,i),ao_expo_transp(q,j), & ao_expo_ordered_transp(p,i),ao_expo_ordered_transp(q,j), &
I_power,J_power,I_center,J_center,dim1) I_power,J_power,I_center,J_center,dim1)
p_inv = 1.d0/pp p_inv = 1.d0/pp
do r = 1, ao_prim_num(k) do r = 1, ao_prim_num(k)
double precision :: coef3 double precision :: coef3
coef3 = coef2*ao_coef_transp(r,k) coef3 = coef2*ao_coef_normalized_ordered_transp(r,k)
do s = 1, ao_prim_num(l) do s = 1, ao_prim_num(l)
double precision :: coef4 double precision :: coef4
coef4 = coef3*ao_coef_transp(s,l) coef4 = coef3*ao_coef_normalized_ordered_transp(s,l)
double precision :: general_primitive_integral double precision :: general_primitive_integral
call give_explicit_poly_and_gaussian(Q_new,Q_center,qq,fact_q,iorder_q,& call give_explicit_poly_and_gaussian(Q_new,Q_center,qq,fact_q,iorder_q,&
ao_expo_transp(r,k),ao_expo_transp(s,l), & ao_expo_ordered_transp(r,k),ao_expo_ordered_transp(s,l), &
K_power,L_power,K_center,L_center,dim1) K_power,L_power,K_center,L_center,dim1)
q_inv = 1.d0/qq q_inv = 1.d0/qq
integral = general_primitive_integral(dim1, & integral = general_primitive_integral(dim1, &
@ -82,15 +82,15 @@ double precision function ao_bielec_integral(i,j,k,l)
double precision :: ERI double precision :: ERI
do p = 1, ao_prim_num(i) do p = 1, ao_prim_num(i)
coef1 = ao_coef_transp(p,i) coef1 = ao_coef_normalized_ordered_transp(p,i)
do q = 1, ao_prim_num(j) do q = 1, ao_prim_num(j)
coef2 = coef1*ao_coef_transp(q,j) coef2 = coef1*ao_coef_normalized_ordered_transp(q,j)
do r = 1, ao_prim_num(k) do r = 1, ao_prim_num(k)
coef3 = coef2*ao_coef_transp(r,k) coef3 = coef2*ao_coef_normalized_ordered_transp(r,k)
do s = 1, ao_prim_num(l) do s = 1, ao_prim_num(l)
coef4 = coef3*ao_coef_transp(s,l) coef4 = coef3*ao_coef_normalized_ordered_transp(s,l)
integral = ERI( & integral = ERI( &
ao_expo_transp(p,i),ao_expo_transp(q,j),ao_expo_transp(r,k),ao_expo_transp(s,l),& ao_expo_ordered_transp(p,i),ao_expo_ordered_transp(q,j),ao_expo_ordered_transp(r,k),ao_expo_ordered_transp(s,l),&
I_power(1),J_power(1),K_power(1),L_power(1), & I_power(1),J_power(1),K_power(1),L_power(1), &
I_power(2),J_power(2),K_power(2),L_power(2), & I_power(2),J_power(2),K_power(2),L_power(2), &
I_power(3),J_power(3),K_power(3),L_power(3)) I_power(3),J_power(3),K_power(3),L_power(3))
@ -149,12 +149,12 @@ double precision function ao_bielec_integral_schwartz_accel(i,j,k,l)
schwartz_kl(0,0) = 0.d0 schwartz_kl(0,0) = 0.d0
do r = 1, ao_prim_num(k) do r = 1, ao_prim_num(k)
coef1 = ao_coef_transp(r,k)*ao_coef_transp(r,k) coef1 = ao_coef_normalized_ordered_transp(r,k)*ao_coef_normalized_ordered_transp(r,k)
schwartz_kl(0,r) = 0.d0 schwartz_kl(0,r) = 0.d0
do s = 1, ao_prim_num(l) do s = 1, ao_prim_num(l)
coef2 = coef1 * ao_coef_transp(s,l) * ao_coef_transp(s,l) coef2 = coef1 * ao_coef_normalized_ordered_transp(s,l) * ao_coef_normalized_ordered_transp(s,l)
call give_explicit_poly_and_gaussian(Q_new,Q_center,qq,fact_q,iorder_q,& call give_explicit_poly_and_gaussian(Q_new,Q_center,qq,fact_q,iorder_q,&
ao_expo_transp(r,k),ao_expo_transp(s,l), & ao_expo_ordered_transp(r,k),ao_expo_ordered_transp(s,l), &
K_power,L_power,K_center,L_center,dim1) K_power,L_power,K_center,L_center,dim1)
q_inv = 1.d0/qq q_inv = 1.d0/qq
schwartz_kl(s,r) = general_primitive_integral(dim1, & schwartz_kl(s,r) = general_primitive_integral(dim1, &
@ -168,13 +168,13 @@ double precision function ao_bielec_integral_schwartz_accel(i,j,k,l)
do p = 1, ao_prim_num(i) do p = 1, ao_prim_num(i)
double precision :: coef1 double precision :: coef1
coef1 = ao_coef_transp(p,i) coef1 = ao_coef_normalized_ordered_transp(p,i)
do q = 1, ao_prim_num(j) do q = 1, ao_prim_num(j)
double precision :: coef2 double precision :: coef2
coef2 = coef1*ao_coef_transp(q,j) coef2 = coef1*ao_coef_normalized_ordered_transp(q,j)
double precision :: p_inv,q_inv double precision :: p_inv,q_inv
call give_explicit_poly_and_gaussian(P_new,P_center,pp,fact_p,iorder_p,& call give_explicit_poly_and_gaussian(P_new,P_center,pp,fact_p,iorder_p,&
ao_expo_transp(p,i),ao_expo_transp(q,j), & ao_expo_ordered_transp(p,i),ao_expo_ordered_transp(q,j), &
I_power,J_power,I_center,J_center,dim1) I_power,J_power,I_center,J_center,dim1)
p_inv = 1.d0/pp p_inv = 1.d0/pp
schwartz_ij = general_primitive_integral(dim1, & schwartz_ij = general_primitive_integral(dim1, &
@ -189,16 +189,16 @@ double precision function ao_bielec_integral_schwartz_accel(i,j,k,l)
cycle cycle
endif endif
double precision :: coef3 double precision :: coef3
coef3 = coef2*ao_coef_transp(r,k) coef3 = coef2*ao_coef_normalized_ordered_transp(r,k)
do s = 1, ao_prim_num(l) do s = 1, ao_prim_num(l)
double precision :: coef4 double precision :: coef4
if (schwartz_kl(s,r)*schwartz_ij < thresh) then if (schwartz_kl(s,r)*schwartz_ij < thresh) then
cycle cycle
endif endif
coef4 = coef3*ao_coef_transp(s,l) coef4 = coef3*ao_coef_normalized_ordered_transp(s,l)
double precision :: general_primitive_integral double precision :: general_primitive_integral
call give_explicit_poly_and_gaussian(Q_new,Q_center,qq,fact_q,iorder_q,& call give_explicit_poly_and_gaussian(Q_new,Q_center,qq,fact_q,iorder_q,&
ao_expo_transp(r,k),ao_expo_transp(s,l), & ao_expo_ordered_transp(r,k),ao_expo_ordered_transp(s,l), &
K_power,L_power,K_center,L_center,dim1) K_power,L_power,K_center,L_center,dim1)
q_inv = 1.d0/qq q_inv = 1.d0/qq
integral = general_primitive_integral(dim1, & integral = general_primitive_integral(dim1, &
@ -222,12 +222,12 @@ double precision function ao_bielec_integral_schwartz_accel(i,j,k,l)
schwartz_kl(0,0) = 0.d0 schwartz_kl(0,0) = 0.d0
do r = 1, ao_prim_num(k) do r = 1, ao_prim_num(k)
coef1 = ao_coef_transp(r,k)*ao_coef_transp(r,k) coef1 = ao_coef_normalized_ordered_transp(r,k)*ao_coef_normalized_ordered_transp(r,k)
schwartz_kl(0,r) = 0.d0 schwartz_kl(0,r) = 0.d0
do s = 1, ao_prim_num(l) do s = 1, ao_prim_num(l)
coef2 = coef1*ao_coef_transp(s,l)*ao_coef_transp(s,l) coef2 = coef1*ao_coef_normalized_ordered_transp(s,l)*ao_coef_normalized_ordered_transp(s,l)
schwartz_kl(s,r) = ERI( & schwartz_kl(s,r) = ERI( &
ao_expo_transp(r,k),ao_expo_transp(s,l),ao_expo_transp(r,k),ao_expo_transp(s,l),& ao_expo_ordered_transp(r,k),ao_expo_ordered_transp(s,l),ao_expo_ordered_transp(r,k),ao_expo_ordered_transp(s,l),&
K_power(1),L_power(1),K_power(1),L_power(1), & K_power(1),L_power(1),K_power(1),L_power(1), &
K_power(2),L_power(2),K_power(2),L_power(2), & K_power(2),L_power(2),K_power(2),L_power(2), &
K_power(3),L_power(3),K_power(3),L_power(3)) * & K_power(3),L_power(3),K_power(3),L_power(3)) * &
@ -238,11 +238,11 @@ double precision function ao_bielec_integral_schwartz_accel(i,j,k,l)
enddo enddo
do p = 1, ao_prim_num(i) do p = 1, ao_prim_num(i)
coef1 = ao_coef_transp(p,i) coef1 = ao_coef_normalized_ordered_transp(p,i)
do q = 1, ao_prim_num(j) do q = 1, ao_prim_num(j)
coef2 = coef1*ao_coef_transp(q,j) coef2 = coef1*ao_coef_normalized_ordered_transp(q,j)
schwartz_ij = ERI( & schwartz_ij = ERI( &
ao_expo_transp(p,i),ao_expo_transp(q,j),ao_expo_transp(p,i),ao_expo_transp(q,j),& ao_expo_ordered_transp(p,i),ao_expo_ordered_transp(q,j),ao_expo_ordered_transp(p,i),ao_expo_ordered_transp(q,j),&
I_power(1),J_power(1),I_power(1),J_power(1), & I_power(1),J_power(1),I_power(1),J_power(1), &
I_power(2),J_power(2),I_power(2),J_power(2), & I_power(2),J_power(2),I_power(2),J_power(2), &
I_power(3),J_power(3),I_power(3),J_power(3))*coef2*coef2 I_power(3),J_power(3),I_power(3),J_power(3))*coef2*coef2
@ -253,14 +253,14 @@ double precision function ao_bielec_integral_schwartz_accel(i,j,k,l)
if (schwartz_kl(0,r)*schwartz_ij < thresh) then if (schwartz_kl(0,r)*schwartz_ij < thresh) then
cycle cycle
endif endif
coef3 = coef2*ao_coef_transp(r,k) coef3 = coef2*ao_coef_normalized_ordered_transp(r,k)
do s = 1, ao_prim_num(l) do s = 1, ao_prim_num(l)
if (schwartz_kl(s,r)*schwartz_ij < thresh) then if (schwartz_kl(s,r)*schwartz_ij < thresh) then
cycle cycle
endif endif
coef4 = coef3*ao_coef_transp(s,l) coef4 = coef3*ao_coef_normalized_ordered_transp(s,l)
integral = ERI( & integral = ERI( &
ao_expo_transp(p,i),ao_expo_transp(q,j),ao_expo_transp(r,k),ao_expo_transp(s,l),& ao_expo_ordered_transp(p,i),ao_expo_ordered_transp(q,j),ao_expo_ordered_transp(r,k),ao_expo_ordered_transp(s,l),&
I_power(1),J_power(1),K_power(1),L_power(1), & I_power(1),J_power(1),K_power(1),L_power(1), &
I_power(2),J_power(2),K_power(2),L_power(2), & I_power(2),J_power(2),K_power(2),L_power(2), &
I_power(3),J_power(3),K_power(3),L_power(3)) I_power(3),J_power(3),K_power(3),L_power(3))

View File

@ -0,0 +1 @@
MOs

View File

@ -1 +0,0 @@
AOs Electrons Ezfio_files MOs Nuclei Output Utils

View File

@ -40,13 +40,7 @@ Needed Modules
.. Do not edit this section. It was auto-generated from the .. Do not edit this section. It was auto-generated from the
.. NEEDED_MODULES file. .. NEEDED_MODULES file.
* `AOs <http://github.com/LCPQ/quantum_package/tree/master/src/AOs>`_
* `Electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Electrons>`_
* `Ezfio_files <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files>`_
* `MOs <http://github.com/LCPQ/quantum_package/tree/master/src/MOs>`_ * `MOs <http://github.com/LCPQ/quantum_package/tree/master/src/MOs>`_
* `Nuclei <http://github.com/LCPQ/quantum_package/tree/master/src/Nuclei>`_
* `Output <http://github.com/LCPQ/quantum_package/tree/master/src/Output>`_
* `Utils <http://github.com/LCPQ/quantum_package/tree/master/src/Utils>`_
Documentation Documentation
============= =============

View File

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

View File

@ -1,2 +0,0 @@
AOs Bielec_integrals Bitmask Dets Electrons Ezfio_files Generators_CAS Hartree_Fock MOGuess MonoInts MOs Nuclei Output Perturbation Properties Selectors_full Utils

View File

@ -24,21 +24,7 @@ Needed Modules
.. Do not edit this section. It was auto-generated from the .. Do not edit this section. It was auto-generated from the
.. NEEDED_MODULES file. .. NEEDED_MODULES file.
* `AOs <http://github.com/LCPQ/quantum_package/tree/master/src/AOs>`_
* `Bielec_integrals <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals>`_
* `Bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask>`_
* `Dets <http://github.com/LCPQ/quantum_package/tree/master/src/Dets>`_
* `Electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Electrons>`_
* `Ezfio_files <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files>`_
* `Generators_CAS <http://github.com/LCPQ/quantum_package/tree/master/src/Generators_CAS>`_
* `Hartree_Fock <http://github.com/LCPQ/quantum_package/tree/master/src/Hartree_Fock>`_
* `MOGuess <http://github.com/LCPQ/quantum_package/tree/master/src/MOGuess>`_
* `MonoInts <http://github.com/LCPQ/quantum_package/tree/master/src/MonoInts>`_
* `MOs <http://github.com/LCPQ/quantum_package/tree/master/src/MOs>`_
* `Nuclei <http://github.com/LCPQ/quantum_package/tree/master/src/Nuclei>`_
* `Output <http://github.com/LCPQ/quantum_package/tree/master/src/Output>`_
* `Perturbation <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation>`_ * `Perturbation <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation>`_
* `Properties <http://github.com/LCPQ/quantum_package/tree/master/src/Properties>`_
* `Selectors_full <http://github.com/LCPQ/quantum_package/tree/master/src/Selectors_full>`_ * `Selectors_full <http://github.com/LCPQ/quantum_package/tree/master/src/Selectors_full>`_
* `Utils <http://github.com/LCPQ/quantum_package/tree/master/src/Utils>`_ * `Generators_CAS <http://github.com/LCPQ/quantum_package/tree/master/src/Generators_CAS>`_

View File

@ -0,0 +1 @@
Selectors_full SingleRefMethod

View File

@ -1,3 +0,0 @@
AOs Bielec_integrals Bitmask Dets Electrons Ezfio_files Hartree_Fock MOGuess MonoInts MOs Nuclei Output Selectors_full SingleRefMethod Utils

View File

@ -15,21 +15,8 @@ Needed Modules
.. Do not edit this section. It was auto-generated from the .. Do not edit this section. It was auto-generated from the
.. NEEDED_MODULES file. .. NEEDED_MODULES file.
* `AOs <http://github.com/LCPQ/quantum_package/tree/master/src/AOs>`_
* `Bielec_integrals <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals>`_
* `Bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask>`_
* `Dets <http://github.com/LCPQ/quantum_package/tree/master/src/Dets>`_
* `Electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Electrons>`_
* `Ezfio_files <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files>`_
* `Hartree_Fock <http://github.com/LCPQ/quantum_package/tree/master/src/Hartree_Fock>`_
* `MOGuess <http://github.com/LCPQ/quantum_package/tree/master/src/MOGuess>`_
* `MonoInts <http://github.com/LCPQ/quantum_package/tree/master/src/MonoInts>`_
* `MOs <http://github.com/LCPQ/quantum_package/tree/master/src/MOs>`_
* `Nuclei <http://github.com/LCPQ/quantum_package/tree/master/src/Nuclei>`_
* `Output <http://github.com/LCPQ/quantum_package/tree/master/src/Output>`_
* `Selectors_full <http://github.com/LCPQ/quantum_package/tree/master/src/Selectors_full>`_ * `Selectors_full <http://github.com/LCPQ/quantum_package/tree/master/src/Selectors_full>`_
* `SingleRefMethod <http://github.com/LCPQ/quantum_package/tree/master/src/SingleRefMethod>`_ * `SingleRefMethod <http://github.com/LCPQ/quantum_package/tree/master/src/SingleRefMethod>`_
* `Utils <http://github.com/LCPQ/quantum_package/tree/master/src/Utils>`_
Documentation Documentation
============= =============

View File

@ -0,0 +1 @@
CID_selected

View File

@ -1,2 +0,0 @@
AOs Bielec_integrals Bitmask CISD CISD_selected Dets Electrons Ezfio_files Hartree_Fock MOGuess MonoInts MOs Nuclei Output Perturbation Properties Selectors_full SingleRefMethod Utils

View File

@ -19,23 +19,5 @@ Needed Modules
.. Do not edit this section. It was auto-generated from the .. Do not edit this section. It was auto-generated from the
.. NEEDED_MODULES file. .. NEEDED_MODULES file.
* `AOs <http://github.com/LCPQ/quantum_package/tree/master/src/AOs>`_ * `CID_selected <http://github.com/LCPQ/quantum_package/tree/master/src/CID_selected>`_
* `Bielec_integrals <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals>`_
* `Bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask>`_
* `CISD <http://github.com/LCPQ/quantum_package/tree/master/src/CISD>`_
* `CISD_selected <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected>`_
* `Dets <http://github.com/LCPQ/quantum_package/tree/master/src/Dets>`_
* `Electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Electrons>`_
* `Ezfio_files <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files>`_
* `Hartree_Fock <http://github.com/LCPQ/quantum_package/tree/master/src/Hartree_Fock>`_
* `MOGuess <http://github.com/LCPQ/quantum_package/tree/master/src/MOGuess>`_
* `MonoInts <http://github.com/LCPQ/quantum_package/tree/master/src/MonoInts>`_
* `MOs <http://github.com/LCPQ/quantum_package/tree/master/src/MOs>`_
* `Nuclei <http://github.com/LCPQ/quantum_package/tree/master/src/Nuclei>`_
* `Output <http://github.com/LCPQ/quantum_package/tree/master/src/Output>`_
* `Perturbation <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation>`_
* `Properties <http://github.com/LCPQ/quantum_package/tree/master/src/Properties>`_
* `Selectors_full <http://github.com/LCPQ/quantum_package/tree/master/src/Selectors_full>`_
* `SingleRefMethod <http://github.com/LCPQ/quantum_package/tree/master/src/SingleRefMethod>`_
* `Utils <http://github.com/LCPQ/quantum_package/tree/master/src/Utils>`_

View File

@ -0,0 +1 @@
Perturbation CID

View File

@ -1,2 +0,0 @@
AOs Bielec_integrals Bitmask CISD Dets Electrons Ezfio_files Hartree_Fock MOGuess MonoInts MOs Nuclei Output Perturbation Properties Selectors_full SingleRefMethod Utils

View File

@ -22,22 +22,6 @@ Needed Modules
.. Do not edit this section. It was auto-generated from the .. Do not edit this section. It was auto-generated from the
.. NEEDED_MODULES file. .. NEEDED_MODULES file.
* `AOs <http://github.com/LCPQ/quantum_package/tree/master/src/AOs>`_
* `Bielec_integrals <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals>`_
* `Bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask>`_
* `CISD <http://github.com/LCPQ/quantum_package/tree/master/src/CISD>`_
* `Dets <http://github.com/LCPQ/quantum_package/tree/master/src/Dets>`_
* `Electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Electrons>`_
* `Ezfio_files <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files>`_
* `Hartree_Fock <http://github.com/LCPQ/quantum_package/tree/master/src/Hartree_Fock>`_
* `MOGuess <http://github.com/LCPQ/quantum_package/tree/master/src/MOGuess>`_
* `MonoInts <http://github.com/LCPQ/quantum_package/tree/master/src/MonoInts>`_
* `MOs <http://github.com/LCPQ/quantum_package/tree/master/src/MOs>`_
* `Nuclei <http://github.com/LCPQ/quantum_package/tree/master/src/Nuclei>`_
* `Output <http://github.com/LCPQ/quantum_package/tree/master/src/Output>`_
* `Perturbation <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation>`_ * `Perturbation <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation>`_
* `Properties <http://github.com/LCPQ/quantum_package/tree/master/src/Properties>`_ * `CID <http://github.com/LCPQ/quantum_package/tree/master/src/CID>`_
* `Selectors_full <http://github.com/LCPQ/quantum_package/tree/master/src/Selectors_full>`_
* `SingleRefMethod <http://github.com/LCPQ/quantum_package/tree/master/src/SingleRefMethod>`_
* `Utils <http://github.com/LCPQ/quantum_package/tree/master/src/Utils>`_

View File

@ -0,0 +1 @@
Selectors_full SingleRefMethod

View File

@ -1,2 +0,0 @@
AOs Bielec_integrals Bitmask Dets Electrons Ezfio_files Hartree_Fock MOGuess MonoInts MOs Nuclei Output Selectors_full SingleRefMethod Utils

View File

@ -31,19 +31,6 @@ Needed Modules
.. Do not edit this section. It was auto-generated from the .. Do not edit this section. It was auto-generated from the
.. NEEDED_MODULES file. .. NEEDED_MODULES file.
* `AOs <http://github.com/LCPQ/quantum_package/tree/master/src/AOs>`_
* `Bielec_integrals <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals>`_
* `Bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask>`_
* `Dets <http://github.com/LCPQ/quantum_package/tree/master/src/Dets>`_
* `Electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Electrons>`_
* `Ezfio_files <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files>`_
* `Hartree_Fock <http://github.com/LCPQ/quantum_package/tree/master/src/Hartree_Fock>`_
* `MOGuess <http://github.com/LCPQ/quantum_package/tree/master/src/MOGuess>`_
* `MonoInts <http://github.com/LCPQ/quantum_package/tree/master/src/MonoInts>`_
* `MOs <http://github.com/LCPQ/quantum_package/tree/master/src/MOs>`_
* `Nuclei <http://github.com/LCPQ/quantum_package/tree/master/src/Nuclei>`_
* `Output <http://github.com/LCPQ/quantum_package/tree/master/src/Output>`_
* `Selectors_full <http://github.com/LCPQ/quantum_package/tree/master/src/Selectors_full>`_ * `Selectors_full <http://github.com/LCPQ/quantum_package/tree/master/src/Selectors_full>`_
* `SingleRefMethod <http://github.com/LCPQ/quantum_package/tree/master/src/SingleRefMethod>`_ * `SingleRefMethod <http://github.com/LCPQ/quantum_package/tree/master/src/SingleRefMethod>`_
* `Utils <http://github.com/LCPQ/quantum_package/tree/master/src/Utils>`_

View File

@ -0,0 +1 @@
Selectors_full SingleRefMethod

View File

@ -1,2 +0,0 @@
AOs Bielec_integrals Bitmask Dets Electrons Ezfio_files Hartree_Fock MOGuess MonoInts MOs Nuclei Output Selectors_full SingleRefMethod Utils

View File

@ -15,21 +15,8 @@ Needed Modules
.. Do not edit this section. It was auto-generated from the .. Do not edit this section. It was auto-generated from the
.. NEEDED_MODULES file. .. NEEDED_MODULES file.
* `AOs <http://github.com/LCPQ/quantum_package/tree/master/src/AOs>`_
* `Bielec_integrals <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals>`_
* `Bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask>`_
* `Dets <http://github.com/LCPQ/quantum_package/tree/master/src/Dets>`_
* `Electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Electrons>`_
* `Ezfio_files <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files>`_
* `Hartree_Fock <http://github.com/LCPQ/quantum_package/tree/master/src/Hartree_Fock>`_
* `MOGuess <http://github.com/LCPQ/quantum_package/tree/master/src/MOGuess>`_
* `MonoInts <http://github.com/LCPQ/quantum_package/tree/master/src/MonoInts>`_
* `MOs <http://github.com/LCPQ/quantum_package/tree/master/src/MOs>`_
* `Nuclei <http://github.com/LCPQ/quantum_package/tree/master/src/Nuclei>`_
* `Output <http://github.com/LCPQ/quantum_package/tree/master/src/Output>`_
* `Selectors_full <http://github.com/LCPQ/quantum_package/tree/master/src/Selectors_full>`_ * `Selectors_full <http://github.com/LCPQ/quantum_package/tree/master/src/Selectors_full>`_
* `SingleRefMethod <http://github.com/LCPQ/quantum_package/tree/master/src/SingleRefMethod>`_ * `SingleRefMethod <http://github.com/LCPQ/quantum_package/tree/master/src/SingleRefMethod>`_
* `Utils <http://github.com/LCPQ/quantum_package/tree/master/src/Utils>`_
Documentation Documentation
============= =============

View File

@ -0,0 +1 @@
CISD_selected

View File

@ -1,2 +0,0 @@
AOs Bielec_integrals Bitmask CISD CISD_selected Dets Electrons Ezfio_files Hartree_Fock MOGuess MonoInts MOs Nuclei Output Perturbation Properties Selectors_full SingleRefMethod Utils

View File

@ -19,23 +19,5 @@ Needed Modules
.. Do not edit this section. It was auto-generated from the .. Do not edit this section. It was auto-generated from the
.. NEEDED_MODULES file. .. NEEDED_MODULES file.
* `AOs <http://github.com/LCPQ/quantum_package/tree/master/src/AOs>`_
* `Bielec_integrals <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals>`_
* `Bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask>`_
* `CISD <http://github.com/LCPQ/quantum_package/tree/master/src/CISD>`_
* `CISD_selected <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected>`_ * `CISD_selected <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected>`_
* `Dets <http://github.com/LCPQ/quantum_package/tree/master/src/Dets>`_
* `Electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Electrons>`_
* `Ezfio_files <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files>`_
* `Hartree_Fock <http://github.com/LCPQ/quantum_package/tree/master/src/Hartree_Fock>`_
* `MOGuess <http://github.com/LCPQ/quantum_package/tree/master/src/MOGuess>`_
* `MonoInts <http://github.com/LCPQ/quantum_package/tree/master/src/MonoInts>`_
* `MOs <http://github.com/LCPQ/quantum_package/tree/master/src/MOs>`_
* `Nuclei <http://github.com/LCPQ/quantum_package/tree/master/src/Nuclei>`_
* `Output <http://github.com/LCPQ/quantum_package/tree/master/src/Output>`_
* `Perturbation <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation>`_
* `Properties <http://github.com/LCPQ/quantum_package/tree/master/src/Properties>`_
* `Selectors_full <http://github.com/LCPQ/quantum_package/tree/master/src/Selectors_full>`_
* `SingleRefMethod <http://github.com/LCPQ/quantum_package/tree/master/src/SingleRefMethod>`_
* `Utils <http://github.com/LCPQ/quantum_package/tree/master/src/Utils>`_

View File

@ -0,0 +1 @@
Perturbation CISD

View File

@ -1,2 +0,0 @@
AOs Bielec_integrals Bitmask CISD Dets Electrons Ezfio_files Hartree_Fock MOGuess MonoInts MOs Nuclei Output Perturbation Properties Selectors_full SingleRefMethod Utils

View File

@ -28,22 +28,6 @@ Needed Modules
.. Do not edit this section. It was auto-generated from the .. Do not edit this section. It was auto-generated from the
.. NEEDED_MODULES file. .. NEEDED_MODULES file.
* `AOs <http://github.com/LCPQ/quantum_package/tree/master/src/AOs>`_
* `Bielec_integrals <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals>`_
* `Bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask>`_
* `CISD <http://github.com/LCPQ/quantum_package/tree/master/src/CISD>`_
* `Dets <http://github.com/LCPQ/quantum_package/tree/master/src/Dets>`_
* `Electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Electrons>`_
* `Ezfio_files <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files>`_
* `Hartree_Fock <http://github.com/LCPQ/quantum_package/tree/master/src/Hartree_Fock>`_
* `MOGuess <http://github.com/LCPQ/quantum_package/tree/master/src/MOGuess>`_
* `MonoInts <http://github.com/LCPQ/quantum_package/tree/master/src/MonoInts>`_
* `MOs <http://github.com/LCPQ/quantum_package/tree/master/src/MOs>`_
* `Nuclei <http://github.com/LCPQ/quantum_package/tree/master/src/Nuclei>`_
* `Output <http://github.com/LCPQ/quantum_package/tree/master/src/Output>`_
* `Perturbation <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation>`_ * `Perturbation <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation>`_
* `Properties <http://github.com/LCPQ/quantum_package/tree/master/src/Properties>`_ * `CISD <http://github.com/LCPQ/quantum_package/tree/master/src/CISD>`_
* `Selectors_full <http://github.com/LCPQ/quantum_package/tree/master/src/Selectors_full>`_
* `SingleRefMethod <http://github.com/LCPQ/quantum_package/tree/master/src/SingleRefMethod>`_
* `Utils <http://github.com/LCPQ/quantum_package/tree/master/src/Utils>`_

View File

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

View File

@ -1,2 +0,0 @@
AOs Bielec_integrals Bitmask Dets Electrons Ezfio_files Generators_CAS Hartree_Fock MOGuess MonoInts MOs Nuclei Output Perturbation Properties Selectors_full Utils

View File

@ -19,21 +19,7 @@ Needed Modules
.. Do not edit this section. It was auto-generated from the .. Do not edit this section. It was auto-generated from the
.. NEEDED_MODULES file. .. NEEDED_MODULES file.
* `AOs <http://github.com/LCPQ/quantum_package/tree/master/src/AOs>`_
* `Bielec_integrals <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals>`_
* `Bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask>`_
* `Dets <http://github.com/LCPQ/quantum_package/tree/master/src/Dets>`_
* `Electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Electrons>`_
* `Ezfio_files <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files>`_
* `Generators_CAS <http://github.com/LCPQ/quantum_package/tree/master/src/Generators_CAS>`_
* `Hartree_Fock <http://github.com/LCPQ/quantum_package/tree/master/src/Hartree_Fock>`_
* `MOGuess <http://github.com/LCPQ/quantum_package/tree/master/src/MOGuess>`_
* `MonoInts <http://github.com/LCPQ/quantum_package/tree/master/src/MonoInts>`_
* `MOs <http://github.com/LCPQ/quantum_package/tree/master/src/MOs>`_
* `Nuclei <http://github.com/LCPQ/quantum_package/tree/master/src/Nuclei>`_
* `Output <http://github.com/LCPQ/quantum_package/tree/master/src/Output>`_
* `Perturbation <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation>`_ * `Perturbation <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation>`_
* `Properties <http://github.com/LCPQ/quantum_package/tree/master/src/Properties>`_
* `Selectors_full <http://github.com/LCPQ/quantum_package/tree/master/src/Selectors_full>`_ * `Selectors_full <http://github.com/LCPQ/quantum_package/tree/master/src/Selectors_full>`_
* `Utils <http://github.com/LCPQ/quantum_package/tree/master/src/Utils>`_ * `Generators_CAS <http://github.com/LCPQ/quantum_package/tree/master/src/Generators_CAS>`_

103
src/Determinants/EZFIO.cfg Normal file
View File

@ -0,0 +1,103 @@
[N_states]
type: States_number
doc: Number of states to consider
interface: input
default: 1
[N_det_max_jacobi]
type: Strictly_positive_int
doc: Maximum number of determinants diagonalized by Jacobi
interface: input
default: 1000
[read_wf]
type: logical
doc: If true, read the wave function from the EZFIO file
interface: input
default: False
[only_single_double_dm]
type: logical
doc: If true, The One body DM is calculated with ignoring the Double<->Doubles extra diag elements
interface: input
default: False
[s2_eig]
type: logical
doc: Force the wave function to be an eigenfunction of S^2
interface: input
default: False
[threshold_generators]
type: Threshold
doc: Thresholds on generators (fraction of the norm)
interface: input
default: 0.99
[threshold_selectors]
type: Threshold
doc: Thresholds on selectors (fraction of the norm)
interface: input
default: 0.999
# Only create the ezfio_config, (no Input_* and no PROVIDER)
[n_states_diag]
type: integer
doc: n_states_diag
interface: Ocaml
[n_int]
interface: OCaml
doc: n_int
type: N_int_number
[bit_kind]
interface: OCaml
doc: bit_kind
type: Bit_kind
[mo_label]
interface: OCaml
doc: o_label
type: character*(64)
[n_det]
interface: OCaml
doc: n_det
type: integer
[psi_coef]
interface: OCaml
doc: psi_coef
type: double precision
size: (determinants_n_det,determinants_n_states)
[psi_det]
interface: OCaml
doc: psi_det
type: integer*8
size: (determinants_n_int*determinants_bit_kind/8,2,determinants_n_det)
[det_num]
interface: OCaml
doc: det_num
type: integer
[det_occ]
interface: OCaml
doc: det_occ
type: integer
size: (electrons_elec_alpha_num,determinants_det_num,2)
[det_coef]
interface: OCaml
doc: det_coef
type: double precision
size: (determinants_det_num)
[expected_s2]
interface: OCaml
doc: expcted_s2
type: double precision

View File

@ -181,8 +181,43 @@ subroutine copy_H_apply_buffer_to_wf
call normalize(psi_coef,N_det) call normalize(psi_coef,N_det)
SOFT_TOUCH N_det psi_det psi_coef SOFT_TOUCH N_det psi_det psi_coef
call debug_unicity_of_determinants
end end
subroutine debug_unicity_of_determinants
implicit none
BEGIN_DOC
! This subroutine checks that there are no repetitions in the wave function
END_DOC
logical :: same, failed
integer :: i,k
print *, "======= DEBUG UNICITY ========="
failed = .False.
do i=2,N_det
same = .True.
do k=1,N_int
if ( psi_det_sorted_bit(k,1,i) /= psi_det_sorted_bit(k,1,i-1) ) then
same = .False.
exit
endif
if ( psi_det_sorted_bit(k,2,i) /= psi_det_sorted_bit(k,2,i-1) ) then
same = .False.
exit
endif
enddo
if (same) then
failed = .True.
call debug_det(psi_det_sorted_bit(1,1,i))
endif
enddo
if (failed) then
print *, '======= Determinants not unique : Failed ! ========='
stop
else
print *, '======= Determinants are unique : OK ! ========='
endif
end
subroutine fill_H_apply_buffer_no_selection(n_selected,det_buffer,Nint,iproc) subroutine fill_H_apply_buffer_no_selection(n_selected,det_buffer,Nint,iproc)
use bitmasks use bitmasks

View File

@ -0,0 +1 @@
Bielec_integrals

View File

@ -32,16 +32,7 @@ Needed Modules
.. Do not edit this section. It was auto-generated from the .. Do not edit this section. It was auto-generated from the
.. NEEDED_MODULES file. .. NEEDED_MODULES file.
* `AOs <http://github.com/LCPQ/quantum_package/tree/master/src/AOs>`_
* `Bielec_integrals <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals>`_ * `Bielec_integrals <http://github.com/LCPQ/quantum_package/tree/master/src/Bielec_integrals>`_
* `Bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask>`_
* `Electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Electrons>`_
* `Ezfio_files <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files>`_
* `MonoInts <http://github.com/LCPQ/quantum_package/tree/master/src/MonoInts>`_
* `MOs <http://github.com/LCPQ/quantum_package/tree/master/src/MOs>`_
* `Nuclei <http://github.com/LCPQ/quantum_package/tree/master/src/Nuclei>`_
* `Output <http://github.com/LCPQ/quantum_package/tree/master/src/Output>`_
* `Utils <http://github.com/LCPQ/quantum_package/tree/master/src/Utils>`_
Documentation Documentation
============= =============
@ -49,26 +40,29 @@ Documentation
.. Do not edit this section. It was auto-generated from the .. Do not edit this section. It was auto-generated from the
.. NEEDED_MODULES file. .. NEEDED_MODULES file.
`copy_h_apply_buffer_to_wf <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/H_apply.irp.f#L100>`_ `copy_h_apply_buffer_to_wf <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/H_apply.irp.f#L100>`_
Copies the H_apply buffer to psi_coef. You need to touch psi_det, psi_coef and N_det Copies the H_apply buffer to psi_coef. You need to touch psi_det, psi_coef and N_det
after calling this function. after calling this function.
After calling this subroutine, N_det, psi_det and psi_coef need to be touched After calling this subroutine, N_det, psi_det and psi_coef need to be touched
`fill_h_apply_buffer_no_selection <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/H_apply.irp.f#L187>`_ `debug_unicity_of_determinants <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/H_apply.irp.f#L187>`_
This subroutine checks that there are no repetitions in the wave function
`fill_h_apply_buffer_no_selection <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/H_apply.irp.f#L222>`_
Fill the H_apply buffer with determiants for CISD Fill the H_apply buffer with determiants for CISD
`h_apply_buffer_allocated <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/H_apply.irp.f#L15>`_ `h_apply_buffer_allocated <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/H_apply.irp.f#L15>`_
Buffer of determinants/coefficients/perturbative energy for H_apply. Buffer of determinants/coefficients/perturbative energy for H_apply.
Uninitialized. Filled by H_apply subroutines. Uninitialized. Filled by H_apply subroutines.
`h_apply_buffer_lock <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/H_apply.irp.f#L16>`_ `h_apply_buffer_lock <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/H_apply.irp.f#L16>`_
Buffer of determinants/coefficients/perturbative energy for H_apply. Buffer of determinants/coefficients/perturbative energy for H_apply.
Uninitialized. Filled by H_apply subroutines. Uninitialized. Filled by H_apply subroutines.
`resize_h_apply_buffer <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/H_apply.irp.f#L48>`_ `resize_h_apply_buffer <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/H_apply.irp.f#L48>`_
Undocumented Undocumented
`cisd_sc2 <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/SC2.irp.f#L1>`_ `cisd_sc2 <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/SC2.irp.f#L1>`_
CISD+SC2 method :: take off all the disconnected terms of a CISD (selected or not) CISD+SC2 method :: take off all the disconnected terms of a CISD (selected or not)
.br .br
dets_in : bitmasks corresponding to determinants dets_in : bitmasks corresponding to determinants
@ -84,25 +78,25 @@ Documentation
.br .br
Initial guess vectors are not necessarily orthonormal Initial guess vectors are not necessarily orthonormal
`connected_to_ref <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/connected_to_ref.irp.f#L155>`_ `connected_to_ref <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/connected_to_ref.irp.f#L155>`_
Undocumented Undocumented
`connected_to_ref_by_mono <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/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#L253>`_
Undocumented Undocumented
`det_search_key <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/connected_to_ref.irp.f#L1>`_ `det_search_key <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/connected_to_ref.irp.f#L1>`_
Return an integer*8 corresponding to a determinant index for searching Return an integer*8 corresponding to a determinant index for searching
`get_index_in_psi_det_sorted_bit <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/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#L48>`_
Returns the index of the determinant in the ``psi_det_sorted_bit`` array Returns the index of the determinant in the ``psi_det_sorted_bit`` array
`is_in_wavefunction <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/connected_to_ref.irp.f#L34>`_ `is_in_wavefunction <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/connected_to_ref.irp.f#L34>`_
True if the determinant ``det`` is in the wave function True if the determinant ``det`` is in the wave function
`occ_pattern_search_key <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/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#L17>`_
Return an integer*8 corresponding to a determinant index for searching Return an integer*8 corresponding to a determinant index for searching
`do_mono_excitation <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/create_excitations.irp.f#L1>`_ `do_mono_excitation <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/create_excitations.irp.f#L1>`_
Apply the mono excitation operator : a^{dager}_(i_particle) a_(i_hole) of spin = ispin Apply the mono excitation operator : a^{dager}_(i_particle) a_(i_hole) of spin = ispin
on key_in on key_in
ispin = 1 == alpha ispin = 1 == alpha
@ -110,13 +104,13 @@ Documentation
i_ok = 1 == the excitation is possible i_ok = 1 == the excitation is possible
i_ok = -1 == the excitation is not possible i_ok = -1 == the excitation is not possible
`davidson_converged <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/davidson.irp.f#L382>`_ `davidson_converged <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/davidson.irp.f#L382>`_
True if the Davidson algorithm is converged True if the Davidson algorithm is converged
`davidson_criterion <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/davidson.irp.f#L372>`_ `davidson_criterion <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/davidson.irp.f#L372>`_
Can be : [ energy | residual | both | wall_time | cpu_time | iterations ] Can be : [ energy | residual | both | wall_time | cpu_time | iterations ]
`davidson_diag <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/davidson.irp.f#L18>`_ `davidson_diag <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/davidson.irp.f#L18>`_
Davidson diagonalization. Davidson diagonalization.
.br .br
dets_in : bitmasks corresponding to determinants dets_in : bitmasks corresponding to determinants
@ -134,7 +128,7 @@ Documentation
.br .br
Initial guess vectors are not necessarily orthonormal Initial guess vectors are not necessarily orthonormal
`davidson_diag_hjj <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/davidson.irp.f#L68>`_ `davidson_diag_hjj <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/davidson.irp.f#L68>`_
Davidson diagonalization with specific diagonal elements of the H matrix Davidson diagonalization with specific diagonal elements of the H matrix
.br .br
H_jj : specific diagonal H matrix elements to diagonalize de Davidson H_jj : specific diagonal H matrix elements to diagonalize de Davidson
@ -154,49 +148,49 @@ Documentation
.br .br
Initial guess vectors are not necessarily orthonormal Initial guess vectors are not necessarily orthonormal
`davidson_iter_max <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/davidson.irp.f#L1>`_ `davidson_iter_max <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/davidson.irp.f#L1>`_
Max number of Davidson iterations Max number of Davidson iterations
`davidson_sze_max <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/davidson.irp.f#L9>`_ `davidson_sze_max <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/davidson.irp.f#L9>`_
Max number of Davidson sizes Max number of Davidson sizes
`davidson_threshold <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/davidson.irp.f#L373>`_ `davidson_threshold <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/davidson.irp.f#L373>`_
Can be : [ energy | residual | both | wall_time | cpu_time | iterations ] Can be : [ energy | residual | both | wall_time | cpu_time | iterations ]
`one_body_dm_mo <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/density_matrix.irp.f#L164>`_ `one_body_dm_mo <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/density_matrix.irp.f#L164>`_
One-body density matrix One-body density matrix
`one_body_dm_mo_alpha <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/density_matrix.irp.f#L1>`_ `one_body_dm_mo_alpha <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/density_matrix.irp.f#L1>`_
Alpha and beta one-body density matrix for each state Alpha and beta one-body density matrix for each state
`one_body_dm_mo_beta <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/density_matrix.irp.f#L2>`_ `one_body_dm_mo_beta <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/density_matrix.irp.f#L2>`_
Alpha and beta one-body density matrix for each state Alpha and beta one-body density matrix for each state
`one_body_single_double_dm_mo_alpha <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/density_matrix.irp.f#L80>`_ `one_body_single_double_dm_mo_alpha <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/density_matrix.irp.f#L80>`_
Alpha and beta one-body density matrix for each state Alpha and beta one-body density matrix for each state
`one_body_single_double_dm_mo_beta <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/density_matrix.irp.f#L81>`_ `one_body_single_double_dm_mo_beta <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/density_matrix.irp.f#L81>`_
Alpha and beta one-body density matrix for each state Alpha and beta one-body density matrix for each state
`one_body_spin_density_mo <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/density_matrix.irp.f#L172>`_ `one_body_spin_density_mo <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/density_matrix.irp.f#L172>`_
rho(alpha) - rho(beta) rho(alpha) - rho(beta)
`save_natural_mos <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/density_matrix.irp.f#L196>`_ `save_natural_mos <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/density_matrix.irp.f#L196>`_
Save natural orbitals, obtained by diagonalization of the one-body density matrix in the MO basis Save natural orbitals, obtained by diagonalization of the one-body density matrix in the MO basis
`set_natural_mos <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/density_matrix.irp.f#L180>`_ `set_natural_mos <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/density_matrix.irp.f#L180>`_
Set natural orbitals, obtained by diagonalization of the one-body density matrix in the MO basis Set natural orbitals, obtained by diagonalization of the one-body density matrix in the MO basis
`state_average_weight <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/density_matrix.irp.f#L207>`_ `state_average_weight <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/density_matrix.irp.f#L207>`_
Weights in the state-average calculation of the density matrix Weights in the state-average calculation of the density matrix
`det_svd <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/det_svd.irp.f#L1>`_ `det_svd <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/det_svd.irp.f#L1>`_
Computes the SVD of the Alpha x Beta determinant coefficient matrix Computes the SVD of the Alpha x Beta determinant coefficient matrix
`filter_3_highest_electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/determinants.irp.f#L426>`_ `filter_3_highest_electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L426>`_
Returns a determinant with only the 3 highest electrons Returns a determinant with only the 3 highest electrons
`int_of_3_highest_electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/determinants.irp.f#L391>`_ `int_of_3_highest_electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L391>`_
Returns an integer*8 as : Returns an integer*8 as :
.br .br
|_<--- 21 bits ---><--- 21 bits ---><--- 21 bits --->| |_<--- 21 bits ---><--- 21 bits ---><--- 21 bits --->|
@ -207,158 +201,158 @@ Documentation
in descending order in descending order
.br .br
`max_degree_exc <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/determinants.irp.f#L32>`_ `max_degree_exc <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L32>`_
Maximum degree of excitation in the wf Maximum degree of excitation in the wf
`n_det <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/determinants.irp.f#L3>`_ `n_det <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L3>`_
Number of determinants in the wave function Number of determinants in the wave function
`psi_average_norm_contrib <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/determinants.irp.f#L276>`_ `psi_average_norm_contrib <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L276>`_
Contribution of determinants to the state-averaged density Contribution of determinants to the state-averaged density
`psi_average_norm_contrib_sorted <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/determinants.irp.f#L306>`_ `psi_average_norm_contrib_sorted <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L306>`_
Wave function sorted by determinants contribution to the norm (state-averaged) Wave function sorted by determinants contribution to the norm (state-averaged)
`psi_coef <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/determinants.irp.f#L230>`_ `psi_coef <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L230>`_
The wave function coefficients. Initialized with Hartree-Fock if the EZFIO file The wave function coefficients. Initialized with Hartree-Fock if the EZFIO file
is empty is empty
`psi_coef_sorted <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/determinants.irp.f#L305>`_ `psi_coef_sorted <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L305>`_
Wave function sorted by determinants contribution to the norm (state-averaged) Wave function sorted by determinants contribution to the norm (state-averaged)
`psi_coef_sorted_ab <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/determinants.irp.f#L453>`_ `psi_coef_sorted_ab <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L453>`_
Determinants on which we apply <i|H|j>. Determinants on which we apply <i|H|j>.
They are sorted by the 3 highest electrons in the alpha part, They are sorted by the 3 highest electrons in the alpha part,
then by the 3 highest electrons in the beta part to accelerate then by the 3 highest electrons in the beta part to accelerate
the research of connected determinants. the research of connected determinants.
`psi_coef_sorted_bit <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/determinants.irp.f#L336>`_ `psi_coef_sorted_bit <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L336>`_
Determinants on which we apply <i|H|psi> for perturbation. Determinants on which we apply <i|H|psi> for perturbation.
They are sorted by determinants interpreted as integers. Useful They are sorted by determinants interpreted as integers. Useful
to accelerate the search of a random determinant in the wave to accelerate the search of a random determinant in the wave
function. function.
`psi_det <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/determinants.irp.f#L65>`_ `psi_det <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L65>`_
The wave function determinants. Initialized with Hartree-Fock if the EZFIO file The wave function determinants. Initialized with Hartree-Fock if the EZFIO file
is empty is empty
`psi_det_size <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/determinants.irp.f#L47>`_ `psi_det_size <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L47>`_
Size of the psi_det/psi_coef arrays Size of the psi_det/psi_coef arrays
`psi_det_sorted <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/determinants.irp.f#L304>`_ `psi_det_sorted <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L304>`_
Wave function sorted by determinants contribution to the norm (state-averaged) Wave function sorted by determinants contribution to the norm (state-averaged)
`psi_det_sorted_ab <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/determinants.irp.f#L452>`_ `psi_det_sorted_ab <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L452>`_
Determinants on which we apply <i|H|j>. Determinants on which we apply <i|H|j>.
They are sorted by the 3 highest electrons in the alpha part, They are sorted by the 3 highest electrons in the alpha part,
then by the 3 highest electrons in the beta part to accelerate then by the 3 highest electrons in the beta part to accelerate
the research of connected determinants. the research of connected determinants.
`psi_det_sorted_bit <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/determinants.irp.f#L335>`_ `psi_det_sorted_bit <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L335>`_
Determinants on which we apply <i|H|psi> for perturbation. Determinants on which we apply <i|H|psi> for perturbation.
They are sorted by determinants interpreted as integers. Useful They are sorted by determinants interpreted as integers. Useful
to accelerate the search of a random determinant in the wave to accelerate the search of a random determinant in the wave
function. function.
`psi_det_sorted_next_ab <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/determinants.irp.f#L454>`_ `psi_det_sorted_next_ab <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L454>`_
Determinants on which we apply <i|H|j>. Determinants on which we apply <i|H|j>.
They are sorted by the 3 highest electrons in the alpha part, They are sorted by the 3 highest electrons in the alpha part,
then by the 3 highest electrons in the beta part to accelerate then by the 3 highest electrons in the beta part to accelerate
the research of connected determinants. the research of connected determinants.
`read_dets <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/determinants.irp.f#L583>`_ `read_dets <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L583>`_
Reads the determinants from the EZFIO file Reads the determinants from the EZFIO file
`save_wavefunction <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/determinants.irp.f#L630>`_ `save_wavefunction <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L630>`_
Save the wave function into the EZFIO file Save the wave function into the EZFIO file
`save_wavefunction_general <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/determinants.irp.f#L649>`_ `save_wavefunction_general <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L649>`_
Save the wave function into the EZFIO file Save the wave function into the EZFIO file
`save_wavefunction_unsorted <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/determinants.irp.f#L640>`_ `save_wavefunction_unsorted <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L640>`_
Save the wave function into the EZFIO file Save the wave function into the EZFIO file
`sort_dets_by_3_highest_electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/determinants.irp.f#L474>`_ `sort_dets_by_3_highest_electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L474>`_
Determinants on which we apply <i|H|j>. Determinants on which we apply <i|H|j>.
They are sorted by the 3 highest electrons in the alpha part, They are sorted by the 3 highest electrons in the alpha part,
then by the 3 highest electrons in the beta part to accelerate then by the 3 highest electrons in the beta part to accelerate
the research of connected determinants. the research of connected determinants.
`sort_dets_by_det_search_key <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/determinants.irp.f#L349>`_ `sort_dets_by_det_search_key <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L349>`_
Determinants are sorted are sorted according to their det_search_key. Determinants are sorted are sorted according to their det_search_key.
Useful to accelerate the search of a random determinant in the wave Useful to accelerate the search of a random determinant in the wave
function. function.
`double_exc_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/determinants_bitmasks.irp.f#L40>`_ `double_exc_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants_bitmasks.irp.f#L40>`_
double_exc_bitmask(:,1,i) is the bitmask for holes of excitation 1 double_exc_bitmask(:,1,i) is the bitmask for holes of excitation 1
double_exc_bitmask(:,2,i) is the bitmask for particles of excitation 1 double_exc_bitmask(:,2,i) is the bitmask for particles of excitation 1
double_exc_bitmask(:,3,i) is the bitmask for holes of excitation 2 double_exc_bitmask(:,3,i) is the bitmask for holes of excitation 2
double_exc_bitmask(:,4,i) is the bitmask for particles of excitation 2 double_exc_bitmask(:,4,i) is the bitmask for particles of excitation 2
for a given couple of hole/particle excitations i. for a given couple of hole/particle excitations i.
`n_double_exc_bitmasks <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/determinants_bitmasks.irp.f#L31>`_ `n_double_exc_bitmasks <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants_bitmasks.irp.f#L31>`_
Number of double excitation bitmasks Number of double excitation bitmasks
`n_single_exc_bitmasks <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/determinants_bitmasks.irp.f#L8>`_ `n_single_exc_bitmasks <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants_bitmasks.irp.f#L8>`_
Number of single excitation bitmasks Number of single excitation bitmasks
`single_exc_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/determinants_bitmasks.irp.f#L17>`_ `single_exc_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants_bitmasks.irp.f#L17>`_
single_exc_bitmask(:,1,i) is the bitmask for holes single_exc_bitmask(:,1,i) is the bitmask for holes
single_exc_bitmask(:,2,i) is the bitmask for particles single_exc_bitmask(:,2,i) is the bitmask for particles
for a given couple of hole/particle excitations i. for a given couple of hole/particle excitations i.
`ci_eigenvectors <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/diagonalize_CI.irp.f#L37>`_ `ci_eigenvectors <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/diagonalize_CI.irp.f#L37>`_
Eigenvectors/values of the CI matrix Eigenvectors/values of the CI matrix
`ci_eigenvectors_s2 <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/diagonalize_CI.irp.f#L38>`_ `ci_eigenvectors_s2 <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/diagonalize_CI.irp.f#L38>`_
Eigenvectors/values of the CI matrix Eigenvectors/values of the CI matrix
`ci_electronic_energy <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/diagonalize_CI.irp.f#L36>`_ `ci_electronic_energy <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/diagonalize_CI.irp.f#L36>`_
Eigenvectors/values of the CI matrix Eigenvectors/values of the CI matrix
`ci_energy <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/diagonalize_CI.irp.f#L18>`_ `ci_energy <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/diagonalize_CI.irp.f#L18>`_
N_states lowest eigenvalues of the CI matrix N_states lowest eigenvalues of the CI matrix
`diag_algorithm <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/diagonalize_CI.irp.f#L1>`_ `diag_algorithm <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/diagonalize_CI.irp.f#L1>`_
Diagonalization algorithm (Davidson or Lapack) Diagonalization algorithm (Davidson or Lapack)
`diagonalize_ci <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/diagonalize_CI.irp.f#L96>`_ `diagonalize_ci <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/diagonalize_CI.irp.f#L96>`_
Replace the coefficients of the CI states by the coefficients of the Replace the coefficients of the CI states by the coefficients of the
eigenstates of the CI matrix eigenstates of the CI matrix
`ci_sc2_eigenvectors <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/diagonalize_CI_SC2.irp.f#L27>`_ `ci_sc2_eigenvectors <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/diagonalize_CI_SC2.irp.f#L27>`_
Eigenvectors/values of the CI matrix Eigenvectors/values of the CI matrix
`ci_sc2_electronic_energy <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/diagonalize_CI_SC2.irp.f#L26>`_ `ci_sc2_electronic_energy <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/diagonalize_CI_SC2.irp.f#L26>`_
Eigenvectors/values of the CI matrix Eigenvectors/values of the CI matrix
`ci_sc2_energy <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/diagonalize_CI_SC2.irp.f#L1>`_ `ci_sc2_energy <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/diagonalize_CI_SC2.irp.f#L1>`_
N_states_diag lowest eigenvalues of the CI matrix N_states_diag lowest eigenvalues of the CI matrix
`diagonalize_ci_sc2 <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/diagonalize_CI_SC2.irp.f#L46>`_ `diagonalize_ci_sc2 <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/diagonalize_CI_SC2.irp.f#L46>`_
Replace the coefficients of the CI states_diag by the coefficients of the Replace the coefficients of the CI states_diag by the coefficients of the
eigenstates of the CI matrix eigenstates of the CI matrix
`threshold_convergence_sc2 <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/diagonalize_CI_SC2.irp.f#L18>`_ `threshold_convergence_sc2 <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/diagonalize_CI_SC2.irp.f#L18>`_
convergence of the correlation energy of SC2 iterations convergence of the correlation energy of SC2 iterations
`ci_eigenvectors_mono <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/diagonalize_CI_mono.irp.f#L2>`_ `ci_eigenvectors_mono <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/diagonalize_CI_mono.irp.f#L2>`_
Eigenvectors/values of the CI matrix Eigenvectors/values of the CI matrix
`ci_eigenvectors_s2_mono <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/diagonalize_CI_mono.irp.f#L3>`_ `ci_eigenvectors_s2_mono <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/diagonalize_CI_mono.irp.f#L3>`_
Eigenvectors/values of the CI matrix Eigenvectors/values of the CI matrix
`ci_electronic_energy_mono <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/diagonalize_CI_mono.irp.f#L1>`_ `ci_electronic_energy_mono <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/diagonalize_CI_mono.irp.f#L1>`_
Eigenvectors/values of the CI matrix Eigenvectors/values of the CI matrix
`diagonalize_ci_mono <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/diagonalize_CI_mono.irp.f#L59>`_ `diagonalize_ci_mono <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/diagonalize_CI_mono.irp.f#L59>`_
Replace the coefficients of the CI states by the coefficients of the Replace the coefficients of the CI states by the coefficients of the
eigenstates of the CI matrix eigenstates of the CI matrix
`apply_mono <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/excitations_utils.irp.f#L1>`_ `apply_mono <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/excitations_utils.irp.f#L1>`_
Undocumented Undocumented
`filter_connected <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/filter_connected.irp.f#L2>`_ `filter_connected <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/filter_connected.irp.f#L2>`_
Filters out the determinants that are not connected by H Filters out the determinants that are not connected by H
.br .br
returns the array idx which contains the index of the returns the array idx which contains the index of the
@ -369,7 +363,7 @@ Documentation
.br .br
idx(0) is the number of determinants that interact with key1 idx(0) is the number of determinants that interact with key1
`filter_connected_davidson <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/filter_connected.irp.f#L163>`_ `filter_connected_davidson <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/filter_connected.irp.f#L163>`_
Filters out the determinants that are not connected by H Filters out the determinants that are not connected by H
returns the array idx which contains the index of the returns the array idx which contains the index of the
determinants in the array key1 that interact determinants in the array key1 that interact
@ -378,7 +372,7 @@ Documentation
idx(0) is the number of determinants that interact with key1 idx(0) is the number of determinants that interact with key1
key1 should come from psi_det_sorted_ab. key1 should come from psi_det_sorted_ab.
`filter_connected_i_h_psi0 <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/filter_connected.irp.f#L293>`_ `filter_connected_i_h_psi0 <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/filter_connected.irp.f#L293>`_
returns the array idx which contains the index of the returns the array idx which contains the index of the
.br .br
determinants in the array key1 that interact determinants in the array key1 that interact
@ -387,7 +381,7 @@ Documentation
.br .br
idx(0) is the number of determinants that interact with key1 idx(0) is the number of determinants that interact with key1
`filter_connected_i_h_psi0_sc2 <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/filter_connected.irp.f#L392>`_ `filter_connected_i_h_psi0_sc2 <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/filter_connected.irp.f#L392>`_
standard filter_connected_i_H_psi but returns in addition standard filter_connected_i_H_psi but returns in addition
.br .br
the array of the index of the non connected determinants to key1 the array of the index of the non connected determinants to key1
@ -398,7 +392,7 @@ Documentation
.br .br
to repeat the excitations to repeat the excitations
`filter_connected_sorted_ab <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/filter_connected.irp.f#L101>`_ `filter_connected_sorted_ab <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/filter_connected.irp.f#L101>`_
Filters out the determinants that are not connected by H Filters out the determinants that are not connected by H
returns the array idx which contains the index of the returns the array idx which contains the index of the
determinants in the array key1 that interact determinants in the array key1 that interact
@ -407,197 +401,197 @@ Documentation
.br .br
Determinants are taken from the psi_det_sorted_ab array Determinants are taken from the psi_det_sorted_ab array
`put_gess <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/guess_triplet.irp.f#L1>`_ `put_gess <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/guess_triplet.irp.f#L1>`_
Undocumented Undocumented
`det_to_occ_pattern <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/occ_pattern.irp.f#L2>`_ `det_to_occ_pattern <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/occ_pattern.irp.f#L2>`_
Transform a determinant to an occupation pattern Transform a determinant to an occupation pattern
`make_s2_eigenfunction <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/occ_pattern.irp.f#L251>`_ `make_s2_eigenfunction <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/occ_pattern.irp.f#L251>`_
Undocumented Undocumented
`n_occ_pattern <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/occ_pattern.irp.f#L143>`_ `n_occ_pattern <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/occ_pattern.irp.f#L143>`_
array of the occ_pattern present in the wf array of the occ_pattern present in the wf
psi_occ_pattern(:,1,j) = jth occ_pattern of the wave function : represent all the single occupation psi_occ_pattern(:,1,j) = jth occ_pattern of the wave function : represent all the single occupation
psi_occ_pattern(:,2,j) = jth occ_pattern of the wave function : represent all the double occupation psi_occ_pattern(:,2,j) = jth occ_pattern of the wave function : represent all the double occupation
`occ_pattern_to_dets <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/occ_pattern.irp.f#L42>`_ `occ_pattern_to_dets <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/occ_pattern.irp.f#L42>`_
Generate all possible determinants for a give occ_pattern Generate all possible determinants for a give occ_pattern
`occ_pattern_to_dets_size <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/occ_pattern.irp.f#L20>`_ `occ_pattern_to_dets_size <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/occ_pattern.irp.f#L20>`_
Number of possible determinants for a given occ_pattern Number of possible determinants for a given occ_pattern
`psi_occ_pattern <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/occ_pattern.irp.f#L142>`_ `psi_occ_pattern <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/occ_pattern.irp.f#L142>`_
array of the occ_pattern present in the wf array of the occ_pattern present in the wf
psi_occ_pattern(:,1,j) = jth occ_pattern of the wave function : represent all the single occupation psi_occ_pattern(:,1,j) = jth occ_pattern of the wave function : represent all the single occupation
psi_occ_pattern(:,2,j) = jth occ_pattern of the wave function : represent all the double occupation psi_occ_pattern(:,2,j) = jth occ_pattern of the wave function : represent all the double occupation
`rec_occ_pattern_to_dets <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/occ_pattern.irp.f#L102>`_ `rec_occ_pattern_to_dets <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/occ_pattern.irp.f#L102>`_
Undocumented Undocumented
`n_states_diag <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/options.irp.f#L40>`_ `n_states_diag <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/options.irp.f#L1>`_
Number of states to consider for the diagonalization Number of states to consider for the diagonalization
`pouet <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/program_beginer_determinants.irp.f#L1>`_ `pouet <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/program_beginer_determinants.irp.f#L1>`_
Undocumented Undocumented
`routine <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/program_beginer_determinants.irp.f#L7>`_ `routine <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/program_beginer_determinants.irp.f#L7>`_
Undocumented Undocumented
`idx_cas <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/psi_cas.irp.f#L5>`_ `idx_cas <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/psi_cas.irp.f#L5>`_
CAS wave function, defined from the application of the CAS bitmask on the 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. determinants. idx_cas gives the indice of the CAS determinant in psi_det.
`idx_non_cas <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/psi_cas.irp.f#L62>`_ `idx_non_cas <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/psi_cas.irp.f#L62>`_
Set of determinants which are not part of the CAS, defined from the application Set of determinants which are not part of the CAS, defined from the application
of the CAS bitmask on the determinants. of the CAS bitmask on the determinants.
idx_non_cas gives the indice of the determinant in psi_det. idx_non_cas gives the indice of the determinant in psi_det.
`n_det_cas <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/psi_cas.irp.f#L6>`_ `n_det_cas <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/psi_cas.irp.f#L6>`_
CAS wave function, defined from the application of the CAS bitmask on the 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. determinants. idx_cas gives the indice of the CAS determinant in psi_det.
`n_det_non_cas <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/psi_cas.irp.f#L63>`_ `n_det_non_cas <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/psi_cas.irp.f#L63>`_
Set of determinants which are not part of the CAS, defined from the application Set of determinants which are not part of the CAS, defined from the application
of the CAS bitmask on the determinants. of the CAS bitmask on the determinants.
idx_non_cas gives the indice of the determinant in psi_det. idx_non_cas gives the indice of the determinant in psi_det.
`psi_cas <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/psi_cas.irp.f#L3>`_ `psi_cas <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/psi_cas.irp.f#L3>`_
CAS wave function, defined from the application of the CAS bitmask on the 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. determinants. idx_cas gives the indice of the CAS determinant in psi_det.
`psi_cas_coef <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/psi_cas.irp.f#L4>`_ `psi_cas_coef <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/psi_cas.irp.f#L4>`_
CAS wave function, defined from the application of the CAS bitmask on the 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. determinants. idx_cas gives the indice of the CAS determinant in psi_det.
`psi_cas_coef_sorted_bit <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/psi_cas.irp.f#L47>`_ `psi_cas_coef_sorted_bit <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/psi_cas.irp.f#L47>`_
CAS determinants sorted to accelerate the search of a random determinant in the wave CAS determinants sorted to accelerate the search of a random determinant in the wave
function. function.
`psi_cas_sorted_bit <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/psi_cas.irp.f#L46>`_ `psi_cas_sorted_bit <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/psi_cas.irp.f#L46>`_
CAS determinants sorted to accelerate the search of a random determinant in the wave CAS determinants sorted to accelerate the search of a random determinant in the wave
function. function.
`psi_non_cas <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/psi_cas.irp.f#L60>`_ `psi_non_cas <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/psi_cas.irp.f#L60>`_
Set of determinants which are not part of the CAS, defined from the application Set of determinants which are not part of the CAS, defined from the application
of the CAS bitmask on the determinants. of the CAS bitmask on the determinants.
idx_non_cas gives the indice of the determinant in psi_det. idx_non_cas gives the indice of the determinant in psi_det.
`psi_non_cas_coef <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/psi_cas.irp.f#L61>`_ `psi_non_cas_coef <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/psi_cas.irp.f#L61>`_
Set of determinants which are not part of the CAS, defined from the application Set of determinants which are not part of the CAS, defined from the application
of the CAS bitmask on the determinants. of the CAS bitmask on the determinants.
idx_non_cas gives the indice of the determinant in psi_det. idx_non_cas gives the indice of the determinant in psi_det.
`psi_non_cas_coef_sorted_bit <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/psi_cas.irp.f#L100>`_ `psi_non_cas_coef_sorted_bit <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/psi_cas.irp.f#L100>`_
CAS determinants sorted to accelerate the search of a random determinant in the wave CAS determinants sorted to accelerate the search of a random determinant in the wave
function. function.
`psi_non_cas_sorted_bit <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/psi_cas.irp.f#L99>`_ `psi_non_cas_sorted_bit <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/psi_cas.irp.f#L99>`_
CAS determinants sorted to accelerate the search of a random determinant in the wave CAS determinants sorted to accelerate the search of a random determinant in the wave
function. function.
`bi_elec_ref_bitmask_energy <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/ref_bitmask.irp.f#L5>`_ `bi_elec_ref_bitmask_energy <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ref_bitmask.irp.f#L5>`_
Energy of the reference bitmask used in Slater rules Energy of the reference bitmask used in Slater rules
`kinetic_ref_bitmask_energy <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/ref_bitmask.irp.f#L3>`_ `kinetic_ref_bitmask_energy <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ref_bitmask.irp.f#L3>`_
Energy of the reference bitmask used in Slater rules Energy of the reference bitmask used in Slater rules
`mono_elec_ref_bitmask_energy <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/ref_bitmask.irp.f#L2>`_ `mono_elec_ref_bitmask_energy <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ref_bitmask.irp.f#L2>`_
Energy of the reference bitmask used in Slater rules Energy of the reference bitmask used in Slater rules
`nucl_elec_ref_bitmask_energy <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/ref_bitmask.irp.f#L4>`_ `nucl_elec_ref_bitmask_energy <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ref_bitmask.irp.f#L4>`_
Energy of the reference bitmask used in Slater rules Energy of the reference bitmask used in Slater rules
`ref_bitmask_energy <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/ref_bitmask.irp.f#L1>`_ `ref_bitmask_energy <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ref_bitmask.irp.f#L1>`_
Energy of the reference bitmask used in Slater rules Energy of the reference bitmask used in Slater rules
`expected_s2 <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/s2.irp.f#L48>`_ `expected_s2 <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/s2.irp.f#L48>`_
Expected value of S2 : S*(S+1) Expected value of S2 : S*(S+1)
`get_s2 <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/s2.irp.f#L1>`_ `get_s2 <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/s2.irp.f#L1>`_
Returns <S^2> Returns <S^2>
`get_s2_u0 <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/s2.irp.f#L82>`_ `get_s2_u0 <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/s2.irp.f#L82>`_
Undocumented Undocumented
`s2_values <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/s2.irp.f#L67>`_ `s2_values <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/s2.irp.f#L67>`_
array of the averaged values of the S^2 operator on the various states array of the averaged values of the S^2 operator on the various states
`s_z <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/s2.irp.f#L36>`_ `s_z <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/s2.irp.f#L36>`_
z component of the Spin z component of the Spin
`s_z2_sz <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/s2.irp.f#L37>`_ `s_z2_sz <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/s2.irp.f#L37>`_
z component of the Spin z component of the Spin
`prog_save_casino <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/save_for_casino.irp.f#L266>`_ `prog_save_casino <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/save_for_casino.irp.f#L266>`_
Undocumented Undocumented
`save_casino <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/save_for_casino.irp.f#L1>`_ `save_casino <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/save_for_casino.irp.f#L1>`_
Undocumented Undocumented
`save_dets_qmcchem <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/save_for_qmcchem.irp.f#L1>`_ `save_dets_qmcchem <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/save_for_qmcchem.irp.f#L1>`_
Undocumented Undocumented
`save_for_qmc <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/save_for_qmcchem.irp.f#L48>`_ `save_for_qmc <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/save_for_qmcchem.irp.f#L48>`_
Undocumented Undocumented
`save_natorb <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/save_natorb.irp.f#L1>`_ `save_natorb <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/save_natorb.irp.f#L1>`_
Undocumented Undocumented
`a_operator <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/slater_rules.irp.f#L962>`_ `a_operator <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L962>`_
Needed for diag_H_mat_elem Needed for diag_H_mat_elem
`ac_operator <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/slater_rules.irp.f#L1007>`_ `ac_operator <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L1007>`_
Needed for diag_H_mat_elem Needed for diag_H_mat_elem
`decode_exc <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/slater_rules.irp.f#L76>`_ `decode_exc <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L76>`_
Decodes the exc arrays returned by get_excitation. Decodes the exc arrays returned by get_excitation.
h1,h2 : Holes h1,h2 : Holes
p1,p2 : Particles p1,p2 : Particles
s1,s2 : Spins (1:alpha, 2:beta) s1,s2 : Spins (1:alpha, 2:beta)
degree : Degree of excitation degree : Degree of excitation
`det_connections <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/slater_rules.irp.f#L1139>`_ `det_connections <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L1139>`_
Build connection proxy between determinants Build connection proxy between determinants
`diag_h_mat_elem <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/slater_rules.irp.f#L900>`_ `diag_h_mat_elem <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L900>`_
Computes <i|H|i> Computes <i|H|i>
`get_double_excitation <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/slater_rules.irp.f#L141>`_ `get_double_excitation <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L141>`_
Returns the two excitation operators between two doubly excited determinants and the phase Returns the two excitation operators between two doubly excited determinants and the phase
`get_excitation <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/slater_rules.irp.f#L30>`_ `get_excitation <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L30>`_
Returns the excitation operators between two determinants and the phase Returns the excitation operators between two determinants and the phase
`get_excitation_degree <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/slater_rules.irp.f#L1>`_ `get_excitation_degree <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L1>`_
Returns the excitation degree between two determinants Returns the excitation degree between two determinants
`get_excitation_degree_vector <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/slater_rules.irp.f#L816>`_ `get_excitation_degree_vector <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L816>`_
Applies get_excitation_degree to an array of determinants Applies get_excitation_degree to an array of determinants
`get_mono_excitation <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/slater_rules.irp.f#L274>`_ `get_mono_excitation <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L274>`_
Returns the excitation operator between two singly excited determinants and the phase Returns the excitation operator between two singly excited determinants and the phase
`get_occ_from_key <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/slater_rules.irp.f#L1055>`_ `get_occ_from_key <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L1055>`_
Returns a list of occupation numbers from a bitstring Returns a list of occupation numbers from a bitstring
`h_u_0 <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/slater_rules.irp.f#L1071>`_ `h_u_0 <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L1071>`_
Computes v_0 = H|u_0> Computes v_0 = H|u_0>
.br .br
n : number of determinants n : number of determinants
.br .br
H_jj : array of <j|H|j> H_jj : array of <j|H|j>
`i_h_j <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/slater_rules.irp.f#L355>`_ `i_h_j <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L355>`_
Returns <i|H|j> where i and j are determinants Returns <i|H|j> where i and j are determinants
`i_h_j_verbose <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/slater_rules.irp.f#L492>`_ `i_h_j_verbose <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L492>`_
Returns <i|H|j> where i and j are determinants Returns <i|H|j> where i and j are determinants
`i_h_psi <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/slater_rules.irp.f#L631>`_ `i_h_psi <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L631>`_
<key|H|psi> for the various Nstates <key|H|psi> for the various Nstates
`i_h_psi_sc2 <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/slater_rules.irp.f#L713>`_ `i_h_psi_sc2 <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L713>`_
<key|H|psi> for the various Nstate <key|H|psi> for the various Nstate
.br .br
returns in addition returns in addition
@ -610,7 +604,7 @@ Documentation
.br .br
to repeat the excitations to repeat the excitations
`i_h_psi_sc2_verbose <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/slater_rules.irp.f#L760>`_ `i_h_psi_sc2_verbose <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L760>`_
<key|H|psi> for the various Nstate <key|H|psi> for the various Nstate
.br .br
returns in addition returns in addition
@ -623,73 +617,73 @@ Documentation
.br .br
to repeat the excitations to repeat the excitations
`i_h_psi_sec_ord <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/slater_rules.irp.f#L666>`_ `i_h_psi_sec_ord <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L666>`_
<key|H|psi> for the various Nstates <key|H|psi> for the various Nstates
`n_con_int <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/slater_rules.irp.f#L1131>`_ `n_con_int <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L1131>`_
Number of integers to represent the connections between determinants Number of integers to represent the connections between determinants
`create_wf_of_psi_svd_matrix <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/spindeterminants.irp.f#L473>`_ `create_wf_of_psi_svd_matrix <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L473>`_
Matrix of wf coefficients. Outer product of alpha and beta determinants Matrix of wf coefficients. Outer product of alpha and beta determinants
`generate_all_alpha_beta_det_products <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/spindeterminants.irp.f#L528>`_ `generate_all_alpha_beta_det_products <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L528>`_
Create a wave function from all possible alpha x beta determinants Create a wave function from all possible alpha x beta determinants
`get_index_in_psi_det_alpha_unique <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/spindeterminants.irp.f#L131>`_ `get_index_in_psi_det_alpha_unique <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L131>`_
Returns the index of the determinant in the ``psi_det_alpha_unique`` array 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/Dets/spindeterminants.irp.f#L212>`_ `get_index_in_psi_det_beta_unique <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L212>`_
Returns the index of the determinant in the ``psi_det_beta_unique`` array Returns the index of the determinant in the ``psi_det_beta_unique`` array
`n_det_alpha_unique <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/spindeterminants.irp.f#L54>`_ `n_det_alpha_unique <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L54>`_
Unique alpha determinants Unique alpha determinants
`n_det_beta_unique <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/spindeterminants.irp.f#L91>`_ `n_det_beta_unique <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L91>`_
Unique beta determinants Unique beta determinants
`psi_det_alpha <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/spindeterminants.irp.f#L25>`_ `psi_det_alpha <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L25>`_
List of alpha determinants of psi_det List of alpha determinants of psi_det
`psi_det_alpha_unique <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/spindeterminants.irp.f#L53>`_ `psi_det_alpha_unique <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L53>`_
Unique alpha determinants Unique alpha determinants
`psi_det_beta <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/spindeterminants.irp.f#L39>`_ `psi_det_beta <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L39>`_
List of beta determinants of psi_det List of beta determinants of psi_det
`psi_det_beta_unique <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/spindeterminants.irp.f#L90>`_ `psi_det_beta_unique <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L90>`_
Unique beta determinants Unique beta determinants
`psi_svd_alpha <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/spindeterminants.irp.f#L568>`_ `psi_svd_alpha <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L568>`_
SVD wave function SVD wave function
`psi_svd_beta <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/spindeterminants.irp.f#L569>`_ `psi_svd_beta <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L569>`_
SVD wave function SVD wave function
`psi_svd_coefs <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/spindeterminants.irp.f#L570>`_ `psi_svd_coefs <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L570>`_
SVD wave function SVD wave function
`psi_svd_matrix <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/spindeterminants.irp.f#L457>`_ `psi_svd_matrix <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L457>`_
Matrix of wf coefficients. Outer product of alpha and beta determinants Matrix of wf coefficients. Outer product of alpha and beta determinants
`psi_svd_matrix_columns <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/spindeterminants.irp.f#L398>`_ `psi_svd_matrix_columns <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L398>`_
Matrix of wf coefficients. Outer product of alpha and beta determinants Matrix of wf coefficients. Outer product of alpha and beta determinants
`psi_svd_matrix_rows <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/spindeterminants.irp.f#L397>`_ `psi_svd_matrix_rows <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L397>`_
Matrix of wf coefficients. Outer product of alpha and beta determinants Matrix of wf coefficients. Outer product of alpha and beta determinants
`psi_svd_matrix_values <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/spindeterminants.irp.f#L396>`_ `psi_svd_matrix_values <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L396>`_
Matrix of wf coefficients. Outer product of alpha and beta determinants Matrix of wf coefficients. Outer product of alpha and beta determinants
`spin_det_search_key <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/spindeterminants.irp.f#L9>`_ `spin_det_search_key <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L9>`_
Return an integer*8 corresponding to a determinant index for searching Return an integer*8 corresponding to a determinant index for searching
`write_spindeterminants <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/spindeterminants.irp.f#L294>`_ `write_spindeterminants <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/spindeterminants.irp.f#L294>`_
Undocumented Undocumented
`cisd <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/truncate_wf.irp.f#L1>`_ `cisd <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/truncate_wf.irp.f#L1>`_
Undocumented Undocumented
`h_matrix_all_dets <http://github.com/LCPQ/quantum_package/tree/master/src/Dets/utils.irp.f#L1>`_ `h_matrix_all_dets <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/utils.irp.f#L1>`_
H matrix on the basis of the slater determinants defined by psi_det H matrix on the basis of the slater determinants defined by psi_det

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