#include <cstdlib>
#include <cstdio>
#include <memory.h>
#include <assert.h>
#include <vector>
#include "ci.h"
#include "output.h"
#include "utilities.h"
#include "integrals_2el_explicit.h"
#include "densfromf_full.h"
#include "../matrix/gblas.h"
Classes | |
struct | four_idx_AO_struct |
struct | four_idx_SO_struct |
struct | two_idx_SO_struct |
struct | SO_struct |
struct | SlaterDet_struct |
struct | SlaterDet_pair_struct |
struct | contrib_debug_struct |
struct | pair_status_struct |
struct | pqrs_struct |
Typedefs | |
typedef ergo_real * | ergp_real_ptr |
Functions | |
static ergo_real | get_vector_norm (int n, const ergo_real *v) |
static void | normalize_vector (int n, ergo_real *v) |
void | get_1el_energy_and_gradient (int nSOs, int nEl, int nSlaterDets, const SlaterDet_struct *SlaterDetList, int nSlaterDetPairs, const SlaterDet_pair_struct *SlaterDet_pair_list, const int *pairCountList, int noOfTrialVectors, ergo_real *energy_list, ergo_real **coeffListList, const two_idx_SO_struct *h_SO, ergo_real **resultGradient_list) |
void | get_1el_contribs_to_mult_or_dmat (int nSOs, int nEl, int nSlaterDets, const SlaterDet_struct *SlaterDetList, const SlaterDet_pair_struct *SlaterDetPair, const two_idx_SO_struct *h_SO, const ergo_real *sourceVector, ergo_real *resultVector, two_idx_SO_struct *resultdmat) |
void | get_1el_contribs (int nSOs, int nEl, int nSlaterDets, const SlaterDet_struct *SlaterDetList, int nSlaterDetPairs, const SlaterDet_pair_struct *SlaterDet_pair_list, const int *pairCountList, const two_idx_SO_struct *h_SO, ergo_real *resultMatrix) |
void | get_2el_energy_and_gradient (int nSOs, int nEl, int nSlaterDets, const SlaterDet_struct *SlaterDetList, int nSlaterDetPairs, const SlaterDet_pair_struct *SlaterDet_pair_list, const int *pairCountList, int noOfTrialVectors, ergo_real *energy_list, ergo_real **coeffListList, const four_idx_SO_struct *g_SO, ergo_real **resultGradient_list) |
void | get_2el_contribs_to_mult_or_dmat (int nSOs, int nEl, int nSlaterDets, const SlaterDet_struct *SlaterDetList, const SlaterDet_pair_struct *SlaterDetPair, const four_idx_SO_struct *g_SO, const ergo_real *sourceVector, ergo_real *resultVector, four_idx_SO_struct *result_dmat_2el) |
void | get_2el_contribs (int nSOs, int nEl, int nSlaterDets, const SlaterDet_struct *SlaterDetList, int nSlaterDetPairs, const SlaterDet_pair_struct *SlaterDet_pair_list, const int *pairCountList, const four_idx_SO_struct *g_SO, ergo_real *resultMatrix) |
int | get_1e_density_matrix (int nSOs, int nEl, two_idx_SO_struct *D, int nSlaterDets, const SlaterDet_struct *SlaterDetList, const ergo_real *coeffList) |
int | get_2e_density_matrix (int nSOs, int nEl, four_idx_SO_struct *d, int nSlaterDets, const SlaterDet_struct *SlaterDetList, const ergo_real *coeffList) |
ergo_real | get_CI_energy (int nSOs, int nEl, const four_idx_SO_struct *g_SO, const two_idx_SO_struct *h_SO, int nSlaterDets, const SlaterDet_struct *SlaterDetList, const ergo_real *coeffList, ergo_real nuclearEnergy) |
void | get_CI_energy_and_gradient (int nSOs, int nEl, const four_idx_SO_struct *g_SO, const two_idx_SO_struct *h_SO, int nSlaterDets, const SlaterDet_struct *SlaterDetList, int nSlaterDetPairs, const SlaterDet_pair_struct *SlaterDet_pair_list, const int *pairCountList, int noOfTrialVectors, ergo_real *energyList, ergo_real **coeffListList, ergo_real **gradientList, ergo_real nuclearEnergy) |
void | mult_by_CI_matrix (int nSOs, int nEl, const four_idx_SO_struct *g_SO, const two_idx_SO_struct *h_SO, int nSlaterDets, const SlaterDet_struct *SlaterDetList, int nSlaterDetPairs, const SlaterDet_pair_struct *SlaterDet_pair_list, const int *pairCountList, const ergo_real *sourceVector, ergo_real *resultVector, ergo_real shift) |
void | get_CI_matrix (int nSOs, int nEl, const four_idx_SO_struct *g_SO, const two_idx_SO_struct *h_SO, int nSlaterDets, const SlaterDet_struct *SlaterDetList, int nSlaterDetPairs, const SlaterDet_pair_struct *SlaterDet_pair_list, const int *pairCountList, ergo_real *resultMatrix) |
int | get_combinations (SlaterDet_struct *SlaterDetList, int nEl, int nSOs) |
int | get_FCI_Slater_dets_alpha_beta (SlaterDet_struct *SlaterDetList, int nEl_a, int nEl_b, int nSOs) |
int | get_FCI_Slater_dets_all (SlaterDet_struct *SlaterDetList, int nElTot, int nSOs) |
static ergo_real | rand_m1_to_1 () |
void | get_relevant_SlaterDet_pairs_recursive_do_mult_or_dmat (SlaterDet_struct **groupList, int nEl, int level, int groupIdx1, int groupIdx2, int ia, int ib, int aDiffCount, int bDiffCount, pair_status_struct *status, int nSOs, int nSlaterDets, const SlaterDet_struct *SlaterDetList, const four_idx_SO_struct *g_SO, const two_idx_SO_struct *h_SO, const ergo_real *sourceVector, ergo_real *resultVector, two_idx_SO_struct *result_dmat_1el, four_idx_SO_struct *result_dmat_2el) |
void | mult_by_CI_matrix_direct (int nSOs, int nEl, const four_idx_SO_struct *g_SO, const two_idx_SO_struct *h_SO, int nSlaterDets, const SlaterDet_struct *SlaterDetList, SlaterDet_struct **groupList, const ergo_real *sourceVector, ergo_real *resultVector, ergo_real shift) |
static ergo_real | get_SlaterDet_energy (int nSOs, int nEl, const four_idx_SO_struct *g_SO, const two_idx_SO_struct *h_SO, const SlaterDet_struct *SlaterDet) |
int | get_relevant_SlaterDet_pairs_recursive_2 (SlaterDet_struct **groupList, int nEl, SlaterDet_pair_struct *resultList, int level, int groupIdx1, int groupIdx2, int ia, int ib, int aDiffCount, int bDiffCount, pair_status_struct *status) |
int | get_relevant_SlaterDet_pairs_recursive (int nSlaterDets, SlaterDet_struct *SlaterDetList, SlaterDet_struct **groupList, int nEl, SlaterDet_pair_struct *resultList, int level, int groupIdx1, int groupIdx2) |
int | get_relevant_SlaterDet_pairs (int nSlaterDets, SlaterDet_struct *SlaterDetList, SlaterDet_struct **groupList, int nEl, SlaterDet_pair_struct *resultList) |
ergo_real | get_eigs (int n, ergo_real *M, ergo_real *bestVector, ergo_real *eigValListResult) |
int | get_Lowdin_orbitals (int n, const ergo_real *S, ergo_real *MOs) |
ergo_real | do_lanczos_method_direct (int n, ergo_real *v, int nSOs, int nEl, const four_idx_SO_struct *g_SO, const two_idx_SO_struct *h_SO, int nSlaterDets, const SlaterDet_struct *SlaterDetList, SlaterDet_struct **groupList, int maxIterations_in, ergo_real nucRepEnergy, ergo_real shift) |
ergo_real | do_lanczos_method (int n, ergo_real *A, ergo_real *v) |
int | do_power_method (int n, ergo_real *A, ergo_real *v) |
int | do_CI (const BasisInfoStruct &basisInfo, const IntegralInfo *integralInfo, const CI::Options &options, const ergo_real *S, const ergo_real *h_AO, const ergo_real *F_a, const ergo_real *F_b, int n_el_a, int n_el_b, ergo_real nuclearEnergy, ergo_real HF_energy) |
Variables | |
const int | MAX_AOS = 30 |
const int | MAX_SOS = 2 * MAX_AOS |
const int | MAX_ELECTRONS = 40 |
const int | SPIN_A = 1 |
const int | SPIN_B = 2 |
typedef ergo_real* ergp_real_ptr |
int do_CI | ( | const BasisInfoStruct & | basisInfo, | |
const IntegralInfo * | integralInfo, | |||
const CI::Options & | options, | |||
const ergo_real * | S, | |||
const ergo_real * | h_AO, | |||
const ergo_real * | F_a, | |||
const ergo_real * | F_b, | |||
int | n_el_a, | |||
int | n_el_b, | |||
ergo_real | nuclearEnergy, | |||
ergo_real | HF_energy | |||
) |
ergo_real do_lanczos_method_direct | ( | int | n, | |
ergo_real * | v, | |||
int | nSOs, | |||
int | nEl, | |||
const four_idx_SO_struct * | g_SO, | |||
const two_idx_SO_struct * | h_SO, | |||
int | nSlaterDets, | |||
const SlaterDet_struct * | SlaterDetList, | |||
SlaterDet_struct ** | groupList, | |||
int | maxIterations_in, | |||
ergo_real | nucRepEnergy, | |||
ergo_real | shift | |||
) |
int get_1e_density_matrix | ( | int | nSOs, | |
int | nEl, | |||
two_idx_SO_struct * | D, | |||
int | nSlaterDets, | |||
const SlaterDet_struct * | SlaterDetList, | |||
const ergo_real * | coeffList | |||
) |
void get_1el_contribs | ( | int | nSOs, | |
int | nEl, | |||
int | nSlaterDets, | |||
const SlaterDet_struct * | SlaterDetList, | |||
int | nSlaterDetPairs, | |||
const SlaterDet_pair_struct * | SlaterDet_pair_list, | |||
const int * | pairCountList, | |||
const two_idx_SO_struct * | h_SO, | |||
ergo_real * | resultMatrix | |||
) |
void get_1el_contribs_to_mult_or_dmat | ( | int | nSOs, | |
int | nEl, | |||
int | nSlaterDets, | |||
const SlaterDet_struct * | SlaterDetList, | |||
const SlaterDet_pair_struct * | SlaterDetPair, | |||
const two_idx_SO_struct * | h_SO, | |||
const ergo_real * | sourceVector, | |||
ergo_real * | resultVector, | |||
two_idx_SO_struct * | resultdmat | |||
) |
void get_1el_energy_and_gradient | ( | int | nSOs, | |
int | nEl, | |||
int | nSlaterDets, | |||
const SlaterDet_struct * | SlaterDetList, | |||
int | nSlaterDetPairs, | |||
const SlaterDet_pair_struct * | SlaterDet_pair_list, | |||
const int * | pairCountList, | |||
int | noOfTrialVectors, | |||
ergo_real * | energy_list, | |||
ergo_real ** | coeffListList, | |||
const two_idx_SO_struct * | h_SO, | |||
ergo_real ** | resultGradient_list | |||
) |
int get_2e_density_matrix | ( | int | nSOs, | |
int | nEl, | |||
four_idx_SO_struct * | d, | |||
int | nSlaterDets, | |||
const SlaterDet_struct * | SlaterDetList, | |||
const ergo_real * | coeffList | |||
) |
void get_2el_contribs | ( | int | nSOs, | |
int | nEl, | |||
int | nSlaterDets, | |||
const SlaterDet_struct * | SlaterDetList, | |||
int | nSlaterDetPairs, | |||
const SlaterDet_pair_struct * | SlaterDet_pair_list, | |||
const int * | pairCountList, | |||
const four_idx_SO_struct * | g_SO, | |||
ergo_real * | resultMatrix | |||
) |
void get_2el_contribs_to_mult_or_dmat | ( | int | nSOs, | |
int | nEl, | |||
int | nSlaterDets, | |||
const SlaterDet_struct * | SlaterDetList, | |||
const SlaterDet_pair_struct * | SlaterDetPair, | |||
const four_idx_SO_struct * | g_SO, | |||
const ergo_real * | sourceVector, | |||
ergo_real * | resultVector, | |||
four_idx_SO_struct * | result_dmat_2el | |||
) |
void get_2el_energy_and_gradient | ( | int | nSOs, | |
int | nEl, | |||
int | nSlaterDets, | |||
const SlaterDet_struct * | SlaterDetList, | |||
int | nSlaterDetPairs, | |||
const SlaterDet_pair_struct * | SlaterDet_pair_list, | |||
const int * | pairCountList, | |||
int | noOfTrialVectors, | |||
ergo_real * | energy_list, | |||
ergo_real ** | coeffListList, | |||
const four_idx_SO_struct * | g_SO, | |||
ergo_real ** | resultGradient_list | |||
) |
ergo_real get_CI_energy | ( | int | nSOs, | |
int | nEl, | |||
const four_idx_SO_struct * | g_SO, | |||
const two_idx_SO_struct * | h_SO, | |||
int | nSlaterDets, | |||
const SlaterDet_struct * | SlaterDetList, | |||
const ergo_real * | coeffList, | |||
ergo_real | nuclearEnergy | |||
) |
void get_CI_energy_and_gradient | ( | int | nSOs, | |
int | nEl, | |||
const four_idx_SO_struct * | g_SO, | |||
const two_idx_SO_struct * | h_SO, | |||
int | nSlaterDets, | |||
const SlaterDet_struct * | SlaterDetList, | |||
int | nSlaterDetPairs, | |||
const SlaterDet_pair_struct * | SlaterDet_pair_list, | |||
const int * | pairCountList, | |||
int | noOfTrialVectors, | |||
ergo_real * | energyList, | |||
ergo_real ** | coeffListList, | |||
ergo_real ** | gradientList, | |||
ergo_real | nuclearEnergy | |||
) |
void get_CI_matrix | ( | int | nSOs, | |
int | nEl, | |||
const four_idx_SO_struct * | g_SO, | |||
const two_idx_SO_struct * | h_SO, | |||
int | nSlaterDets, | |||
const SlaterDet_struct * | SlaterDetList, | |||
int | nSlaterDetPairs, | |||
const SlaterDet_pair_struct * | SlaterDet_pair_list, | |||
const int * | pairCountList, | |||
ergo_real * | resultMatrix | |||
) |
int get_combinations | ( | SlaterDet_struct * | SlaterDetList, | |
int | nEl, | |||
int | nSOs | |||
) |
int get_FCI_Slater_dets_all | ( | SlaterDet_struct * | SlaterDetList, | |
int | nElTot, | |||
int | nSOs | |||
) |
int get_FCI_Slater_dets_alpha_beta | ( | SlaterDet_struct * | SlaterDetList, | |
int | nEl_a, | |||
int | nEl_b, | |||
int | nSOs | |||
) |
int get_relevant_SlaterDet_pairs | ( | int | nSlaterDets, | |
SlaterDet_struct * | SlaterDetList, | |||
SlaterDet_struct ** | groupList, | |||
int | nEl, | |||
SlaterDet_pair_struct * | resultList | |||
) |
int get_relevant_SlaterDet_pairs_recursive | ( | int | nSlaterDets, | |
SlaterDet_struct * | SlaterDetList, | |||
SlaterDet_struct ** | groupList, | |||
int | nEl, | |||
SlaterDet_pair_struct * | resultList, | |||
int | level, | |||
int | groupIdx1, | |||
int | groupIdx2 | |||
) |
int get_relevant_SlaterDet_pairs_recursive_2 | ( | SlaterDet_struct ** | groupList, | |
int | nEl, | |||
SlaterDet_pair_struct * | resultList, | |||
int | level, | |||
int | groupIdx1, | |||
int | groupIdx2, | |||
int | ia, | |||
int | ib, | |||
int | aDiffCount, | |||
int | bDiffCount, | |||
pair_status_struct * | status | |||
) |
void get_relevant_SlaterDet_pairs_recursive_do_mult_or_dmat | ( | SlaterDet_struct ** | groupList, | |
int | nEl, | |||
int | level, | |||
int | groupIdx1, | |||
int | groupIdx2, | |||
int | ia, | |||
int | ib, | |||
int | aDiffCount, | |||
int | bDiffCount, | |||
pair_status_struct * | status, | |||
int | nSOs, | |||
int | nSlaterDets, | |||
const SlaterDet_struct * | SlaterDetList, | |||
const four_idx_SO_struct * | g_SO, | |||
const two_idx_SO_struct * | h_SO, | |||
const ergo_real * | sourceVector, | |||
ergo_real * | resultVector, | |||
two_idx_SO_struct * | result_dmat_1el, | |||
four_idx_SO_struct * | result_dmat_2el | |||
) |
static ergo_real get_SlaterDet_energy | ( | int | nSOs, | |
int | nEl, | |||
const four_idx_SO_struct * | g_SO, | |||
const two_idx_SO_struct * | h_SO, | |||
const SlaterDet_struct * | SlaterDet | |||
) | [static] |
void mult_by_CI_matrix | ( | int | nSOs, | |
int | nEl, | |||
const four_idx_SO_struct * | g_SO, | |||
const two_idx_SO_struct * | h_SO, | |||
int | nSlaterDets, | |||
const SlaterDet_struct * | SlaterDetList, | |||
int | nSlaterDetPairs, | |||
const SlaterDet_pair_struct * | SlaterDet_pair_list, | |||
const int * | pairCountList, | |||
const ergo_real * | sourceVector, | |||
ergo_real * | resultVector, | |||
ergo_real | shift | |||
) |
void mult_by_CI_matrix_direct | ( | int | nSOs, | |
int | nEl, | |||
const four_idx_SO_struct * | g_SO, | |||
const two_idx_SO_struct * | h_SO, | |||
int | nSlaterDets, | |||
const SlaterDet_struct * | SlaterDetList, | |||
SlaterDet_struct ** | groupList, | |||
const ergo_real * | sourceVector, | |||
ergo_real * | resultVector, | |||
ergo_real | shift | |||
) |
static void normalize_vector | ( | int | n, | |
ergo_real * | v | |||
) | [static] |
static ergo_real rand_m1_to_1 | ( | ) | [static] |
const int MAX_AOS = 30 |
const int MAX_ELECTRONS = 40 |
const int SPIN_A = 1 |
const int SPIN_B = 2 |