forte2.state.state#
Module Contents#
- class forte2.state.state.State#
Class to represent a state of a quantum system.
- Parameters:
- multiplicityint, required for non-relativisitic states.
Multiplicity of the state (2S+1).
- msfloat, required for non-relativisitic states.
Spin projection (Ms) of the state.
- nelint, optional
Total number of electrons in the state. If not provided, it is calculated from the system and charge.
- systemSystem, optional
The system to which this state belongs. If not provided, nel must be specified.
- chargeint, optional, default=0
Charge of the state. Used to calculate the number of electrons if system is provided. Ignored if nel is provided.
- irrepint, optional
Irreducible representation of the state in Cotton ordering.
- gas_minlist[int], optional, default=[]
Minimum number of electrons in each GAS. If not provided, no occupation restrictions will be applied. If the length of gas_min is smaller than the number of GASes, the restrictions will be sequentially applied to GAS1, GAS2, until the end of gas_min, beyond which no restrictions will be applied.
- gas_maxlist[int], optional, default=[]
Maximum number of electrons in each GAS. Processed similarly to gas_min.
- symmetry: int, optional, default=0
Symmetry of the state.
- symmetry_label: str, optional, default=None
Label for the symmetry of the state.
- multiplicity: int#
- ms: float#
- nel: int = None#
- system: forte2.system.System = None#
- charge: int = 0#
- gas_min: list[int] = []#
- gas_max: list[int] = []#
- symmetry: int = 0#
- symmetry_label: str = None#
- na: int#
- nb: int#
- twice_ms: int#
- multiplicity_label() str#
Return the label for the multiplicity of the state.
- str_minimum() str#
Return a minimal string representation of the state.
- str_short() str#
Return a short string representation of the state.
- static get_ms_string(twice_ms: int) str#
Return a string representation of Ms based on its value.
- class forte2.state.state.RelState#
Bases:
StateA convenience class representing a relativistic electronic state. Multiplicity and ms are no longer required, but will be used for initial guesses if provided.
- multiplicity: int = None#
- ms: float = None#
- class forte2.state.state.StateAverageInfo#
A class to hold information about state averaging in multireference calculations.
- Parameters:
- stateslist[State] | State
A list of State objects or a single State object representing the electronic states. This also includes the gas_min and gas_max attributes.
- nrootslist[int] | int, optional, default=1
A list of integers specifying the number of roots for each state. If only one state is provided, this can be a single integer.
- weightslist[list[float]], optional
A list of lists of floats specifying the weights for each root in each state. These do not have to be normalized, but must be non-negative. If not provided, equal weights are assigned to each root.
- Attributes:
- ncisint
The number of CI states, which is the length of the states list.
- nroots_sumint
The total number of roots across all states.
- weights_flatNDArray
A flattened array of weights for all roots across all states.
- nroots: list[int] | int = 1#
- weights: list[list[float]] = None#
- pretty_print_sa_info()#
Pretty print the state averaging information.