ergo
integrals_1el_potential.cc File Reference

Code for 1-electron integrals, computation of electron-nuclear potential energy matrix V. More...

#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 "integrals_1el_potential_prep.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  DistributionSpecStructWithIndexes
 

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 (const IntegralInfo &integralInfo, 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 DistributionSpecStructWithIndexes *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 do_interaction_recursive_2 (const IntegralInfo &integralInfo, csr_matrix_struct *V_CSR, int noOfBasisFuncIndexPairs, const basis_func_index_pair_struct_1el *basisFuncIndexPairList, const DistributionSpecStructWithIndexes2 *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)
 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, DistributionSpecStructWithIndexes *resultList, int maxCountResult)
 
static ergo_real get_nucl_repulsion_energy_using_multipoles (const Atom *atomListReordered, const int *atomPermutation, ergo_real threshold, const atom_box_struct *boxList, MMInteractor &interactor, int boxIndex1, int boxIndex2, int currLevel, int numberOfLevels)
 
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, ergo_real &result_nuclearRepulsionEnergy)
 
int compute_V_hierarchical (const BasisInfoStruct &basisInfo, const IntegralInfo &integralInfo, const Molecule &molecule, ergo_real threshold, ergo_real boxSize, const basis_func_index_pair_struct_1el *basisFuncIndexPairList, int noOfBasisFuncIndexPairs, csr_matrix_struct *V_CSR, ergo_real &result_nuclearRepulsionEnergy)
 
static ergo_real simplePrimVintegralSingle (const DistributionSpecStruct &prim, const Atom &atom, const IntegralInfo &integralInfo)
 
ergo_real simplePrimVintegral_list (const DistributionSpecStruct *list, int nPrims, const Atom &atom, 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)
 

Detailed Description

Code for 1-electron integrals, computation of electron-nuclear potential energy matrix V.

Author
: Elias Rudberg responsible

Function Documentation

◆ compute_V_and_gradient_linear()

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,
ergo_real result_nuclearRepulsionEnergy 
)

◆ compute_V_hierarchical()

◆ compute_V_matrix_full()

◆ create_nuclei_mm_tree()

◆ do_interaction_recursive()

static int do_interaction_recursive ( const IntegralInfo integralInfo,
ergo_real V_list,
int  noOfBasisFuncIndexPairs,
const basis_func_index_pair_struct_1el basisFuncIndexPairList,
const DistributionSpecStructWithIndexes 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 
)
static

◆ do_interaction_recursive_2()

static int do_interaction_recursive_2 ( const IntegralInfo integralInfo,
csr_matrix_struct V_CSR,
int  noOfBasisFuncIndexPairs,
const basis_func_index_pair_struct_1el basisFuncIndexPairList,
const DistributionSpecStructWithIndexes2 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 
)
static

◆ get_distance_3d()

static ergo_real get_distance_3d ( const ergo_real x,
const ergo_real y 
)
static

◆ get_list_of_distrs_for_V()

◆ get_multipole_contribs_for_atom()

◆ get_nucl_repulsion_energy_using_multipoles()

◆ init_multipole_struct_large()

static void init_multipole_struct_large ( multipole_struct_large boxMultipole,
const ergo_real multipolePointCoords 
)
static

◆ simplePrimVintegral_list()

ergo_real simplePrimVintegral_list ( const DistributionSpecStruct list,
int  nPrims,
const Atom atom,
const IntegralInfo integralInfo 
)

◆ simplePrimVintegralSingle()

static ergo_real simplePrimVintegralSingle ( const DistributionSpecStruct prim,
const Atom atom,
const IntegralInfo integralInfo 
)
static