ARTS 2.5.0 (git: 9ee3ac6c)
quantum.h File Reference
#include "array.h"
#include "enums.h"
#include "interpolation.h"
#include "isotopologues.h"
#include "matpack.h"
#include "mystring.h"
#include "rational.h"
#include <array>
#include <iostream>
#include <map>
#include <numeric>
#include <stdexcept>

Go to the source code of this file.

Classes

class  QuantumNumbers
 Container class for Quantum Numbers. More...
 

Namespaces

namespace  Quantum
 

Typedefs

using ArrayOfQuantumNumbers = Array< QuantumNumbers >
 
using QuantumIdentifierType = Quantum::IdentifierType
 
using QuantumIdentifier = Quantum::Identifier
 
using ArrayOfQuantumIdentifier = Array< QuantumIdentifier >
 List of QuantumIdentifier. More...
 

Enumerations

enum class  Hund : Index { CaseA = int('a') , CaseB = int('b') }
 Enum for Hund cases. More...
 

Functions

 ENUMCLASS (QuantumNumberType, char, J, dJ, M, N, dN, S, tau, n, F, Ka, Kc, Omega, i, Lambda, alpha, Sym, parity, kronigParity, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, pm, r, S_global, ElectronState, n_global, C, Hund) const expr QuantumNumberType string2quantumnumbertype(const std
 Enum for Quantum Numbers used for indexing. More...
 
constexpr bool operator== (const QuantumNumbers &a, const QuantumNumbers &b)
 Check if all quantum numbers are the same between a and b. More...
 
constexpr bool operator!= (const QuantumNumbers &a, const QuantumNumbers &b)
 Opposite of operator==() More...
 
std::istream & operator>> (std::istream &is, QuantumNumbers &qn)
 Input operator. More...
 
std::ostream & operator<< (std::ostream &os, const QuantumNumbers &qn)
 Output operator. More...
 
 Quantum::ENUMCLASS (IdentifierType, unsigned char, None, All, Transition, EnergyLevel) struct Identifier
 Class to identify and match lines by their quantum numbers. More...
 
constexpr bool IsValidQuantumNumberName (const std::string_view name)
 Check for valid quantum number name. More...
 
void ThrowIfQuantumNumberNameInvalid (String name)
 Check for valid quantum number name and throws if it is invalid. More...
 
void update_id (QuantumIdentifier &qid, const std::vector< std::array< String, 2 > > &upper_list, const std::vector< std::array< String, 2 > > &lower_list)
 Updates the quantum identifier based on a lists of strings. More...
 

Typedef Documentation

◆ ArrayOfQuantumIdentifier

List of QuantumIdentifier.

Definition at line 474 of file quantum.h.

◆ ArrayOfQuantumNumbers

Definition at line 287 of file quantum.h.

◆ QuantumIdentifier

using QuantumIdentifier = Quantum::Identifier

Identifier for species, energy levels, or transitions

Definition at line 471 of file quantum.h.

◆ QuantumIdentifierType

using QuantumIdentifierType = Quantum::IdentifierType

Definition at line 468 of file quantum.h.

Enumeration Type Documentation

◆ Hund

enum class Hund : Index
strong

Enum for Hund cases.

Enumerator
CaseA 
CaseB 

Definition at line 109 of file quantum.h.

Function Documentation

◆ ENUMCLASS()

ENUMCLASS ( QuantumNumberType  ,
char  ,
,
dJ  ,
M  ,
N  ,
dN  ,
,
tau  ,
,
,
Ka  ,
Kc  ,
Omega  ,
,
Lambda  ,
alpha  ,
Sym  ,
parity  ,
kronigParity  ,
v1  ,
v2  ,
v3  ,
v4  ,
v5  ,
v6  ,
v7  ,
v8  ,
v9  ,
v10  ,
v11  ,
v12  ,
l1  ,
l2  ,
l3  ,
l4  ,
l5  ,
l6  ,
l7  ,
l8  ,
l9  ,
l10  ,
l11  ,
l12  ,
pm  ,
,
S_global  ,
ElectronState  ,
n_global  ,
,
Hund   
) const

Enum for Quantum Numbers used for indexing.

Definition at line 44 of file quantum.h.

◆ IsValidQuantumNumberName()

constexpr bool IsValidQuantumNumberName ( const std::string_view  name)
constexpr

Check for valid quantum number name.

Parameters
[in]nameParameter
Returns
true If the parameter exist
false Otherwise

Definition at line 482 of file quantum.h.

References good_enum().

Referenced by Absorption::ReadFromArtscat5Stream(), string2vecqn(), and ThrowIfQuantumNumberNameInvalid().

◆ operator!=()

constexpr bool operator!= ( const QuantumNumbers a,
const QuantumNumbers b 
)
constexpr

Opposite of operator==()

Parameters
[in]aOne set of quantum numbers
[in]bAnother set of quantum numbers
Returns
false If all quantum numbers match
true Otherwise

Definition at line 277 of file quantum.h.

References a, and b.

Referenced by Quantum::ENUMCLASS(), Absorption::ENUMCLASS(), and Species::ENUMCLASS().

◆ operator<<()

std::ostream & operator<< ( std::ostream &  os,
const QuantumNumbers qn 
)

Output operator.

Definition at line 49 of file quantum.cc.

Referenced by Quantum::ENUMCLASS().

◆ operator==()

constexpr bool operator== ( const QuantumNumbers a,
const QuantumNumbers b 
)
constexpr

Check if all quantum numbers are the same between a and b.

Parameters
[in]aOne set of quantum numbers
[in]bAnother set of quantum numbers
Returns
true If all quantum numbers match
false Otherwise

Definition at line 257 of file quantum.h.

References a, b, and Rational::isDefined().

Referenced by Quantum::ENUMCLASS(), Absorption::ENUMCLASS(), Jacobian::ENUMCLASS(), and Species::ENUMCLASS().

◆ operator>>()

std::istream & operator>> ( std::istream &  is,
QuantumNumbers qn 
)

Input operator.

Definition at line 38 of file quantum.cc.

References QuantumNumbers::Set().

◆ ThrowIfQuantumNumberNameInvalid()

void ThrowIfQuantumNumberNameInvalid ( String  name)

Check for valid quantum number name and throws if it is invalid.

Parameters
[in]nameParameter

Definition at line 33 of file quantum.cc.

References ARTS_USER_ERROR_IF, and IsValidQuantumNumberName().

Referenced by Absorption::ReadFromArtscat5Stream().

◆ update_id()

void update_id ( QuantumIdentifier qid,
const std::vector< std::array< String, 2 > > &  upper_list,
const std::vector< std::array< String, 2 > > &  lower_list 
)

Updates the quantum identifier based on a lists of strings.

The input lists of strings should be paired as {key, value}

Parameters
[in,out]qidIdentifier to update
[in]upper_listList of strings to update upper state
[in]lower_listList of strings to update lower state

Definition at line 153 of file quantum.cc.

References interpret_stringdata(), and RATIONAL_UNDEFINED.