forte2.orbitals.converters#
Module Contents#
- forte2.orbitals.converters.convert_coeff_spatial_to_spinor(C, complex=True)#
Convert spatial orbital MO coefficients to spinor(bital) MO coefficients
- Parameters:
- Clist of NDArray
The MO coefficients in spatial orbital basis.
- complexbool, optional, default=True
Whether to cast to complex dtype.
- Returns:
- list of NDArray
The MO coefficients in spinor(bital) basis.
- forte2.orbitals.converters.list_spatial_to_spinor(lst)#
Convert a list of spatial orbital objects to a list of spinor orbital objects by either duplicating each element (RHF/ROHF case) or interleaving two lists (UHF case).
- Parameters:
- lstlist of list of objects
A list of lists of spatial orbital objects. The outer list is over spin (length 1 for RHF/ROHF, length 2 for UHF), and the inner lists are over nmos.
- Returns:
- list[list]
A list of spinor orbital objects.
- class forte2.orbitals.converters.SpinorUpcaster#
Bases:
forte2.base_classes.mixins.MOsMixin,forte2.base_classes.mixins.SystemMixinA converter class to convert a spatial-orbital-based method to a spinor-based method by converting the MO coefficients to spinor basis and updating the system object.
- Parameters:
- x2c_type_overridestr | None, optional
The type of X2C Hamiltonian to use. Must be either ‘so’ (spin-orbit) or ‘sf’ (spin-free). If provided, System.x2c_type will be overwritten by this value. If None, the X2C type will be determined by the System object.
- snso_type_overridestr | None, optional
The type of SNSO correction to use. Must be one of ‘boettger’, ‘dc’, ‘dcb’, or ‘row-dependent’. If provided, System.snso_type will be overwritten by this value. If None, the SNSO type will be determined by the System object.
- apply_random_phasebool, optional, default=False
Whether to apply a random phase to the MO coefficients after conversion. This can be useful for testing the robustness of downstream methods to the choice of MO phases.
- rngnp.random.Generator or int, optional, default=np.random.default_rng()
The random number generator to use for generating the random phase. Can be an instance of np.random.Generator or an integer seed.
- x2c_type_override: str | None = None#
- snso_type_override: str | None = None#
- apply_random_phase: bool = False#
- rng: numpy.random.Generator | int#
- executed: bool = False#
- run()#