Functions#

The functions module contains functions for calculating pair correlations.

average1d(arrays, d, pairs, tol=0.0001)[source]#

Average of one-dimensional correlations.

Parameters:
arraystuple

Arrays to average.

d1d array

Separation distance magnitude.

pairs1d array, str

Atom, ion, or isotope-pairs.

tolfloat, optional

Tolerance of distances for unique pairs. Default is 1e-4.

Returns:
averagetuple

Averaged of arrays.

d1d array

Averaged separation distance magnitude.

pairs_ave1d array, str

Averaged atom, ion, or isotope-pairs.

average3d(arrays, dx, dy, dz, pairs, tol=0.0001)[source]#

Average of three-dimensional correlations.

Parameters:
arraystuple

Arrays to average.

dx, dy, dz1d array

Separation distance vector.

pairs1d array, str

Atom, ion, or isotope-pairs.

tolfloat, optional

Tolerance of distances for unique pairs. Default is 1e-4.

Returns:
averagetuple

Averaged of arrays.

dx_ave, dy_ave, dz_ave1d array

Averaged separation distance vector.

pairs_ave1d array, str

Averaged atom, ion, or isotope-pairs.

pairs1d(rx, ry, rz, ion, nu, nv, nw, A, fract=0.25, tol=0.0001)[source]#

Generate spherically averaged pairs.

Parameters:
rx, ry, rz1d array

Atomic positions.

ion1d array, str

Atoms, ions, or isotopes.

nu, nv, nwint

Supercell size.

A2d array, 3x3

Transformation matrix.

fractfloat, optional

Fraction of longest distance for radial cutoff. Default is 0.25.

tolfloat, optional

Tolerance of distances for unique pairs. Default is 1e-4.

Returns:
d1d array

Separation distance magnitude.

pairs1d array, str

Atom, ion, or isotope-pairs.

counts1d array, int

Number of pair counts.

search1d array, int

Index of first appearance in sorted pairs.

coordinate2d array, int

Coordinate (i,j) pairs.

unique_pairsint

Number of unique pairs.

pairs3d(rx, ry, rz, ion, nu, nv, nw, A, fract=0.25, tol=0.0001)[source]#

Generate three-dimensional pairs.

Parameters:
rx, ry, rz1d array

Atomic positions.

ion1d array, str

Atoms, ions, or isotopes.

nu, nv, nwint

Supercell size.

A2d array, 3x3

Transformation matrix.

fractfloat, optional

Fraction of longest distance for radial cutoff. Default is 0.25.

tolfloat, optional

Tolerance of distances for unique pairs. Default is 1e-4.

Returns:
dx, dy, dz1d array

Separation distance vector.

pairs1d array, str

Atom, ion, or isotope-pairs.

counts1d array, int

Number of pair counts.

search1d array, int

Index of first appearance in sorted pairs.

coordinate2d array, int

Coordinate (i,j) pairs.

unique_pairsint

Number of unique pairs.

scalar1d(S, rx, ry, rz, ion, nu, nv, nw, A, fract=0.25, tol=0.0001)[source]#

Spherically averaged scalar-pair correlations.

Parameters:
S1d array

Scalars.

rx, ry, rz1d array

Atomic positions.

ion1d array, str

Atoms, ions, or isotopes.

nu, nv, nwint

Supercell size.

A2d array, 3x3

Transformation matrix.

fractfloat, optional

Fraction of longest distance for radial cutoff. Default is 0.25.

tolfloat, optional

Tolerance of distances for unique pairs. Default is 1e-4.

Returns:
C_corr1d array

Correlated averge product function.

C_corr_1d array

Uncorrelated averge product function.

d1d array

Separation distance magnitude.

pairs1d array, str

Atom, ion, or isotope-pairs.

scalar3d(S, rx, ry, rz, ion, nu, nv, nw, A, fract=0.25, tol=0.0001)[source]#

Three-dimensional scalar-pair correlations.

Parameters:
S1d array

Scalars.

rx, ry, rz1d array

Atomic positions.

ion1d array, str

Atoms, ions, or isotopes.

nu, nv, nwint

Supercell size.

A2d array, 3x3

Transformation matrix.

fractfloat, optional

Fraction of longest distance for radial cutoff. Default is 0.25.

tolfloat, optional

Tolerance of distances for unique pairs. Default is 1e-4.

Returns:
C_corr1d array

Correlated averge product function.

C_corr_1d array

Uncorrelated averge product function.

dx, dy, dz1d array

