MolSSI Integral Reference Project
Macros | Functions
shell.h File Reference

Functions related to gaussians and shells. More...

#include <arb.h>
Include dependency graph for shell.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MIRP_NCART(am)   ((((am)+1)*((am)+2))/2)
 Number of cartesian functions for a given angular momentum. More...
 
#define MIRP_NCART2(am1, am2)   (MIRP_NCART((am1)) * MIRP_NCART((am2)))
 Number of cartesian functions for 2 shells. More...
 
#define MIRP_NCART4(am1, am2, am3, am4)   (MIRP_NCART2((am1),(am2)) * MIRP_NCART2((am3),(am4)))
 Number of cartesian functions for 4 shells. More...
 
#define MIRP_NCART_LMN(lmn)   (MIRP_NCART((lmn[0])+(lmn[1])+(lmn[2])))
 Number of cartesian functions for an lmn triplet. More...
 
#define MIRP_NCART_LMN2(lmn1, lmn2)   (MIRP_NCART_LMN((lmn1)) * MIRP_NCART_LMN((lmn2)))
 Number of cartesian functions for 2 lmn triplets. More...
 
#define MIRP_NCART_LMN4(lmn1, lmn2, lmn3, lmn4)   (MIRP_NCART_LMN2((lmn1),(lmn2)) * MIRP_NCART_LMN2((lmn3),(lmn4)))
 Number of cartesian functions for 4 lmn triplets. More...
 

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.

Macro Definition Documentation

◆ MIRP_NCART

#define MIRP_NCART (   am)    ((((am)+1)*((am)+2))/2)

Number of cartesian functions for a given angular momentum.

◆ MIRP_NCART2

#define MIRP_NCART2 (   am1,
  am2 
)    (MIRP_NCART((am1)) * MIRP_NCART((am2)))

Number of cartesian functions for 2 shells.

◆ MIRP_NCART4

#define MIRP_NCART4 (   am1,
  am2,
  am3,
  am4 
)    (MIRP_NCART2((am1),(am2)) * MIRP_NCART2((am3),(am4)))

Number of cartesian functions for 4 shells.

◆ MIRP_NCART_LMN

#define MIRP_NCART_LMN (   lmn)    (MIRP_NCART((lmn[0])+(lmn[1])+(lmn[2])))

Number of cartesian functions for an lmn triplet.

◆ MIRP_NCART_LMN2

#define MIRP_NCART_LMN2 (   lmn1,
  lmn2 
)    (MIRP_NCART_LMN((lmn1)) * MIRP_NCART_LMN((lmn2)))

Number of cartesian functions for 2 lmn triplets.

◆ MIRP_NCART_LMN4

#define MIRP_NCART_LMN4 (   lmn1,
  lmn2,
  lmn3,
  lmn4 
)    (MIRP_NCART_LMN2((lmn1),(lmn2)) * MIRP_NCART_LMN2((lmn3),(lmn4)))

Number of cartesian functions for 4 lmn triplets.

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