MolSSI Integral Reference Project
Functions
shell.c File Reference

Functions related to gaussians and shells. More...

#include "mirp/shell.h"
#include "mirp/math.h"
Include dependency graph for shell.c:

Functions

int mirp_iterate_gaussian (int *lmn)
 Find the next gaussian in the ordering. More...
 
void mirp_gaussian_fill_lmn (int am, int *lmn)
 Create all lmn combinations for a given angular momentum. More...
 
void mirp_normalize_shell (int am, int nprim, int ngeneral, arb_srcptr alpha, arb_srcptr coeff, arb_ptr coeff_out, slong working_prec)
 Normalize a shell (double precision) More...
 

Detailed Description

Functions related to gaussians and shells.

Function Documentation

◆ mirp_gaussian_fill_lmn()

void mirp_gaussian_fill_lmn ( int  am,
int *  lmn 
)

Create all lmn combinations for a given angular momentum.

This fills in the lmn parameter will all combinations of l,m, and n that are valid for the given angular momentum. They will be in order.

Warning
The lmn parameter must be allocated and large enough to hold 3*number of cartesian components for the given am
Parameters
[in]amThe angular momentum
[out]lmnPlace to put all the lmn combinations

◆ mirp_iterate_gaussian()

int mirp_iterate_gaussian ( int *  lmn)

Find the next gaussian in the ordering.

Obtain the next l, m, and n parameters of a gaussian in the internal MIRP ordering

For example, if lmn = {2, 1, 0} is input, the result will be {2, 0, 1}.

If the return value of this function is 0, the contents of lmn are not defined.

Parameters
[in,out]lmnThe l, m, and n parameters of a gaussian basis function
Returns
Nonzero if the new lmn is a valid gaussian, 0 if it is not (i.e., we have iterated past the end of the complete set of gaussians)

◆ mirp_normalize_shell()

void mirp_normalize_shell ( int  am,
int  nprim,
int  ngeneral,
arb_srcptr  alpha,
arb_srcptr  coeff,
arb_ptr  coeff_out,
slong  working_prec 
)

Normalize a shell (double precision)

This function normalizes the contraction coefficients of the shell.

Parameters
[in]amThe angular momentum of the shell (0 = s, 1 = p, etc)
[in]nprimNumber of primitives in the shell
[in]ngeneralNumber of general contractions in the shell
[in]alphaThe exponents of the shell (length nprim)
[in]coeffThe (unnormalized) contraction coefficients (length nprim * ngeneral)
[out]coeff_outNormalized contraction coefficients (length nprim * ngeneral)
[in]working_precThe working precision (binary digits/bits) to use in the calculation