(git:6344619)
Loading...
Searching...
No Matches
grpp_spherical_harmonics.c File Reference
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "grpp_binomial.h"
#include "grpp_factorial.h"
#include "grpp_spherical_harmonics.h"
#include "libgrpp.h"

Go to the source code of this file.

Macros

#define M_PI   3.1415926535897932384626433
#define M_SQRT1_2   0.70710678118654752440

Functions

rsh_coef_table_t * libgrpp_tabulate_real_spherical_harmonic_coeffs (int L)
static int * generate_cartesian_combinations (int L, int *num)
void libgrpp_create_real_spherical_harmonic_coeffs_tables (int Lmax)
rsh_coef_table_t * libgrpp_get_real_spherical_harmonic_table (int L)
double libgrpp_spherical_to_cartesian_coef (int l, int m, int lx, int ly)
double libgrpp_evaluate_real_spherical_harmonic (const int l, const int m, const double *k)
void libgrpp_evaluate_real_spherical_harmonics_array (const int l, const double *k, double *rsh_array)

Variables

static rsh_coef_table_t ** rsh_coef_tables = NULL
static int rsh_tables_lmax = -1

Macro Definition Documentation

◆ M_PI

#define M_PI   3.1415926535897932384626433

Definition at line 30 of file grpp_spherical_harmonics.c.

◆ M_SQRT1_2

#define M_SQRT1_2   0.70710678118654752440

Definition at line 34 of file grpp_spherical_harmonics.c.

Function Documentation

◆ libgrpp_tabulate_real_spherical_harmonic_coeffs()

rsh_coef_table_t * libgrpp_tabulate_real_spherical_harmonic_coeffs ( int L)

Calculates all C_{l,m}^{lx,ly,lz} coefficients for the given angular momentum L.

Definition at line 79 of file grpp_spherical_harmonics.c.

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

◆ generate_cartesian_combinations()

int * generate_cartesian_combinations ( int L,
int * num )
static

Definition at line 284 of file grpp_spherical_harmonics.c.

Here is the caller graph for this function:

◆ libgrpp_create_real_spherical_harmonic_coeffs_tables()

void libgrpp_create_real_spherical_harmonic_coeffs_tables ( int Lmax)

Constructs the set of tables with C_{l,m}^{lx,ly,lz} coefficients (up to maximum angular momentum Lmax). (pretabulation step)

Definition at line 60 of file grpp_spherical_harmonics.c.

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

◆ libgrpp_get_real_spherical_harmonic_table()

rsh_coef_table_t * libgrpp_get_real_spherical_harmonic_table ( int L)

Access to the table for the angular momentum value L.

Definition at line 105 of file grpp_spherical_harmonics.c.

Here is the caller graph for this function:

◆ libgrpp_spherical_to_cartesian_coef()

double libgrpp_spherical_to_cartesian_coef ( int l,
int m,
int lx,
int ly )

For the given real spherical harmonic (RSH) S_lm calculates the coefficient C_{l,m}^{lx,ly,lz} before the unitary spherical polynomial (USP) in its expansion.

The formula is taken from: R. Flores-Moreno et al, J. Comput. Chem. 27, 1009 (2006) doi: 10.1002/jcc.20410 (formula 32)

Definition at line 124 of file grpp_spherical_harmonics.c.

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

◆ libgrpp_evaluate_real_spherical_harmonic()

double libgrpp_evaluate_real_spherical_harmonic ( const int l,
const int m,
const double * k )

Calculates value of the real spherical harmonic S_lm at the point k/|k| of the unit sphere.

Definition at line 178 of file grpp_spherical_harmonics.c.

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

◆ libgrpp_evaluate_real_spherical_harmonics_array()

void libgrpp_evaluate_real_spherical_harmonics_array ( const int l,
const double * k,
double * rsh_array )

Calculates values of the real spherical harmonic S_lm at the point k/|k| of the unit sphere for all m = -l, ..., +l

Definition at line 230 of file grpp_spherical_harmonics.c.

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

Variable Documentation

◆ rsh_coef_tables

rsh_coef_table_t** rsh_coef_tables = NULL
static

Definition at line 45 of file grpp_spherical_harmonics.c.

◆ rsh_tables_lmax

int rsh_tables_lmax = -1
static

Definition at line 46 of file grpp_spherical_harmonics.c.