tblite
Light-weight tight-binding framework
Loading...
Searching...
No Matches
result.h File Reference

Provides a storage container tblite_result for all persistent quantities produced in a calculation by tblite_get_singlepoint. The data stored in tblite_result can be used as restart data for subsequent calculations. More...

Go to the source code of this file.

Typedefs

typedef struct _tblite_result * tblite_result
 Container to for storing and handling calculation results.
 

Functions

TBLITE_API_ENTRY tblite_result TBLITE_API_CALL tblite_new_result (void)
 
TBLITE_API_ENTRY tblite_result TBLITE_API_CALL tblite_copy_result (tblite_result res)
 
TBLITE_API_ENTRY void TBLITE_API_CALL tblite_delete_result (tblite_result *res)
 
TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_number_of_atoms (tblite_error error, tblite_result res, int *nat)
 
TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_number_of_shells (tblite_error error, tblite_result res, int *nsh)
 
TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_number_of_orbitals (tblite_error error, tblite_result res, int *nao)
 
TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_number_of_spins (tblite_error error, tblite_result res, int *nspin)
 
TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_energy (tblite_error error, tblite_result res, double *energy)
 
TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_energies (tblite_error error, tblite_result res, double *energies)
 
TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_gradient (tblite_error error, tblite_result res, double *gradient)
 
TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_virial (tblite_error error, tblite_result res, double *sigma)
 
TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_charges (tblite_error error, tblite_result res, double *charges)
 
TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_bond_orders (tblite_error error, tblite_result res, double *mbo)
 
TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_dipole (tblite_error error, tblite_result res, double dipole[3])
 
TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_quadrupole (tblite_error error, tblite_result res, double quadrupole[6])
 
TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_orbital_energies (tblite_error error, tblite_result res, double *emo)
 
TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_orbital_occupations (tblite_error error, tblite_result res, double *occ)
 
TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_orbital_coefficients (tblite_error error, tblite_result res, double *cmat)
 
TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_density_matrix (tblite_error error, tblite_result res, double *pmat)
 
TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_overlap_matrix (tblite_error error, tblite_result res, double *smat)
 
TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_hamiltonian_matrix (tblite_error error, tblite_result res, double *hmat)
 
TBLITE_API_ENTRY tblite_double_dictionary TBLITE_API_CALL tblite_get_post_processing_dict (tblite_error error, tblite_result res)
 

Detailed Description

Provides a storage container tblite_result for all persistent quantities produced in a calculation by tblite_get_singlepoint. The data stored in tblite_result can be used as restart data for subsequent calculations.

The individual entries of the tblite_result container can be queried and retrieved. For some quantities, like the count of the shells and orbitals duplicated queries are implemented to allow the usage of the tblite_result container without requiring access to the tblite_calculator which produced it.

Function Documentation

◆ tblite_copy_result()

Create new result container from existing container

Parameters
resExisting result container
Returns
Copy of the results in a new container

◆ tblite_delete_result()

TBLITE_API_ENTRY void TBLITE_API_CALL tblite_delete_result ( tblite_result * res)

Delete a calculation environment object

Parameters
resResult container

◆ tblite_get_post_processing_dict()

TBLITE_API_ENTRY tblite_double_dictionary TBLITE_API_CALL tblite_get_post_processing_dict ( tblite_error error,
tblite_result res )

Retrieve Hamiltonian matrix from result container

Parameters
errorHandle for error messages
resResult container
dictPointer to dictionary object

◆ tblite_get_result_bond_orders()

TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_bond_orders ( tblite_error error,
tblite_result res,
double * mbo )

Retrieve bond orders from result container

Parameters
errorHandle for error messages
resResult container
mboBond orders, shape [nat][nat]

◆ tblite_get_result_charges()

TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_charges ( tblite_error error,
tblite_result res,
double * charges )

Retrieve atomic charges from result container

Parameters
errorHandle for error messages
resResult container
chargesAtomic partial charges, shape [nat]

◆ tblite_get_result_density_matrix()

TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_density_matrix ( tblite_error error,
tblite_result res,
double * pmat )

Retrieve density matrix from result container

Parameters
errorHandle for error messages
resResult container
pmatDensity matrix, shape [nspin][nao][nao]

