29#include <util/misc/scexception.h>
31#ifndef _chemistry_qc_mbptr12_spin_h
32#define _chemistry_qc_mbptr12_spin_h
36 typedef enum { NSpinCases1 = 2, NSpinCases2 = 3} NSpinCases;
37 typedef enum { NPureSpinCases2 = 2 } NPureSpinCases;
44 enum { ToLowerCase =
true,
45 ToUpperCase =
false };
50 typedef enum { AnySpinCase1 = -1, Alpha = 0, Beta = 1, InvalidSpinCase1 = 2} SpinCase1;
51 typedef enum { AnySpinCase2 = -1, AlphaBeta = 0, AlphaAlpha = 1, BetaBeta = 2, InvalidSpinCase2 = 3} SpinCase2;
52 typedef enum { AnyPureSpinCase2 = -1, Singlet = 0, Triplet = 1, InvalidPureSpinCase2 = 2} PureSpinCase2;
58 SpinCase2
case12(SpinCase1 S1, SpinCase1 S2);
62 std::string to_string(SpinCase1 S);
63 std::string to_string(SpinCase2 S);
64 std::string to_string(PureSpinCase2 S);
65 SpinCase1 to_spincase1(
const std::string& key);
66 SpinCase2 to_spincase2(
const std::string& key);
67 PureSpinCase2 to_purespincase2(
const std::string& key);
70 std::string
prepend_spincase(SpinCase1 S,
const std::string& R,
bool lowercase =
false);
72 std::string
prepend_spincase(SpinCase2 S,
const std::string& R,
bool lowercase =
false);
74 std::string
prepend_spincase(PureSpinCase2 S,
const std::string& R,
bool lowercase =
false);
SpinCase1 case2(SpinCase2 S)
returns the second spin case of the 2-spin S
SpinCase1 case1(SpinCase2 S)
returns the first spin case of the 2-spin S
SpinCase1 other(SpinCase1 S)
given 1-spin return the other 1-spin
SpinCase2 case12(SpinCase1 S1, SpinCase1 S2)
combines 2 spins to give 1 2-spin
std::string prepend_spincase(SpinCase1 S, const std::string &R, bool lowercase=false)
Prepend string representation of S to R and return.
Contains all MPQC code up to version 3.
Definition mpqcin.h:14
unsigned int npurespincases2()
Returns the number of pure 2 spin cases.
unsigned int nspincases2(bool spin_polarized)
Returns the number of unique combinations of 2 spin cases (1 or 3)
unsigned int nspincases1(bool spin_polarized)
Returns the number of unique spin cases (1 or 2)