scine_autocas.interfaces.qcmaquis.qcmaquis_hdf5_utils

Module to read and store qcmaquis measurements

This module implements a class to read measurements from the qcmaquis hdf5 output file and stores these measurements in a Datasets object.

Classes

Hdf5Converter()

Class to handle QCMaquis HDF5 file.

class scine_autocas.interfaces.qcmaquis.qcmaquis_hdf5_utils.Hdf5Converter[source]

Class to handle QCMaquis HDF5 file.

Reads the HDF5 file, generates one orbital RDMs from corresponding measurements.

Attributes

L

(int) the number of orbitals in the active space

energy

(float) energy of the dmrg calculation

symmetry

(str) symmetry used in the dmrg calculation

orbital_order

(Optional[np.ndarray]) order of the orbitals, if changed by fiedler ordering

results_file

(str) path to the hdf5 file

data

(Datasets) stores all measurements from qcmaquis

__slots__ = ['L', 'energy', 'symmetry', 'orbital_order', 'data', 'result_file']
__init__()[source]

Construct class.

L: int

number of orbitals in CAS

energy: float

DMRG energy

symmetry: str

symmetry used in the DMRG calculation

orbital_order: Optional[numpy.ndarray]

orbital order from the DMRG calculation

result_file: str

name of the HDF5 file

data: scine_autocas.interfaces.qcmaquis.qcmaquis_hdf5_dataset.Datasets
__doc__ = 'Class to handle QCMaquis HDF5 file.\n\n    Reads the HDF5 file, generates one orbital RDMs from corresponding\n    measurements.\n\n    Attributes\n    ----------\n    L : int\n        the number of orbitals in the active space\n    energy : float\n        energy of the dmrg calculation\n    symmetry : str\n        symmetry used in the dmrg calculation\n    orbital_order : Optional[np.ndarray]\n        order of the orbitals, if changed by fiedler ordering\n    results_file : str\n        path to the hdf5 file\n    data : Datasets\n        stores all measurements from qcmaquis\n    '
__module__ = 'scine_autocas.interfaces.qcmaquis.qcmaquis_hdf5_utils'
__get_labels(hdf5_label_vector)

Convert labels from HDF5 file into correct format.

example string ( 12 ) – ( 19 )

Parameters
hdf5_label_vectorList[str]

contains the label strings from HDF5 file

Returns
label_vectorList[Tuple[int]]

contains the labels as indices

rtype

List[Tuple[int, int]] ..

__mat_measurement(label_vector, value_vector)

Build a matrix from a label_vector and a value_vector.

Parameters
label_vectorList[Tuple[int]]

contains the converted labels from a measurement

value_vectornp.ndarray

contains the values from a measurement

Returns
matrixnp.ndarray

the full, ordered matrix of the corresponding measurement

rtype

ndarray ..

__mat_merge_transpose(label_vector_1, value_vector_1, label_vector_2, value_vector_2)

Build merged matrix from two measurements and corresponding label vectors.

Parameters
label_vector_1List[Tuple[int]]

converted labels for the first measurement

value_vector_1np.ndarray

contains the values from the first measurement

label_vector_2List[Tuple[int]]

converted labels for the second measurement

value_vector_2np.ndarray

contains the values from the second measurement

Returns
matrixnp.ndarray

the full, ordered, merged matrix of the measurements

rtype

ndarray ..

read_hdf5(file_name=None)[source]

Read measurements form the QCMaquis HDF5 file.

Parameters
file_namestr, optional

name of the HDF5 file

Returns
dataDatasets

contains all measurements as ordered vectors/matrices

rtype

Datasets ..