ergo
|
#include "basisinfo.h"
Go to the source code of this file.
Classes | |
struct | matrix_description_struct |
Functions | |
int | ddf_writeShellListAndDensityMatricesToFile (const BasisInfoStruct *basisInfo, int noOfDensityMatrices, ergo_real **densityMatrixList, const char *fileName) |
int | ddf_writeShellListAndDensityMatricesToFile_sparse (const BasisInfoStruct *basisInfo, int noOfDensityMatrices, matrix_description_struct *densityMatrixList, const char *fileName) |
Writes basisInfo and sparse matrices in a format that can be later read by ddf_load_density. | |
int | ddf_load_density (const char *densityFileName, int noOfDensityMatrices, const IntegralInfo &integralInfo, BasisInfoStruct **basisInfo, ergo_real **densityMatrixList) |
Function opens fileName, fills in basisInfo (which has to be allocated and nullified), allocates densityMatrixList and reads density matrix or at most two matrices and puts it/them in densityMatrixList. | |
int | ddf_load_density_sparse (const char *densityFileName, const IntegralInfo &integralInfo, BasisInfoStruct **basisInfo, int *noOfDensitiesRead, int **rowindList, int **colindList, ergo_real **valuesList, long *nvaluesList) |
Function opens fileName, fills in basisInfo (which has to be allocated and nullified), allocates densityMatrixList and reads density matrix or at most two matrices and puts it/them in densityMatrixList. |
int ddf_load_density | ( | const char * | densityFileName, |
int | noOfDensityMatrices, | ||
const IntegralInfo & | integralInfo, | ||
BasisInfoStruct ** | basisInfo, | ||
ergo_real ** | densityMatrixList | ||
) |
Function opens fileName, fills in basisInfo (which has to be allocated and nullified), allocates densityMatrixList and reads density matrix or at most two matrices and puts it/them in densityMatrixList.
References do_output(), LOG_CAT_INFO, LOG_AREA_MAIN, ddf_load_density_getSizes(), LOG_CAT_ERROR, ergo_new, and ddf_read_shells_and_density_matrices().
Referenced by main(), ErgoE2Evaluator::transform(), es_getexc(), es_get_polarisability(), and load_density_and_project_full().
int ddf_load_density_sparse | ( | const char * | densityFileName, |
const IntegralInfo & | integralInfo, | ||
BasisInfoStruct ** | basisInfo, | ||
int * | noOfDensitiesRead, | ||
int ** | rowindList, | ||
int ** | colindList, | ||
ergo_real ** | valuesList, | ||
long * | nvaluesList | ||
) |
Function opens fileName, fills in basisInfo (which has to be allocated and nullified), allocates densityMatrixList and reads density matrix or at most two matrices and puts it/them in densityMatrixList.
References do_output(), LOG_CAT_INFO, LOG_AREA_MAIN, ddf_load_density_getSizes(), LOG_CAT_ERROR, and ddf_read_shells_and_density_matrices_sparse().
Referenced by load_density_and_project_sparse().
int ddf_writeShellListAndDensityMatricesToFile | ( | const BasisInfoStruct * | basisInfo, |
int | noOfDensityMatrices, | ||
ergo_real ** | densityMatrixList, | ||
const char * | fileName | ||
) |
References BasisInfoStruct::noOfBasisFuncs, BasisInfoStruct::noOfShells, do_output(), LOG_CAT_ERROR, LOG_AREA_MAIN, ddf_get_matrix_storage_size(), MATRIX_STORAGE_TYPE_TRIANGLE, MATRIX_STORAGE_TYPE_VECTORS, LOG_CAT_INFO, densityFileHeaderStruct::densityFileVersion, DENSITY_FILE_VERSION_NUMBER, densityFileHeaderStruct::typeOfMatrixStorage, densityFileHeaderStruct::noOfShells, densityFileHeaderStruct::noOfBasisFuncs, densityFileHeaderStruct::noOfDensityMatrices, densityFileHeaderStruct::padding_int, densityFileHeaderStruct::matrixSize_1, densityFileHeaderStruct::matrixSize_2, densityFileHeaderStruct::fileSizeInBytes, ergo_malloc(), BasisInfoStruct::shellList, ddf_store_matrix(), and ergo_free().
Referenced by save_symmetric_matrix().
int ddf_writeShellListAndDensityMatricesToFile_sparse | ( | const BasisInfoStruct * | basisInfo, |
int | noOfDensityMatrices, | ||
matrix_description_struct * | densityMatrixList, | ||
const char * | fileName | ||
) |
Writes basisInfo and sparse matrices in a format that can be later read by ddf_load_density.
Data loss was observed with large files on AFS, we do extra verification to detect it early on...
References BasisInfoStruct::noOfBasisFuncs, do_output(), LOG_CAT_INFO, LOG_AREA_MAIN, BasisInfoStruct::noOfShells, LOG_CAT_ERROR, ddf_get_matrix_storage_size_sparse(), MATRIX_STORAGE_TYPE_TRIANGLE, MATRIX_STORAGE_TYPE_VECTORS, densityFileHeaderStruct::densityFileVersion, DENSITY_FILE_VERSION_NUMBER, densityFileHeaderStruct::typeOfMatrixStorage, densityFileHeaderStruct::noOfShells, densityFileHeaderStruct::noOfBasisFuncs, densityFileHeaderStruct::noOfDensityMatrices, densityFileHeaderStruct::padding_int, densityFileHeaderStruct::matrixSize_1, densityFileHeaderStruct::matrixSize_2, densityFileHeaderStruct::fileSizeInBytes, ergo_malloc(), BasisInfoStruct::shellList, ddf_store_matrix_sparse(), fileno(), and ergo_free().
Referenced by SCF_restricted::write_density_to_file(), and SCF_unrestricted::write_density_to_file().