shnitsel.data.state_helpers#

Attributes#

Functions#

default_state_type_assigner(dataset)

Function to assign default state types to states independent of the format.

default_state_name_assigner(dataset)

Function to assign default state names to states.

set_sharc_state_type_and_name_defaults(dataset, ...[, ...])

Apply default sharc naming scheme to a dataset and set the state order appropriately. This is more specific than the general naming convention. Enumerates spin numbers on top of common plain enumeration of dublets and triplets.

state_name_to_tex_label(statename)

Function to translate default state naming conventions into a general latex-subcscrip/-superscript label.

Module Contents#

higher_order_state_pattern_re#
triplet_state_pattern_re#
doublet_state_pattern_re#
singlet_state_pattern_re#
default_state_type_assigner(dataset)#

Function to assign default state types to states independent of the format.

Parameters:

dataset (xr.Dataset) – The dataset to assign the states to

Returns:

The dataset after the assignment

Return type:

xr.Dataset

default_state_name_assigner(dataset)#

Function to assign default state names to states.

State names for Singlets are (S0, S1, S2, S3, S4…) higher-order multiplicities start with index 1 (no suffix for momentum in default naming due to lack of information). Prefixes for singlets, doublets and triplets are S, D, T. Higher-order states are not considered.

Parameters:

dataset (xr.Dataset) – The dataset to assign the states to

Returns:

The dataset after the assignment

Return type:

xr.Dataset

set_sharc_state_type_and_name_defaults(dataset, multiplicity_counts, multiplicity_charges=None)#

Apply default sharc naming scheme to a dataset and set the state order appropriately. This is more specific than the general naming convention. Enumerates spin numbers on top of common plain enumeration of dublets and triplets.

Can also be used to set the charges per state. State names for Singlets are (S0, S1, S2, S3, S4…) higher-order multiplicities start with index 1 and have a suffix depending on the angular momentum (+,none, -). Prefixes for singlets, doublets and triplets are S, D, T. Higher-order states are named with the pattern S[<multiplicity>]<label index in multiplicity>::<angular momentum index>.

Parameters:
  • dataset (xr.Dataset) – The input dataset to set the states on

  • multiplicity_counts (List[int] | int) – The list of amount of states of different multiplicities or the number of singlet states

  • multiplicity_charges (List | int | float, optional) –

    The list of charges of different states or the charge to apply to all states.

    If not set, no charge will be set for all states

Returns:

The dataset with state types, names and charges applied.

Return type:

xr.Dataset

state_name_to_tex_label(statename)#

Function to translate default state naming conventions into a general latex-subcscrip/-superscript label.

Parameters:

statename (str) – Statename as per Shnitsel default convention.

Returns:

A LaTeX representation of the state label

Return type:

str