scine_autocas.autocas_utils.large_active_spaces

A handler for large active space protocol.

This module implements the LargeSpaces class, which handles all variables and functionalities required for the large active space protocol.

Classes

LargeSpaces([settings_dict])

A Class to store information and handle functionalities for the large active space protocol.

class scine_autocas.autocas_utils.large_active_spaces.LargeSpaces(settings_dict=None)[source]

A Class to store information and handle functionalities for the large active space protocol.

The large active space protocol enables active space searches in initial actives space with more than 200 orbitals. It divides the orbital space into an occupied and virtual sub space. These spaces are separated into many smaller subspaces. Afterwards all occupied subspaces are recombined with all virtual subspaces, hence creating more, but smaller, active space. All active spaces are evaluated by an “initial” DMRG calculation, to calculate the single orbital entropies. These entropies are then recombined, to approximate the single orbital entropies from the full initial cas. The “final” active space is then constructed from the approximated s1.

__slots__ = ('seed', 'max_orbitals', 'n_orbitals', 'n_electrons', 'orbital_indices', 'occupation', 'average_entanglement')
__init__(settings_dict=None)[source]

Construct the LargeSpaces object.

A LargeSpaces object stores all relevant data and provides routines to divide spaces into occupied and virtual as well as into sub spaces and the recombination of these subspaces.

Parameters
settings_dictDict[str, Any], optional

a dict, usually provided by the input_handler, which stores attributes and corresponding values

See also

settings_dict

InputHandler

seed: Optional[int]

sets the seed for np.random. Should not be modified.

max_orbitals: int

maximum number of orbitals per active space. Active spaces contain the same number of orbitals.

n_orbitals: List[int]

contains number of orbitals per sub-CAS

n_electrons: List[int]

contains number of electrons per sub-CAS

orbital_indices: List[List[int]]

a List that contains a List of orbital indices

__doc__ = 'A Class to store information and handle functionalities for the large\n    active space protocol.\n\n    The large active space protocol enables active space searches in initial actives space with more\n    than 200 orbitals. It divides the orbital space into an occupied and virtual sub space.\n    These spaces are separated into many smaller subspaces. Afterwards all occupied subspaces are recombined\n    with all virtual subspaces, hence creating more, but smaller, active space. All active spaces are\n    evaluated by an "initial" DMRG calculation, to calculate the single orbital entropies. These entropies\n    are then recombined, to approximate the single orbital entropies from the full initial cas.\n    The "final" active space is then constructed from the approximated s1.\n\n    '
__module__ = 'scine_autocas.autocas_utils.large_active_spaces'
occupation: List[List[int]]

a List that contains a List of orbital occupations

average_entanglement: bool

Flag to average the entropies from all sub-CASs instead of taking the max value

_partition_space(orbital_indices)[source]

Create small active spaces within the valence space.

New active space are created by recombining all subspaces from occupied and virtual space.

Parameters
orbital_indicesList[int]

contains all indices which correspond to an orbital space, e.g. occupied or virtual

Returns
partial_orbital_indicesList[List[int]]

contains Lists which contains orbital indices from an orbital space, e.g. occupied or virtual

rtype

List[List[int]] ..

separate_space(cas, molecule)[source]

Separate the valence active space into occupied and virtual orbitals.

The information for the separation is provided by an ActiveSpace and Molecule object.

Parameters
casActiveSpace

an ActiveSpace object, which stores all active space related information

moleculeMolecule

a Molecule object, which stores all molecular system related information

Returns
occupied_orbitalsList[int]

contains all orbital indices which correspond to occupied orbtials

virtual_orbitalsList[int]

contains all orbital indices which correspond to virtual orbtials

rtype

Tuple[List[int], List[int]] ..

generate_spaces(occupied_orbitals, virtual_orbitals, molecule)[source]

Generate sub active space from a set of occupied and virtual orbital indices.

The provided indices are further devided into smaller lists, which are later recombined to generate many, small active spaces, from a set of occupied and virtual orbital indices.

Parameters
occupied_orbitalsList[int]

stores all indices, which represent occupied orbitals

virtual_orbitals: List[int]

stores all indices, which represent virtual orbitals

moleculeMolecule

handles all molecular information