Separation distance vector.

pairs1d array, str

Atom, ion, or isotope-pairs.

scalar_vector1d(S, Sx, Sy, Sz, rx, ry, rz, ion, nu, nv, nw, A, fract=0.25, tol=0.0001)[source]#

Spherically averaged scalar-pair correlations.

Parameters:
S1d array

Scalars.

Sx, Sy, Sz1d array

Vectors.

rx, ry, rz1d array

Atomic positions.

ion1d array, str

Atoms, ions, or isotopes.

nu, nv, nwint

Supercell size.

A2d array, 3x3

Transformation matrix.

fractfloat, optional

Fraction of longest distance for radial cutoff. Default is 0.25.

tolfloat, optional

Tolerance of distances for unique pairs. Default is 1e-4.

Returns:
C_corr1d array

Cross correlated averge product function.

d1d array

Separation distance magnitude.

pairs1d array, str

Atom, ion, or isotope-pairs.

scalar_vector3d(S, Sx, Sy, Sz, rx, ry, rz, ion, nu, nv, nw, A, fract=0.25, tol=0.0001)[source]#

Three-dimensional scalar-pair correlations.

Parameters:
S1d array

Scalars.

Sx, Sy, Sz1d array

Vectors.

rx, ry, rz1d array

Atomic positions.

ion1d array, str

Atoms, ions, or isotopes.

nu, nv, nwint

Supercell size.

A2d array, 3x3

Transformation matrix.

fractfloat, optional

Fraction of longest distance for radial cutoff. Default is 0.25.

tolfloat, optional

Tolerance of distances for unique pairs. Default is 1e-4.

Returns:
C_corr1d array

Cross correlated averge product function.

dx, dy, dz1d array

Separation distance vector.

pairs1d array, str

Atom, ion, or isotope-pairs.

symmetrize(arrays, dx, dy, dz, pairs, A, laue, tol=0.0001)[source]#

Symmetrization of three-dimensional correlations.

Parameters:
arraystuple

Arrays to average.

dx, dy, dz1d array

Separation distance vector.

pairs1d array, str

Atom, ion, or isotope-pairs.

A2d array, 3x3

Transformation matrix.

lauestr

Laue class.

tolfloat, optional

Tolerance of distances for unique pairs. Default is 1e-4.

Returns:
symmetrizetuple

Symmetrized of arrays.

dx_ave, dy_ave, dz_ave1d array

Symmetrized separation distance vector.

pairs_ave1d array, str

Symmetrized atom, ion, or isotope-pairs.

vector1d(Sx, Sy, Sz, rx, ry, rz, ion, nu, nv, nw, A, fract=0.25, tol=0.0001)[source]#

Spherically averaged vector-pair correlations.

Parameters:
Sx, Sy, Sz1d array

Vectors.

rx, ry, rz1d array

Atomic positions.

ion1d array, str

Atoms, ions, or isotopes.

nu, nv, nwint

Supercell size.

A2d array, 3x3

Transformation matrix.

fractfloat, optional

Fraction of longest distance for radial cutoff. Default is 0.25.

tolfloat, optional

Tolerance of distances for unique pairs. Default is 1e-4.

Returns:
C_corr1d array

Correlated averge product function.

C_coll1d array

Collinear correlated averge product function.

C_corr_1d array

Uncorrelated averge product function.

C_coll_1d array

Collinear uncorrelated averge product function.

d1d array

Separation distance magnitude.

pairs1d array, str

Atom, ion, or isotope-pairs.

vector3d(Sx, Sy, Sz, rx, ry, rz, ion, nu, nv, nw, A, fract=0.25, tol=0.0001)[source]#

Three-dimensional vector-pair correlations.

Parameters:
Sx, Sy, Sz1d array

Vectors.

rx, ry, rz1d array

Atomic positions.

ion1d array, str

Atoms, ions, or isotopes.

nu, nv, nwint

Supercell size.

A2d array, 3x3

Transformation matrix.

fractfloat, optional

Fraction of longest distance for radial cutoff. Default is 0.25.

tolfloat, optional

Tolerance of distances for unique pairs. Default is 1e-4.

Returns:
C_corr1d array

Correlated averge product function.

C_coll1d array

Collinear correlated averge product function.

C_corr_1d array

Uncorrelated averge product function.

C_coll_1d array

Collinear uncorrelated averge product function.

dx, dy, dz1d array

Separation distance vector.

pairs1d array, str

Atom, ion, or isotope-pairs.