(git:cdd058b)
Loading...
Searching...
No Matches
grpp_integrals_gradient.c File Reference
#include "libgrpp.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "grpp_diff_gaussian.h"
#include "grpp_utils.h"

Go to the source code of this file.

Functions

void grpp_gradient_diff_bra_contribution (libgrpp_shell_t *shell_A, libgrpp_shell_t *shell_B, libgrpp_grpp_t *grpp_operator, double *grpp_origin, double **grad_arep, double **grad_so_x, double **grad_so_y, double **grad_so_z, double factor)
void grpp_gradient_diff_bra_grpp_integrals (libgrpp_shell_t *shell_A, libgrpp_shell_t *shell_B, libgrpp_grpp_t *grpp_operator, double *grpp_origin, double **arep_matrix_down, double **so_x_matrix_down, double **so_y_matrix_down, double **so_z_matrix_down, double **arep_matrix_up, double **so_x_matrix_up, double **so_y_matrix_up, double **so_z_matrix_up, int *cart_size_down, int *cart_size_up)
void grpp_gradient_diff_ket_contribution (libgrpp_shell_t *shell_A, libgrpp_shell_t *shell_B, libgrpp_grpp_t *grpp_operator, double *grpp_origin, double **grad_arep, double **grad_so_x, double **grad_so_y, double **grad_so_z, double factor)
void grpp_gradient_diff_ket_grpp_integrals (libgrpp_shell_t *shell_A, libgrpp_shell_t *shell_B, libgrpp_grpp_t *grpp_operator, double *grpp_origin, double **arep_matrix_down, double **so_x_matrix_down, double **so_y_matrix_down, double **so_z_matrix_down, double **arep_matrix_up, double **so_x_matrix_up, double **so_y_matrix_up, double **so_z_matrix_up, int *cart_size_down, int *cart_size_up)
void grpp_gradient_contribution (libgrpp_shell_t *shell_A, libgrpp_shell_t *shell_B, libgrpp_grpp_t *grpp_operator, double *grpp_origin, double **grad_arep, double **grad_so_x, double **grad_so_y, double **grad_so_z, int diff_bra, double factor)
void grpp_gradient_diff_gaussian (libgrpp_shell_t *shell_A, libgrpp_shell_t *shell_B, libgrpp_grpp_t *grpp_operator, double *grpp_origin, double **arep_matrix_down, double **so_x_matrix_down, double **so_y_matrix_down, double **so_z_matrix_down, double **arep_matrix_up, double **so_x_matrix_up, double **so_y_matrix_up, double **so_z_matrix_up, int *cart_size_down, int *cart_size_up, int diff_bra)
int libgrpp_nlm_to_linear (int *nlm)
double ** libgrpp_alloc_gradients (libgrpp_shell_t *bra, libgrpp_shell_t *ket)
void libgrpp_dealloc_gradients (double **grad)
void libgrpp_type1_integrals_gradient (libgrpp_shell_t *shell_A, libgrpp_shell_t *shell_B, double *grpp_origin, libgrpp_potential_t *potential, double *point_3d, double **grad_arep)
void libgrpp_type2_integrals_gradient (libgrpp_shell_t *shell_A, libgrpp_shell_t *shell_B, double *grpp_origin, libgrpp_potential_t *potential, double *point_3d, double **grad_arep)
void libgrpp_spin_orbit_integrals_gradient (libgrpp_shell_t *shell_A, libgrpp_shell_t *shell_B, double *grpp_origin, libgrpp_potential_t *potential, double *point_3d, double **grad_so_x, double **grad_so_y, double **grad_so_z)
void libgrpp_outercore_potential_integrals_gradient (libgrpp_shell_t *shell_A, libgrpp_shell_t *shell_B, double *rpp_origin, int num_oc_shells, libgrpp_potential_t **oc_potentials, libgrpp_shell_t **oc_shells, double *point_3d, double **grad_arep, double **grad_so_x, double **grad_so_y, double **grad_so_z)
void libgrpp_full_grpp_integrals_gradient (libgrpp_shell_t *shell_A, libgrpp_shell_t *shell_B, libgrpp_grpp_t *grpp_operator, double *grpp_origin, double *point_3d, double **grad_arep, double **grad_so_x, double **grad_so_y, double **grad_so_z)

