scine_autocas.interfaces.molcas.molcas_hdf5_utils¶
Modify Molcas Hdf5 files.
This module implements a class to read and modify molcas input files. The modification of the orbital hdf5 file allows to change the order of orbitals, required for active space calculations, without using MOLCASs ‘alter’ keyword.
Classes
Class to handle the Molcas HDF5 files. |
- class scine_autocas.interfaces.molcas.molcas_hdf5_utils.MolcasHdf5Utils[source]¶
Class to handle the Molcas HDF5 files.
Attributes
self.nbas: np.ndarray
number of basis functions per symmetry
self.irrep_labels: np.ndarray
name of the symmetries
self.natoms: int = 0
number of atoms
self.module: str = “”
name of the Molcas module
self.orbital_type: str = “”
type of orbitals
# Datasets
self.type_indices: np.ndarray
molcas typeindex for each orbital
self.mo_energies: List[float] = []
array with MO energies ordered first by symmetry, then by energy
# extracted from hdf5 file
self.occupations: List[int] = []
contains the occupation of each orbital, e.g. 0: virtual, 1: singly occupied (uhf), 2: doubly occupied (rhf)
self.symmetries: List[int] = []
contains the symmetry index of each orbtial
self.energy: Union[np.ndarray, float] = 0
contains the energy for every state
- __slots__ = ['nbas', 'irrep_labels', 'natoms', 'module', 'orbital_type', 'type_indices', 'mo_energies', 'occupations', 'symmetries', 'energy']¶
- nbas: numpy.ndarray¶
number of basis functions per symmetry
- irrep_labels: numpy.ndarray¶
name of the symmetries
- type_indices: numpy.ndarray¶
molcas typeindex for each orbital
- __doc__ = 'Class to handle the Molcas HDF5 files.\n\n Attributes\n ----------\n self.nbas: np.ndarray\n number of basis functions per symmetry\n self.irrep_labels: np.ndarray\n name of the symmetries\n self.natoms: int = 0\n number of atoms\n self.module: str = ""\n name of the Molcas module\n self.orbital_type: str = ""\n type of orbitals\n # Datasets\n self.type_indices: np.ndarray\n molcas typeindex for each orbital\n self.mo_energies: List[float] = []\n array with MO energies ordered first by symmetry, then by energy\n # extracted from hdf5 file\n self.occupations: List[int] = []\n contains the occupation of each orbital,\n e.g. 0: virtual, 1: singly occupied (uhf), 2: doubly occupied (rhf)\n self.symmetries: List[int] = []\n contains the symmetry index of each orbtial\n self.energy: Union[np.ndarray, float] = 0\n contains the energy for every state\n '¶
- __module__ = 'scine_autocas.interfaces.molcas.molcas_hdf5_utils'¶
- occupations: List[int]¶
contains the occupation of each orbital, e.g. 0: virtual, 1: singly occupied (uhf), 2: doubly occupied (rhf)
- energy: Union[numpy.ndarray, float]¶
contains the energy for every state
- modify_hdf5(hdf5_file, cas_orbitals)[source]¶
Modify the Molcas orbital file, to enable typeindices in Molcas.
The active space is encoded in the hdf5 file.
- Parameters
- hdf5_filestr
name of the orbital file to modify
- cas_orbitalsList[int]
orbital indices corresponding to orbitals in active space
- Raises
- KeyError
if no typeindices are found in the hdf5 file.