ergo
|
#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 void | get_multipole_contribs_for_atom (multipole_struct_large &boxMultipole, ergo_real *multipolePointCoords, const Atom &currAtom, const MMTranslator &translator) |
static void | init_multipole_struct_large (multipole_struct_large &boxMultipole, const ergo_real *multipolePointCoords) |
static int | create_nuclei_mm_tree (int nAtoms, const Atom *atomList, ergo_real boxSize, BoxSystem &boxSystem, atom_box_struct **return_boxList, int *return_numberOfLevels, Atom **return_atomListReordered, int *return_atomPermutation, bool compute_gradient_also) |
static int | do_interaction_recursive (const IntegralInfo &integralInfo, ergo_real *V_list, int noOfBasisFuncIndexPairs, const basis_func_index_pair_struct_1el *basisFuncIndexPairList, const DistributionSpecStructWithPairIdx *list, int nDistrs, const multipole_struct_small *multipoleList, const ergo_real *maxMomentVectorNormForDistrsList, int maxNoOfMomentsForDistrs, int maxDegreeForDistrs, ergo_real distrExtent, const Atom *atomListReordered, const int *atomPermutation, ergo_real threshold, const atom_box_struct *boxList, MMInteractor &interactor, int boxIndex, int currLevel, int numberOfLevels, bool compute_gradient_also, const ergo_real *D_list, ergo_real *result_gradient_list) |
Take care of interaction between list of distrs and box. More... | |
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_and_gradient_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, bool compute_gradient_also, const ergo_real *D_list, ergo_real *gradient_list) |
static ergo_real | simplePrimVintegralSingle (DistributionSpecStruct *prim, const Atom *atom, const IntegralInfo &integralInfo) |
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) |
|
static |
References DistributionSpecStruct_::centerCoords, DistributionSpecStructWithPairIdx::distr, and DistributionSpecStruct_::exponent.
Referenced by compute_V_and_gradient_linear(), and sort_distr_list().
int compute_V_and_gradient_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, | ||
bool | compute_gradient_also, | ||
const ergo_real * | D_list, | ||
ergo_real * | gradient_list | ||
) |
References A, atom_box_struct::basicBox, Atom::charge, compare_distrs(), compute_multipole_moments(), create_nuclei_mm_tree(), multipole_struct_small::degree, atom_box_struct::derivatives_wrt_multipole_moments, DistributionSpecStructWithPairIdx::distr, do_interaction_recursive(), do_output(), DistributionSpecStruct_::exponent, box_struct_basic::firstItemIndex, get_list_of_distrs_for_V(), Molecule::getAtom(), Molecule::getAtomListPtr(), Molecule::getNoOfAtoms(), Molecule::getNuclearRepulsionEnergyGradientContrib(), getSafeMaxDistance(), init_multipole_code(), LOG_AREA_INTEGRALS, LOG_CAT_ERROR, LOG_CAT_INFO, MAX_MULTIPOLE_DEGREE_BASIC, MAX_NO_OF_MOMENTS_PER_MULTIPOLE, mm_limits_init(), multipole_struct_small::momentList, atom_box_struct::multipole_moment_derivatives, box_struct_basic::noOfItems, multipole_struct_small::noOfMoments, Util::TimeMeter::print(), and sort_distr_list().
Referenced by compute_gradient_of_nucl_and_trDV(), and 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 |
References A, B, atom_box_struct::basicBox, BoxSystem::boxList, box_struct_basic::centerCoords, multipole_struct_large::centerCoords, atom_box_struct::centerOfChargeCoords, Atom::charge, Atom::coords, BoxSystem::create_box_system(), multipole_struct_large::degree, atom_box_struct::derivatives_wrt_multipole_moments, do_output(), box_struct_basic::firstChildBoxIndex, box_struct_basic::firstItemIndex, get_multipole_contribs_for_atom(), MMTranslator::getTranslationMatrix(), init_multipole_struct_large(), BoxSystem::levelList, LOG_AREA_INTEGRALS, LOG_CAT_ERROR, MAX_MULTIPOLE_DEGREE, MAX_NO_OF_MOMENTS_PER_MULTIPOLE, multipole_struct_large::momentList, atom_box_struct::multipole, atom_box_struct::multipole_moment_derivatives, box_level_struct::noOfBoxes, box_struct_basic::noOfChildBoxes, box_struct_basic::noOfItems, BoxSystem::noOfLevels, multipole_struct_large::noOfMoments, box_item_struct::originalIndex, setup_multipole_maxAbsMomentList(), box_level_struct::startIndexInBoxList, and BoxSystem::totNoOfBoxes.
Referenced by compute_V_and_gradient_linear().
|
static |
Take care of interaction between list of distrs and box.
References A, B, atom_box_struct::basicBox, box_struct_basic::centerCoords, multipole_struct_large::centerCoords, DistributionSpecStruct_::centerCoords, Atom::charge, DistributionSpecStruct_::coeff, Atom::coords, atom_box_struct::derivatives_wrt_multipole_moments, distance(), DistributionSpecStructWithPairIdx::distr, DistributionSpecStruct_::exponent, box_struct_basic::firstChildBoxIndex, box_struct_basic::firstItemIndex, get_distance_3d(), get_related_integrals_hermite(), MMInteractor::getInteractionMatrix(), MAX_MULTIPOLE_DEGREE, MAX_NO_OF_MOMENTS_PER_MULTIPOLE, mm_limits_get_minimum_multipole_degree_needed(), multipole_struct_large::momentList, multipole_struct_small::momentList, monomial_info_struct::monomial_index_list, IntegralInfo::monomial_info, DistributionSpecStruct_::monomialInts, IntegralInfo::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_and_gradient_linear().
Referenced by do_interaction_recursive().
|
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_and_gradient_linear().
|
static |
References A, B, multipole_struct_large::centerCoords, Atom::charge, Atom::coords, multipole_struct_large::degree, multipole_struct_small::degree, MMTranslator::getTranslationMatrix(), MAX_MULTIPOLE_DEGREE, MAX_NO_OF_MOMENTS_PER_MULTIPOLE, multipole_struct_large::momentList, multipole_struct_small::momentList, multipole_struct_large::noOfMoments, and multipole_struct_small::noOfMoments.
Referenced by create_nuclei_mm_tree().
|
static |
|
static |
ergo_real simplePrimVintegral_list | ( | DistributionSpecStruct * | list, |
int | nPrims, | ||
const Atom * | atom, | ||
ergo_real | threshold, | ||
const IntegralInfo & | integralInfo | ||
) |
References simplePrimVintegralSingle().
Referenced by compute_V_matrix_full().
|
static |
References Atom::charge, Atom::coords, and do_1e_repulsion_integral_using_symb_info().
Referenced by simplePrimVintegral_list().
|
static |
References compare_distrs().
Referenced by compute_V_and_gradient_linear().