FCIDump
QfFCIDump
struct QfFCIDump
An electronic structure Hamiltonian in FCIDump format.
Definition
The FCIDump format was originally defined by Knowles and Handy, 1989 [1]. It is a widespread format for exporting electronic structure Hamiltonians in a plain-text file.
The present data structure only stores the information relevant for constructing the second quantized operator. However, this implementation goes beyond the original definition by supporting unrestricted spin data to be loaded. The table below outlines how integrals are associated with spin species based on the intervals in which the indices fall (assuming a header with NORB=n):
Integral Type | i | j | k | l |
|---|---|---|---|---|
| Constant | ||||
| 1-body alpha | ||||
| 1-body beta | ||||
| 2-body alpha-alpha | ||||
| 2-body alpha-beta | ||||
| 2-body beta-beta |
The only required values are the 1-body alpha-spin integrals.
[1]
-
- Knowles and N. C. Handy, Computer Physics Communications 54 (1989) 75-83.
Members
qf_fcidump_from_file
QfFCIDump *qf_fcidump_from_file(char *file_path)
Parses an FCIDump file.
Example
Assuming you have an FCIDump file called molecule.fcidump, you use this function like so:
1QfFCIDump *fcidump = qf_fcidump_from_file("molecule.fcidump");Parameters
- file_path – The path to the FCIDump file.
Returns
A pointer to the FCIDump data structure.
qf_fcidump_free
void qf_fcidump_free(QfFCIDump *fcidump)
Frees an existing FCIDump data structure.
Example
1QfFCIDump *fcidump = qf_fcidump_from_file("molecule.fcidump");
2qf_fcidump_free(fcidump);Parameters
- fcidump – A pointer to the FCIDump data structure to be freed.
qf_fcidump_norb
uint32_t qf_fcidump_norb(const QfFCIDump *fcidump)
Gets the number of orbitals from an FCIDump.
This number, , is extracted from the NORB=n field in the header of the FCIDump file.
Example
1QfFCIDump *fcidump = qf_fcidump_from_file("molecule.fcidump");
2uint32_t norb = qf_fcidump_norb(fcidump);Parameters
- fcidump – A pointer to the FCIDump data structure to be freed.
Returns
The number of orbitals.
qf_fcidump_nelec
uint32_t qf_fcidump_nelec(const QfFCIDump *fcidump)
Gets the number of electrons from an FCIDump.
This number, , is extracted from the NELEC=n field in the header of the FCIDump file.
Example
1QfFCIDump *fcidump = qf_fcidump_from_file("molecule.fcidump");
2uint32_t nelec = qf_fcidump_nelec(fcidump);Parameters
- fcidump – A pointer to the FCIDump data structure to be freed.
Returns
The number of electrons.
qf_fcidump_ms2
uint32_t qf_fcidump_ms2(const QfFCIDump *fcidump)
Gets the spin quantum number from an FCIDump.
This number, , is extracted from the MS2=S field in the header of the FCIDump file.
Example
1QfFCIDump *fcidump = qf_fcidump_from_file("molecule.fcidump");
2uint32_t ms2 = qf_fcidump_ms2(fcidump);Parameters
- fcidump – A pointer to the FCIDump data structure to be freed.
Returns
The spin quantum number (multiplied by 2 to ensure an integer value).
Conversion
Operator representations which can be constructed from an instance of QfFCIDump provide a qf_*_from_fcidump function:
qf_ferm_op_from_fcidump
QfFermionOperator *qf_ferm_op_from_fcidump(const QfFCIDump *fcidump)
Constructs an :c:struct:QfFermionOperator from a :c:struct:QfFCIDump.
Example
1QfFCIDump *fcidump = qf_fcidump_from_file("molecule.fcidump");
2QfFermionOperator *op = qf_ferm_op_from_fcidump(fcidump);Parameters
- fcidump – A pointer to the FCIDump data structure.
Returns
A pointer to the created operator.