Function Documentation

◆ grpp_gradient_diff_bra_contribution()

void grpp_gradient_diff_bra_contribution ( libgrpp_shell_t * shell_A,
libgrpp_shell_t * shell_B,
libgrpp_grpp_t * grpp_operator,
double * grpp_origin,
double ** grad_arep,
double ** grad_so_x,
double ** grad_so_y,
double ** grad_so_z,
double factor )

Calculates contribution to gradients arising from the < df/dA | V | g > term:

grad += factor * < df/dA | V | g >

(bra basis function is differentiated).

Definition at line 335 of file grpp_integrals_gradient.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ grpp_gradient_diff_bra_grpp_integrals()

void grpp_gradient_diff_bra_grpp_integrals ( libgrpp_shell_t * shell_A,
libgrpp_shell_t * shell_B,
libgrpp_grpp_t * grpp_operator,
double * grpp_origin,
double ** arep_matrix_down,
double ** so_x_matrix_down,
double ** so_y_matrix_down,
double ** so_z_matrix_down,
double ** arep_matrix_up,
double ** so_x_matrix_up,
double ** so_y_matrix_up,
double ** so_z_matrix_up,
int * cart_size_down,
int * cart_size_up )

To assemble the contribution < df/dA | V | g > to gradients, one have to differentiate a Gaussian function. Such a differentiation yields two Gaussians with angular momenta L-1 ("down") and L+1 ("up"): dG/dA -> G(L-1) and G(L+1)

This function constructs overlap matrices with these "downgraded" and "upgraded" Gaussian functions: < G(L-1) | V | G' > and < G(L+1) | V | G' >

Definition at line 444 of file grpp_integrals_gradient.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ grpp_gradient_diff_ket_contribution()

void grpp_gradient_diff_ket_contribution ( libgrpp_shell_t * shell_A,
libgrpp_shell_t * shell_B,
libgrpp_grpp_t * grpp_operator,
double * grpp_origin,
double ** grad_arep,
double ** grad_so_x,
double ** grad_so_y,
double ** grad_so_z,
double factor )

Calculates contribution to gradients arising from the < df/dA | V | g > term:

grad += factor * < f | V | dg/dA >

(bra basis function is differentiated).

Definition at line 513 of file grpp_integrals_gradient.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ grpp_gradient_diff_ket_grpp_integrals()

void grpp_gradient_diff_ket_grpp_integrals ( libgrpp_shell_t * shell_A,
libgrpp_shell_t * shell_B,
libgrpp_grpp_t * grpp_operator,
double * grpp_origin,
double ** arep_matrix_down,
double ** so_x_matrix_down,
double ** so_y_matrix_down,
double ** so_z_matrix_down,
double ** arep_matrix_up,
double ** so_x_matrix_up,
double ** so_y_matrix_up,
double ** so_z_matrix_up,
int * cart_size_down,
int * cart_size_up )

To assemble the contribution < df/dA | V | g > to gradients, one have to differentiate Gaussian function. Such a differentiation yields two Gaussians with angular momenta L-1 ("down") and L+1 ("up"): dG/dA -> G(L-1) and G(L+1)

This function constructs matrices with these "downgraded" and "upgraded" Gaussian functions: < G(L-1) | V | G' > and < G(L+1) | V | G' >

Definition at line 622 of file grpp_integrals_gradient.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ grpp_gradient_contribution()

void grpp_gradient_contribution ( libgrpp_shell_t * shell_A,
libgrpp_shell_t * shell_B,
libgrpp_grpp_t * grpp_operator,
double * grpp_origin,
double ** grad_arep,
double ** grad_so_x,
double ** grad_so_y,
double ** grad_so_z,
int diff_bra,
double factor )

Definition at line 686 of file grpp_integrals_gradient.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ grpp_gradient_diff_gaussian()

void grpp_gradient_diff_gaussian ( libgrpp_shell_t * shell_A,
libgrpp_shell_t * shell_B,
libgrpp_grpp_t * grpp_operator,
double * grpp_origin,
double ** arep_matrix_down,
double ** so_x_matrix_down,
double ** so_y_matrix_down,
double ** so_z_matrix_down,
double ** arep_matrix_up,
double ** so_x_matrix_up,
double ** so_y_matrix_up,
double ** so_z_matrix_up,
int * cart_size_down,
int * cart_size_up,
int diff_bra )

