#include <stdlib.h>
#include <math.h>
#include <stdio.h>
#include <errno.h>
#include <memory.h>
#include <time.h>
#include <stdarg.h>
#include <assert.h>
#include <vector>
#include "integrals_1el.h"
#include "integrals_1el_potential.h"
#include "memorymanag.h"
#include "pi.h"
#include "output.h"
#include "utilities.h"
#include "boysfunction.h"
#include "integral_info.h"
#include "integrals_general.h"
#include "box_system.h"
#include "multipole.h"
#include "integrals_2el_single.h"
#include "integrals_1el_single.h"
#include "integrals_hermite.h"
#include "matrix_norm.h"
#include "mm_limit_table.h"
Classes | |
struct | atom_box_struct |
struct | DistributionSpecStructWithPairIdx |
struct | group_struct |
Functions | |
static ergo_real | get_distance_3d (const ergo_real *x, const ergo_real *y) |
static int | create_nuclei_mm_tree (int nAtoms, const Atom *atomList, ergo_real boxSize, atom_box_struct **return_boxList, int *return_numberOfLevels, Atom **return_atomListReordered) |
static int | do_interaction_recursive (const IntegralInfo &integralInfo, ergo_real *V_list, int noOfBasisFuncIndexPairs, const DistributionSpecStructWithPairIdx *list, int nDistrs, const multipole_struct_small *multipoleList, const ergo_real *maxMomentVectorNormForDistrsList, int maxNoOfMomentsForDistrs, int maxDegreeForDistrs, ergo_real distrExtent, const Atom *atomListReordered, ergo_real threshold, const atom_box_struct *boxList, MMInteractor &interactor, int boxIndex, int currLevel, int numberOfLevels) |
Take care of interaction between list of distrs and box. | |
static int | get_list_of_distrs_for_V (const BasisInfoStruct &basisInfo, const basis_func_index_pair_struct_1el *basisFuncIndexPairList, int noOfBasisFuncIndexPairs, ergo_real threshold, ergo_real maxCharge, DistributionSpecStructWithPairIdx *resultList, int maxCountResult) |
static int | compare_distrs (const void *p1, const void *p2) |
static int | sort_distr_list (DistributionSpecStructWithPairIdx *list, int n) |
static ergo_real | getSafeMaxDistance (const BasisInfoStruct &basisInfo, const Molecule &molecule) |
int | compute_V_linear (const BasisInfoStruct &basisInfo, const IntegralInfo &integralInfo, const Molecule &molecule, ergo_real threshold, ergo_real boxSize, const basis_func_index_pair_struct_1el *basisFuncIndexPairList, ergo_real *V_list, int noOfBasisFuncIndexPairs) |
static ergo_real | simplePrimVintegralSingle (DistributionSpecStruct *prim, const Atom *atom, const IntegralInfo *integralInfo) |
static ergo_real | simplePrimVintegral_list (DistributionSpecStruct *list, int nPrims, const Atom *atom, ergo_real threshold, const IntegralInfo *integralInfo) |
int | compute_V_matrix_full (const BasisInfoStruct &basisInfo, const IntegralInfo &integralInfo, int nAtoms, const Atom *atomList, ergo_real threshold, ergo_real *result) |
Variables | |
const ergo_real | tolernance_dist = 1e-10 |
const ergo_real | tolernance_exponent = 1e-11 |
static int compare_distrs | ( | const void * | p1, | |
const void * | p2 | |||
) | [static] |
References DistributionSpecStruct_::centerCoords, DistributionSpecStructWithPairIdx::distr, DistributionSpecStruct_::exponent, tolernance_dist, and tolernance_exponent.
Referenced by compute_V_linear(), and sort_distr_list().
int compute_V_linear | ( | const BasisInfoStruct & | basisInfo, | |
const IntegralInfo & | integralInfo, | |||
const Molecule & | molecule, | |||
ergo_real | threshold, | |||
ergo_real | boxSize, | |||
const basis_func_index_pair_struct_1el * | basisFuncIndexPairList, | |||
ergo_real * | V_list, | |||
int | noOfBasisFuncIndexPairs | |||
) |
References A, Molecule::atoms, Atom::charge, compare_distrs(), compute_multipole_moments(), create_nuclei_mm_tree(), multipole_struct_small::degree, DistributionSpecStructWithPairIdx::distr, do_interaction_recursive(), do_output(), DistributionSpecStruct_::exponent, get_list_of_distrs_for_V(), getSafeMaxDistance(), init_multipole_code(), LOG_AREA_INTEGRALS, LOG_CAT_ERROR, LOG_CAT_INFO, MAX_MULTIPOLE_DEGREE_BASIC, mm_limits_init(), multipole_struct_small::momentList, Molecule::noOfAtoms, multipole_struct_small::noOfMoments, and sort_distr_list().
Referenced by compute_V_sparse().
int compute_V_matrix_full | ( | const BasisInfoStruct & | basisInfo, | |
const IntegralInfo & | integralInfo, | |||
int | nAtoms, | |||
const Atom * | atomList, | |||
ergo_real | threshold, | |||
ergo_real * | result | |||
) |
References A, BasisInfoStruct::basisFuncList, do_output(), get_product_simple_prims(), LOG_AREA_INTEGRALS, LOG_CAT_ERROR, BasisInfoStruct::noOfBasisFuncs, BasisFuncStruct_::noOfSimplePrimitives, BasisFuncStruct_::simplePrimitiveIndex, BasisInfoStruct::simplePrimitiveList, and simplePrimVintegral_list().
Referenced by compute_h_core_matrix_full(), savePotential(), and test_V_by_explicit_comparison().
static int create_nuclei_mm_tree | ( | int | nAtoms, | |
const Atom * | atomList, | |||
ergo_real | boxSize, | |||
atom_box_struct ** | return_boxList, | |||
int * | return_numberOfLevels, | |||
Atom ** | return_atomListReordered | |||
) | [static] |
References A, B, atom_box_struct::basicBox, BoxSystem::boxList, multipole_struct_large::centerCoords, box_struct_basic::centerCoords, atom_box_struct::centerOfChargeCoords, Atom::charge, Atom::coords, BoxSystem::create_box_system(), multipole_struct_small::degree, multipole_struct_large::degree, do_output(), box_struct_basic::firstChildBoxIndex, box_struct_basic::firstItemIndex, MMTranslator::getTranslationMatrix(), BoxSystem::levelList, LOG_AREA_INTEGRALS, LOG_CAT_ERROR, MAX_MULTIPOLE_DEGREE, MAX_NO_OF_MOMENTS_PER_MULTIPOLE, multipole_struct_large::momentList, multipole_struct_small::momentList, atom_box_struct::multipole, box_level_struct::noOfBoxes, box_struct_basic::noOfChildBoxes, box_struct_basic::noOfItems, BoxSystem::noOfLevels, multipole_struct_small::noOfMoments, multipole_struct_large::noOfMoments, box_item_struct::originalIndex, setup_multipole_maxAbsMomentList(), box_level_struct::startIndexInBoxList, and BoxSystem::totNoOfBoxes.
Referenced by compute_V_linear().
static int do_interaction_recursive | ( | const IntegralInfo & | integralInfo, | |
ergo_real * | V_list, | |||
int | noOfBasisFuncIndexPairs, | |||
const DistributionSpecStructWithPairIdx * | list, | |||
int | nDistrs, | |||
const multipole_struct_small * | multipoleList, | |||
const ergo_real * | maxMomentVectorNormForDistrsList, | |||
int | maxNoOfMomentsForDistrs, | |||
int | maxDegreeForDistrs, | |||
ergo_real | distrExtent, | |||
const Atom * | atomListReordered, | |||
ergo_real | threshold, | |||
const atom_box_struct * | boxList, | |||
MMInteractor & | interactor, | |||
int | boxIndex, | |||
int | currLevel, | |||
int | numberOfLevels | |||
) | [static] |
Take care of interaction between list of distrs and box.
References A, B, atom_box_struct::basicBox, DistributionSpecStruct_::centerCoords, multipole_struct_large::centerCoords, box_struct_basic::centerCoords, Atom::charge, DistributionSpecStruct_::coeff, Atom::coords, distance(), DistributionSpecStructWithPairIdx::distr, DistributionSpecStruct_::exponent, box_struct_basic::firstChildBoxIndex, box_struct_basic::firstItemIndex, get_distance_3d(), get_related_integrals_hermite(), MMInteractor::getInteractionMatrix(), IntegralInfo::hermite_conversion_info, MAX_MULTIPOLE_DEGREE, MAX_NO_OF_MOMENTS_PER_MULTIPOLE, mm_limits_get_minimum_multipole_degree_needed(), multipole_struct_large::momentList, monomial_info_struct::monomial_index_list, IntegralInfo::monomial_info, DistributionSpecStruct_::monomialInts, hermite_conversion_info_struct::multiply_by_hermite_conversion_matrix_from_right(), atom_box_struct::multipole, monomial_info_struct::no_of_monomials_list, box_struct_basic::noOfChildBoxes, box_struct_basic::noOfItems, multipole_struct_small::noOfMoments, DistributionSpecStructWithPairIdx::pairIdx, pi, and box_struct_basic::width.
Referenced by compute_V_linear().
Referenced by do_interaction_recursive().
static int get_list_of_distrs_for_V | ( | const BasisInfoStruct & | basisInfo, | |
const basis_func_index_pair_struct_1el * | basisFuncIndexPairList, | |||
int | noOfBasisFuncIndexPairs, | |||
ergo_real | threshold, | |||
ergo_real | maxCharge, | |||
DistributionSpecStructWithPairIdx * | resultList, | |||
int | maxCountResult | |||
) | [static] |
References DistributionSpecStruct_::coeff, DistributionSpecStructWithPairIdx::distr, do_output(), DistributionSpecStruct_::exponent, get_product_simple_primitives(), basis_func_index_pair_struct_1el::index_1, basis_func_index_pair_struct_1el::index_2, LOG_AREA_INTEGRALS, LOG_CAT_ERROR, DistributionSpecStructWithPairIdx::pairIdx, pi, and POLY_PRODUCT_MAX_DISTRS.
Referenced by compute_V_linear().
static ergo_real getSafeMaxDistance | ( | const BasisInfoStruct & | basisInfo, | |
const Molecule & | molecule | |||
) | [static] |
static ergo_real simplePrimVintegral_list | ( | DistributionSpecStruct * | list, | |
int | nPrims, | |||
const Atom * | atom, | |||
ergo_real | threshold, | |||
const IntegralInfo * | integralInfo | |||
) | [static] |
References simplePrimVintegralSingle().
Referenced by compute_V_matrix_full().
static ergo_real simplePrimVintegralSingle | ( | DistributionSpecStruct * | prim, | |
const Atom * | atom, | |||
const IntegralInfo * | integralInfo | |||
) | [static] |
References Atom::charge, Atom::coords, and do_1e_repulsion_integral_using_symb_info().
Referenced by simplePrimVintegral_list().
static int sort_distr_list | ( | DistributionSpecStructWithPairIdx * | list, | |
int | n | |||
) | [static] |
References compare_distrs().
Referenced by compute_V_linear().
const ergo_real tolernance_dist = 1e-10 |
Referenced by compare_distrs().
const ergo_real tolernance_exponent = 1e-11 |
Referenced by compare_distrs().