◆ tblite_get_result_dipole()

TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_dipole ( tblite_error error,
tblite_result res,
double dipole[3] )

Retrieve dipole moment from result container (order x, y, z)

Parameters
errorHandle for error messages
resResult container
dipoleTotal dipole moment, shape [3]

◆ tblite_get_result_energies()

TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_energies ( tblite_error error,
tblite_result res,
double * energies )

Retrieve atom-resolved energies from result container

Parameters
errorHandle for error messages
resResult container
energiesAtom-resolved energies, shape [nat]

◆ tblite_get_result_energy()

TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_energy ( tblite_error error,
tblite_result res,
double * energy )

Retrieve energy from result container

Parameters
errorHandle for error messages
resResult container
energyTotal energy

◆ tblite_get_result_gradient()

TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_gradient ( tblite_error error,
tblite_result res,
double * gradient )

Retrieve gradient from result container

Parameters
errorHandle for error messages
resResult container
gradientCartesian gradient, shape [nat][3]

◆ tblite_get_result_hamiltonian_matrix()

TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_hamiltonian_matrix ( tblite_error error,
tblite_result res,
double * hmat )

Retrieve Hamiltonian matrix from result container

Parameters
errorHandle for error messages
resResult container
hmatHamiltonian matrix, shape [nao][nao]

◆ tblite_get_result_number_of_atoms()

TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_number_of_atoms ( tblite_error error,
tblite_result res,
int * nat )

Retrieve number of atoms from result container

Parameters
errorHandle for error messages
resResult container
natNumber of atoms

◆ tblite_get_result_number_of_orbitals()

TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_number_of_orbitals ( tblite_error error,
tblite_result res,
int * nao )

Retrieve number of orbitals from result container

Parameters
errorHandle for error messages
resResult container
naoNumber of orbitals

◆ tblite_get_result_number_of_shells()

TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_number_of_shells ( tblite_error error,
tblite_result res,
int * nsh )

Retrieve number of shells from result container

Parameters
errorHandle for error messages
resResult container
nshNumber of shells

◆ tblite_get_result_number_of_spins()

TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_number_of_spins ( tblite_error error,
tblite_result res,
int * nspin )

Retrieve number of spins from result container

Parameters
errorHandle for error messages
resResult container
nspinNumber of spins

◆ tblite_get_result_orbital_coefficients()

TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_orbital_coefficients ( tblite_error error,
tblite_result res,
double * cmat )

Retrieve orbital coefficients from result container

Parameters
errorHandle for error messages
resResult container
cmatOrbital coefficient matrix, shape [nspin][nao][nao]

◆ tblite_get_result_orbital_energies()

TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_orbital_energies ( tblite_error error,
tblite_result res,
double * emo )

Retrieve orbital energies from result container

Parameters
errorHandle for error messages
resResult container
emoEigenvalues for each orbital

◆ tblite_get_result_orbital_occupations()

TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_orbital_occupations ( tblite_error error,
tblite_result res,
double * occ )

Retrieve orbital occupations from result container

Parameters
errorHandle for error messages
resResult container
occOccupation numbers for each orbital

◆ tblite_get_result_overlap_matrix()

TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_overlap_matrix ( tblite_error error,
tblite_result res,
double * smat )

Retrieve overlap matrix from result container

Parameters
errorHandle for error messages
resResult container
smatOverlap matrix, shape [nao][nao]

◆ tblite_get_result_quadrupole()

TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_quadrupole ( tblite_error error,
tblite_result res,
double quadrupole[6] )

Retrieve traceless quadrupole moment from result container (packed xx, xy, yy, xz, yz, zz)

Parameters
errorHandle for error messages
resResult container
quadrupoleTotal traceless quadrupole moment, shape [6]

◆ tblite_get_result_virial()

TBLITE_API_ENTRY void TBLITE_API_CALL tblite_get_result_virial ( tblite_error error,
tblite_result res,
double * sigma )

Retrieve virial from result container

Parameters
errorHandle for error messages
resResult container
sigmaStrain derivatives, shape [3][3]

◆ tblite_new_result()

TBLITE_API_ENTRY tblite_result TBLITE_API_CALL tblite_new_result ( void )

Create new result container

Returns
New result container