To assemble the contribution < df/dA | V | g > to gradients, one have to differentiate Gaussian function. Such a differentiation yields two Gaussians with angular momenta L-1 ("down") and L+1 ("up"): dG/dA -> G(L-1) and G(L+1)

This function constructs matrices with these "downgraded" and "upgraded" Gaussian functions: < G(L-1) | V | G' > and < G(L+1) | V | G' >

Definition at line 805 of file grpp_integrals_gradient.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ libgrpp_nlm_to_linear()

int libgrpp_nlm_to_linear ( int * nlm)
extern

calculates sequential ("linear") index of the (n,l,m) primitive in the cartesian shell

Definition at line 205 of file grpp_overlap_gradient.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ libgrpp_alloc_gradients()

double ** libgrpp_alloc_gradients ( libgrpp_shell_t * bra,
libgrpp_shell_t * ket )

Allocates memory for gradients for a given shell pair.

Definition at line 898 of file grpp_integrals_gradient.c.

Here is the caller graph for this function:

◆ libgrpp_dealloc_gradients()

void libgrpp_dealloc_gradients ( double ** grad)

Deallocates arrays containing gradients of AO integrals.

Definition at line 912 of file grpp_integrals_gradient.c.

Here is the caller graph for this function:

◆ libgrpp_type1_integrals_gradient()

void libgrpp_type1_integrals_gradient ( libgrpp_shell_t * shell_A,
libgrpp_shell_t * shell_B,
double * grpp_origin,
libgrpp_potential_t * potential,
double * point_3d,
double ** grad_arep )

Analytic calculation of gradients of LOCAL potential integrals for a given shell pair with respect to the point 'point_3d'.

Definition at line 77 of file grpp_integrals_gradient.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ libgrpp_type2_integrals_gradient()

void libgrpp_type2_integrals_gradient ( libgrpp_shell_t * shell_A,
libgrpp_shell_t * shell_B,
double * grpp_origin,
libgrpp_potential_t * potential,
double * point_3d,
double ** grad_arep )

Analytic calculation of gradients of SEMI-LOCAL potential integrals for a given shell pair with respect to the point 'point_3d'.

Definition at line 110 of file grpp_integrals_gradient.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ libgrpp_spin_orbit_integrals_gradient()

void libgrpp_spin_orbit_integrals_gradient ( libgrpp_shell_t * shell_A,
libgrpp_shell_t * shell_B,
double * grpp_origin,
libgrpp_potential_t * potential,
double * point_3d,
double ** grad_so_x,
double ** grad_so_y,
double ** grad_so_z )

Analytic calculation of gradients of integrals over the effective spin-orbit operator (potential) for a given shell pair (with respect to the point 'point_3d').

Definition at line 144 of file grpp_integrals_gradient.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ libgrpp_outercore_potential_integrals_gradient()

void libgrpp_outercore_potential_integrals_gradient ( libgrpp_shell_t * shell_A,
libgrpp_shell_t * shell_B,
double * rpp_origin,
int num_oc_shells,
libgrpp_potential_t ** oc_potentials,
libgrpp_shell_t ** oc_shells,
double * point_3d,
double ** grad_arep,
double ** grad_so_x,
double ** grad_so_y,
double ** grad_so_z )

Definition at line 182 of file grpp_integrals_gradient.c.

Here is the call graph for this function:

◆ libgrpp_full_grpp_integrals_gradient()

void libgrpp_full_grpp_integrals_gradient ( libgrpp_shell_t * shell_A,
libgrpp_shell_t * shell_B,
libgrpp_grpp_t * grpp_operator,
double * grpp_origin,
double * point_3d,
double ** grad_arep,
double ** grad_so_x,
double ** grad_so_y,
double ** grad_so_z )

Analytic calculation of gradients of GRPP integrals for a given shell pair with respect to the point 'point_3d'. (for the full GRPP operator which includes local, semi-local and non-local parts)

Definition at line 207 of file grpp_integrals_gradient.c.

Here is the call graph for this function:
Here is the caller graph for this function: