scine_puffin.utilities.properties

Functions

single_particle_energy_from_matrix(x)

Converts datatype np.ndarray to SingleParticleEnergies.

single_particle_energy_to_matrix(x)

Converts datatype utils.SingleParticleEnergies to np.array.

scine_puffin.utilities.properties.single_particle_energy_from_matrix(x: ndarray) scine_utilities.SingleParticleEnergies[source]

Converts datatype np.ndarray to SingleParticleEnergies. If the first dimension of the numpy array is 1, there is only one column of energies, indicating the restricted case. Otherwise, for two columns, we’re in the unrestricted case.

Parameters:
xnp.ndarray
The array of dimension $1 imes N$ for the restricted case or $2

imes N$ for the unrestricted case, where $N$ is the number energies.

scine_puffin.utilities.properties.single_particle_energy_to_matrix(x: scine_utilities.SingleParticleEnergies) ndarray[source]

Converts datatype utils.SingleParticleEnergies to np.array. In the restricted case, there is only one column, in the unrestricted case, there are two columns, denoted by alpha and beta.

Parameters:
xutils.SingleParticleEnergies

The single particle energies to be converted to numpy matrices. It contains the energies and flags denoting the restricted or unrestricted case.