vibrav.numerical.degeneracy module

vibrav.numerical.degeneracy.energetic_degeneracy(data_df, degen_delta, rtol=1e-12, numpy=True, original_order=False, min_sort=False, original_size=False)[source]

Get the energetic degeneracies within the energy tolerance given by the degen_delta parameter. This is mean to keep track of the indeces at which the energies are degenerate which helps when the input energies are not sorted in increasing order of energy. This is largely due to the way the function is set up.

The returned data frame has the columns ‘value’, ‘degen’, and ‘index’ for the energies, electronic degeneracies, and indeces where the degenerate energies are based on the input array locations.

If the input data is in ‘Hartree’ we recommend a degeneracy parameter of 1e-5 Ha. For data that is in ‘wavenumbers’ we recommend a degeneracy parameter of 1 cm^{-1}

Note

There is no kind of sanity checking with the tolerance values that are given. Meaning, that if the user gives an un-physical degeneracy tolerance parameter this function will blindly calculate it.

Parameters:
  • data_df (pandas.DataFrame or numpy.ndarray) – Data frame or array of the energies. If it is a numpy array must set the numpy parameter to True.

  • degen_delta (float) – Absolute value for determining two levels are degenerate. Must be in the same units as the input energies.

  • rtol (float, optional) – Relative tolerance value for the differences in energy. Defaults to 1e-12 so the it is more dependent on the degen_delta parameter.

  • numpy (bool, optional) – Tell the program that the input data is a numpy array instead of a pandas data frame. Defaults to True.

Returns:

degeneracy (pandas.DataFrame) –

Data frame containing the

degenerate energies.